/* ===================================================================
   OBSCURE - Modern Professional Navbar CSS
   Ultra Professional & Mobile Optimized
   =================================================================== */

:root {
    --navbar-bg: #ffffff;
    --navbar-text: #1D1C1C;
    --navbar-hover: #6A6254;
    --navbar-active-bg: rgba(29, 28, 28, 0.08);
    --navbar-cta-bg: #1D1C1C;
    --navbar-cta-text: #E0DCD1;
    --navbar-shadow: 0 2px 20px rgba(29, 28, 28, 0.08);
    --navbar-height: 80px;
    --topbar-height: 55px;
}

/* ===================================================================
   Navbar Container
   =================================================================== */
.navbar {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    width: 100%;
    height: var(--navbar-height);
    background: var(--navbar-bg);
    box-shadow: var(--navbar-shadow);
    z-index: 999;
    transition: all 0.3s ease;
    overflow-x: hidden;
}

.navbar.scrolled {
    box-shadow: 0 4px 30px rgba(29, 28, 28, 0.12);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

/* ===================================================================
   Logo - ULTRA PROFESSIONAL
   =================================================================== */
.navbar-logo {
    height: 70px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    transition: all 0.3s ease;
    flex-shrink: 0;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.navbar-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

/* Logo link wrapper */
.navbar-container > a:first-child {
    display: flex;
    align-items: center;
    height: 100%;
    z-index: 100;
    position: relative;
}

/* ===================================================================
   Navigation Menu
   =================================================================== */
.navbar-menu {
    display: flex;
    list-style: none;
    gap: 8px;
    margin: 0;
    padding: 0;
    flex: 1;
    justify-content: center;
}

.navbar-menu li {
    position: relative;
}

.navbar-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--navbar-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
    white-space: nowrap;
}

.navbar-menu a:hover {
    color: var(--navbar-hover);
    background: rgba(29, 28, 28, 0.05);
    transform: translateY(-2px);
}

.navbar-menu a.active {
    background: var(--navbar-active-bg);
    font-weight: 700;
    color: var(--navbar-text);
}

/* CTA Button */
.navbar-cta {
    background: var(--navbar-cta-bg) !important;
    color: var(--navbar-cta-text) !important;
    padding: 12px 28px !important;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(29, 28, 28, 0.2);
    font-size: 1.05rem !important;
    font-weight: 700 !important;
}

.navbar-cta:hover {
    background: #2d2d2d !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 20px rgba(29, 28, 28, 0.3) !important;
}

/* ===================================================================
   Mobile Toggle Button - ULTRA PROFESSIONAL
   =================================================================== */
.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    background: rgba(29, 28, 28, 0.08);
    border-radius: 10px;
    border: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
    z-index: 100;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.navbar-toggle:hover {
    background: rgba(29, 28, 28, 0.12);
    transform: scale(1.05);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
}

.navbar-toggle:active {
    transform: scale(0.95);
}

.navbar-toggle span {
    width: 24px;
    height: 3px;
    background: var(--navbar-text);
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

.navbar-toggle.active {
    background: var(--navbar-cta-bg);
}

.navbar-toggle.active span {
    background: var(--navbar-cta-text);
}

.navbar-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.navbar-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.navbar-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ===================================================================
   Language Switcher
   =================================================================== */

/* Desktop Language Switcher */
.language-switcher-desktop {
    display: flex;
    align-items: center;
    position: relative;
    flex-shrink: 0;
}

/* Mobile Language Switcher (Hidden on Desktop) */
.navbar-lang-mobile {
    display: none;
}

.language-switcher-desktop .lang-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(29, 28, 28, 0.05);
    border: 1px solid rgba(29, 28, 28, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1D1C1C;
}

.language-switcher-desktop .lang-toggle:hover {
    background: rgba(29, 28, 28, 0.1);
    border-color: rgba(29, 28, 28, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.language-switcher-desktop .lang-toggle i {
    font-size: 1.2rem;
}

.language-switcher-desktop .lang-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 15px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    min-width: 200px;
}

.language-switcher-desktop .lang-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ===================================================================
   Responsive Design - ULTRA PROFESSIONAL MOBILE
   =================================================================== */

/* Tablet & Mobile */
@media (max-width: 992px) {
    :root {
        --navbar-height: 70px;
    }
    
    .navbar {
        height: var(--navbar-height);
    }
    
    .navbar-container {
        padding: 0 15px;
        gap: 15px;
    }
    
    .navbar-toggle {
        display: flex;
        order: 3;
    }
    
    /* Logo - PROMINENT ??? ???????? */
    .navbar-logo {
        order: 1;
        height: 55px;
        max-width: 160px;
    }
    
    /* Hide Desktop Language Switcher */
    .language-switcher-desktop {
        display: none;
    }
    
    /* Show Mobile Language Switcher in Menu */
    .navbar-lang-mobile {
        display: block;
        width: 100%;
        margin-top: 15px;
        padding-top: 20px;
        border-top: 2px solid rgba(29, 28, 28, 0.1);
    }
    
    .navbar-menu {
        position: fixed;
        top: calc(var(--navbar-height) + var(--topbar-height));
        left: -100%;
        width: 320px;
        max-width: 85%;
        height: calc(100vh - var(--navbar-height) - var(--topbar-height));
        background: var(--navbar-bg);
        flex-direction: column;
        justify-content: flex-start;
        padding: 25px 20px;
        gap: 8px;
        box-shadow: 4px 0 30px rgba(0, 0, 0, 0.15);
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        order: 2;
        z-index: 998;
    }
    
    /* Smooth scroll for menu */
    .navbar-menu::-webkit-scrollbar {
        width: 6px;
    }
    
    .navbar-menu::-webkit-scrollbar-track {
        background: rgba(29, 28, 28, 0.05);
        border-radius: 10px;
    }
    
    .navbar-menu::-webkit-scrollbar-thumb {
        background: rgba(29, 28, 28, 0.2);
        border-radius: 10px;
    }
    
    .navbar-menu::-webkit-scrollbar-thumb:hover {
        background: rgba(29, 28, 28, 0.3);
    }
    
    .navbar-menu.active {
        left: 0;
    }
    
    /* Backdrop overlay when menu is open */
    .navbar-menu.active::before {
        content: '';
        position: fixed;
        top: calc(var(--navbar-height) + var(--topbar-height));
        left: 0;
        width: 100vw;
        height: calc(100vh - var(--navbar-height) - var(--topbar-height));
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
        animation: fadeIn 0.3s ease;
    }
    
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    
    .navbar-menu li {
        width: 100%;
    }
    
    .navbar-menu a {
        width: 100%;
        padding: 16px 20px;
        font-size: 1.05rem;
        border-radius: 10px;
    }
    
    .navbar-cta {
        margin-top: 15px;
        text-align: center;
        padding: 16px 28px !important;
    }
    
    /* Mobile Language Switcher Styles */
    .navbar-lang-mobile .language-switcher {
        width: 100%;
    }
    
    .navbar-lang-mobile .lang-toggle {
        width: 100%;
        justify-content: center;
        background: rgba(29, 28, 28, 0.05);
        border: 1px solid rgba(29, 28, 28, 0.1);
        padding: 14px 20px;
        border-radius: 10px;
        font-size: 1rem;
    }
    
    .navbar-lang-mobile .lang-toggle:hover {
        background: rgba(29, 28, 28, 0.1);
        transform: translateY(-2px);
    }
    
    .navbar-lang-mobile .lang-dropdown {
        position: relative;
        top: 10px;
        right: 0;
        left: 0;
        width: 100%;
    }
}

/* ?? Mobile - NO TOP BAR (CLEAN DESIGN) */
@media (max-width: 768px) {
    :root {
        --navbar-height: 65px;
        --topbar-height: 0px; /* Top bar ????? ????????? = 0 */
    }
    
    /* Navbar ???? ?? ???? ?????? ?????? */
    .navbar {
        top: 0; /* ????? ?? var(--topbar-height) */
        height: var(--navbar-height);
    }
    
    .navbar-container {
        padding: 0 12px;
        gap: 12px;
    }
    
    /* Logo - CLEAR & VISIBLE */
    .navbar-logo {
        height: 50px;
        max-width: 140px;
    }
    
    .navbar-toggle {
        padding: 9px;
        gap: 4px;
    }
    
    .navbar-toggle span {
        width: 22px;
        height: 2.5px;
    }
    
    /* Menu positioning ???? top-bar */
    .navbar-menu {
        top: var(--navbar-height); /* ????? ?? calc() */
        width: 300px;
        max-width: 80%;
        padding: 20px 18px;
        height: calc(100vh - var(--navbar-height)); /* ???? top-bar height */
    }
    
    /* Backdrop ???? top-bar */
    .navbar-menu.active::before {
        top: var(--navbar-height);
        height: calc(100vh - var(--navbar-height));
    }
    
    .navbar-menu a {
        padding: 15px 18px;
        font-size: 1rem;
    }
}

/* Small Mobile - OPTIMIZED */
@media (max-width: 576px) {
    :root {
        --navbar-height: 60px;
    }
    
    .navbar {
        height: var(--navbar-height);
        top: 0;
    }
    
    .navbar-container {
        padding: 0 10px;
        gap: 10px;
    }
    
    /* Logo - PROMINENT even on small screens */
    .navbar-logo {
        height: 45px;
        max-width: 120px;
    }
    
    .navbar-toggle {
        padding: 8px;
        gap: 4px;
    }
    
    .navbar-toggle span {
        width: 20px;
        height: 2.5px;
    }
    
    .navbar-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .navbar-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    
    .navbar-menu {
        top: var(--navbar-height);
        width: 280px;
        max-width: 75%;
        padding: 18px 15px;
        height: calc(100vh - var(--navbar-height));
    }
    
    .navbar-menu.active::before {
        top: var(--navbar-height);
        height: calc(100vh - var(--navbar-height));
    }
    
    .navbar-menu a {
        padding: 14px 16px;
        font-size: 0.95rem;
    }
}

/* Extra Small Mobile - MINIMAL but CLEAR */
@media (max-width: 400px) {
    :root {
        --navbar-height: 55px;
    }
    
    .navbar {
        height: var(--navbar-height);
        top: 0;
    }
    
    .navbar-container {
        padding: 0 8px;
        gap: 8px;
    }
    
    /* Logo - STILL VISIBLE */
    .navbar-logo {
        height: 40px;
        max-width: 100px;
    }
    
    .navbar-toggle {
        padding: 7px;
        gap: 3px;
    }
    
    .navbar-toggle span {
        width: 18px;
        height: 2px;
    }
    
    .navbar-menu {
        top: var(--navbar-height);
        width: 260px;
        max-width: 70%;
        padding: 15px 12px;
        height: calc(100vh - var(--navbar-height));
    }
    
    .navbar-menu.active::before {
        top: var(--navbar-height);
        height: calc(100vh - var(--navbar-height));
    }
    
    .navbar-menu a {
        padding: 13px 15px;
        font-size: 0.9rem;
    }
}

/* ===================================================================
   Main Content Spacing - ADJUSTED FOR NO TOP BAR ON MOBILE
   =================================================================== */
main {
    margin-top: calc(var(--navbar-height) + var(--topbar-height));
    min-height: calc(100vh - var(--navbar-height) - var(--topbar-height));
}

/* Mobile: ???? top-bar? ??? navbar */
@media (max-width: 768px) {
    main {
        margin-top: var(--navbar-height); /* ??? navbar height */
        min-height: calc(100vh - var(--navbar-height));
    }
}

@media (max-width: 576px) {
    main {
        margin-top: var(--navbar-height);
        min-height: calc(100vh - var(--navbar-height));
    }
}

/* ===================================================================
   Professional Touch - Animation & Effects
   =================================================================== */

/* Smooth menu items animation - FIXED */
.navbar-menu li {
    opacity: 1; /* ? Default visible */
    transform: translateX(0);
}

.navbar-menu.active li {
    animation: slideInLeft 0.3s ease forwards;
}

.navbar-menu.active li:nth-child(1) { animation-delay: 0.05s; }
.navbar-menu.active li:nth-child(2) { animation-delay: 0.1s; }
.navbar-menu.active li:nth-child(3) { animation-delay: 0.15s; }
.navbar-menu.active li:nth-child(4) { animation-delay: 0.2s; }
.navbar-menu.active li:nth-child(5) { animation-delay: 0.25s; }
.navbar-menu.active li:nth-child(6) { animation-delay: 0.3s; }
.navbar-menu.active li:nth-child(7) { animation-delay: 0.35s; }
.navbar-menu.active li:nth-child(8) { animation-delay: 0.4s; }

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Logo pulse effect on hover */
@keyframes logoPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.navbar-logo:hover {
    animation: logoPulse 0.6s ease;
}
