/* =============================================================================
   About page — team + collaborations / Hakkimizda sayfasi — ekip + is birlikleri
   Loaded only by templates/public/about.html, which adds body.lmb-about.

   Ekip kartlari (3x2 masaustu, 2x3 telefon), is birligi kartlari ve bilgi
   popover'i / alt sayfasi, footer'dan once Webrazzi Arena karti. Baslik
   kurallari yalnizca bu sayfaya ozeldir.

   Team cards (3x2 on desktop, 2x3 on phones), the collaboration cards and
   their info popover / bottom sheet, and the Webrazzi Arena milestone card
   before the footer. The header rules are scoped to this page.
   ========================================================================== */

.lmb-about {
    --ab-ink: #001c3e;
    --ab-accent: #4bb0e8;
    --ab-line: rgba(0, 28, 62, 0.10);
    --ab-gap: 24px;
    --ab-pad: 22px 20px;
    --ab-media: 140px;
    --ab-btn: 40px;
    --ab-radius: 18px;
}

/* ── Header ───────────────────────────────────────────────────────────────
   The theme's header is 45% white, so cards scrolled under it showed
   through. Here it is opaque white with a hairline. Desktop keeps its
   dimensions and navigation; only the background changes. */
body.lmb-about .site-header {
    background-color: #fff;
    box-shadow: 0 1px 0 var(--ab-line);
}

@media (max-width: 767px) {
    .lmb-about {
        --lmb-header-h: 72px;
        --lmb-header-total: calc(var(--lmb-header-h) + env(safe-area-inset-top, 0px));
    }
    /* Same compact one-row header as the homepage (static/css/home-mobile.css).
       env(safe-area-inset-top) is 0 unless the page opts into
       viewport-fit=cover, so Safari gets no double gap. */
    .lmb-about .site-header {
        display: flex;
        align-items: center;
        height: var(--lmb-header-total);
        padding: env(safe-area-inset-top, 0px) 20px 0;
    }
    .lmb-about .site-header .extend-container {
        height: 100%;
        align-items: center !important;
    }
    .lmb-about .site-header .inner-header .main-logo { width: auto; }
    .lmb-about .site-header .main-logo a { min-height: 44px; }
    .lmb-about .site-header .main-logo img {
        width: auto;
        max-width: none;
        height: 40px;
    }
    .lmb-about .site-header .brand-name {
        margin-left: 10px !important;
        font-size: 17px !important;
        letter-spacing: 0.14em;
    }
    .lmb-about #lmb-mobile-hamburger {
        min-width: 44px;
        min-height: 44px;
        align-items: center !important;
        justify-content: flex-end;
        pointer-events: all;
    }
    .lmb-about .header-page.header-padding-top {
        padding-top: calc(var(--lmb-header-total) + 56px);
    }
    .lmb-about .header-page.header-padding-bottom { padding-bottom: 72px; }
}

/* ── Sections ─────────────────────────────────────────────────────────── */
.lmb-about .ab-section { scroll-margin-top: calc(var(--lmb-header-total, 90px) + 12px); }
.lmb-about .ab-team    { padding-top: clamp(32px, 5vw, 72px); }
.lmb-about .ab-collabs { padding-top: clamp(56px, 7vw, 104px); padding-bottom: clamp(40px, 6vw, 88px); }

.lmb-about .ab-head { margin-bottom: clamp(20px, 2.6vw, 36px); }
.lmb-about .ab-title {
    margin: 0;
    color: var(--ab-ink);
    overflow-wrap: break-word;
}
.lmb-about .ab-sub {
    max-width: 570px;
    margin: 10px 0 0;
    opacity: 0.9;
}

/* ── Grids ────────────────────────────────────────────────────────────── */
/* Three cards per row on a 6-track grid (each card spans 2), so a last row
   of two can be centred instead of leaving an empty slot. */
.lmb-about .ab-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: var(--ab-gap);
}
.lmb-about .ab-grid > .ab-card { grid-column: span 2; }
.lmb-about .ab-grid > .ab-card:nth-child(3n+1):nth-last-child(2) { grid-column: 2 / span 2; }
.lmb-about .ab-grid > .ab-card:nth-child(3n+1):last-child { grid-column: 3 / span 2; }

/* ── Cards ────────────────────────────────────────────────────────────── */
.lmb-about .ab-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    padding: var(--ab-pad);
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--ab-radius);
}

.lmb-about .ab-media {
    width: min(var(--ab-media), 100%);
    aspect-ratio: 1 / 1;
    margin: 0 0 14px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}
