/* =====================================================
   1️⃣ TOP BAR 
===================================================== */
.top-bar {
    position: fixed;
    top: 0;
    z-index: var(--z-index-top-bar);
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 40px;
    padding: 0 15px;
    
    color: #fff;
    font-size: 14px;
    
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    
    /* Transition added for hide logic */
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.3s ease;
}

/* Hide Top Bar logic triggered by JS */
.top-bar.hide {
    opacity: 0;
    transform: translateY(-100%);
}

/********** CENTERED TRANSLATE LOGO **********/
.top-bar {
    display: flex;
    justify-content: center; /* Horizontally centers the widget */
    align-items: center;
    height: 40px;
    background: rgba(0, 0, 0, 0.2); /* Adjust based on your theme */
}

/* Hide the 'Powered by' text and the Google Brand name */
.goog-logo-link, 
.goog-te-gadget span {
    display: none !important;
}

/* Make the gadget container transparent so only the icon/dropdown shows */
.goog-te-gadget {
    color: transparent !important;
    font-size: 0 !important;
    display: flex !important;
    align-items: center;
}

/* Style the Google Icon specifically */
.goog-te-gadget img {
    margin: 0 auto;
    display: block;
}

/* Optional: If you want to hide the dropdown text and only show the icon */
/* Note: This makes the widget harder to use, so usually we just show the icon + dropdown */
#google_translate_element {
    text-align: center;
}

/* =====================================================
   2️⃣ GLASSMORPHISM NAVBAR (GOLD DUAL-TONE)
===================================================== */
.glass-navbar {
    position: fixed;
    top: 40px;
    z-index: var(--z-index-navbar-base);
    isolation: isolate;
    
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0 15px;
    
    /* DUAL-TONE BACKGROUND */
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.95) 60%,
        rgba(250, 240, 210, 0.9) 60%
    );
    
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), 
                0 2px 8px rgba(0, 0, 0, 0.15);
    
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    
    transition: top 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.4s ease,
                background 0.4s ease,
                box-shadow 0.4s ease,
                width 0.4s ease,
                left 0.4s ease,
                border-radius 0.4s ease;
}

/* THE GLOWING GOLD SEAM LINE (ONLY VISIBLE AT TOP) */
.glass-navbar::before {
    content: "";
    position: absolute;
    top: 60%;
    left: -100%;
    z-index: 1;
    
    width: 80%;
    height: 2px;
    pointer-events: none;
    
    background: linear-gradient(
        to right,
        rgba(212, 175, 55, 0) 0%,
        rgba(212, 175, 55, 0.8) 20%,
        rgba(255, 248, 225, 1) 50%,
        rgba(212, 175, 55, 0.8) 80%,
        rgba(212, 175, 55, 0) 100%
    );
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.7);
    
    animation: goldSweep 5s infinite ease-in-out;
    transition: opacity 0.3s ease;
}

/* HOVER EFFECT ON LINE */
.glass-navbar:hover::before {
    height: 3px;
    box-shadow: 0 0 25px rgba(212, 175, 55, 1);
    animation: goldSweep 1.5s infinite linear;
}

@keyframes goldSweep {
    0%   { left: -100%; opacity: 0; }
    10%  { opacity: 0.8; }
    90%  { opacity: 0.8; }
    100% { left: 100%; opacity: 0; }
}

/* ❌ HIDE LINE WHEN SHRINKED */
.glass-navbar.shrinked::before {
    display: none !important;
    opacity: 0 !important;
}

.glass-navbar.shrinked {
    top: 0;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 1) 60%,
        rgba(245, 225, 170, 1) 60%
    );
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35), 
                0 4px 10px rgba(0, 0, 0, 0.2);
}

/* =====================================================
   3️⃣ BRAND & LOGO SHINE
===================================================== */
.logo-wrapper {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.logo-shine {
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right, 
        transparent, 
        rgba(255, 248, 225, 0.6), 
        transparent
    );
    transform: skewX(-25deg);
    animation: logoShimmer 5s infinite ease-in-out;
}

@keyframes logoShimmer {
    0%   { left: -150%; }
    30%  { left: 150%; }
    100% { left: 150%; }
}

.glass-navbar .navbar-brand {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    margin-right: 20px;
    overflow: hidden;
    white-space: nowrap;
    transition: max-width 0.5s ease, opacity 0.3s ease, transform 0.4s ease;
}

.glass-navbar.hide-brand .navbar-brand {
    max-width: 0;
    opacity: 0;
    margin-right: 0;
    transform: translateX(-20px);
    pointer-events: none;
}

.navbar-brand img {
    height: 45px;
    transition: height 0.3s ease;
}

.navbar-brand .brand-text {
    padding: 6px 14px;
    margin-left: 10px;
    
 /*   background: linear-gradient(135deg, #fcfde6, #fdf5da);
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    */
    color: var(--primary);
    font-family: var(--font-saira);
    font-size: 1.6rem;
    font-weight: 700;
    /* The Shadow Logic: X-offset Y-offset Blur Color */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2), 
                 0 0 10px rgba(255, 255, 255, 0.3);
}

