/*
 * الحل الأمثل - KSA305.com
 * تصميم متجاوب 100% - جوال + تابلت + ديسكتوب
 */

/* ========== المتغيرات الأساسية ========== */
:root {
    --gold: #C9A227;
    --gold-dark: #a8801a;
    --green: #0B2E22;
    --green-light: #1a4731;
    --white: #ffffff;
    --bg: #faf8f1;
    --text: #1a1a1a;
    --border-radius: 16px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.1);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== الأساسيات ========== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; transition: var(--transition); }

/* ========== Container موحد ========== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* ========== Typography ========== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--green);
    margin-bottom: 0.5em;
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }

/* ========== أزرار ========== */
.btn, button, input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
}
.btn-primary, .fx-btn--primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--white);
    box-shadow: 0 6px 20px rgba(201, 162, 39, 0.3);
}
.btn-primary:hover, .fx-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(201, 162, 39, 0.4);
}
.btn-secondary, .fx-btn--secondary {
    background: transparent;
    color: var(--green);
    border: 2px solid var(--gold);
}
.btn-secondary:hover, .fx-btn--secondary:hover {
    background: var(--gold);
    color: var(--white);
}

/* ========== النماذج ========== */
input, textarea, select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e8e4d8;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    transition: var(--transition);
    background: var(--white);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.1);
}

/* ========== الصور ========== */
img { max-width: 100%; height: auto; }
.fx-img, .wp-block-image img, .elementor-widget-image img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========== الجداول ========== */
table {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    display: block;
}

/* ========== المحتوى النصي ========== */
.entry-content, .elementor-widget-container, .fx-content {
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}
.entry-content p, .elementor-widget-container p {
    margin-bottom: 1.2em;
    line-height: 1.8;
    font-size: clamp(15px, 2vw, 17px);
}
.entry-content img, .elementor-widget-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}
.entry-content h1, .entry-content h2, .entry-content h3 {
    margin-top: 1.5em;
    margin-bottom: 0.7em;
    color: var(--green);
}

/* ========== Header Navigation ========== */
.fx-header, header.elementor-location-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
    padding: 10px 0;
}
.fx-header-inner, .elementor-location-header .elementor-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0 20px;
}

/* Mobile menu toggle */
.fx-menu-toggle, .menu-toggle {
    display: none;
    background: var(--gold);
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
}

/* ========== Footer ========== */
.fx-footer, footer.elementor-location-footer {
    background: var(--green);
    color: var(--white);
    padding: 50px 0 20px;
}
.fx-footer a { color: rgba(255,255,255,0.85); }
.fx-footer a:hover { color: var(--gold); }

/* ========== Floating WhatsApp Button ========== */
.whatsapp-float, .joinchat {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
}
@media (max-width: 768px) {
    .whatsapp-float, .joinchat {
        bottom: 15px;
        left: 15px;
    }
}

/* ========== Responsive Grid ========== */
.fx-grid, .elementor-section .elementor-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* ========== Tablet (768px - 1024px) ========== */
@media (max-width: 1024px) and (min-width: 768px) {
    .container { padding: 0 30px; }
    h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
    .fx-hero-ctas, .elementor-element-12b12cc {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
    }
}

/* ========== Mobile (أقل من 768px) ========== */
@media (max-width: 768px) {
    .container { padding: 0 16px; }
    body { font-size: 15px; }

    /* Header للموبايل */
    .fx-header-inner, .elementor-location-header .elementor-section {
        flex-wrap: nowrap;
        padding: 8px 16px;
    }
    .fx-nav, .elementor-widget-nav-menu, .fx-header-nav {
        display: none !important;
    }
    .fx-nav.is-open, .elementor-widget-nav-menu.is-open {
        display: flex !important;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: 20px;
        box-shadow: var(--shadow-md);
    }
    .fx-menu-toggle, .menu-toggle {
        display: block;
    }
    .fx-logo-text-ar { font-size: 16px !important; }
    .fx-logo-text-en { font-size: 9px !important; }
    .fx-whatsapp-cta {
        padding: 8px 12px !important;
        font-size: 12px !important;
    }

    /* Hero Section */
    .fx-hero h1 {
        font-size: clamp(1.5rem, 6vw, 2.2rem) !important;
        text-align: center;
        line-height: 1.4;
    }
    .fx-hero-lead, .fx-hero-lead p {
        text-align: center;
        font-size: 14px !important;
    }
    .fx-hero-ctas {
        flex-direction: column;
        gap: 10px;
    }
    .fx-hero-ctas .fx-btn, .fx-btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 15px;
    }
    .fx-badge { text-align: center; }
    .elementor-element-12b12cc { text-align: center; }

    /* Stats / Features */
    .fx-stats, .elementor-element-255c6bd {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .fx-feature-card, .elementor-column {
        padding: 20px 15px;
    }
    .fx-feature-title { font-size: 16px; }

    /* Footer */
    .fx-foot-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }
    .fx-foot-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 14px;
    }
    .fx-foot { padding: 30px 16px 0; }
    .fx-foot-seo h2 { font-size: 13px !important; }
    .fx-foot-seo p { font-size: 11px !important; line-height: 1.9; }

    /* Section spacing */
    .fx-section, section {
        padding: 40px 0;
    }
    .fx-section h2 {
        font-size: 22px;
        margin-bottom: 30px;
        text-align: center;
    }

    /* Images full width */
    .fx-img, img {
        max-width: 100%;
        height: auto;
    }

    /* Hide decorative on mobile */
    .fx-hide-mobile { display: none !important; }
}

/* ========== Very Small Mobile (أقل من 480px) ========== */
@media (max-width: 480px) {
    .container { padding: 0 12px; }
    h1 { font-size: 1.6rem !important; }
    .fx-feature-card { padding: 18px 12px; }
    .fx-feature-title { font-size: 15px; }
    .fx-feature-desc { font-size: 13px; }
}

/* ========== Tablet & iPad (768px - 1024px) ========== */
@media (min-width: 768px) and (max-width: 1024px) {
    .container { padding: 0 30px; }
    .fx-hero-ctas { flex-wrap: wrap; gap: 15px; }
    .fx-hero-ctas .fx-btn { flex: 1 1 200px; }
    .fx-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ========== iPad Pro & Desktop ========== */
@media (min-width: 1024px) {
    .fx-hero-ctas { gap: 16px; }
}

/* ========== Ultra-wide screens ========== */
@media (min-width: 1600px) {
    .container { max-width: 1440px; }
}

/* ========== Print ========== */
@media print {
    .fx-header, .whatsapp-float, .joinchat { display: none !important; }
    body { background: white; color: black; }
}

/* ========== Accessibility ========== */
*:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========== Smooth transitions ========== */
* {
    -webkit-tap-highlight-color: transparent;
}
a, button {
    transition: var(--transition);
}

/* ========== Loading state ========== */
.fx-loading {
    opacity: 0.5;
    pointer-events: none;
}

/* ========== Form Validation ========== */
input:invalid, textarea:invalid {
    border-color: #e74c3c;
}
input:valid, textarea:valid {
    border-color: #27ae60;
}

/* ========== Print & mobile optimization ========== */
@media (prefers-color-scheme: dark) {
    /* Placeholder for dark mode */
}