/**
 * GLOBAL HEADER FOUNDATION - AFAQ SMART TRACKING (آفاق التتبع الذكي)
 * Pure Enterprise Sass / Corporate Design System
 * Approved Afaq Palette: Petrol, Turquoise, Dark Turquoise, Silver Gray, Light Background, White
 * Contrast: white on petrol 15.5:1, petrol on turquoise 6.9:1, dark turquoise on white 4.1:1 (large text / UI only)
 */

:root {
    --afaq-petrol: #01273B;
    --afaq-turquoise: #0DC0C2;
    --afaq-turquoise-dark: #038B99;
    --afaq-silver: #A0A8B0;
    --afaq-light-bg: #F5F7F8;
    --afaq-white: #FFFFFF;
    --afaq-text: #17313D;
    --afaq-border: #E1E7EB;
    --afaq-shadow-sm: 0 1px 3px rgba(1, 39, 59, 0.05);
    --afaq-shadow-md: 0 4px 16px rgba(1, 39, 59, 0.06);
    --afaq-shadow-lg: 0 20px 48px -12px rgba(1, 39, 59, 0.12), 0 0 1px 1px rgba(1, 39, 59, 0.04);
    --afaq-font-family: 'Tajawal', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --afaq-header-height: 76px;
    --afaq-transition-timing: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base resets for Afaq Header to prevent parent theme clashes */
#site-header.afaq-global-header-wrapper {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background: var(--afaq-white);
    border-bottom: 1px solid var(--afaq-border);
    transition: background-color 220ms ease, box-shadow 220ms ease;
    box-sizing: border-box;
    padding: 0 !important;
    margin: 0 !important;
}

#site-header.afaq-global-header-wrapper.is-scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(1, 39, 59, 0.06);
}

.afaq-header-container {
    max-width: 1440px;
    margin: 0 auto;
    height: var(--afaq-header-height);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Direction inherited from header[dir]: rtl (Arabic) / ltr (English) */
    font-family: var(--afaq-font-family);
    box-sizing: border-box;
    position: relative;
}

/* ==================================================
   RIGHT: LOGO SECTION
   ================================================== */
.afaq-header-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    z-index: 10;
}

.afaq-brand-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 180ms ease;
    padding: 4px 0;
}

.afaq-brand-link:hover {
    opacity: 0.92;
}

.afaq-brand-logo {
    height: 52px;
    width: auto;
    max-width: 210px;
    object-fit: contain;
    display: block;
    border: none;
    background: transparent;
    vertical-align: middle;
}

/* ==================================================
   CENTER: MAIN NAVIGATION
   ================================================== */
.afaq-header-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    margin: 0 24px;
}

.afaq-nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 24px;
}

.afaq-nav-item {
    position: relative;
    display: flex;
    align-items: center;
}

.afaq-nav-link {
    display: inline-flex;
    align-items: center;
    color: var(--afaq-petrol);
    font-size: 15px;
    font-weight: 500;
    font-family: var(--afaq-font-family);
    text-decoration: none;
    padding: 8px 6px;
    position: relative;
    transition: color 200ms ease;
    white-space: nowrap;
    line-height: 1.5;
}

.afaq-nav-link:hover,
.afaq-nav-item.is-active > .afaq-nav-link,
.afaq-nav-item:hover > .afaq-nav-link {
    color: var(--afaq-turquoise-dark);
}

/* Subtle indicator bar on hover */
.afaq-nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 6px;
    left: 6px;
    height: 2px;
    background-color: var(--afaq-turquoise);
    border-radius: 2px;
    opacity: 0;
    transform: scaleX(0);
    transform-origin: right; /* grows from the reading start; LTR override below */
    transition: transform 200ms var(--afaq-transition-timing), opacity 200ms ease;
}

.afaq-nav-link:hover::after,
.afaq-nav-item.is-active > .afaq-nav-link::after,
.afaq-nav-item:hover > .afaq-nav-link::after {
    opacity: 1;
    transform: scaleX(1);
}

#site-header[dir="ltr"] .afaq-nav-link::after {
    transform-origin: left;
}

/* ==================================================
   ARROW NEXT TO "الحلول"
   ================================================== */
.afaq-nav-item-solutions > .afaq-nav-link {
    gap: 5px; /* Tight, balanced spacing between word and arrow */
}

