/* 1. Logo Wrapper Resets (Targeting the inner div and the <a> tag) */
.static-overlay > div, 
.static-overlay a {
    /* Make <a> tag a Flex container to control vertical alignment */
    display: flex;
    
    /* Force contents (the <object>) to align to the top (flex-start) */
    align-items: flex-start;
    
    pointer-events: auto !important;

    /* Preserve margin/padding resets */
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: 0; 
    margin-right: 0;
    padding: 0;
    line-height: 0; 
    
    /* Give it room to contain the logo */
    width: fit-content; 
}

/* 2. The Main Overlay Container */
.static-overlay {
    /* Container positioning, layering, and full-screen size */
    position: absolute;
    top: 0;
    left: 0;
    
    /* ADDED: Clamping and centering control */
    width: 90%; 
    max-width: 1200px;
    height: 100%; 
    margin-left: auto;
    margin-right: auto;
    
    z-index: 30;
    
    /* Split padding to use stable vertical units (3rem) and responsive horizontal units (5vw) */
    padding: 2rem 6vw 2rem 6vw; 
    
    /* MODIFIED: Flex properties to anchor content to the top-left */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; 
    align-items: flex-start;
    
    /* Temporarily remove all child spacing */
    margin: 0 !important; 
    
    text-align: left; 
    pointer-events: none;
    
    /* Generic styles for all text inside the overlay */

}

/* 3. The Logo Image (Now targets the <object> tag again) */
.logo-img {
    /* Force <object> to be treated as a block for sizing */
    display: block; 
    
    /* Use object-fit: contain to ensure the SVG scales correctly within the <object> frame */
    object-fit: contain;

    transform-origin: 0% 0%; 
    object-position: 0% 0%;
    transform: translateX(0vw);

    /* Dynamic scaling based on viewport width/height */
    width: 20vw;  
    height: 10vh; 
    min-width: 200px;
    min-height: 100px;
    max-width: 600px;
    max-height: 300px;

}

.flex.items-center { 
    /* This overrides the vertical centering, aligning items to the top */
    align-items: flex-start; 
}

/* Modal content below */

/* 1. POPUP OVERLAY (Hidden State) */
.popup-overlay {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    display: flex; 
    justify-content: center; 
    align-items: center;

    /* Global Fix */
    overflow: hidden; 

    /* Initial Hidden State */
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease, z-index 0s 0.3s;
}

/* 2. POPUP OVERLAY (Visible/Active State) */
.popup-overlay.is-open {
    opacity: 1;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

/* 3. PANEL CLOSER CONTAINER (The clickable dark box) */
.panel-closer {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
    /* Ensure the closer fills the overlay and uses flex to center the content box */
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