/* The corner button never overlaps the portrait: the portrait gives way. */
.lmb-about .ab-card--has-link .ab-media {
    width: min(var(--ab-media), calc(100% - var(--ab-btn) - 6px));
}
.lmb-about .ab-media picture,
.lmb-about .ab-media img {
    display: block;
    width: 100%;
    height: 100%;
}
.lmb-about .ab-media img { object-fit: cover; }

/* The clinic logo: same height as a portrait, no circle, no crop. */
.lmb-about .ab-card--logo .ab-media {
    width: min(240px, calc(100% - var(--ab-btn) - 6px));
    height: var(--ab-media);
    aspect-ratio: auto;
    border-radius: 0;
    display: flex;
    align-items: center;
}
.lmb-about .ab-card--logo .ab-media img {
    object-fit: contain;
    object-position: left center;
}

.lmb-about .ab-name {
    margin: 0 0 4px;
    color: var(--ab-ink);
    font-size: 19px;
    line-height: 1.25;
    letter-spacing: 0.04em;
    overflow-wrap: break-word;
}
.lmb-about .ab-role {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    opacity: 0.9;
}

/* ── Round icon buttons (LinkedIn / website / info) ───────────────────── */
.lmb-about .ab-icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--ab-btn);
    height: var(--ab-btn);
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--ab-line);
    background: #fff;
    color: var(--ab-ink);
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color .2s, box-shadow .2s, transform .15s, background-color .2s;
    -webkit-tap-highlight-color: transparent;
}
/* Invisible ring that brings the hit area to at least 44x44. */
.lmb-about .ab-icon-btn::before {
    content: "";
    position: absolute;
    inset: calc((44px - var(--ab-btn)) / -2);
    border-radius: 50%;
}
.lmb-about .ab-card > .ab-icon-btn {
    position: absolute;
    top: 14px;
    right: 14px;
}
.lmb-about .ab-icon-btn:hover {
    border-color: rgba(10, 102, 194, 0.45);
    box-shadow: 0 4px 14px rgba(0, 28, 62, 0.10);
}
.lmb-about .ab-icon-btn--website:hover,
.lmb-about .ab-info-btn:hover { border-color: var(--ab-accent); color: #1b6fa3; }
.lmb-about .ab-icon-btn:active { transform: scale(0.94); }
.lmb-about .ab-icon-btn:focus { outline: none; }
.lmb-about .ab-icon-btn:focus-visible {
    outline: 2px solid var(--ab-accent);
    outline-offset: 3px;
}
.lmb-about .ab-icon-btn[aria-expanded="true"] {
    background: #eef7fd;
    border-color: var(--ab-accent);
}

/* ── Collaboration cards ──────────────────────────────────────────────── */
.lmb-about .ab-collab { cursor: pointer; }
.lmb-about .ab-collab.is-open { z-index: 30; }
.lmb-about .ab-collab-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--ab-media);
    margin: 0 0 14px;
    padding: 8px;
}
.lmb-about .ab-collab-logo picture {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
.lmb-about .ab-collab-logo img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.lmb-about .ab-collab-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
}
.lmb-about .ab-collab-foot .ab-name { margin: 0; min-width: 0; }

/* Hover / keyboard-focus preview of the info button. */
.lmb-about .ab-info-preview {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--ab-ink);
    color: #fff;
    font-size: 12px;
    line-height: 1.3;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity .15s, transform .15s, visibility .15s;
}
@media (hover: hover) and (min-width: 768px) {
    .lmb-about .ab-info-btn:hover .ab-info-preview,
    .lmb-about .ab-info-btn:focus-visible .ab-info-preview {
        opacity: 1;
        visibility: visible;
        transform: none;
    }
}
.lmb-about .ab-info-btn[aria-expanded="true"] .ab-info-preview { display: none; }

/* ── Popover (desktop) / bottom sheet (phone) ─────────────────────────────
   One <dialog> per institution: show() anchors it under its card on
   desktop, showModal() turns it into a bottom sheet on phones. */
