/* ----------------------------------------------------------- */
/* 1. GLOBAL VARIABLES & THEMES */
/* ----------------------------------------------------------- */
:root {
    --font-primary: 'Cairo', sans-serif;
    --mw-content: 85rem;

    /* --- LIGHT THEME --- */
    --bg-color: #fcfcfc;
    --text-color: #111111;
    --text-subtle: #666666;
    --surface-color: rgba(255, 255, 255, 0.5);
    --border-color: rgba(0, 0, 0, 0.1);

    /* GLASS VARIABLES */
    --glass-bg: rgba(255, 255, 255, 0.4);
    --dropdown-bg: rgba(255, 255, 255, 0.95);
    --glass-blur: 1.25rem;

    --card-shadow: 0 1.25rem 2.5rem rgba(0, 0, 0, 0.03);

    /* Aurora Colors - Refined AI Tech Identity */
    --aurora-1: rgba(60, 100, 255, 0.18);
    /* Deep electric blue */
    --aurora-2: rgba(120, 70, 200, 0.16);
    /* Royal purple */
}

/* --- DARK THEME --- */
[data-theme="dark"] {
    --bg-color: #050505;
    --text-color: #f0f0f0;
    --text-subtle: #999999;
    --surface-color: rgba(255, 255, 255, 0.03);
    --border-color: rgba(255, 255, 255, 0.1);

    /* GLASS VARIABLES DARK */
    --glass-bg: rgba(0, 0, 0, 0.4);
    --dropdown-bg: rgba(10, 10, 10, 0.95);
    --card-shadow: 0 1.875rem 3.75rem rgba(0, 0, 0, 0.3);

    /* Aurora Colors - Enhanced for dark mode */
    --aurora-1: rgba(70, 110, 255, 0.28);
    /* Brighter electric blue */
    --aurora-2: rgba(140, 90, 220, 0.24);
    /* Vibrant purple */
}

/* ----------------------------------------------------------- */
/* 2. BASE STYLES */
/* ----------------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 100%;
    scroll-behavior: smooth;
    overflow-x: hidden;
    height: 100%;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-primary);
    transition: background-color 0.8s ease, color 0.8s ease;
    overflow-x: hidden;
    line-height: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Aurora Background */
.aurora-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(5rem);
    opacity: 0.8;
    will-change: transform;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: var(--aurora-1);
    animation: driftOne 25s infinite alternate ease-in-out;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: var(--aurora-2);
    animation: driftTwo 30s infinite alternate-reverse ease-in-out;
}

@keyframes driftOne {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(15vw, 0) scale(1);
    }
}

@keyframes driftTwo {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }

    100% {
        transform: translate(-15vw, 5vh) scale(1.1) rotate(5deg);
    }
}

/* STRICT WIDTH CONTAINER */
.main-container {
    width: 95%;
    max-width: var(--mw-content);
    margin: 0 auto;
    padding-top: 6rem;
    flex: 1;
}

h1,
h2,
h3,
h4 {
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* ----------------------------------------------------------- */
/* 3. NAVBAR & MENU (CENTERED FIX) */
/* ----------------------------------------------------------- */
.navbar {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: var(--mw-content);
    height: 4.5rem;
    background-color: var(--glass-bg);
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-color);
    border-radius: 3.125rem;
    z-index: 1000;
    display: flex;
    justify-content: center;
    box-shadow: 0 0.625rem 1.875rem rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.navbar-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 2rem;
}

/* Logo takes 1 part of the width */
.logo {
    flex: 1;
    display: flex;
    align-items: center;
    height: 100%;
    z-index: 1002;
}

.logo img {
    height: 1.6rem;
    width: auto;
    filter: grayscale(1) invert(1) drop-shadow(0 0 0.9375rem rgba(50, 100, 255, 0.5));
    transition: 0.3s;
}

[data-theme="dark"] .logo img {
    filter: grayscale(1) invert(0) drop-shadow(0 0 0.9375rem rgba(255, 255, 255, 0.6));
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    z-index: 1003;
}

