/*
 * الحل الأمثل - KSA305.com
 * نظام الألوان الجديد: أزرق غامق + ذهبي
 */

/* ========== نظام الألوان الجديد ========== */
:root {
    --primary: #0A2540;
    --primary-light: #1E3A5F;
    --primary-dark: #061629;
    --gold: #D4AF37;
    --gold-light: #E5C158;
    --gold-dark: #B8941F;
    --white: #ffffff;
    --bg: #F5F7FA;
    --bg-dark: #E8ECF1;
    --text: #1A1A1A;
    --text-light: #4A5568;
    --text-muted: #718096;
    --border: #E2E8F0;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --shadow-sm: 0 1px 3px rgba(10, 37, 64, 0.08);
    --shadow-md: 0 4px 12px rgba(10, 37, 64, 0.1);
    --shadow-lg: 0 12px 32px rgba(10, 37, 64, 0.15);
    --shadow-xl: 0 25px 50px rgba(10, 37, 64, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 32px;
    --radius-full: 9999px;
}

/* ========== Override الستايل القديم ========== */
:root {
    --gold: #D4AF37;
    --gold-dark: #B8941F;
    --green: #0A2540;
    --green-light: #1E3A5F;
    --bg: #F5F7FA;
    --text: #1A1A1A;
}

/* ========== Body & Typography ========== */
* { 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); }
a:hover { color: var(--gold-dark); }

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--primary);
    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); }
p { margin-bottom: 1em; }

/* ========== الأزرار ========== */
.btn, button, input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-full);
    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(212, 175, 55, 0.35);
}
.btn-primary:hover, .fx-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
    color: var(--white);
}
.btn-secondary, .fx-btn--secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--gold);
}
.btn-secondary:hover, .fx-btn--secondary:hover {
    background: var(--gold);
    color: var(--white);
}

/* ========== Header ========== */
.fx-header, header.elementor-location-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    padding: 12px 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;
}

/* ========== Hero Section ========== */
.fx-hero, .fx-cta-band {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 60px 20px;
    position: relative;
    overflow: hidden;
}
.fx-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.fx-hero h1 {
    color: var(--white);
    font-weight: 900;
}
.fx-hero h1 span, .fx-hero .highlight {
    color: var(--gold);
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}
.fx-hero-lead {
    color: rgba(255,255,255,0.9);
    font-size: clamp(15px, 2vw, 18px);
}

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

/* ========== Footer ========== */
.fx-footer, footer.elementor-location-footer {
    background: var(--primary);
    color: var(--white);
    padding: 60px 0 25px;
}
.fx-footer a {
    color: rgba(255,255,255,0.85);
    transition: var(--transition);
}
.fx-footer a:hover {
    color: var(--gold);
}
.fx-foot-seo h2 { color: var(--gold); }
.fx-foot-seo p { color: rgba(255,255,255,0.8); }

/* ========== CTA Banner ========== */
.fx-cta-band {
    background: var(--primary);
}
.fx-cta-band h2 { color: var(--white); }
.fx-cta-band p { color: rgba(255,255,255,0.85); }
.fx-cta-band .fx-container {
    background: linear-gradient(135deg, var(--primary-light), var(--primary)) !important;
    border: 1px solid rgba(212, 175, 55, 0.2) !important;
}

/* ========== Feature Cards ========== */
.fx-feature-card, .elementor-column {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 30px 25px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.fx-feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gold);
}
.fx-feature-icon {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark)) !important;
    color: var(--white);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.3);
}
.fx-feature-title { color: var(--primary); }

/* ========== Calculator Box ========== */
.fx-liq-inner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--primary-dark) 100%) !important;
    color: var(--white);
}

/* ========== WhatsApp Button ========== */
.joinchat__button {
    background: var(--gold) !important;
}
.joinchat__button:hover {
    background: var(--gold-light) !important;
    transform: scale(1.1);
}
.joinchat__tooltip {
    background: var(--primary) !important;
    color: var(--white) !important;
}

/* ========== CTA Band (Hero) ========== */
.elementor-element-12b12cc .elementor-button,
.fx-cta-band .fx-btn--primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark)) !important;
    color: var(--white) !important;
    border: none !important;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3) !important;
}

/* ========== Footer Logo ========== */
.afq-logo svg circle.afq-disc {
    fill: var(--primary) !important;
}
.afq-logo svg rect.afq-stem {
    fill: var(--white) !important;
}
.afq-logo svg rect.afq-hamza {
    fill: var(--gold) !important;
}
.afq-logo .afq-ar {
    color: var(--white) !important;
}
.afq-logo .afq-en {
    color: rgba(255,255,255,0.6) !important;
}

/* ========== Stats / Counters ========== */
.fx-stat-number, .elementor-counter-number {
    color: var(--gold) !important;
}
.fx-stat-label, .elementor-counter-title {
    color: var(--text-light) !important;
}

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

/* ========== Form Validation ========== */
input:invalid, textarea:invalid {
    border-color: var(--danger);
}
input:valid, textarea:valid {
    border-color: var(--success);
}

/* ========== Responsive ========== */
@media (max-width: 1024px) and (min-width: 768px) {
    .container { padding: 0 30px; }
    h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
}

@media (max-width: 768px) {
    .container { padding: 0 16px; }
    body { font-size: 15px; }

    .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;
    }
    .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; }
    .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; }
    .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; }
    .fx-section, section { padding: 40px 0; }
    .fx-section h2 {
        font-size: 22px;
        margin-bottom: 30px;
        text-align: center;
    }
    .fx-img, img {
        max-width: 100%;
        height: auto;
    }
    .fx-hide-mobile { display: none !important; }
}

@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; }
}

@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); }
}

@media (min-width: 1024px) {
    .fx-hero-ctas { gap: 16px; }
}

@media (min-width: 1600px) {
    .container { max-width: 1440px; }
}

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

*:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

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

/* ========== Animations ========== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.fx-hero, .fx-feature-card, .fx-stat {
    animation: fadeIn 0.6s ease-out;
}
.fx-feature-card:nth-child(2) { animation-delay: 0.1s; }
.fx-feature-card:nth-child(3) { animation-delay: 0.2s; }
.fx-feature-card:nth-child(4) { animation-delay: 0.3s; }