.lmb-about .ab-pop {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 18px 20px 20px;
    border: 1px solid var(--ab-line);
    border-radius: 14px;
    background: #fff;
    color: #333;
    box-shadow: 0 14px 40px rgba(0, 28, 62, 0.16);
    cursor: auto;
    z-index: 40;
}
.lmb-about .ab-pop:not([open]) { display: none; }
.lmb-about .ab-pop-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.lmb-about .ab-pop-title {
    margin: 0;
    padding-top: 9px;
    color: var(--ab-ink);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
}
.lmb-about .ab-pop-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: -4px -10px 0 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--ab-ink);
    cursor: pointer;
    flex-shrink: 0;
}
.lmb-about .ab-pop-close:hover { background: #f1f5f9; }
.lmb-about .ab-pop-close:focus { outline: none; }
.lmb-about .ab-pop-close:focus-visible { outline: 2px solid var(--ab-accent); outline-offset: 1px; }
.lmb-about .ab-pop-text {
    margin: 0 0 12px;
    font-size: 15px;
    line-height: 1.55;
}
.lmb-about .ab-pop-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    color: #1b6fa3;
    font-size: 14px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.lmb-about .ab-pop-link:focus { outline: none; }
.lmb-about .ab-pop-link:focus-visible { outline: 2px solid var(--ab-accent); outline-offset: 2px; border-radius: 4px; }
.lmb-about .ab-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: no-preference) {
    .lmb-about .ab-pop[open] { animation: ab-pop-in .18s ease-out; }
}
@keyframes ab-pop-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
}

/* The vertical TÜSEB mark needs a little more height than a portrait. */
@media (min-width: 768px) {
    .lmb-about .ab-collab-logo { height: calc(var(--ab-media) + 24px); }
}

/* ── Tablet ───────────────────────────────────────────────────────────── */
@media (max-width: 991px) {
    .lmb-about {
        --ab-gap: 18px;
        --ab-media: 120px;
    }
}

