/* ============================================================
   PRIME CONSTRUCTION — NAVBAR & FOOTER FIX
   Targets the exact HTML class names in Site.Master
   ============================================================ */

/* ==================== GOOGLE FONTS ==================== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap');

/* ==================== ROOT VARIABLES ==================== */
:root {
    --prime-blue: #f0c4ad;
    --prime-dark: #0a0b10;
    --prime-accent: #b89664;
    --prime-concrete: #e5e5e5;
    --prime-text: #1a1a1a;
    --prime-muted: #666;
    --prime-white: #ffffff;
    --prime-surface: #f4f5f7;
    --prime-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --prime-ease: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== NAVBAR ==================== */

/* Override legacy fixed positioning that causes issues */
header.header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
    transition: var(--prime-ease) !important;
}

/* The <nav> container */
header.header nav.nav {
    display: flex !important;
    flex-direction: row !important;
    direction: ltr !important;
    /* CRITICAL: Force logo to the left in both AR and EN */
    align-items: center !important;
    justify-content: space-between !important;
    max-width: 1280px !important;
    margin: 0 auto !important;
    padding: 14px 2rem !important;
    width: 100% !important;
    gap: 2rem !important;
    flex-wrap: nowrap !important;
}

/* Logo container - Force to be absolute first child visually */
header.header .nav__left {
    flex-shrink: 0 !important;
    order: -1 !important;
    margin-right: auto !important;
    margin-left: 0 !important;
}

header.header .nav__logo img {
    height: 52px !important;
    width: auto !important;
    display: block !important;
    object-fit: contain !important;
}