/* Static so the mega menu panel anchors to .afaq-header-container, not to this narrow item */
.afaq-nav-item.afaq-nav-item-solutions {
    position: static;
}

/* Hover bridge from the link down to the header edge where the panel begins */
.afaq-nav-item-solutions > .afaq-nav-link::before {
    content: '';
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    height: 26px;
    background: transparent;
}

.afaq-chevron-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    color: var(--afaq-silver);
    transition: transform 220ms var(--afaq-transition-timing), color 200ms ease;
}

.afaq-chevron-arrow svg {
    width: 10px;
    height: 10px;
    display: block;
    stroke-width: 2.2;
}

.afaq-nav-item-solutions:hover .afaq-chevron-arrow,
.afaq-nav-item-solutions.is-open .afaq-chevron-arrow {
    color: var(--afaq-turquoise-dark);
    transform: rotate(180deg);
}

/* ==================================================
   PREMIUM MEGA MENU
   ================================================== */
.afaq-megamenu-panel {
    position: absolute;
    top: calc(100% + 2px);
    right: 50%;
    transform: translateX(50%) translateY(8px);
    width: min(1200px, calc(100vw - 32px));
    background: var(--afaq-white);
    border: 1px solid var(--afaq-border);
    border-radius: 18px;
    box-shadow: var(--afaq-shadow-lg);
    padding: 32px 36px 24px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 220ms var(--afaq-transition-timing),
                transform 220ms var(--afaq-transition-timing),
                visibility 220ms;
    z-index: 1000;
}

/* Mega menu hover/open state */
.afaq-nav-item-solutions:hover .afaq-megamenu-panel,
.afaq-nav-item-solutions.is-open .afaq-megamenu-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(50%) translateY(0);
}

/* Invisible bridge so mouse doesn't drop hover when moving from nav item to panel */
.afaq-megamenu-panel::before {
    content: '';
    position: absolute;
    top: -16px;
    left: 0;
    right: 0;
    height: 16px;
    background: transparent;
}

/* Mega Menu 4-Column Grid */
.afaq-megamenu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* Mega Menu Column Card */
.afaq-megamenu-col {
    display: flex;
    flex-direction: column;
    background: var(--afaq-light-bg);
    border: 1px solid var(--afaq-border);
    border-radius: 12px;
    padding: 20px 18px;
    transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
    box-sizing: border-box;
}

.afaq-megamenu-col:hover {
    border-color: var(--afaq-turquoise);
    box-shadow: 0 6px 18px rgba(1, 39, 59, 0.04);
    transform: translateY(-2px);
    background: var(--afaq-white);
}

/* Category Header */
.afaq-col-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--afaq-border);
}

.afaq-col-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--afaq-light-bg);
    color: var(--afaq-turquoise-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 200ms ease, color 200ms ease;
}

.afaq-megamenu-col:hover .afaq-col-icon {
    background: var(--afaq-turquoise-dark);
    color: var(--afaq-white);
}

.afaq-col-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--afaq-petrol);
    margin: 0;
    line-height: 1.35;
    font-family: var(--afaq-font-family);
}

/* Placeholder body for future approved solutions */
.afaq-col-placeholder {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 12px 6px;
}

/* Columns with solution links align to the top so all four groups line up. */
.afaq-col-placeholder:has(.afaq-col-links) {
    justify-content: flex-start;
}

.afaq-placeholder-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--afaq-light-bg);
    color: var(--afaq-text);
    font-size: 12px;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 6px;
    width: fit-content;
    margin-bottom: 8px;
}

.afaq-placeholder-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--afaq-turquoise);
    display: inline-block;
}

.afaq-placeholder-desc {
    font-size: 12px;
    color: var(--afaq-text);
    line-height: 1.5;
    margin: 0;
}

/* Links to completed solution pages inside a category column */
.afaq-col-links {
    list-style: none;
    margin: 4px 0 0;
    padding: 10px 6px 0;
    border-top: 1px solid var(--afaq-border);
}

.afaq-col-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--afaq-font-family);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--afaq-turquoise-dark);
    text-decoration: none;
    transition: color 200ms ease;
}

.afaq-col-link::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--afaq-turquoise);
    flex: 0 0 auto;
}

.afaq-col-link:hover,
.afaq-col-link:focus-visible {
    color: var(--afaq-petrol);
    text-decoration: underline;
}