/* Container centers its children and takes the remaining space */
.mobile-menu-container {
    display: flex;
    align-items: center;
    flex: 3;
    justify-content: space-between;
    height: 100%;
}

/* Middle links are pushed to the mathematical center */
.main-nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    height: 100%;
    margin: 0 auto;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
    opacity: 1;
}

/* Right section takes 1 part of the width (same as logo) to maintain balance */
.navbar-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.5rem;
}

/* ----------------------------------------------------------- */
/* 4. DROPDOWN (DESKTOP) */
/* ----------------------------------------------------------- */
.nav-dropdown-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

/* The "bridge" to keep hover active */
.nav-dropdown-wrapper::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 0;
    width: 100%;
    height: 1rem;
    background: transparent;
    z-index: 1000;
}

.arrow-icon {
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.nav-dropdown-wrapper:hover .arrow-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 4.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    background-color: var(--dropdown-bg);
    -webkit-backdrop-filter: blur(1.5625rem);
    backdrop-filter: blur(1.5625rem);
    border: 1px solid var(--border-color);
    padding: 0.8rem;
    border-radius: 1.25rem;
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 14rem;
    box-shadow: 0 1.25rem 2.5rem rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 999;
}

.nav-dropdown-wrapper:hover .dropdown-menu {
    display: flex;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item {
    padding: 0.8rem 1.2rem;
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 0.75rem;
    transition: 0.3s;
    text-align: center;
    white-space: nowrap;
    display: block;
}

.dropdown-item:hover {
    background: var(--surface-color);
    color: var(--text-color);
}

/* ----------------------------------------------------------- */
/* 5. COMPONENTS */
/* ----------------------------------------------------------- */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
}

.theme-switch {
    position: relative;
    width: 3.5rem;
    height: 1.75rem;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: transparent;
    border: 1px solid var(--text-color);
    border-radius: 2rem;
    transition: .4s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.5rem;
}

.slider:before {
    position: absolute;
    content: "";
    height: 1.1rem;
    width: 1.1rem;
    left: 0.25rem;
    bottom: 0.25rem;
    background-color: var(--text-color);
    border-radius: 50%;
    z-index: 2;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

input:checked+.slider:before {
    transform: translateX(1.8rem);
}

.slider i {
    font-size: 0.85rem;
    color: var(--text-color);
    transition: opacity 0.3s ease;
    z-index: 1;
}

.slider .fa-sun {
    opacity: 0;
}

.slider .fa-moon {
    opacity: 1;
}

input:checked+.slider .fa-sun {
    opacity: 1;
    color: #fff;
}

input:checked+.slider .fa-moon {
    opacity: 0;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: 0.3s;
    display: flex !important;
    /* Changed from none to flex */
    align-items: center;
    gap: 0.5rem;
}

.lang-btn:hover {
    opacity: 0.6;
}

.glow-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1.2rem 3.5rem;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-color);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(0.625rem);
    border: 1px solid var(--border-color);
    border-radius: 3.125rem;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
}

.glow-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: 0.6s;
    z-index: 1;
}

.glow-btn:hover {
    background: var(--text-color);
    color: var(--bg-color);
    box-shadow: 0 0 1.875rem var(--aurora-1), 0 0 3.75rem var(--aurora-2);
    border-color: transparent;
    transform: scale(1.05) translateY(-0.1875rem);
}

.glow-btn:hover::before {
    left: 100%;
}

/* ----------------------------------------------------------- */
/* 6. FOOTER & SOCIAL */
/* ----------------------------------------------------------- */
.footer {
    position: relative;
    margin-top: 8rem;
    padding: 6rem 0 0 0;
    background: var(--surface-color);
    backdrop-filter: blur(1.875rem);
    -webkit-backdrop-filter: blur(1.875rem);
    border-top: 1px solid var(--border-color);
    overflow: hidden;
}

