    header .container { padding-top: 20px !important; padding-bottom: 20px !important; }
    .header-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover !important;
    background-position: center !important;
    transition: filter 0.4s ease, opacity 1s ease-in-out !important;
}

/* Fix for the footer overlap specifically */
.flex-container::after {
    content: "";
    display: table;
    clear: both;
}
    .header-wrapper{
        position: relative; margin: 0 auto; background: #ffffff; overflow: hidden;
    }
    .header-back { z-index: 1; }
    .header-front { z-index: 2; opacity: 1; }
   
    .header-badge {
    position: absolute; 
    z-index: 999; 
    display: block; 
    width: auto; 
    max-width: 250px;
    padding: 15px; 
    
    /* Ensure background is ALWAYS white so text remains readable */
    background: #ffffff !important; 
    
    /* Initial colors (will be overridden by JS) */
    color: black; 
    border: 8px solid #ffffff; 
    border-radius: 4px;
    
    box-shadow: 0 8px 16px rgba(0,0,0,0.3), inset 3px 3px 6px rgba(0,0,0,0.15);
    opacity: 0; 
    transform: scale(1.5); 
    
    /* ADDED: Smooth color and border-color transitions */
    transition: 
        opacity 0.4s ease-out, 
        transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.3),
        color 0.6s ease, 
        border-color 0.6s ease;
        
    white-space: normal; 
    word-wrap: break-word; 
    pointer-events: none;

     font-size: 1.8rem !important; /* Boosted from 1.5em to ~32px */
    line-height: 1.2;
    font-weight: 800; /* Makes the colors pop more */
}
.header-badge.is-stuck { opacity: 1; transform: scale(1) rotate(var(--r, 0deg)); }



/* Container for both halves */
.flex-container {
    display: flex;
    flex-wrap: wrap; 
    width: 100%;
    padding: 0 20px; 
    gap: 25px; 
    justify-content: center;
    box-sizing: border-box;
}

/* Individual halves */
.half {
    
    flex: 1 1 calc(50% - 15px);
    min-width: 340px; 
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    
   
    height: 70dvh; 
    min-height: 400px; 
    max-height: 600px;

    
    border-radius: 25px; 
    overflow: hidden; 
    border: 8px solid #ffffff;
    box-sizing: border-box;
    
    
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.half:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

/* MOBILE FIX */
@media (max-width: 768px) {
    .flex-container { padding: 0 15px; gap: 20px; }
    .half {
        flex: 1 1 100%;
        min-width: 100%;
        height: 55dvh; /* Shorter on mobile to keep button in view */
    }
    .visit-overlay {
        font-size: 1.1rem !important; 
        bottom: 20% !important; /* Slightly higher on mobile */
        padding: 8px 18px !important;
    }
}

/* The Link Wrapper */
.header-link-wrapper {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 10;
    text-decoration: none !important;
}

/* PC VERSION: Positioned lower to feel more natural */
.visit-overlay {
    position: absolute;
    bottom: 15%; /* Lowered from 25% for a better desktop look */
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000; 
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.6); 
    padding: 14px 28px;
    border-radius: 50px; 
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
    transition: all 0.4s ease;
    pointer-events: none;
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,0.3);
}

/* MOBILE VERSION: Pushed HIGHER to stay in view */
@media (max-width: 768px) {
    .visit-overlay {
        bottom: 25% !important; /* Pushed up significantly for mobile screens */
        font-size: 1.2rem !important; 
        padding: 10px 20px !important;
        background: rgba(0, 0, 0, 0.8) !important; /* Darker for better visibility */
    }
}

/* Hover Effects */
.half:hover .header-layer { filter: brightness(0.3) !important; }

.half:hover .visit-overlay {
    background: rgba(0, 0, 0, 0.9) !important;
    color: #FFD700 !important; 
    transform: translate(-50%, 50%) scale(1.1) !important;
    border-color: #FFD700;
}

/* Image Layer */
.header-layer {
    background-size: cover !important;
    background-position: center !important;
    
    transition: filter 0.4s ease, opacity 1s ease-in-out !important;
}

.half:hover .header-badge {
    opacity: 0.2 !important; 
}