/* Solution listed before its page is published: plain text, not a link. */
.afaq-col-link--pending,
.afaq-col-link--pending:hover,
.afaq-mobile-col-link.afaq-mobile-col-link--pending {
    color: var(--afaq-text);
    font-weight: 500;
    text-decoration: none;
    cursor: default;
}

.afaq-col-link--pending::before {
    background: var(--afaq-silver, #A0A8B0);
}

/* Mega Menu Bottom Enterprise Bar */
.afaq-megamenu-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--afaq-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--afaq-text);
}

.afaq-megamenu-footer-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--afaq-petrol);
    font-weight: 500;
}

.afaq-megamenu-footer-info svg {
    color: var(--afaq-turquoise-dark);
    flex-shrink: 0;
}

.afaq-megamenu-footer-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--afaq-turquoise-dark);
    font-weight: 600;
    text-decoration: none;
    transition: color 180ms ease, gap 180ms ease;
}

.afaq-megamenu-footer-cta:hover {
    color: var(--afaq-petrol);
    gap: 9px;
}

/* ==================================================
   LEFT: LANGUAGE SWITCHER + CTA BUTTON
   ================================================== */
.afaq-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
    z-index: 10;
}

/* Language Switcher */
.afaq-lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--afaq-light-bg);
    border: 1px solid var(--afaq-border);
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-family: var(--afaq-font-family);
    transition: border-color 180ms ease, background-color 180ms ease;
    cursor: pointer;
    user-select: none;
    text-decoration: none;
}

.afaq-lang-switcher:hover {
    border-color: var(--afaq-silver);
    background: var(--afaq-light-bg);
}

.afaq-lang-icon {
    width: 14px;
    height: 14px;
    color: var(--afaq-silver);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.afaq-lang-opt {
    color: var(--afaq-text);
    font-weight: 500;
    transition: color 180ms ease;
    text-decoration: none;
}

.afaq-lang-opt.is-current {
    color: var(--afaq-petrol);
    font-weight: 700;
}

.afaq-lang-opt:hover {
    color: var(--afaq-turquoise-dark);
}

.afaq-lang-sep {
    color: var(--afaq-silver);
    font-size: 12px;
}

/* Primary CTA Button */
.afaq-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--afaq-petrol);
    color: var(--afaq-white) !important;
    font-family: var(--afaq-font-family);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 10px;
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(1, 39, 59, 0.16);
    transition: transform 200ms var(--afaq-transition-timing),
                box-shadow 200ms var(--afaq-transition-timing),
                background-color 200ms ease;
}

.afaq-cta-btn:hover {
    background-color: var(--afaq-turquoise);
    color: var(--afaq-petrol) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(13, 192, 194, 0.28);
}

.afaq-cta-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(13, 192, 194, 0.2);
}

/* WhatsApp button (rendered only when the official number is configured). Secondary to the quote CTA:
   same height/radius, white surface, WhatsApp-green icon. */
#site-header .afaq-wa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
    min-height: 40px;
    padding: 9px 16px;
    color: var(--afaq-petrol);
    background: var(--afaq-white);
    border: 1px solid var(--afaq-border);
    border-radius: 10px;
    font-family: var(--afaq-font-family);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    text-decoration: none;
    transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

/* <button> variant (number not configured yet): neutralise theme/kit button styles. */
#site-header button.afaq-wa-btn {
    margin: 0;
    cursor: pointer;
    letter-spacing: normal;
    text-transform: none;
    box-shadow: none;
}

#site-header button.afaq-wa-btn:focus {
    color: var(--afaq-petrol);
    background: var(--afaq-white);
    border-color: var(--afaq-border);
}

#site-header button.afaq-wa-btn:hover,
#site-header button.afaq-wa-btn[aria-expanded="true"] {
    color: var(--afaq-petrol);
    background: #F0FBF4;
    border-color: #25D366;
}

.afaq-wa-wrap {
    position: relative;
    display: inline-flex;
}

/* "Available soon" note under the button */
.afaq-wa-note {
    position: absolute;
    top: calc(100% + 10px);
    inset-inline-end: 0;
    z-index: 20;
    width: max-content;
    max-width: min(280px, calc(100vw - 32px));
    padding: 9px 14px;
    color: var(--afaq-white);
    background: var(--afaq-petrol);
    border-radius: 8px;
    box-shadow: 0 10px 24px -8px rgba(1, 39, 59, 0.35);
    font-family: var(--afaq-font-family);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    white-space: normal;
    text-align: start;
}

