@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=TASA+Explorer:wght@400..800&display=swap');

* {
    box-sizing: border-box;
}

body {
    font-family: "Montserrat", sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    margin: 0;
}

.container {
    display: flex;
    width: 90vw;
}

.panel {
    background-size: cover;
    background-position: center;
    position: relative;
    height: 80vh;
    transition: flex 0.5s ease-in;
    color: #fff;
    flex: 0.5;
    border: 5px solid silver; 
    cursor: pointer;   
    gap: 2px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
.panel::after {
    content: "";
    position: absolute;
    bottom: 0;
    top: 0;
    left: 0;
    right: 0;
    height: 0%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    border-radius: inherit;
}

.panel h3 {
    font-size: medium;
    margin: 0;
    padding: 0;
    position: absolute;
    bottom: 20px;
    left: 10px;
    transition: opacity 0.3s ease-in-out 0.8s;
    opacity: 0;
}

.panel.active {
    flex: 5;
    border-color: #fff;
    transform: scale(1.02);
    transition: transform 0.2s ease;
}
.panel.active h3 {
    font-size: medium;
    opacity: 1;
    position: absolute;
    bottom: 20px;
    left: 10px;
}


@media (max-width:480px) {
    .container {
        width: 100vw;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
    }
    .panel {
        flex: 1;
        margin: 0;
        height: 40vh;
        scroll-snap-align: center;
    }
    .panel.active{
        flex:3
    }
    .panel:nth-of-type(2), .panel:nth-of-type(3) {
        display: none;
    }
}