.footer-content-grid {
    width: 95%;
    max-width: var(--mw-content);
    margin: 0 auto;
    padding: 0;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-logo {
    height: 1.8rem;
    margin-bottom: 1.5rem;
    filter: grayscale(1) invert(1);
}

[data-theme="light"] .footer-logo {
    filter: grayscale(1) invert(1);
}

[data-theme="dark"] .footer-logo {
    filter: grayscale(1) invert(0);
}

.footer-mission {
    color: var(--text-subtle);
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 20rem;
}

.footer-col h4 {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col ul li a {
    text-decoration: none;
    color: var(--text-subtle);
    font-size: 1rem;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: var(--text-color);
}

.footer-email {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-subtle);
}

.footer-social-icons {
    display: flex;
    gap: 1rem;
    opacity: 0;
    transform: translateY(1.25rem);
    transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.footer-social-icons.visible {
    opacity: 1;
    transform: translateY(0);
}

.footer-social-icons a {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.footer-social-icons a:hover {
    background: var(--text-color);
    color: var(--bg-color);
    transform: scale(1.1);
}

.footer-bottom-bar {
    width: 95%;
    max-width: var(--mw-content);
    margin: 0 auto;
    padding: 2rem 0 2rem 0;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-subtle);
    font-size: 0.85rem;
}

.legal-links a {
    color: var(--text-subtle);
    text-decoration: none;
    transition: color 0.3s;
}

.legal-links a:hover {
    color: var(--text-color);
}

.separator {
    margin: 0 0.5rem;
    opacity: 0.5;
}

.social-container {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 900;
    transition: all 0.5s ease;
    opacity: 1;
}

.social-container.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(1.25rem) scale(0.9);
    pointer-events: none;
}

.social-icons-bar {
    display: flex;
    gap: 2rem;
    padding: 1rem 2.5rem;
    border-radius: 4rem;
    background-color: var(--glass-bg);
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-color);
    box-shadow: 0 0.625rem 1.875rem rgba(0, 0, 0, 0.05);
    transition: 0.3s;
}

.social-icons-bar a {
    color: var(--text-color);
    font-size: 1.25rem;
    transition: 0.3s;
}

.social-icons-bar a:hover {
    transform: translateY(-0.1875rem);
    opacity: 0.6;
}