.afaq-wa-note[hidden] {
    display: none;
}

#site-header .afaq-wa-btn-icon {
    flex-shrink: 0;
    color: #128C7E;
}

#site-header .afaq-wa-btn:hover {
    color: var(--afaq-petrol);
    background: #F0FBF4;
    border-color: #25D366;
    transform: translateY(-2px);
}

#site-header .afaq-wa-btn:focus-visible {
    color: var(--afaq-petrol);
    outline: 2px solid var(--afaq-turquoise);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    #site-header .afaq-wa-btn,
    #site-header .afaq-wa-btn:hover {
        transition: none;
        transform: none;
    }
}

/* Mobile Toggle Hamburger Button (Hidden on Desktop) */
.afaq-mobile-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: var(--afaq-light-bg);
    border: 1px solid var(--afaq-border);
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    color: var(--afaq-petrol);
    transition: background-color 180ms ease, border-color 180ms ease;
    margin-inline-start: 8px;
}

.afaq-mobile-toggle:hover {
    background: var(--afaq-light-bg);
    border-color: var(--afaq-silver);
}

.afaq-hamburger-icon {
    width: 20px;
    height: 15px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.afaq-hamburger-icon span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--afaq-petrol);
    border-radius: 2px;
    transition: transform 220ms ease, opacity 220ms ease;
}

/* Active hamburger icon transforms to X */
.afaq-mobile-toggle.is-active .afaq-hamburger-icon span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.afaq-mobile-toggle.is-active .afaq-hamburger-icon span:nth-child(2) {
    opacity: 0;
}

.afaq-mobile-toggle.is-active .afaq-hamburger-icon span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* Shield the header toggle from Elementor kit global button styles (.elementor-kit-N button) */
#site-header .afaq-mobile-toggle {
    background: var(--afaq-light-bg);
    border: 1px solid var(--afaq-border);
    border-radius: 8px;
    color: var(--afaq-petrol);
    padding: 0;
    box-shadow: none;
}

#site-header .afaq-mobile-toggle:hover,
#site-header .afaq-mobile-toggle:focus {
    background: var(--afaq-light-bg);
    border-color: var(--afaq-silver);
    color: var(--afaq-petrol);
}

/* Mobile Drawer (Hidden on Desktop) */
.afaq-mobile-drawer {
    display: none;
}

/* ==================================================
   RESPONSIVE DESIGN (1440px, 1024px, 768px, 430px, 390px, 375px)
   ================================================== */

@media (max-width: 1320px) {
    /* Keep the horizontal lockup within the original logo footprint (~185px) */
    .afaq-brand-logo {
        height: 46px;
        max-width: 186px;
    }
}

@media (max-width: 1200px) {
    .afaq-nav-list {
        gap: 16px;
    }
    .afaq-nav-link {
        font-size: 14px;
        padding: 6px 4px;
    }
    .afaq-header-container {
        padding: 0 20px;
    }
}

/* Small desktops with the WhatsApp button present: icon-only WhatsApp + tighter gaps so the bar fits. */
@media (min-width: 1024px) and (max-width: 1279px) {
    .afaq-header-container:has(.afaq-header-left .afaq-wa-btn) .afaq-header-left {
        gap: 12px;
    }

    .afaq-header-container:has(.afaq-header-left .afaq-wa-btn) .afaq-header-center {
        margin: 0 12px;
    }

    .afaq-header-container:has(.afaq-header-left .afaq-wa-btn) .afaq-nav-list {
        gap: 12px;
    }

    #site-header .afaq-header-left .afaq-wa-btn {
        width: 40px;
        padding: 0;
    }

    #site-header .afaq-header-left .afaq-wa-btn-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}

