/* =========================================
   BRIGHT ANGEL - STRICT GLOBAL HEADER
   ========================================= */

#ba-global-header {
    font-family: 'Montserrat', 'Raleway', sans-serif;
}

#ba-global-header .ba-navbar {
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 9999;
    padding: 1.2rem 0;
    transition: padding 0.3s ease, box-shadow 0.3s ease;
}

#ba-global-header .ba-navbar.ba-navbar-scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.1);
}

#ba-global-header .ba-navbar-brand img {
    height: 70px;
    width: auto;
    transition: transform 0.3s ease;
}

#ba-global-header .ba-navbar-brand img:hover {
    transform: scale(1.02);
}

#ba-global-header .ba-nav-link {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 0.5rem 1rem !important;
    color: #1e293b !important; 
    position: relative;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

#ba-global-header .ba-nav-link::after {
    content: '';
    display: block;
    position: absolute;
    left: 50%;
    bottom: 2px;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    border-radius: 2px;
    background: var(--primary-color, #004aad);
    transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#ba-global-header .ba-nav-link:hover,
#ba-global-header .ba-nav-link:focus,
#ba-global-header .ba-nav-link.active {
    color: var(--primary-color, #004aad) !important;
}

#ba-global-header .ba-nav-link:hover::after,
#ba-global-header .ba-nav-link:focus::after,
#ba-global-header .ba-nav-link.active::after {
    width: 70%;
}

/* =========================================
   DROPDOWN MENU STYLING & MOBILE FIX
   ========================================= */

#ba-global-header .dropdown-menu {
    border-radius: 12px;
    background: #ffffff;
    padding: 0.5rem 0;
}

#ba-global-header .dropdown-item {
    font-weight: 600;
    color: #475569;
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

#ba-global-header .dropdown-item:hover,
#ba-global-header .dropdown-item.active-sub {
    color: var(--primary-color, #004aad);
    background: rgba(0, 74, 173, 0.05);
    padding-left: 1.8rem; 
}

@media (min-width: 992px) {
    #ba-global-header .dropdown-menu {
        border: 1px solid rgba(0,0,0,0.05);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
        margin-top: 0.5rem;
        min-width: 200px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: all 0.3s ease;
        display: block; 
    }
    
    #ba-global-header .dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

@media (max-width: 991px) {
    #ba-global-header .navbar-collapse {
        background-color: #ffffff;
        padding: 1rem 0;
        border-top: 1px solid rgba(0,0,0,0.05);
        margin-top: 10px;
    }

    #ba-global-header .ba-nav-link {
        padding: 10px 20px !important;
        display: block;
        width: 100%;
        text-align: left;
    }

    #ba-global-header .ba-nav-link::after {
        display: none !important; 
    }

    #ba-global-header .ba-nav-link:hover,
    #ba-global-header .ba-nav-link.active {
        background-color: rgba(0, 74, 173, 0.05);
        border-left: 4px solid var(--primary-color, #004aad);
        padding-left: 16px !important; 
    }

    #ba-global-header .dropdown-menu {
        position: static !important; 
        float: none;
        border: none;
        box-shadow: none;
        padding: 0 0 0 1.5rem; 
        margin: 0;
        background: transparent;
        display: none; 
        opacity: 1;
        visibility: visible;
        transform: none;
    }
    
    #ba-global-header .dropdown-menu.show {
        display: block !important;
    }

    #ba-global-header .dropdown-item {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
    
    #ba-global-header .dropdown-item.active-sub {
        background: transparent;
        border-left: 2px solid var(--primary-color, #004aad);
    }
}

#ba-global-header .ba-page-badge {
    background: #ef4444; 
    color: #ffffff;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 3px 6px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(239, 68, 68, 0.3);
    display: inline-block;
    transform: translateY(-2px);
}

#ba-global-header .dropdown-toggle::after,
.navbar-nav .dropdown-toggle::after {
    display: none !important;
    content: none !important;
    border: none !important;
}

#ba-global-header .nav-item.dropdown .ba-nav-link::before,
#ba-global-header .nav-item.dropdown .ba-nav-link::after {
    display: none !important;
}

@media (max-width: 991px) {
    #ba-global-header .ba-nav-link::before,
    #ba-global-header .ba-nav-link::after {
        display: none !important;
        content: none !important;
    }
    
    #ba-global-header .ba-nav-link:hover,
    #ba-global-header .ba-nav-link.active {
        border-bottom: none !important;
        border-left: 4px solid #004aad !important;
    }
}

