/* ==========================================================================
   Our Team — cinematic redesign (v2)
   Loaded after the compiled bundle + responsive/motion sheets, so these
   rules win the cascade without needing !important everywhere.

   Layout: the photo is a clean, fully-visible zone (fixed height,
   object-fit: cover, NO overlay) -- it is the priority element. The name
   + short bio sit in a compact solid caption band below it, never on top
   of the face. The base stylesheet also fixes the modal panel at a
   1200px-wide `.about-modal .panel`, sized for the old, wider card design;
   with only a couple of cards that leaves large empty gutters, so this
   file narrows the panel to fit the content instead.
   ========================================================================== */

.about-modal .panel {
    width: min(880px, 94vw);
}

.about-cards {
    gap: 22px;
    padding: 6px 4px 18px;
    align-items: stretch;
    /* Safety net: if a card is still taller than the available panel space
       on a short/unmaximized window, scroll it instead of letting the
       panel's own overflow:hidden hard-clip the bottom of the card. */
    max-height: calc(100vh - 260px);
    overflow-y: auto;
}

/* ---- Card shell -------------------------------------------------------- */
.about-card-vertical {
    flex: 0 0 340px;
    width: 340px;
    height: auto;
    aspect-ratio: auto;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 18px 44px rgba(2, 6, 23, 0.28);
    background: #0b1220;
}

.about-card-vertical.active {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 26px 58px rgba(2, 6, 23, 0.38);
    border-color: rgba(56, 189, 248, 0.32);
}

.about-card-vertical:hover {
    transform: translateY(-4px) scale(1.012);
    box-shadow: 0 22px 50px rgba(2, 6, 23, 0.32);
    border-color: rgba(56, 189, 248, 0.24);
}

.about-card-flippable {
    perspective: 1600px;
}

.about-card-flip-inner {
    width: 100%;
    height: 100%;
}

.about-card-face {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
}

/* Keep the base stylesheet's `.about-card-back { position:absolute; inset:0;
   transform:rotateY(180deg); }` intact -- it's what makes the flip stack the
   back face on top of the front face. Only add to it, never re-set position
   on the shared `.about-card-face` class or the flip breaks. */
.about-card-back {
    border-radius: 20px;
}

/* ---- Front face: photo zone (clear, no overlay) + caption band --------- */
.about-card-front {
    display: flex;
    flex-direction: column;
}

.about-card-vertical img {
    position: static;
    flex: 0 0 auto;
    width: 100%;
    height: min(320px, 40vh);
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.about-card-vertical:hover img,
.about-card-vertical.active img {
    transform: scale(1.035);
}

.about-card-front .meta {
    position: static;
    flex: 0 0 auto;
    padding: 16px 20px 18px;
    color: #f8fafc;
    background: #0b1220;
}

.about-card-vertical h4 {
    margin: 0 0 6px;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #ffffff;
}

.about-card-vertical h4::before {
    content: "";
    display: block;
    width: 30px;
    height: 3px;
    border-radius: 2px;
    margin-bottom: 9px;
    background: linear-gradient(90deg, var(--primary-accent), var(--primary-accent-2));
}

.about-card-vertical .meta p {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: rgba(226, 232, 240, 0.82);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.about-card-click-hint {
    margin-top: 10px;
    color: rgba(226, 232, 240, 0.6);
    font-size: 11.5px;
}

.about-card-click-hint .ui-icon {
    font-size: 14px;
}

/* ---- Back face: matching dark, elegant panel ---------------------------- */
.about-card-back {
    background: radial-gradient(120% 120% at 20% 0%, rgba(37, 99, 235, 0.22), transparent 55%), linear-gradient(165deg, #0f172a 0%, #0b1220 65%);
    padding: 24px;
}

.about-card-social-meta {
    justify-content: center;
    height: 100%;
    gap: 14px;
}

.about-card-social-meta h4 {
    margin: 0;
    color: #fff;
    font-size: 1.1rem;
}

.about-card-social-meta > p {
    margin: -6px 0 6px;
    color: rgba(226, 232, 240, 0.72);
    font-size: 13.5px;
}

.about-card-social-link {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(148, 163, 184, 0.22);
    color: #f1f5f9;
}

.about-card-social-link:hover {
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(56, 189, 248, 0.12);
}

/* ---- Empty / reserved slot, matched proportions ------------------------- */
.about-card-empty {
    flex: 0 0 340px;
    width: 340px;
    height: auto;
    min-height: 500px;
    border-radius: 20px;
    border: 1px dashed rgba(148, 163, 184, 0.24);
    background: linear-gradient(165deg, rgba(15, 23, 42, 0.55), rgba(11, 18, 32, 0.85));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 28px;
}

.about-card-empty-shell {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(148, 163, 184, 0.1);
    margin-bottom: 14px;
}

.about-card-empty .meta h4 {
    color: #e2e8f0;
    font-size: 0.95rem;
}

.about-card-empty .meta p {
    color: rgba(148, 163, 184, 0.8);
    font-size: 12.5px;
    line-height: 1.5;
}

/* ---- Tablet / narrow desktop -------------------------------------------- */
@media (max-width: 1100px) {
    .about-modal .panel {
        width: min(680px, 94vw);
    }

    .about-card-vertical,
    .about-card-empty {
        flex: 0 0 280px;
        width: 280px;
    }

    .about-card-vertical img {
        height: min(280px, 38vh);
    }

    .about-card-empty {
        min-height: 400px;
    }
}

/* ---- Tablet portrait ----------------------------------------------------- */
@media (max-width: 920px) {
    .about-modal .panel {
        width: min(560px, 94vw);
    }

    .about-cards {
        padding: 4px 4px 16px;
        gap: 16px;
    }

    .about-card-vertical,
    .about-card-empty {
        flex: 0 0 250px;
        width: 250px;
        border-radius: 16px;
    }

    .about-card-vertical img {
        height: min(250px, 36vh);
    }

    .about-card-empty {
        min-height: 360px;
    }

    .about-card-face,
    .about-card-back {
        border-radius: 16px;
    }
}

/* ---- Phones --------------------------------------------------------------
   The horizontal drag/snap carousel stays (it already works well on touch),
   but cards become near-full-width so one member is comfortably readable
   per screen without pinch-zooming. */
@media (max-width: 560px) {
    .about-modal .panel {
        width: min(94vw, 400px);
        padding: 16px;
    }

    .about-cards {
        padding: 4px 6px 14px;
        gap: 14px;
        scroll-snap-type: x mandatory;
    }

    .about-card-vertical,
    .about-card-empty {
        flex: 0 0 78vw;
        width: 78vw;
        max-width: 340px;
        scroll-snap-align: center;
    }

    .about-card-vertical img {
        height: 46vh;
        max-height: 360px;
    }

    .about-card-empty {
        min-height: 420px;
    }

    .about-card-vertical h4 {
        font-size: 1rem;
    }

    .about-card-vertical .meta p {
        font-size: 12.5px;
    }

    /* The prev/next arrows are absolutely centered on the whole panel by
       default, which is fine on desktop (short, fixed-height cards) but on
       phones the card grows tall enough that a 50%-of-panel center lands
       the arrows low, over the caption band. Pin them to the photo zone
       near the top of the card instead. */
    .about-nav-btn {
        top: 165px;
        transform: none;
        width: 44px;
        height: 44px;
        opacity: 0.88;
    }

    .about-nav-btn:hover,
    .about-nav-btn:active {
        transform: scale(1.06);
    }

    .about-nav-btn[disabled] {
        transform: none;
    }
}