/* Center nav links */
header.header .nav__center {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

header.header .nav__menu {
    display: flex !important;
    align-items: center !important;
}

header.header .nav__list {
    display: flex !important;
    flex-direction: row !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 2.5rem !important;
    align-items: center !important;
}

header.header .nav__item {
    position: relative !important;
}

header.header .nav__link {
    display: inline-block !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    color: inherit !important; /* Managed by scroll state in modern-premium.css */
    text-decoration: none !important;
    padding: 6px 0 !important;
    position: relative !important;
    white-space: nowrap !important;
    transition: color 0.3s ease !important;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
}

header.header .nav__link::after {
    content: '' !important;
    position: absolute !important;
    bottom: -2px !important;
    left: 0 !important;
    width: 0 !important;
    height: 2px !important;
    background: var(--prime-blue) !important;
    transition: width 0.3s ease !important;
}



header.header .nav__link:hover::after,
header.header .nav__link.active-link::after {
    width: 100% !important;
}

/* right side - force absolute right visually in both versions */
header.header .nav__right {
    flex-shrink: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    direction: ltr !important;
    /* Force icons order: Lang -> Theme -> Button */
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 1.5rem !important;
    order: 10 !important;
    /* Visual placement after logo and links */
    margin-left: auto !important;
    margin-right: 0 !important;
}

/* Language switcher */
header.header .lang-switcher {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
}

header.header .lang-link {
    display: flex !important;
    align-items: center !important;
    text-decoration: none !important;
    
    transition: color 0.3s !important;
    padding: 0 5px !important;
}

header.header .lang-link i {
    display: none !important; /* Always hide icon */
}

header.header .lang-link span {
    font-size: 14px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    font-family: 'Outfit', 'Cairo', sans-serif !important;
    color: rgb(239 193 169 / 90%) !important;
    transition: color 0.3s !important;
}

header.header .lang-link:hover span {
    color: var(--prime-blue) !important;
}

header.header .divider {
    color: var(--prime-concrete) !important;
}

/* Theme icon */
header.header .change-theme {
    font-size: 1.3rem !important;
    color: var(--prime-muted) !important;
    cursor: pointer !important;
    transition: color 0.3s !important;
}

header.header .change-theme:hover {
    color: var(--prime-blue) !important;
}

/* CTA Button */
header.header .nav__button {
    display: inline-flex !important;
    align-items: center !important;
    padding: 10px 22px !important;
    background: var(--prime-blue) !important;
    color: #fff !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    text-decoration: none !important;
    border: none !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    transition: var(--prime-ease) !important;
    border-radius: 0 !important;
}

header.header .nav__button:hover {
    background: var(--prime-dark) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(0, 45, 91, 0.25) !important;
    color: #fff !important;
}

/* Hamburger — hidden on desktop */
header.header .nav__toggle {
    display: none !important;
}

/* ==================== MOBILE NAV ==================== */
@media (max-width: 991px) {
    header.header .nav__center {
        /* Removed display:none so the fixed mobile menu inside can actually render */
        display: block !important;
        width: 0 !important;
        flex: 0 !important;
        overflow: visible !important;
    }

    header.header .nav__menu {
        background-color: var(--prime-surface) !important;
        padding-top: 100px !important; /* Space for the close button or header */
        box-shadow: 10px 0 30px rgba(0,0,0,0.1) !important;
    }

    /* ======== LOGO / LAYOUT FOR MOBILE ======== */
    header.header .nav__left {
        position: relative !important;
        left: auto !important;
        transform: none !important;
        margin: 0 !important;
        z-index: 10 !important;
    }

    header.header .nav__logo img {
        height: 65px !important; /* Large, but fits within flex layout */
        width: auto !important;
    }

    /* Resume standard flex layout spreading items to left and right */
    header.header nav.nav {
        justify-content: space-between !important;
    }

    header.header .nav__right {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 15px !important; /* Precise spacing between the icons */
    }

    /* Ensure language text is shown since user preferred text over icon */
    header.header .lang-switcher span {
        display: block !important;
        font-family: 'Cairo', 'Outfit', sans-serif !important;
        font-size: 14px !important;
        transform: translateY(2px);
        padding-right: 100px;
        color: #efc1a9;
    }

    /* Standardize icon sizing on mobile */
    header.header .lang-link,
    header.header .change-theme,
    header.header .nav__toggle {
        position: relative !important;
        right: auto !important;
        left: auto !important;
        top: auto !important;
        bottom: auto !important;
        margin: 0 !important;
    }

    header.header .change-theme {
        font-size: 1.4rem !important;
        line-height: 1 !important;
        transform: translateY(2px); /* Optically align with the hamburger button */
    }


    header.header .nav__list {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 0 2rem !important;
        gap: 1.5rem !important;
    }

    header.header .nav__link {
        font-size: 16px !important;
        padding: 10px 0 !important;
        color: var(--prime-text) !important;
    }

    body.dark-theme header.header .nav__menu {
        background-color: var(--prime-dark) !important;
    }

    body.dark-theme header.header .nav__link {
        color: var(--prime-white) !important;
    }

    header.header .nav__button {
        display: none !important;
    }

    header.header .nav__toggle {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 5px !important;
        width: 44px !important;
        height: 44px !important;
        background: none !important;
        border: 2px solid var(--prime-concrete) !important;
        cursor: pointer !important;
        padding: 0 !important;
    }

    header.header .nav__toggle span {
        display: block !important;
        width: 22px !important;
        height: 2px !important;
        background: var(--prime-dark) !important;
        transition: var(--prime-ease) !important;
    }
}


/* ==================== FOOTER ==================== */

footer.premium-footer {
    background: rgb(10 11 16) !important;
    color: #fff !important;
    padding: 80px 0 0 !important;
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    overflow: hidden !important;
}

footer.premium-footer::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: 500px !important;
    height: 500px !important;
    background: radial-gradient(circle, rgba(184, 150, 100, 0.08) 0%, transparent 70%) !important;
    pointer-events: none !important;
}

/* Inner container */
footer.premium-footer .premium-container {
    max-width: 1440px !important;
    margin: 0 auto !important;
    padding: 0 2rem !important;
    width: 100% !important;
}

/* Main grid — 4 columns */
footer.premium-footer .footer-main {
    display: grid !important;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr !important;
    gap: 2rem !important;
    padding-bottom: 60px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}



footer.premium-footer .footer-logo img {
    height: 55px !important;
    width: auto !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 0 1.5rem 0 !important;
    filter: brightness(0) invert(1) !important;
}

body.rtl footer.premium-footer .footer-logo img {
    margin: 0 0 1.5rem auto !important;
}

footer.premium-footer .footer-desc {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 0.9rem !important;
    line-height: 1.8 !important;
    margin: 0 0 2rem 0 !important;
    max-width: 320px !important;
    text-align: start !important;
}

footer.premium-footer .footer-brand {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    text-align: start !important;
}

body.rtl footer.premium-footer .footer-brand {
    align-items: flex-start !important;
    text-align: start !important;
}

/* Social icons */
footer.premium-footer .footer-socials {
    display: flex !important;
    gap: 0.75rem !important;
    justify-content: flex-start !important;
    margin-top: 1.5rem !important;
}

body.rtl footer.premium-footer .footer-socials {
    justify-content: flex-start !important;
}

footer.premium-footer .social-icon {
    width: 40px !important;
    height: 40px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 1.15rem !important;
    text-decoration: none !important;
    transition: var(--prime-ease) !important;
}