/* =====================================================
   4️⃣ NAV LINKS
===================================================== */
.glass-navbar .navbar-nav .nav-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    
    background: rgba(255, 255, 255, 0.35);
    border-radius: 6px;
    
    color: var(--text-color) !important;
    font-family: var(--font-montserrat);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-navbar .navbar-nav .nav-link:hover,
.glass-navbar .navbar-nav .nav-link.active {
    background: linear-gradient(135deg, var(--primary), #ff9447);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
    
    color: #fff !important;
    transform: scale(1.08) translateY(-2px);
}

/* Duplicate logic preserved from original */
.glass-navbar .navbar-nav .nav-link.active {
    background: linear-gradient(135deg, var(--primary), #ff9447);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    
    color: #fff !important;
    transform: scale(1.05);
}

@media (prefers-reduced-motion: reduce) {
    .glass-navbar .navbar-nav .nav-link {
        transition: none;
        transform: none;
    }
}

/* Gold Shimmer Overlay */
.glass-navbar::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1; /* ABOVE background */
    
    background: linear-gradient(
        120deg,
        rgba(255, 180, 80, 0) 0%,
        rgba(255, 200, 120, 0.35) 35%,
        rgba(255, 240, 200, 0.85) 50%,
        rgba(255, 200, 120, 0.35) 65%,
        rgba(255, 180, 80, 0) 100%
    );
    opacity: 0.85;
    filter: blur(6px);
    mix-blend-mode: screen;
    pointer-events: none;
    
    transform: translateX(-120%) skewX(-25deg);
    animation: shimmer-gold 3.5s ease-in-out infinite;
}

@keyframes shimmer-gold {
    0% {
        transform: translateX(-120%) skewX(-25deg);
        opacity: 0;
    }
    30% { opacity: 1; }
    60% { opacity: 1; }
    100% {
        transform: translateX(120%) skewX(-25deg);
        opacity: 0;
    }
}

/* =====================================================
   5️⃣ DROPDOWN MENU
===================================================== */
.dropdown-menu {
    z-index: var(--z-index-dropdown);
    padding: 8px 0;
    margin: 0;
    
    background: #fff;
    border: 1px solid var(--primary);
    border-radius: 8px;
    box-shadow: 0 8px 20px var(--shadow-medium);
}

.dropdown-menu .dropdown-item {
    display: block;
    width: calc(100% - 10px);
    margin: 0 5px;
    padding: 10px 20px;
    
    border-radius: 4px;
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    
    transition: all 0.2s ease;
}

.dropdown-menu .dropdown-item {
    position: relative; /* Required for the absolute line */
    display: block;
    overflow: hidden;   /* Keeps the shimmer inside the item boundaries */
    transition: all 0.3s ease-in-out;
    transform-origin: left center;
}

.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item.active {
    background: #ffedd5;
    color: var(--primary);
    transform: scale(1.03);
    padding-left: 25px;
}

/* THE GLOWING LINE */
.dropdown-menu .dropdown-item::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: -100%; /* Start off-screen to the left */
    width: 100%;
    height: 2px;
    background: linear-gradient(
        90deg, 
        transparent, 
        var(--primary), 
        #fff, 
        var(--primary), 
        transparent
    );
    box-shadow: 0 0 8px var(--primary);
    transition: left 0.4s ease;
}

/* TRIGGER LINE & SHIMMER ON HOVER */
.dropdown-menu .dropdown-item:hover::after {
    left: 100%; /* Moves the line across the bottom */
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* EXTRA SHIMMER EFFECT (Optional: Continuous Glow) */
@keyframes lineShimmer {
    0% { opacity: 0.5; }
    50% { opacity: 1; box-shadow: 0 0 15px var(--primary); }
    100% { opacity: 0.5; }
}

.dropdown-menu .dropdown-item:hover::after {
    animation: lineShimmer 1.5s infinite ease-in-out;
}
/* Nested Dropdown */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    display: none;
    min-width: 200px;
    margin-left: 0.2rem;
    padding: 8px 0;
    
    background: #fff;
    border: 1px solid var(--primary);
    border-radius: 8px;
    box-shadow: 0 8px 20px var(--shadow-medium);
}

.dropdown-submenu:hover > .dropdown-menu {
    display: block;
}

/* Nested Dropdown Arrow */
.dropdown-menu .dropdown-item.dropdown > .dropdown-toggle::after {
    content: "\f054";
    position: absolute;
    top: 50%;
    right: 20px;
    
    color: var(--text-muted);
    font-family: "Font Awesome 6 Free";
    font-size: 12px;
    font-weight: 900;
    
    transform: translateY(-50%);
    transition: transform 0.2s, color 0.2s;
}

.dropdown-menu .dropdown-item.dropdown:hover > .dropdown-toggle::after {
    color: var(--primary);
    transform: translateY(-50%) translateX(2px);
}

