

/* 1. The Main Stage */
.hero-split-container {
    position: relative;
    width: 100%;
    display: flex;
    background: transparent;
    z-index: 1; 
    justify-content: center;
    align-items: center;
    max-width: 1200px !important; 
    
    /* 2. Center the block element horizontally */
    margin-left: auto !important;
    margin-right: auto !important;
    
    /* 3. Ensure no floats above prevent centering */
    clear: both;
}


#logo-container {
    /* ADD all the layout styles you just removed */
    display: flex;
    position: relative;
    /* height: 60vh; */ /* <-- Move this here if you want it */

    /* Also, remove the inline styles from your HTML */
    background: transparent;
    padding: 0.5em;
    width: 100%; /* Use 100% width, not 'auto' */
}

/* 2. The Two Halves (The "Masks") */
.split-part {
    height: 100%;
    position: relative; /* Keep for spinning X */
    
    /* Use Flexbox to vertically center the image */
    display: flex;
    align-items: center;
}

/* 3. Left Side Animation */
.split-part.left {
    transform: translateX(-100%);
    animation: slideLeft 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 4. Right Side Animation */
.split-part.right {
    transform: translateX(100%);
    
/* === YOUR SPEED DIALS === */
    /* 1. Shorter duration (0.9s)
     * 2. 'linear' timing (no slowdown)
    */
    animation: slideRightBounce 0.9s ease-in forwards;
}

/* * 5. Base Image Styling (applies to BOTH images)
 */
.split-part img.hero-img {
    /* Make the image fill its 50% container */
    width: 100%;
    /* Let the height adjust automatically */
    height: auto; 
    
    backface-visibility: hidden;
}



/* 8. Animation Keyframes (Keep as-is) */
@keyframes slideLeft { to { transform: translateX(0); } }
/* NEW KEYFRAMES FOR THE BOUNCE */
@keyframes slideRightBounce {
    0% {
        transform: translateX(100%);
    }
    
    /* --- THE BOUNCE --- */
    85% {
        /* Go PAST the final position */
        transform: translateX(-3%); 
    }
    100% {
        /* Settle back to the final position */
        transform: translateX(0);
    }
}

/* 9. THE FLASH OVERLAY (The "Mask" for the shine) */

/* 10. THE SHINE ELEMENT (The moving part) */
.hero-flash-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 50px;
    height: 100%;
    background: white;
    transform: skewX(-25deg);
    animation: doShine 0.5s linear 2.3s forwards;
}

@keyframes doShine {
    0% {
        left: -50px;
    }
    100% {
        left: calc(100% + 50px);
    }
}

/*Add Spinning X div positions and animated spinAndFadeIn*/

#Spinning-X-container {
    /* 1. THE SIZE FIX: 
       Set width as a percentage of its parent (.split-part.left).
       Adjust this percentage to get the size you want. */
    width: 30%;  /* <-- Try 15%, 20%, etc. */

    /* 2. THE SQUARE FIX: 
       This automatically makes the height equal the width. */
    aspect-ratio: 1 / 1;

    /* 3. THE CENTERING FIX: (Same as before) */
    display: flex;
    justify-content: center;
    align-items: center;

    /* --- (All your other rules remain the same) --- */
    position: absolute;
    top: 0px;
    right: 10px;
    z-index: 10;
    animation: spinAndFadeIn 1s ease-out 1.2s forwards;
    opacity: 0; 
}

#Spinning-X-container img {
    /* Make the image fit perfectly inside the new square */
    width: 100%;
    height: 100%;
    object-fit: contain; /* Prevents distortion */
}

/* 14. THE NEW KEYFRAMES (Fade In + Spin) */
@keyframes spinAndFadeIn {
    /* * At 0% (which is 1.2s into the total timeline), 
     * it's still invisible and at 0 degrees.
     */
    0% {
        opacity: 0;
        transform: rotate(0deg);
    }
    
    /* * At 10% of the animation (just 0.1s later), 
     * it quickly fades into view.
     */
    10% {
        opacity: 1;
    }

    /* * At 100% (the end of the 1s spin), 
     * it's still visible and fully rotated.
     */
    100% {
        opacity: 1;
        transform: rotate(-360deg);
    }
}





    .news-grid {
        display: grid;
        /* This forces 3 columns. If the screen is too small, it wraps automatically */
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 30px; /* Space between columns */
        margin-top: 20px;
    }

    .news-card {
        background: #fff;
        border: 1px solid #eee;
        border-radius: 8px;
        padding: 20px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1); /* Subtle shadow */
        display: flex;
        flex-direction: column; /* Aligns content vertically inside the card */
        height: 100%; /* Makes all cards the same height */
    }

    .news-card img {
        width: 100%;
        height: auto;
        border-radius: 4px;
        margin-bottom: 15px;
    }

    .news-card h3 {
        margin-top: 0;
        font-size: 1.2rem;
        margin-bottom: 0;
    }

    .news-card .read-more {
        margin-top: auto; /* Pushes button to bottom */
        align-self: flex-start;
        background: #333;
        color: #fff;
        padding: 5px 15px;
        border-radius: 4px;
        text-decoration: none;
        font-size: 0.8rem;
    }

    .news-card p {
        margin-top: .5rem;
        margin-bottom: 0.5rem;
    }

/*
* HOMEPAGE NAV BAR FIX:
* Forces header to be on a higher layer 
* than the hero animation.
*/
body.template-home #header {
    z-index: 15;
}

/* Minimal fix for double vertical scrollbar */
html {
    overflow-y: scroll; /* Ensure scroll is enabled on HTML element */
}
body {
    overflow: initial !important; /* Prevents body from fighting for control */
}


/* Mobile Fix: @media (max-width: 768px) { ... } */

@media (max-width: 768px) {
    
    /* 1. HIDE THE ENTIRE HERO ANIMATION CONTAINER */
    .hero-split-container {
        /* This hides the element and ensures it takes up no space */
        display: none !important; 
        height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;

        
    }

    /* 2. CLEAR THE FIXED NAVIGATION BAR */
    /* This pushes the main content (#body) down just enough to appear below the fixed header */
    #body {
        /* 100px is usually safe for the Antimatter header height. Adjust if needed. */
        padding-top: 100px !important; 
        margin-top: 0 !important;
    }
    
 
}