.cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: start;
    flex-direction: row;
    column-gap: 4rem;
    row-gap: 4rem;
}

.profile-card {
    flex: 0 1 calc(33.333% - 3rem);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    min-width: 300px;
}

.image-card {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    cursor: pointer;
}

.card-image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease;
    top: 0;
    left: 0;
    z-index: 1;
}

.favourite {
   font-family: var(--font-ooh-baby);
   font-size: 2rem;
}

.hover-img {
    opacity: 0;
}

.image-card:hover .hover-img {
    opacity: 1;
}

.image-card:hover .default-img {
    opacity: 0;
}

.icon {
    margin-left: 1px;
    font-size: 20px;
    font-weight: bold;
    user-select: none;
    transition: opacity 0.2s ease;
}

.icon.fade-out {
    opacity: 0;
}

.expanding-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 40px;
    background: var(--secondary-beige-light);
    clip-path: polygon(0 0, 66% 0, 101% 100%, 0 100%);
    transition: all 0.5s ease;
    z-index: 2;
}

.profile-card.expanded .expanding-overlay {
    width: 100%;
    height: 100%;
    clip-path: none;
    border-radius: 0;
}

.card-text {
    position: absolute;
    inset: 0;
    background: transparent;
    padding: 1rem;
    display: none;
    z-index: 3;
    text-align: center;
    justify-content: center;
    align-items: center;
}

.profile-card.expanded .card-text {
    display: block;
    overflow-y: auto;
    hyphens: auto;
    text-align: left;
}

.profile-card.expanded .card-image {
    display: none;
}

.person-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.person-info h2 {
    padding: 0;
}

.contact-info {
    display: flex;
    height: 1.5rem;
    gap: 1.5rem;
    margin-top: 10px;
}

.contact-icon {
    height: 100%;
}

.contact-icon img {
    height: 100%;
    width: auto;
}

@media screen and (max-width: 992px) {
    .cards-container {
        width: 90%;
    }
}

@media screen and (max-width: 768px) {
    .cards-container {
        width: 100%;
        padding: 0 2rem;
        justify-content: center;
    }

    .contact-info {
        gap: 1rem;
    }

    .contact-icon {
        height: 16px;
    }
}