/* =====================================================
   6️⃣ NAVBAR TOGGLER
===================================================== */
.navbar-toggler {
    position: relative;
    padding: 0;
    line-height: 1;
    border: none;
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

.navbar-toggler-icon {
    position: relative;
    display: inline-block;
    width: 25px;
    height: 18px;
}

.navbar-toggler-icon div,
.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--text-color);
    transition: all 0.3s ease;
}

.navbar-toggler-icon::before { top: 0; }
.navbar-toggler-icon div    { top: 50%; transform: translateY(-50%); }
.navbar-toggler-icon::after  { bottom: 0; }

.navbar-toggler:not(.collapsed) .navbar-toggler-icon::before {
    top: 8px;
    background: var(--primary);
    transform: rotate(45deg);
}

.navbar-toggler:not(.collapsed) .navbar-toggler-icon div {
    opacity: 0;
}

.navbar-toggler:not(.collapsed) .navbar-toggler-icon::after {
    bottom: 8px;
    background: var(--primary);
    transform: rotate(-45deg);
}

/* =====================================================
   7️⃣ LANGUAGE BUTTON & MAIN
===================================================== */
.toggleLang {
    padding: 6px 14px;
    background: transparent;
    border: 1px solid var(--primary);
    border-radius: 5px;
    
    color: var(--primary);
    font-size: 14px;
    
    transition: all 0.3s ease;
}

.toggleLang:hover {
    background: var(--primary);
    box-shadow: 0 2px 5px var(--shadow-medium);
    color: #fff;
}

main {
    margin-top: 100px;
    transition: margin-top 0.3s ease;
}

/* =====================================================
   8️⃣ MEDIA QUERIES
===================================================== */

/********** DESKTOP (992px+) **********/
@media (min-width: 992px) {
    .glass-navbar.shrinked {
        top: 10px;
        left: 2.5%;
        z-index: var(--z-index-navbar-shrinked);
        
        width: 95%;
        padding: 5px 20px;
        
        background: rgba(255, 255, 255, 0.95);
        border-radius: 12px;
        box-shadow: 0 4px 12px var(--shadow-medium);
    }
    
    .glass-navbar.shrinked .navbar-brand img {
        height: 35px;
    }
    
    .glass-navbar.shrinked .navbar-brand .brand-text {
        font-size: 1rem;
        line-height: 1.1;
    }
    
    .navbar-nav .nav-item.dropdown:hover > .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }
}

/********** MOBILE (Under 992px) **********/
@media (max-width: 991.98px) {
    .top-bar { display: none; }
    
    .glass-navbar {
        top: 0;
        z-index: var(--z-index-navbar-base);
        padding-right: 20px;
    }
    
    .navbar-brand .brand-text { display: none; }
    
    main { margin-top: 70px; }

    .navbar-collapse {
        position: fixed;
        top: 0;
        left: 0;
        z-index: var(--z-index-dropdown);
        
        width: 100%;
        height: 100vh;
        padding: 80px 25px 30px;
        overflow-y: auto;
        
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        
        transform: translateX(100%);
        transition: transform 0.4s ease-in-out;
        touch-action: pan-y;
    }
    
    .navbar-collapse.show { transform: translateX(0); }

    .glass-navbar .navbar-nav {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        padding-top: 20px;
    }
    
    .glass-navbar .navbar-nav .nav-item {
        width: 100%;
        margin: 0;
        border-bottom: 1px solid var(--border-color-light);
    }
    
    .glass-navbar .navbar-nav .nav-link {
        display: flex;
        justify-content: space-between;
        width: 100%;
        padding: 15px 10px;
        
        border-radius: 0;
        font-size: 16px;
        font-weight: 600;
    }
    
    .glass-navbar .navbar-nav .nav-link:hover,
    .glass-navbar .navbar-nav .nav-link.active {
        background: var(--primary);
    }

    .dropdown-menu {
        position: static;
        width: 100%;
        margin: 0;
        padding: 0;
        
        background: none;
        border: none;
        box-shadow: none;
    }
    
    .dropdown-menu > li > a.dropdown-item {
        padding: 10px 10px 10px 30px;
        color: var(--text-color) !important;
        font-size: 15px;
    }
    
    .dropdown-menu .dropdown-item.dropdown > .dropdown-toggle {
        display: flex;
        justify-content: space-between;
        width: 100%;
        padding: 10px 10px 10px 30px;
        
        border-bottom: 1px dashed var(--border-color-light);
        font-size: 15px;
        font-weight: 600;
    }
    
    .dropdown-menu .dropdown-item.dropdown > .dropdown-menu {
        position: static;
        padding-left: 15px;
    }
    
    .dropdown-menu .dropdown-item.dropdown > .dropdown-toggle::after {
        content: "\f078";
        position: static;
        margin-left: 10px;
        
        color: var(--text-color);
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
    }
    
    .dropdown-menu .dropdown-item.dropdown > .dropdown-toggle[aria-expanded="true"]::after {
        color: var(--primary);
        transform: rotate(180deg);
    }

    body.nav-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        z-index: 999;
        
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.35);
        
        pointer-events: auto;
    }
}