@media (max-width: 1023px) {
    /* Hide desktop center nav and desktop left CTA inside bar */
    .afaq-header-center {
        display: none;
    }

    .afaq-mobile-toggle {
        display: inline-flex;
    }

    .afaq-header-container {
        padding: 0 16px;
    }

    .afaq-brand-logo {
        height: 44px;
        max-width: 178px;
    }

    /* Mobile drawer styles */
    .afaq-mobile-drawer {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--afaq-white);
        border-bottom: 1px solid var(--afaq-border);
        box-shadow: 0 16px 36px rgba(1, 39, 59, 0.12);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition: max-height 300ms var(--afaq-transition-timing),
                    opacity 220ms ease,
                    visibility 220ms;
    }

    .afaq-mobile-drawer.is-open {
        max-height: calc(100vh - var(--afaq-header-height));
        overflow-y: auto;
        opacity: 1;
        visibility: visible;
    }

    .afaq-mobile-nav-content {
        padding: 24px 20px 32px;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .afaq-mobile-nav-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 14px;
        color: var(--afaq-petrol);
        font-size: 16px;
        font-weight: 500;
        text-decoration: none;
        border-radius: 8px;
        transition: background-color 180ms ease, color 180ms ease;
    }

    .afaq-mobile-nav-link:hover,
    .afaq-mobile-nav-link:active {
        background-color: var(--afaq-light-bg);
        color: var(--afaq-turquoise-dark);
    }

    /* Mobile accordion for "الحلول" */
    .afaq-mobile-accordion-toggle {
        cursor: pointer;
    }

    .afaq-mobile-accordion-arrow {
        transition: transform 200ms ease;
    }

    .afaq-mobile-accordion.is-open .afaq-mobile-accordion-arrow {
        transform: rotate(180deg);
        color: var(--afaq-turquoise-dark);
    }

    .afaq-mobile-accordion-content {
        display: none;
        padding: 8px 12px 12px;
        background: var(--afaq-light-bg);
        border-radius: 8px;
        margin: 4px 0 8px;
        border: 1px solid var(--afaq-border);
    }

    .afaq-mobile-accordion.is-open .afaq-mobile-accordion-content {
        display: block;
    }

    .afaq-mobile-col-item {
        padding: 10px 8px;
        border-bottom: 1px solid var(--afaq-border);
    }

    .afaq-mobile-col-item:last-child {
        border-bottom: none;
    }

    .afaq-mobile-col-title {
        font-size: 14px;
        font-weight: 700;
        color: var(--afaq-petrol);
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 4px;
    }

    .afaq-mobile-col-title svg {
        color: var(--afaq-turquoise-dark);
    }

    .afaq-mobile-col-note {
        font-size: 12px;
        color: var(--afaq-text);
        padding-inline-start: 22px;
    }

    .afaq-mobile-col-link {
        display: block;
        margin-top: 6px;
        padding: 6px 0 2px;
        padding-inline-start: 22px;
        font-size: 13px;
        font-weight: 700;
        color: var(--afaq-turquoise-dark);
        text-decoration: none;
    }

    /* Mobile bottom actions */
    .afaq-mobile-footer-actions {
        margin-top: 16px;
        padding-top: 16px;
        border-top: 1px solid var(--afaq-border);
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .afaq-mobile-footer-actions .afaq-cta-btn {
        width: 100%;
        padding: 12px;
        font-size: 15px;
    }

    .afaq-mobile-footer-actions .afaq-lang-switcher {
        justify-content: center;
        padding: 8px 14px;
    }

    #site-header .afaq-mobile-footer-actions .afaq-wa-btn {
        width: 100%;
        padding: 11px 12px;
        font-size: 15px;
    }

    /* Drawer: full-width button, note shown inline beneath it. */
    .afaq-mobile-footer-actions .afaq-wa-wrap {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .afaq-mobile-footer-actions .afaq-wa-note {
        position: static;
        width: auto;
        max-width: none;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .afaq-brand-logo {
        height: 40px;
        max-width: 162px;
    }

    /* On narrow phones, hide desktop header CTA and keep inside hamburger drawer */
    .afaq-header-left .afaq-cta-btn {
        display: none;
    }

    .afaq-header-left .afaq-lang-switcher {
        display: none; /* Accessible inside mobile drawer */
    }

    /* WhatsApp stays in the bar as an icon button matching the hamburger (label kept for screen readers). */
    #site-header .afaq-header-left .afaq-wa-btn {
        width: 42px;
        height: 42px;
        min-height: 0;
        padding: 0;
        border-radius: 8px;
    }

    #site-header .afaq-header-left .afaq-wa-btn-icon {
        width: 22px;
        height: 22px;
    }

    #site-header .afaq-header-left .afaq-wa-btn-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .afaq-header-container {
        height: 68px;
    }
}
