/* ── Team Page Styles ──────────────────────────────────────────── */

/* Main section */
.team-section {
    background: #F3F6F5;
    padding: 56px 20px 80px;
}

.team-container {
    max-width: 1300px;
    margin: 0 auto;
}

/* Header */
.team-header {
    margin-bottom: 48px;
    text-align: center;
}

.team-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #001B2F;
    margin: 0 0 16px 0;
    position: relative;
    display: inline-block;
}

.team-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: #2775BD;
    border-radius: 2px;
}

.team-intro-text {
    max-width: 700px;
    margin: 24px auto 0;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #475569;
}

/* Team grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 56px;
}

@media (max-width: 1024px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .team-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Profile / Blog card design mapping */
.blog-card {
    background: #ffffff;
    overflow: hidden;
    display: block;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(15, 23, 42, 0.10);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    border-radius: 4px;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 26px 68px rgba(15, 23, 42, 0.16);
}

.blog-card__img-wrap {
    display: block;
    overflow: hidden;
}

.blog-card__img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.blog-card:hover .blog-card__img {
    transform: scale(1.05);
}

@media (min-width: 640px) and (max-width: 1023px) {
    .blog-card__img {
        height: 240px;
    }
}

.blog-card__body {
    display: block;
    padding: 24px;
}

.blog-card__meta {
    display: block;
    margin-bottom: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #2775BD;
    letter-spacing: 0.05em;
}

.blog-card__title-btn {
    display: block;
    width: 100%;
    margin-bottom: 12px;
    font-family: inherit;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.25;
    color: #001B2F;
    background: none;
    border: none;
    padding: 0;
    text-align: left;
    cursor: pointer;
    transition: color 0.3s ease;
}

.blog-card__title-btn:hover {
    color: #2775BD;
    text-decoration: underline;
}

.blog-card__title-btn:focus-visible {
    outline: 2px solid #2775BD;
    outline-offset: 4px;
}

.blog-card__excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 4.71em;
    /* 3 lines * 1.57 line-height */
    min-height: 4.71em;
    /* Keep uniform height even if text is shorter */
    font-size: 0.95rem;
    line-height: 1.57;
    color: #475569;
}

/* Empty state */
.team-empty {
    text-align: center;
    padding: 80px 20px;
    color: #7E8286;
}

.team-empty svg {
    margin: 0 auto 20px;
    opacity: 0.4;
    display: block;
}

.team-empty h2 {
    font-size: 1.375rem;
    font-weight: 700;
    color: #001B2F;
    margin-bottom: 8px;
}

.team-empty p {
    font-size: 0.9375rem;
}

/* ── Profile Details Modal ─────────────────────────────────────────────── */
.team-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.team-modal.is-active {
    opacity: 1;
    pointer-events: auto;
}

.team-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 27, 47, 0.75);
    backdrop-filter: blur(4px);
}

.team-modal__wrapper {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 90vh;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    z-index: 1;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.team-modal.is-active .team-modal__wrapper {
    transform: translateY(0);
}

.team-modal__close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: #ffffff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    line-height: 1;
    color: #475569;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.team-modal__close:hover {
    color: #2775BD;
    transform: scale(1.05);
}

/* Main modal content */
.team-modal__content {
    flex: 1;
    width: 100%;
    padding: 50px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
}

/* Internal Grid */
.team-modal__grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
}

.team-modal__img-col img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.team-modal__info-col {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.team-modal__meta {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #2775BD;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.team-modal__name {
    font-size: 2.25rem;
    font-weight: 800;
    color: #001B2F;
    margin: 0 0 24px 0;
    line-height: 1.2;
}

.team-modal__description {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #475569;
}

/* Scrollbar */
.team-modal__content::-webkit-scrollbar {
    width: 8px;
}

.team-modal__content::-webkit-scrollbar-track {
    background: transparent;
}

.team-modal__content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
    border: 2px solid #ffffff;
}

.team-modal__content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}


/* =========================
   TABLET
========================= */
@media (max-width: 900px) {
    .team-modal__grid {
        grid-template-columns: 240px 1fr;
        gap: 30px;
    }

    .team-modal__img-col img {
        height: 280px;
    }
}

@media (max-width: 768px) {
    .team-modal__wrapper {
        width: 94%;
        height: 90vh;
    }

    .team-modal__content {
        padding: 40px 30px;
    }

    .team-modal__grid {
        grid-template-columns: 200px 1fr;
        gap: 25px;
    }

    .team-modal__img-col img {
        height: 240px;
    }
}


/* =========================
   MOBILE
========================= */
@media (max-width: 600px) {
    .team-modal__wrapper {
        width: 100%;
        height: 100%;
        /* Native full screen feel on mobile */
        max-height: none;
        border-radius: 0;
        transform: translateY(50px);
    }

    .team-modal__content {
        padding: 70px 20px 40px 20px;
        /* Extra top padding for the fixed close button */
    }

    .team-modal__grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .team-modal__img-col {
        max-width: 250px;
        margin: 0 auto;
    }

    .team-modal__name {
        font-size: 1.75rem;
        margin: 0 0 16px 0;
        text-align: center;
    }

    .team-modal__meta {
        text-align: center;
        margin-bottom: 8px;
    }

    .team-modal__close {
        top: 16px;
        right: 16px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    }
}