/* ── Team Grid (Our Team / home "Our Faculty") ── */

/* The grid adapts to the width of its CONTAINER, not the viewport. The same
   [iforest_team_grid] therefore shows 4-across in a full-width column (Our Team)
   and 2x2 in a half-width column (the home page) with no shortcode change. */
.iforest-team {
    container-type: inline-size;
}

.team-grid {
    display: grid;
    /* Fallback used only where CSS container queries are unsupported. */
    grid-template-columns: repeat(2, 1fr);
    gap: 2vw;
    margin: 2vw 0 0;
}

@container (min-width: 860px) {
    .team-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@container (min-width: 430px) and (max-width: 859.98px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@container (max-width: 429.98px) {
    .team-grid {
        grid-template-columns: 1fr;
    }
}

.team-card {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    text-align: center;
    cursor: default;
}

.team-card.is-clickable {
    cursor: pointer;
}

.team-card figure {
    margin: 0;
    border-radius: 0.4vw;
    overflow: hidden;
    position: relative;
    box-shadow: rgba(17, 17, 26, 0.1) 0 0 16px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    background: #f5f5f5;
}

.team-card.is-clickable:hover figure,
.team-card:hover figure {
    transform: translateY(-4px);
    box-shadow: rgba(17, 17, 26, 0.18) 0 8px 24px;
}

.team-card figure img {
    width: 100%;
    display: block;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* ── Pro-Info Hover Reveal Overlay (Matching HTML Template) ── */
.team-card .pro-info,
.pro-info {
    position: absolute !important;
    bottom: 12px !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 auto !important;
    width: 84% !important;
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    text-align: center !important;
    color: #000000 !important;
    z-index: 10 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(10px) !important;
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s ease !important;
    pointer-events: none !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

.team-card:hover .pro-info,
.team-card figure:hover .pro-info,
.block-area-03-right figure:hover .pro-info,
figure:hover .pro-info {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

.team-card .pro-name,
.pro-info .pro-name {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #000000 !important;
    line-height: 1.25 !important;
    margin: 0 !important;
    font-family: 'Work Sans', sans-serif !important;
    text-align: center !important;
}

.team-card .pro-name:not(:last-child),
.pro-info .pro-name:not(:last-child) {
    margin-bottom: 6px !important;
}

.team-card .pro-social,
.pro-info .pro-social {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    margin-top: 3px !important;
}

.team-card .pro-social a,
.pro-info .pro-social a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #000000 !important;
    font-size: 14px !important;
    transition: color 0.2s ease, transform 0.2s ease !important;
    text-decoration: none !important;
}

.team-card .pro-social a:hover,
.pro-info .pro-social a:hover {
    color: #6eaf20 !important;
    transform: scale(1.15) !important;
}

.team-card .pro-social i,
.pro-info .pro-social i,
.pro-info i {
    display: inline-block !important;
    color: inherit !important;
}

.team-card-info {
    display: none !important;
}

@media screen and (max-width: 768px) {
    .team-card .pro-info {
        width: 88%;
        bottom: 10px;
        padding: 8px 10px;
        border-radius: 5px;
    }
    .team-card .pro-name {
        font-size: 13px;
    }
    .team-card .pro-social {
        gap: 8px;
    }
    .team-card .pro-social a {
        font-size: 12px;
    }
}

/* ── Bio Lightbox Modal ── */
.bio-modal-overlay {
    display: flex;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 2vw;
    pointer-events: none;
    transition: background 0.3s ease;
}

.bio-modal-overlay.active {
    background: rgba(200, 200, 200, 0.9);
    pointer-events: auto;
}

.bio-modal-box {
    background: #fff;
    border-radius: 0.5vw;
    max-width: 860px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 3vw;
    opacity: 0;
    transform: scale(0.92) translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.bio-modal-overlay.active .bio-modal-box {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.bio-modal-close {
    position: absolute;
    top: 1vw;
    right: 1vw;
    width: 2.2vw;
    height: 2.2vw;
    min-width: 32px;
    min-height: 32px;
    border-radius: 50%;
    border: 2px solid #ccc;
    background: #fff;
    font-size: 1.2vw;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: background 0.2s, border-color 0.2s;
    z-index: 1;
}

.bio-modal-close:hover {
    background: #ed1c24;
    border-color: #ed1c24;
    color: #fff;
}

.bio-modal-inner {
    display: flex;
    gap: 2.5vw;
    align-items: flex-start;
}

.bio-modal-left {
    flex: 0 0 220px;
}

.bio-modal-left img {
    width: 100%;
    border-radius: 0.4vw;
    display: block;
}

.bio-modal-right {
    flex: 1;
}

.bio-modal-right h2 {
    font-size: 1.8vw;
    font-weight: 700;
    color: #111;
    margin: 0 0 0.5vw;
}

.bio-modal-designation {
    font-size: 1vw;
    color: #6eaf20;
    font-weight: 600;
    margin: 0 0 1.5vw;
}

.bio-modal-website {
    margin: 1.5vw 0 0;
    font-size: 0.95vw;
    font-weight: 600;
}

.bio-modal-website a {
    color: #6eaf20;
}

.bio-modal-website a:hover {
    color: #ed1c24;
}

/* ── Bio modal: social links row ── */
.bio-modal-social {
    display: flex;
    gap: 0.6vw;
    margin: 1.2vw 0 0;
    flex-wrap: wrap;
}

.bio-modal-social a {
    width: 2.2vw;
    height: 2.2vw;
    min-width: 34px;
    min-height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #6eaf20;
    color: #fff;
    font-size: 0.95vw;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.bio-modal-social a:hover {
    background: #ed1c24;
    color: #fff;
    transform: translateY(-2px);
}

.bio-modal-social a i {
    font-size: 16px;
}

@media (max-width: 900px) {
    .team-card-info strong {
        font-size: 2vw;
    }

    .bio-modal-inner {
        flex-direction: column;
    }

    .bio-modal-left {
        flex: none;
        width: 120px;
    }

    .bio-modal-right h2 {
        font-size: 3.5vw;
    }

    .bio-modal-designation {
        font-size: 2vw;
    }

    .bio-modal-close {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
}