.animate {
    opacity: 0;
    transform: translateY(2.5rem) scale(0.98);
    transition: 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* =========================================================== */
/* RESPONSIVE MEDIA QUERIES */
/* =========================================================== */

/* Laptop, Tablet & Mobile (Max 1024px / 64rem) */
@media (max-width: 64rem) {
    .navbar {
        width: 95%;
        padding: 0;
    }

    .navbar-content {
        padding: 0 1.5rem;
    }

    .hamburger-menu {
        display: block;
    }

    /* MOBILE MENU: SOLID BG & STRONG CONTRAST */
    .mobile-menu-container {
        position: absolute;
        top: 4.5rem;
        left: 0;
        width: 100%;
        margin: auto;
        background-color: rgb(255, 255, 255, 0.95);
        border: 1px solid var(--border-color);
        border-radius: 10rem;
        padding: 2rem;
        flex-direction: column;
        gap: 2rem;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
        opacity: 0;
        transform: translateY(-1rem);
        transition: opacity 0.3s ease, transform 0.3s ease;
        z-index: 999;
    }

    [data-theme="dark"] .mobile-menu-container {
        background-color: #050505;
        border-color: rgba(255, 255, 255, 0.5);
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    }

    .mobile-menu-container.open {
        display: flex;
        opacity: 1;
        transform: translateY(0.625rem);
    }

    .main-nav-links {
        flex-direction: column;
        width: 100%;
        gap: 1.5rem;
        align-items: center;
    }

    .nav-link {
        width: 100%;
        justify-content: center;
    }

    /* MOBILE DROPDOWN FIX (CRITICAL) */
    .nav-dropdown-wrapper {
        flex-direction: column;
        width: 100%;
        align-items: center;
    }

    .nav-dropdown-wrapper .dropdown-menu {
        position: static !important;
        display: none !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        transform: none !important;
        opacity: 1 !important;
        width: 100% !important;
        text-align: center !important;
        margin-top: 0.5rem;
        padding-left: 0 !important;
        transition: none !important;
    }

    .nav-dropdown-wrapper .dropdown-menu.accordion-open {
        display: block !important;
    }

    .dropdown-item {
        font-size: 0.9rem;
        padding: 0.5rem 0;
        color: var(--text-subtle);
        text-align: center;
    }

    .navbar-right {
        width: 100%;
        justify-content: center;
        border-top: 1px solid var(--border-color);
        padding-top: 1.5rem;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (max-width: 64rem) {
    .mobile-menu-container {
        /* Existing positioning code */
        position: absolute;
        top: 4.5rem;
        left: 0;
        width: 100%;

        /* THE FIX: Height & Padding */
        height: auto;
        /* Allows container to grow with text */
        min-height: 300px;
        /* Ensures a minimum size */
        max-height: 85vh;
        /* Prevents menu from going off-screen */
        overflow-y: auto;
        /* Adds a scrollbar if the menu is too tall */
        padding: 3rem 1.5rem;
        /* Increases vertical space inside */

        /* Visuals */
        display: flex;
        flex-direction: column;
        gap: 1.8rem;
        /* Increased gap between links */
        background-color: var(--dropdown-bg);
        -webkit-backdrop-filter: blur(var(--glass-blur));
        backdrop-filter: blur(var(--glass-blur));
        border: 1px solid var(--border-color);
        border-radius: 2rem;
        box-shadow: var(--card-shadow);

        /* Animation states */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-1rem);
        transition: all 0.4s ease;
        z-index: 1000;
    }

    .mobile-menu-container.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* Ensure the links have enough room */
    .main-nav-links {
        gap: 1.5rem;
    }
}

/* TABLET & MOBILE FOOTER (Max 48rem) */
@media (max-width: 48rem) {
    html {
        font-size: 95%;
    }

    .footer-col.brand-col {
        display: none;
    }

    .footer-content-grid {
        width: 95%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        text-align: center;
        margin-bottom: 2rem;
    }

    .footer-col.social-col h4 {
        display: none;
    }

    .footer-col.social-col {
        grid-column: span 2;
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-top: 1rem;
        border-top: 1px solid var(--border-color);
        padding-top: 2rem;
    }

    .footer-social-icons {
        justify-content: center;
    }

    .footer-email {
        text-align: center;
    }

    .footer-bottom-bar {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        width: 95%;
        padding-bottom: 1rem;
        padding-top: 1rem;
    }

    .social-icons-bar {
        padding: 0.8rem 1.5rem;
        gap: 1.5rem;
    }
}

/* Mobile (Max 30rem) */
@media (max-width: 30rem) {
    .navbar {
        width: 95%;
        height: 4rem;
    }

    .logo img {
        height: 1.4rem;
    }

    .hamburger-menu {
        font-size: 1.3rem;
    }

    .glow-btn {
        padding: 1rem 2rem;
        font-size: 0.9rem;
        width: 100%;
    }
}

/* --- Header Hierarchy Grouping --- */
.navbar-content {
    display: flex;
    justify-content: space-between;
    /* Equal space between Logo, Nav, and Actions */
    align-items: center;
    width: 100%;
}

.logo {
    flex: 0 0 auto;
}

/* Don't grow */
.main-nav-links {
    flex: 1;
    justify-content: center;
}

/* Center the links */
.navbar-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    /* Mini space between theme and lang */
}

/* --- Pulse Dot Fix (Ensures it stays visible in all languages) --- */
.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #ff4d4d;
    border-radius: 50%;
    box-shadow: 0 0 8px #ff4d4d;
    flex-shrink: 0;
    animation: pulseRed 2s infinite;
}

/* --- Theme Icon Visibility Fix --- */
/* In light theme, show Moon. In dark theme, show Sun. */
.slider .fa-sun {
    opacity: 0;
}

.slider .fa-moon {
    opacity: 1;
}

input:checked+.slider .fa-sun {
    opacity: 1;
    color: #f1c40f;
}

/* Yellow Sun */
input:checked+.slider .fa-moon {
    opacity: 0;
}

[data-theme="dark"] .slider {
    border-color: var(--text-color);
}

/* --- Header Grouping --- */
.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* Mini space between globe and theme button */
}

