﻿@import url('https://fonts.googleapis.com/css?family=Muli&display-swap');

* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Muli', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    overflow: hidden;
    margin: 0;
}

.phwrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
}

.phcontainer {
    display: flex;
    width: 100vw;
    padding-top: 100px;
}

.animated-background {
    background: linear-gradient(to right, #833ab4, #fd1d1d, #fcb045);
    background-size: 400% 400%;
    animation: animate-background 10s infinite ease-in-out;
    /* fill the viewport and sit behind content */
    position: fixed;
    inset: 0; /* top:0; right:0; bottom:0; left:0; */
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 0;
}

/* ensure content sits above the animated background */
.phcontainer {
    position: relative;
    z-index: 1;
    width: 90vw;
}

@keyframes animate-background {
    0% {
        background-position: 0 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0 50%;
    }
}

.panel {
    /* make images behave consistently and cover the panel area */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    height: 80vh;
    border-radius: 50px;
    color: #fff;
    text-shadow: 0px 2px 4px #000;
    cursor: pointer;
    flex: 0.5;
    margin: 10px;
    position: relative;
    transition: flex 0.7s ease-in, border-radius 0.4s ease-in-out, background-size 0.5s ease, background-position 0.5s ease;
    overflow: hidden; /* ensure rounded corners clip content */
}

    .panel h3 {
        font-size: 24px;
        position: absolute;
        bottom: 20px;
        left: 20px;
        margin: 0;
        opacity: 0;
        transform: translateY(12px);
        transition: opacity 0.6s ease, transform 0.6s ease;
        font-weight: 700;
        letter-spacing: 0.4px;
        line-height: 1;
        pointer-events: none;
    }

    .panel.active {
        flex: 5;
        border-radius: 80px; /* increased rounding for active panel */
        /* ensure the background image completely fills the expanded panel */
        background-size: cover;
        background-position: center center;
    }

        .panel.active h3 {
            opacity: 1;
            transform: translateY(0);
            transition-delay: 0.12s;
            font-size: clamp(20px, 3.5vw, 36px);
            padding: 10px 14px;
            background: rgba(0, 0, 0, 0.45);
            border-radius: 8px;
            box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
            color: #fff;
            text-shadow: none;
        }

@media(max-width: 480px) {
    .phcontainer {
        width: 100vw;
    }

    .panel:nth-of-type(4),
    .panel:nth-of-type(5) {
        display: none;
    }

    .panel h3 {
        font-size: 18px;
        bottom: 14px;
        left: 12px;
    }

    .panel.active h3 {
        font-size: 18px;
        padding: 8px 10px;
        border-radius: 6px;
    }

    .panel.active {
        border-radius: 28px; /* gentler rounding on small screens */
    }
}