/* --- FULL SCREEN OVERLAY --- */
.ba-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1e293b; 
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.8s ease;
}

.ba-loader-hidden { opacity: 0; visibility: hidden; }

/* --- CENTERING WRAPPER --- */
.ba-loader-inner {
    display: flex;
    flex-direction: column; 
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    /* This gap ensures the text card never touches the cubes */
    gap: 120px; 
}
/* --- CUBE CONTAINER (Rainbow Hue Rotation) --- */
.cube-container {
    /* Giving the container an explicit height prevents the overlap */
    height: 180px; 
    width: 100%;
    transform: skewY(-20deg);
    display: flex;
    justify-content: center;
    align-items: center;
    animation: colorfulRainbow 5s linear infinite; 
    position: relative;
    /* Added margin to push the text card further down */
    margin-bottom: 20px;
}

@keyframes colorfulRainbow {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.cube { position: relative; }
.cube:nth-child(2) { translate: -60px -60px; }
.cube:nth-child(3) { translate: 60px 60px; }

.cube div {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 30px;
    translate: calc(-70px * var(--x)) calc(-60px * var(--y));
}

/* --- CUBE PIECES (Base State) --- */
.cube div span {
    position: relative;
    display: inline-block; 
    width: 40px;
    height: 40px;
    background: #dcdcdc;
    z-index: calc(1 * var(--i));
    transition: 1.5s; 
}

.cube div span:before {
    content: ""; position: absolute; left: -30px; width: 30px; height: 100%;
    background: #fff; transform-origin: right; transform: skewY(45deg);
    transition: 1.5s;
}

.cube div span:after {
    content: ""; position: absolute; top: -30px; left: 0px; width: 100%; height: 30px;
    background: #f2f2f2; transform-origin: bottom; transform: skewX(45deg);
    transition: 1.5s;
}

/* --- CUBE HOVER EFFECT (Instant Colorful Light-Up) --- */
.cube div span:hover {
    transition: 0s;
    background: #ef4149; 
    filter: drop-shadow(0 0 30px #ef4149);
    cursor: pointer; 
}

.cube div span:hover:before,
.cube div span:hover:after {
    transition: 0s;
    background: #ef4149;
}

/* --- TEXT STYLING (Solid Dark Card ON TOP of the cube) --- */
.loader-text-wrapper {
    position: relative;
    text-align: center;
    z-index: 10000;
    background: #0f172a !important; 
    padding: 25px 45px;
    border-radius: 12px;
    border: 2px solid #334155 !important; 
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
    width: max-content;
    max-width: 90%;
    /* Ensure it doesn't scale with the cube container */
    transform: none !important;
}
.loader-main-text {
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    animation: textGlow 2s infinite;
}

.loader-sub-text {
    color: #cbd5e1; 
    font-size: 0.9rem;
    letter-spacing: 1.5px;
    margin: 0;
}

@keyframes textGlow { 
    0%, 100% { opacity: 0.8; } 
    50% { opacity: 1; text-shadow: 0 0 15px rgba(255,255,255,0.4); } 
}



/* --- GOOGLE TRANSLATE CUSTOM UI --- */

/* Hide the "Powered by" branding and Google logo */
.goog-logo-link, 
.goog-te-gadget span, 
.goog-te-banner-frame {
    display: none !important;
}

/* Fix body shifting when translated */
body {
    top: 0 !important;
}

/* Match the dropdown box to your site theme */
.goog-te-gadget-simple {
    background-color: transparent !important;
    border: 1px solid #e0e0e0 !important;
    padding: 6px 12px !important;
    border-radius: 50px !important; /* Rounded pill look */
    font-family: 'Inter', sans-serif !important; /* Use your site font */
    display: flex !important;
    align-items: center !important;
    transition: all 0.3s ease;
}

.goog-te-gadget-simple:hover {
    border-color: #0056b3 !important; /* Your theme blue */
    background-color: rgba(0, 86, 179, 0.05) !important;
}

/* Style the text inside the dropdown */
.goog-te-menu-value span {
    color: #333 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    text-transform: uppercase;
    text-decoration: none !important;
}

/* Remove the blue focus outline */
.goog-te-gadget-simple:focus {
    outline: none !important;
}

/* --- READABILITY IMPROVEMENTS --- */

/* Ensures translated text doesn't overlap or break your design */
.goog-te-menu-frame {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
    border: none !important;
}

/* Highlight for mobile accessibility */
@media (max-width: 991px) {
    .ba-translate-li {
        margin-top: 15px;
        width: 100%;
        display: flex;
        justify-content: center;
    }
}