/* --- Layout Shift Fixes --- */
.main-container {
    overflow: visible;
    /* Prevents cards from being cut off during direction switch */
}

.product-card {
    text-align: start;
    /* Ensures text flips correctly LTR/RTL */
}

/* --- Theme Button Icon Fix --- */
/* If light theme: Show Moon. If dark theme: Show Sun */
.slider .fa-sun {
    opacity: 0;
    color: #f1c40f;
}

.slider .fa-moon {
    opacity: 1;
}

input:checked+.slider .fa-sun {
    opacity: 1;
}

input:checked+.slider .fa-moon {
    opacity: 0;
}

/* --- Pulse Dot Visibility --- */
.pulse-dot {
    display: inline-block !important;
    width: 8px;
    height: 8px;
    background-color: #ff4d4d;
    border-radius: 50%;
    box-shadow: 0 0 10px #ff4d4d;
    margin-inline-end: 8px;
}

/* ----------------------------------------------------------- */
/* THEME SWITCHER - FIXED FOR RTL & WHITE SUN ICON             */
/* ----------------------------------------------------------- */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
}

.theme-switch {
    position: relative;
    width: 3.5rem;
    height: 1.75rem;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: transparent;
    border: 1px solid var(--text-color);
    border-radius: 2rem;
    transition: .4s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.5rem;

    /* FIX: Force LTR layout inside the switch so icons don't break in Arabic */
    direction: ltr !important;
}

.slider i {
    font-size: 0.85rem;
    color: var(--text-color);
    z-index: 1;
    transition: opacity 0.3s ease;
}

/* --- Icon Logic & Colors --- */
/* In Light Theme (Unchecked): Show Moon */
.slider .fa-sun {
    opacity: 0;
    color: #ffffff !important;
    /* SUN COLOR: WHITE */
}

.slider .fa-moon {
    opacity: 1;
}

/* In Dark Theme (Checked): Show Sun */
input:checked+.slider .fa-sun {
    opacity: 1;
}

input:checked+.slider .fa-moon {
    opacity: 0;
}

/* The Sliding Circle */
.slider:before {
    position: absolute;
    content: "";
    height: 1.1rem;
    width: 1.1rem;
    left: 0.25rem;
    bottom: 0.25rem;
    background-color: var(--text-color);
    border-radius: 50%;
    z-index: 2;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

/* Movement Logic */
input:checked+.slider:before {
    transform: translateX(1.8rem);
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.lang-btn i {
    font-size: 1.5rem;
    /* Slightly larger to show the translation details */
}

.lang-btn:hover {
    opacity: 0.6;
    transform: scale(1.1);
}

/* Ensure the icon doesn't flip or disappear in Arabic */
[dir="rtl"] .lang-btn {
    direction: ltr !important;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.lang-btn i {
    font-size: 1.3rem;
    /* Perfectly sized Earth icon */
}

.lang-btn:hover {
    opacity: 0.6;
    transform: rotate(15deg) scale(1.1);
    /* Subtle rotation effect on hover */
}

/* FIX: Prevents the button from flipping layout in Arabic mode */
[dir="rtl"] .lang-btn {
    direction: ltr !important;
}

/* Container for actions and burger */
.header-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    /* Desktop gap */
}

/* Desktop: Hide burger, keep actions visible */
.hamburger-menu {
    display: none;
}

@media (max-width: 64rem) {
    .navbar-content {
        justify-content: space-between;
    }

    .header-controls {
        gap: 0.75rem;
        /* Tighter gap for mobile */
    }

    /* Ensure actions stay on the top bar */
    .navbar-actions {
        display: flex !important;
        align-items: center;
        gap: 0.5rem;
    }

    /* Burger menu icon alignment */
    .hamburger-menu {
        display: flex !important;
        align-items: center;
        justify-content: center;
        margin-inline-start: 0.5rem;
        height: 2.5rem;
        /* Matches the vertical rhythm of other icons */
    }

    /* Remove the actions from inside the dropdown menu since they are now on the top bar */
    .mobile-menu-container {
        padding-top: 2rem;
    }
}