/**
 * People Grid Block Styles
 * Based on Figma design specifications
 *
 * @package CUHK_GRC
 */

/* People Grid Block Container */
.people-grid-block {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 0 100px;
}

/* People Category */
.people-category {
    width: 100%;
}

/* People Grid */
.people-category__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* People Card Link */
.people-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.people-card__link:hover {
    text-decoration: none;
    color: inherit;
}

/* People Card Image Container */
.people-card__image {
    width: 100%;
    aspect-ratio: 1 / 1;
    box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.05);
}

.people-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Image Placeholder */
.people-card__image-placeholder {
    width: 100%;
    height: 100%;
    background-color: #f4f4f4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.people-card__image-placeholder::before {
    content: '';
    width: 30%;
    aspect-ratio: 1 / 1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23999' viewBox='0 0 24 24'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.3;
}

/* People Card Info Section */
.people-card__info {
    background-color: #ffffff;
    border-radius: 0px 0px 60px 0px;
    padding: 40px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.05);
}

/* Person Name */
.people-card__name {
    color: #3d3d3d;
    font-size: 21px;
    font-weight: 400;
    line-height: 1.5em; /* 42px */
    margin: 0;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

/* Department/Affiliation */
.people-card__department {
    color: #3d3d3d;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4444444444444444em; /* 26px */
    margin: 0;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

/* Department with word-break enabled */
.people-card__department--break-words {
    word-break: break-all;
}

@media (max-width: 1280px) {
    .people-grid-block {
        gap: 30px;
    }

    .people-category__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .people-card__info {
        border-radius: 0px 0px 40px 0px;
        padding: 27.586px 20px;
        gap: 6.897px;
    }

    .people-card__name {
        font-size: 21px;
        line-height: 28.966px; /* 137.931% */
    }

    .people-card__department {
        font-size: 16px;
        line-height: 17.931px; /* 112.069% */
    }
}

@media (max-width: 768px) {
    .people-category__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px 14px;
    }

    .people-card__info {
        border-radius: 0px 0px 28px 0px;
        padding: 25.728px 20px;
        gap: 6.432px;
    }

    .people-card__name {
        font-size: 24px;
        line-height: 27.014px; /* 112.56% */
    }

    .people-card__department {
        font-size: 18px;
        line-height: 26px; /* 144.444% */
    }
}

@media (max-width: 400px) {
    .people-category__grid {
        grid-template-columns: repeat(1, 1fr);
    }
}
