/* Container to hold the three panels */
.hero-gallery {
    display: flex;
    width: 100%;
    /* Calculates height to fill screen minus header (approx 100px) and footer */
    height: calc(100vh - 100px); 
    overflow: hidden;
    background: #000;
}

/* Individual Panels (The Links) */
.gallery-panel {
    position: relative;
    flex: 1; /* All start with equal width */
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: flex 0.6s cubic-bezier(0.25, 1, 0.5, 1); /* Smooth easing */
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
}

/* --- BACKGROUND IMAGES --- */
/* Update these paths to your actual image locations */
.tea-panel {
    /* Use the steep tea image */
    background-image: url('/public/HomePage3images-01.png'); 
}

.coffee-panel {
    /* Use the pour over coffee image */
    background-image: url('/public/HomePage3images-02.png'); 
}

.wine-panel {
    /* Use the wine opener image */
    background-image: url('/public/HomePage3images-03.png'); 
}

/* Dark Overlay to make text readable */
.gallery-panel .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Darkens image by 40% */
    transition: background 0.4s ease;
    z-index: 1;
}

/* Text Content Wrapper */
.gallery-panel .content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    transform: translateY(20px); /* Start slightly lower */
    transition: transform 0.4s ease;
}

/* The Main Headers */
.gallery-panel h2 {
    font-family: 'AileronThin', sans-serif; /* Your custom font */
    font-size: 4rem;
    letter-spacing: 2px;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    transition: letter-spacing 0.4s ease;
}

/* Subtitles (Initially Hidden) */
.gallery-panel p {
    font-family: 'AileronReg', sans-serif;
    font-size: 1.2rem;
    margin-top: 10px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease 0.1s; /* Slight delay */
    text-shadow: 0 1px 5px rgba(0,0,0,0.8);
}

/* Little Arrow Icon */
.btn-arrow {
    margin-top: 15px;
    font-size: 2rem;
    opacity: 0;
    transition: all 0.4s ease 0.2s;
    color: white;
}

/* --- HOVER EFFECTS --- */

/* When hovering a specific panel */
.gallery-panel:hover {
    flex: 2.5; /* This panel grows 2.5x larger than the others */
}

/* Lighten the overlay on hover so image pops */
.gallery-panel:hover .overlay {
    background: rgba(0, 0, 0, 0.1); 
}

/* Move text up slightly */
.gallery-panel:hover .content {
    transform: translateY(0);
}

/* Reveal subtitle and arrow */
.gallery-panel:hover p,
.gallery-panel:hover .btn-arrow {
    opacity: 1;
    transform: translateY(0);
}

/* Spacing out the letters slightly on hover */
.gallery-panel:hover h2 {
    letter-spacing: 5px;
}

/* --- RESPONSIVE DESIGN (Mobile) --- */
@media screen and (max-width: 768px) {
    .hero-gallery {
        flex-direction: column; /* Stack vertically on phones */
        height: auto;
        min-height: 100vh;
    }

    .gallery-panel {
        min-height: 33vh; /* Each takes 1/3 of screen height */
        width: 100%;
    }

    /* On mobile, we always show the subtitle because there is no "hover" */
    .gallery-panel p {
        opacity: 1;
        transform: translateY(0);
        font-size: 1rem;
    }
    
    .gallery-panel h2 {
        font-size: 3rem;
    }
    
    /* Disable the expansion effect on mobile to prevent jerkiness during scrolling */
    .gallery-panel:hover {
        flex: 1; 
    }
}