footer.premium-footer .social-icon:hover {
    background: var(--prime-accent) !important;
    border-color: var(--prime-accent) !important;
    color: #fff !important;
    transform: translateY(-4px) !important;
}

footer.premium-footer .footer-nav-col {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    text-align: start !important;
}

footer.premium-footer .footer-title {
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.15em !important;
    margin: 0 0 1.5rem !important;
    position: relative !important;
    padding-bottom: 0.75rem !important;
    display: inline-block !important;
    text-align: start !important;
}

footer.premium-footer .footer-title::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    transform: none !important;
    width: 28px !important;
    height: 2px !important;
    background: var(--prime-accent) !important;
}

body.rtl footer.premium-footer .footer-title::after,
body[dir="rtl"] footer.premium-footer .footer-title::after {
    left: auto !important;
    right: 0 !important;
}

footer.premium-footer .footer-links {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    text-align: start !important;
    gap: 0.75rem !important;
}



footer.premium-footer .footer-link {
    color: rgba(255, 255, 255, 0.6) !important;
    text-decoration: none !important;
    font-size: 0.9rem !important;
    transition: all 0.3s !important;
    display: inline-block !important;
}

footer.premium-footer a.footer-link:hover {
    color: var(--prime-accent) !important;
    transform: translateX(6px) !important;
}

body.rtl footer.premium-footer a.footer-link:hover,
body[dir="rtl"] footer.premium-footer a.footer-link:hover {
    transform: translateX(-6px) !important;
}

/* Footer bottom bar */
footer.premium-footer .footer-bottom {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 1.5rem 0 !important;
    text-align: center !important;
}

footer.premium-footer .footer-bottom p,
footer.premium-footer .footer-bottom-links a {
    font-size: 0.82rem !important;
    color: rgba(255, 255, 255, 0.4) !important;
}

footer.premium-footer .footer-bottom-links {
    display: flex !important;
    gap: 1rem !important;
    align-items: center !important;
}

footer.premium-footer .footer-bottom-links a {
    text-decoration: none !important;
    transition: color 0.3s !important;
}

footer.premium-footer .footer-bottom-links a:hover {
    color: var(--prime-accent) !important;
}

footer.premium-footer .footer-bottom-links span {
    color: rgba(255, 255, 255, 0.2) !important;
}

/* ==================== FOOTER RESPONSIVE ==================== */
@media (max-width: 1024px) {
    footer.premium-footer .footer-main {
        grid-template-columns: 1fr 1fr !important;
        gap: 2.5rem !important;
    }
}

@media (max-width: 640px) {
    footer.premium-footer {
        padding-top: 50px !important;
        padding-right: 15px !important;
        padding-left: 15px !important;
    }

    footer.premium-footer .footer-logo img {
        margin: 0 auto 1.5rem auto !important;
    }

    footer.premium-footer .footer-desc {
        margin: 0 auto 2rem auto !important;
    }

    footer.premium-footer .footer-socials {
        justify-content: center !important;
    }

    footer.premium-footer .footer-main {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        /* Removed text-align: center so it cascades the start alignment naturally */
    }

    footer.premium-footer .footer-title {
        margin: 0 0 1.5rem !important;
    }

    footer.premium-footer .footer-title::after {
        /* Start alignment fallback */
        left: 0 !important;
        transform: none !important;
    }

    body.rtl footer.premium-footer .footer-title::after,
    body[dir="rtl"] footer.premium-footer .footer-title::after {
        left: auto !important;
        right: 0 !important;
    }

    footer.premium-footer .footer-bottom {
        flex-direction: column !important;
        gap: 0.75rem !important;
        text-align: center !important;
    }
}

/* ==================== SHOWCASE SLIDER FIXES ==================== */
@media (max-width: 992px) {
    /* Expand container to allow text to fit without clipping the arrows */
    .showcase-main {
        min-height: 850px !important; 
    }

    /* Center and elevate the slider navigation so arrows are clearly visible */
    .showcase-wrapper .showcase-nav {
        position: relative !important;
        z-index: 50 !important;
        justify-content: center !important;
        margin-top: 0 !important;
        width: 100% !important;
        padding-bottom: 2rem !important;
    }

    /* Make the arrows bold and filled so they scream 'Click Me' */
    .showcase-wrapper .nav-prev, 
    .showcase-wrapper .nav-next {
        background: var(--prime-blue) !important;
        color: #fff !important;
        border: none !important;
        box-shadow: 0 8px 20px rgba(0,0,0,0.15) !important;
    }
}