/* =================================================================
   SECTION 1: HEADER & FOOTER (BLACK THEME + LIGHTING FLASH)
   ================================================================= */
:root {
    --cassiopeia-color-primary: #000000;
    --cassiopeia-color-link: #ffffff;
    --cassiopeia-color-hover: #007bff;
}

.container-header {
    background-color: #000000 !important;
    background-image: none !important;
    box-shadow: none !important;
    border-bottom: none !important;
    /* Desktop Padding */
    padding: 25px 0 5px 25px !important;
    position: relative;
    /* Overflow remains visible so menus work */
    overflow: visible !important; 
}

/* LIGHTING FLASH (DESKTOP ONLY - >992px) */
@media (min-width: 992px) {
    .container-header::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        /* FIX: Lock width to 100% so it never overflows */
        width: 100%; 
        height: 100%;
        
        /* THE MAGIC: We create the angled flash using a gradient, not skew transform */
        background: linear-gradient(
            115deg, 
            rgba(255,255,255,0) 40%, 
            rgba(255,255,255,0.2) 50%, 
            rgba(255,255,255,0) 60%
        );
        
        /* Make the background wider than the container so we can slide it */
        background-size: 250% 100%;
        background-repeat: no-repeat;
        
        pointer-events: none;
        animation: shineLoop 10s linear infinite;
        z-index: 6;
        mix-blend-mode: screen;
    }
}

@keyframes shineLoop {
    0% { background-position: 200% 0; }
    20% { background-position: -200% 0; } /* Slide the background, not the div */
    100% { background-position: -200% 0; }
}

/* Ensure text stays visible */
.site-title, .navbar-brand, .mod-menu > li > a {
    color: #ffffff !important;
    position: relative;
    z-index: 5;
}

/* =================================================================
   SECTION 2: LOGO & OCTOPUS VIDEO ALIGNMENT
   ================================================================= */
.brand-container {
    display: flex;
    align-items: center; 
    gap: 15px; 
    position: relative;
    z-index: 5;
    flex-direction: row; /* Default: Side by side */
}

.brand-logo { height: 100px !important; width: auto !important; }
.brand-video { height: 130px !important; width: auto !important; }

/* --- MOBILE SPECIFIC LAYOUT (Max Width 768px) --- */
@media (max-width: 768px) {
    
    .container-header {
        /* Remove left padding to allow true centering */
        padding: 15px !important;
    }

    .brand-container {
        /* Stack items vertically */
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        text-align: center;
        gap: 10px;
    }

    /* FORCE RE-ORDERING */
    /* Moves the Video to position 1 (Top) */
    .brand-video {
        height: 110px !important;
        order: 1; 
        margin-bottom: 5px; /* Add small space between video and logo */
    }

    /* Moves the Logo to position 2 (Bottom) */
    .brand-logo {
        height: 80px !important;
        order: 2; 
    }
}

/* =================================================================
   SECTION 3: DROPDOWN MENU FIXES
   ================================================================= */
.container-header .dropdown-menu,
.container-header .nav-child {
    background-color: #000000 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    display: block !important; 
    visibility: hidden;
    opacity: 0;
    position: absolute !important;
    z-index: 1000 !important;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(10px);
}

.container-header li:hover > .dropdown-menu,
.container-header li:hover > .nav-child {
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateY(0);
}

.container-header .dropdown-item,
.container-header .nav-child a {
    color: #ffffff !important;
    padding: 10px 20px !important;
}

.container-header .dropdown-item:hover {
    background-color: #1a1a1a !important;
    color: #007bff !important;
}