@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    font-family: "Poppins", sans-serif;
    background-color: #ffffff;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #333;
    text-align: center;
    overflow-x: hidden;
}

.main-container h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    color: #2c3e50;
    animation: fadeInUp 0.8s ease-out forwards;
}

.subtitle {
    font-size: 1.1rem;
    color: #7f8c8d;
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    animation: fadeInUp 0.8s 0.3s ease-out forwards;
}

.card-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: auto;
    min-height: 480px;
    transition: all 0.5s ease;
}


.card-container:has(.card.active) .card:not(.active) {
    opacity: 0.6;
    transform: scale(0.95);
}

.card {
    background-color: #f8f9fa;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    overflow: hidden;
    width: 320px;
    height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    opacity: 0;
    animation: fadeInUp 0.7s ease-out forwards;
}

.card:nth-of-type(1) {
    animation-delay: 0.6s;
}

.card:nth-of-type(2) {
    animation-delay: 0.8s;
}

.card:nth-of-type(3) {
    animation-delay: 1.0s;
}

.card:not(.active):hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.12);
}

.card-visible-content h2 {
    margin: 0;
    font-size: 1.8rem;
    color: #34495e;
    transition: all 0.5s ease;
}

.card-hidden-content {
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.6s ease-out, opacity 0.4s 0.2s ease-in, visibility 0.6s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 0 20px 20px;
}

.card-hidden-content img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.card-hidden-content p {
    margin: 0;
    font-size: 0.95rem;
    color: #555;
}

.btn {
    background-color: #3498db;
    color: white;
    padding: 10px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn:hover {
    background-color: #2980b9;
    transform: scale(1.05);
}

.card.active {
    height: 450px;
    background-color: #ffffff;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    cursor: default;
}

.card.active .card-visible-content {
    padding-top: 20px;
    transform: translateY(-15px);
}

.card.active .card-hidden-content {
    max-height: 350px;
    opacity: 1;
    visibility: visible;
}

@media (max-width: 1050px) {
    .card-container {
        flex-direction: column;
        align-items: center;
        gap: 25px;
    }

    .card {
        width: 90%;
        max-width: 400px;
        height: 150px;
    }

    .card.active {
        height: 420px;
    }

    .main-container h1 {
        font-size: 2.2rem;
    }

    .subtitle {
        font-size: 1rem;
        padding: 0 15px;
    }
}