/**
 * Theme Layout Header Components & Architecture Rules
 */

/* Main Header Shell Layout Structure - Updated for Sticky Tracking */
.site-header {
    background-color: var(--bg-color, #111111);
    position: fixed; /* Keep pinned to top of screen during scroll */
    top: 0;
    left: 0;
    z-index: 9999;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); /* Adds a clean shadow separating header from scrolling content */
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Site Brand Text Elements */
.site-branding {
    margin: 0;
    padding: 0;
}

.site-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.2;
}

.site-title a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-title a:hover {
    color: #cccccc;
}

/* Primary Horizontal Desktop Menu Rules */
.main-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 28px;
}

.main-navigation ul a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.main-navigation ul a:hover {
    color: #ff1a53; /* Bright emphasis focus color state */
}

/* Standard Hidden State Rule for the Mobile Trigger */
.mobile-menu-hamburger-btn {
    display: none;
}

/* --- Mobile Breakpoint Overrides (Viewport Switch Max Width 768px) --- */
@media screen and (max-width: 768px) {
    
    /* Display and Center the 3-Line Mobile Button Container */
    .mobile-menu-hamburger-btn {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 26px;
        height: 18px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 100000; /* Keeps lines hovering floating safely above the fullscreen modal box layer */
    }

    .hamburger-bar {
        width: 100%;
        height: 2px;
        background-color: #ffffff;
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
    }

    /* Transform Main Nav container window to structural Solid Canvas Takeover */
    .main-navigation {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: #000000; /* Pure deep solid black display fill */
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s ease;
        z-index: 99999;
    }

    /* Stack list targets into clean vertical orientation matrix */
    .main-navigation ul {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 36px;
        text-align: center;
    }

    .main-navigation ul a {
        font-size: 2rem; /* Clean high impact visibility touch targets */
        font-weight: 700;
        display: block;
        padding: 10px 20px;
    }

    /* Target Engine Layout Classes Triggered Runtime via JS Action Sets */
    body.mobile-menu-open {
        overflow: hidden; /* Halts natural background site body scrolling steps */
    }

    body.mobile-menu-open .main-navigation {
        opacity: 1;
        visibility: visible;
    }

    /* Morphing Matrix transformations to turn 3 lines to an elegant exit "X" button */
    body.mobile-menu-open .line-top {
        transform: translateY(8px) rotate(45deg);
    }
    
    body.mobile-menu-open .line-mid {
        opacity: 0;
        transform: scale(0.3);
    }
    
    body.mobile-menu-open .line-bot {
        transform: translateY(-8px) rotate(-45deg);
    }
}


.site-title a img {
    max-height: 30px; /* Adjust this to match your header's height */
    width: auto;
    display: block;
}