/* MEDIC conference pages (2025 / 2026) */

.v16-medic-page .v16-doc-inline {
    color: var(--tma-brand, #00668e);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.v16-medic-page .v16-doc-inline:hover {
    color: var(--tma-brand-dark, #004d6b);
}

.v16-medic-page .v16-content-section > h2,
.v16-medic-page .v16-legacy-content > h2 {
    margin: 1.35em 0 0.55em;
    font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem);
    line-height: 1.3;
    color: var(--tma-ink, #0a3652);
}

.v16-medic-page .v16-content-section > h2:first-child {
    margin-top: 0;
}

.v16-medic-hero-sub {
    margin: 0.65rem 0 0;
    max-width: 42rem;
    font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.82);
}

.v16-medic-years {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 0.85rem;
    margin-top: 1.15rem;
}

.v16-medic-years__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.v16-medic-years__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.1rem;
    padding: 0.42rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 650;
    line-height: 1;
    text-decoration: none;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

a.v16-medic-years__item:hover,
a.v16-medic-years__item:focus-visible {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.55);
    transform: translateY(-1px);
    outline: none;
}

.v16-medic-years__item.is-current {
    background: #fff;
    border-color: #fff;
    color: #0a3652;
    cursor: default;
}

.v16-medic-gallery-title {
    margin: 0 0 1rem;
    font-size: clamp(1.2rem, 1.05rem + 0.5vw, 1.45rem);
    color: var(--tma-ink, #0a3652);
}

.v16-medic-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(10px, 2vw, 16px);
}

.v16-medic-gallery__item {
    display: block;
    padding: 0;
    border: 0;
    border-radius: calc(var(--tma-radius-md, 18px) - 6px);
    overflow: hidden;
    cursor: pointer;
    background: rgba(10, 54, 82, 0.04);
    box-shadow: 0 8px 24px rgba(10, 54, 82, 0.08);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.v16-medic-gallery__item:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(10, 54, 82, 0.12);
}

.v16-medic-gallery__item:focus-visible {
    outline: 2px solid var(--tma-brand, #00668e);
    outline-offset: 3px;
}

.v16-medic-gallery__item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    transition: transform 260ms ease;
}

.v16-medic-gallery__item:hover img {
    transform: scale(1.03);
}

/* ---- Lightbox ---- */
.v16-medic-lightbox {
    position: fixed;
    inset: 0;
    width: min(1100px, calc(100vw - 24px));
    height: fit-content;
    max-height: calc(100vh - 24px);
    margin: auto;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: visible;
    z-index: 10050;
}

.v16-medic-lightbox[open] {
    display: block;
}

.v16-medic-lightbox:not([open]) {
    display: none;
}

.v16-medic-lightbox::backdrop {
    background: rgba(10, 54, 82, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.v16-medic-lightbox__panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: calc(100vh - 24px);
    border-radius: calc(var(--tma-radius-md, 18px) + 2px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(12, 40, 62, 0.92);
    box-shadow: 0 28px 72px rgba(4, 18, 32, 0.45);
    overflow: hidden;
}

.v16-medic-lightbox__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.v16-medic-lightbox__count {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}

.v16-medic-lightbox__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
    cursor: pointer;
    transition: background 180ms ease;
}

.v16-medic-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.18);
}

.v16-medic-lightbox__stage {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(8px, 2vw, 16px);
    padding: 0 clamp(8px, 2vw, 16px) clamp(12px, 2vw, 16px);
    min-height: min(68vh, 720px);
}

.v16-medic-lightbox__figure {
    margin: 0;
    min-width: 0;
    height: min(68vh, 720px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.v16-medic-lightbox__img {
    max-width: 100%;
    max-height: min(68vh, 720px);
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: calc(var(--tma-radius-md, 18px) - 4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.v16-medic-lightbox__nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
    cursor: pointer;
    transition: background 180ms ease, border-color 180ms ease, opacity 180ms ease;
}

.v16-medic-lightbox__nav:hover:not(:disabled) {
    background: rgba(102, 214, 231, 0.22);
    border-color: rgba(102, 214, 231, 0.45);
}

.v16-medic-lightbox__nav:disabled {
    opacity: 0.35;
    cursor: default;
}

.v16-medic-lightbox__thumbs {
    display: flex;
    gap: 8px;
    padding: 0 14px 14px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.v16-medic-lightbox__thumbs[hidden] {
    display: none !important;
}

.v16-medic-lightbox__thumb {
    flex: 0 0 auto;
    width: 72px;
    height: 54px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    opacity: 0.72;
    transition: opacity 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.v16-medic-lightbox__thumb:hover,
.v16-medic-lightbox__thumb.is-active {
    opacity: 1;
    border-color: rgba(102, 214, 231, 0.75);
}

.v16-medic-lightbox__thumb.is-active {
    transform: translateY(-2px);
}

.v16-medic-lightbox__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.v16-medic-figure {
    margin: 0 0 1.1em;
}

.v16-medic-figure img {
    border-radius: var(--tma-radius-md, 18px);
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 900px) {
    .v16-medic-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .v16-medic-lightbox__stage {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .v16-medic-lightbox__nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 2;
    }

    .v16-medic-lightbox__nav--prev {
        left: 10px;
    }

    .v16-medic-lightbox__nav--next {
        right: 10px;
    }

    .v16-medic-lightbox__figure {
        height: min(58vh, 520px);
    }

    .v16-medic-lightbox__img {
        max-height: min(58vh, 520px);
    }
}

@media (max-width: 560px) {
    .v16-medic-gallery {
        grid-template-columns: 1fr;
    }
}