/* ── Phone: compact 2-column grid ─────────────────────────────────────── */
@media (max-width: 767px) {
    .lmb-about {
        --ab-gap: 12px;
        --ab-pad: 12px;
        --ab-media: clamp(84px, 26vw, 104px);
        --ab-btn: 36px;
        --ab-radius: 16px;
    }
    .lmb-about .ab-section .container {
        padding-left: 14px;
        padding-right: 14px;
    }
    .lmb-about .ab-title {
        font-size: clamp(22px, 6.6vw, 30px);
        line-height: 1.15;
        letter-spacing: 0.02em;
    }
    .lmb-about .ab-sub { margin-top: 6px; font-size: 14px; }

    .lmb-about .ab-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .lmb-about .ab-grid > .ab-card,
    .lmb-about .ab-grid > .ab-card:nth-child(3n+1):nth-last-child(2),
    .lmb-about .ab-grid > .ab-card:nth-child(3n+1):last-child { grid-column: auto; }
    /* An odd last card sits centred, one column wide. */
    .lmb-about .ab-grid > .ab-card:nth-child(odd):last-child {
        grid-column: 1 / -1;
        justify-self: center;
        width: calc((100% - var(--ab-gap)) / 2);
    }
    .lmb-about .ab-card { min-height: 190px; }
    .lmb-about .ab-card > .ab-icon-btn { top: 10px; right: 10px; }
    .lmb-about .ab-media { margin-bottom: 10px; }

    .lmb-about .ab-name {
        font-size: clamp(13px, 3.9vw, 16px);
        letter-spacing: 0.02em;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    /* Institution names wrap in full; the info button moves under the name. */
    .lmb-about .ab-collab-foot {
        flex-direction: column;
        align-items: flex-start;
        flex: 1 1 auto;
    }
    .lmb-about .ab-collab-foot .ab-name {
        display: block;
        overflow: visible;
        font-size: clamp(12px, 3.6vw, 15px);
        hyphens: auto;
    }
    .lmb-about .ab-collab-foot .ab-info-btn { margin-top: auto; align-self: flex-end; }
    .lmb-about .ab-role {
        font-size: 13px;
        line-height: 1.35;
    }
    .lmb-about .ab-collab-logo { padding: 4px; margin-bottom: 10px; }
    .lmb-about .ab-collab-foot { gap: 8px; }

    /* Bottom sheet */
    .lmb-about .ab-pop:modal {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        max-height: 80vh;
        overflow-y: auto;
        border-radius: 20px 20px 0 0;
        border-bottom: 0;
        padding: 16px 20px calc(20px + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 -10px 40px rgba(0, 28, 62, 0.18);
    }
    .lmb-about .ab-pop:modal::backdrop { background: rgba(0, 28, 62, 0.35); }
    .lmb-about .ab-pop-head::before {
        content: "";
        position: absolute;
        top: 7px;
        left: 50%;
        width: 36px;
        height: 4px;
        margin-left: -18px;
        border-radius: 2px;
        background: rgba(0, 28, 62, 0.18);
    }
}
/* Narrowest phones: a little less gutter and padding so portraits stay ~80px. */
@media (max-width: 359px) {
    .lmb-about { --ab-gap: 10px; --ab-pad: 10px; }
    .lmb-about .ab-section .container { padding-left: 12px; padding-right: 12px; }
    .lmb-about .ab-card > .ab-icon-btn { top: 8px; right: 8px; }
}
@media (max-width: 767px) and (prefers-reduced-motion: no-preference) {
    .lmb-about .ab-pop:modal[open] { animation: ab-sheet-in .22s ease-out; }
}
@keyframes ab-sheet-in {
    from { transform: translateY(100%); }
    to   { transform: none; }
}

/* ── Milestone: Webrazzi Arena 2026 ───────────────────────────────────────
   An editorial moment after the collaborations, not a fourth partner card:
   a navy panel with the stage photo on the left and the text on the right,
   stacked photo-first below 992px. The photo keeps its own 3:2 frame and is
   never cropped; when the text column is the taller one, the media cell is
   filled with the photo's near-black edge colour so no seam shows. */
.lmb-about .ab-milestone { padding-bottom: clamp(16px, 3vw, 40px); }
.lmb-about .ab-ms-card {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    overflow: hidden;
    border-radius: var(--ab-radius);
    background:
        radial-gradient(120% 100% at 100% 0%, rgba(75, 176, 232, 0.16), transparent 60%),
        var(--ab-ink);
    color: #fff;
}
.lmb-about .ab-ms-media {
    display: flex;
    align-items: center;
    min-width: 0;
    background: linear-gradient(#0a0b12, #010102);
}
.lmb-about .ab-ms-media picture,
.lmb-about .ab-ms-media img {
    display: block;
    width: 100%;
    height: auto;
}
.lmb-about .ab-ms-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-width: 0;
    padding: clamp(28px, 3.2vw, 48px);
}
.lmb-about .ab-ms-eyebrow {
    margin: 0 0 12px;
    color: var(--ab-accent);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.16em;
}
.lmb-about .ab-ms-title {
    margin: 0 0 14px;
    color: #fff;
    font-size: clamp(22px, 2.1vw, 30px);
    line-height: 1.2;
    letter-spacing: 0.04em;
    overflow-wrap: break-word;
}
.lmb-about .ab-ms-text {
    max-width: 46ch;
    margin: 0 0 10px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 16px;
    line-height: 1.65;
}
/* inline-block (not flex) so the inline-block arrow is left out of the
   underline; 10px + 24px + 10px keeps the target at 44px. */
.lmb-about .ab-ms-link {
    display: inline-block;
    padding: 10px 0;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    line-height: 24px;
    text-decoration: underline;
    text-decoration-color: rgba(75, 176, 232, 0.75);
    text-decoration-thickness: 1.5px;
    text-underline-offset: 5px;
}
.lmb-about .ab-ms-link:hover { color: #bfe6fb; text-decoration-color: currentColor; }
.lmb-about .ab-ms-link:focus { outline: none; }
.lmb-about .ab-ms-link:focus-visible {
    outline: 2px solid var(--ab-accent);
    outline-offset: 4px;
    border-radius: 4px;
}
.lmb-about .ab-ms-arrow { display: inline-block; margin-left: 8px; }
@media (prefers-reduced-motion: no-preference) {
    .lmb-about .ab-ms-arrow { transition: transform .2s ease; }
    .lmb-about .ab-ms-link:hover .ab-ms-arrow { transform: translateX(3px); }
}

@media (max-width: 991px) {
    .lmb-about .ab-milestone { padding-top: 16px; }
    .lmb-about .ab-ms-card { grid-template-columns: minmax(0, 1fr); }
    .lmb-about .ab-ms-body { padding: 24px 24px 18px; }
    .lmb-about .ab-ms-text { max-width: 60ch; }
}
@media (max-width: 767px) {
    .lmb-about .ab-ms-body { padding: 18px 16px 10px; }
    .lmb-about .ab-ms-eyebrow { margin-bottom: 8px; font-size: 11px; letter-spacing: 0.14em; }
    .lmb-about .ab-ms-title {
        margin-bottom: 10px;
        font-size: clamp(19px, 5.4vw, 24px);
        letter-spacing: 0.02em;
    }
    .lmb-about .ab-ms-text { font-size: 15px; line-height: 1.6; margin-bottom: 4px; }
}
