/* ============================================================
   TAGHAT v4.5 — Specialist cards
   Shared component: .tg-specialist-photo
   Portrait ratio: 600x800 / 3:4 — used by Index, Team archive,
   and Single team member pages. Do not reintroduce 4:3 or 1:1
   for this component anywhere in the theme.
   ============================================================ */

.tg-home-specialists .row,
.archive-team-card + * {
    --tg-specialist-gap: 24px;
}

.tg-specialist-card {
    display: block;
    height: 100%;
    overflow: hidden;
    text-decoration: none;
    text-align: center;
    padding: 0 0 16px;
    border-radius: 20px;
    background: var(--surface, #fff);
    border: 1px solid var(--border, rgba(19,41,75,.08));
    box-shadow: 0 10px 30px rgba(19,41,75,.08);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.tg-specialist-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 42px rgba(19,41,75,.14);
    border-color: rgba(47,111,237,.22);
}

/* Shared specialist photo component — Index, Team archive, Single. */
.tg-specialist-photo,
.archive-team-card .team-member-photo {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    height: auto;
    min-height: 0;
    max-width: 100%;
    object-fit: cover;
    object-position: center;
    background: #eef3f9;
    border: none;
    border-radius: 0;
}

.tg-specialist-card > strong,
.tg-specialist-card > .tg-mini-meta {
    padding-left: 16px;
    padding-right: 16px;
}

.tg-specialist-card > strong {
    margin-top: 14px;
    line-height: 1.6;
}

.tg-specialist-card .tg-mini-meta {
    display: block;
    margin-top: 3px;
}

.archive-team-card {
    height: 100%;
    overflow: hidden;
}

.archive-team-card .event-image {
    overflow: hidden;
    aspect-ratio: 3 / 4;
}

.archive-team-card .event-image .team-member-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (min-width: 1200px) {
    .tg-home-specialists .tg-specialist-card {
        max-width: 600px;
        margin-inline: auto;
    }
}

@media (max-width: 991.98px) {
    .tg-home-specialists .row.g-4 {
        --bs-gutter-x: 16px;
        --bs-gutter-y: 20px;
    }
}

@media (max-width: 575.98px) {
    .tg-home-specialists .row.g-4,
    .archive-team-card {
        --bs-gutter-x: 12px;
    }

    .tg-specialist-card {
        border-radius: 16px;
        padding-bottom: 12px;
    }

    .tg-specialist-card > strong {
        font-size: 15px !important;
        margin-top: 10px;
    }

    .tg-specialist-card > .tg-mini-meta {
        font-size: 12px;
    }

    /* Aspect ratio must not change at this or any breakpoint. */
    .tg-specialist-photo,
    .archive-team-card .team-member-photo,
    .archive-team-card .event-image {
        aspect-ratio: 3 / 4;
    }
}

/* Dark mode compatibility */
@media (prefers-color-scheme: dark) {
    .tg-specialist-card {
        background: var(--surface, #111827);
        border-color: rgba(91,155,255,.12);
        box-shadow: 0 12px 32px rgba(0,0,0,.28);
    }

    .tg-specialist-photo,
    .archive-team-card .team-member-photo {
        background: #17213a;
    }
}
