/* ============================================================
   Six Days of Country Doctor – glassomorphic layout
   Prefix: .v16-cd-
   ============================================================ */

.v16-cd-hero {
    background: linear-gradient(
        135deg,
        rgba(16, 62, 92, 0.98) 0%,
        rgba(0, 92, 128, 0.93) 36%,
        rgba(24, 78, 108, 0.95) 58%,
        rgba(10, 48, 74, 0.99) 100%
    );
}

.v16-cd-hero::before {
    background:
        radial-gradient(circle at 8% 20%, rgba(102, 214, 231, 0.17) 0%, transparent 40%),
        radial-gradient(circle at 92% 70%, rgba(91, 163, 245, 0.10) 0%, transparent 36%),
        radial-gradient(circle at 50% 110%, rgba(91, 163, 245, 0.09) 0%, transparent 48%),
        linear-gradient(120deg, rgba(0, 104, 142, 0.24) 0%, transparent 62%);
}

.v16-cd-hero--season .v16-inner-hero__grid {
    align-items: center;
}

.v16-cd-hero__glass-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: clamp(160px, 22vw, 220px);
    overflow: hidden;
}

.v16-cd-hero__glass-card--cover {
    min-height: clamp(180px, 24vw, 260px);
    padding: 0;
}

.v16-cd-hero__svg {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 220px;
    display: block;
    margin: 0 auto;
}

.v16-cd-hero__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.28;
    filter: saturate(0.9);
}

.v16-cd-hero__cover {
    width: 100%;
    height: 100%;
    min-height: clamp(180px, 24vw, 260px);
    object-fit: cover;
    display: block;
    border-radius: inherit;
}

.v16-cd-hero__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(10px, 2vw, 16px);
    margin: clamp(20px, 3vw, 28px) 0 0;
    padding: 0;
}

.v16-cd-hero__stats > div {
    padding: clamp(12px, 2vw, 16px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
}

.v16-cd-hero__stats dt {
    margin: 0 0 4px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.62);
}

.v16-cd-hero__stats dd {
    margin: 0;
    font-size: clamp(1.25rem, 2.4vw, 1.65rem);
    font-weight: 800;
    line-height: 1.1;
    color: #fff;
}

.v16-cd-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.88);
}

.v16-cd-back:hover {
    color: #fff;
    text-decoration: underline;
}

/* ---- Page atmosphere ---- */
.v16-cd-page {
    position: relative;
    padding-bottom: clamp(52px, 8vw, 96px);
    background:
        radial-gradient(ellipse 90% 54% at 6% 0%, rgba(102, 214, 231, 0.12), transparent 54%),
        radial-gradient(ellipse 70% 46% at 94% 4%, rgba(91, 163, 245, 0.07), transparent 50%),
        linear-gradient(180deg, #e0edf6 0%, #f0f7fb 40%, #ffffff 100%);
}

.v16-cd-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(0, 104, 142, 0.035) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
    opacity: 0.5;
}

.v16-cd-page > .container {
    position: relative;
    z-index: 1;
}

.v16-cd-page .v16-inner-layout {
    padding-top: clamp(20px, 3.5vw, 36px);
}

.v16-cd-shell {
    display: grid;
    gap: clamp(20px, 3vw, 32px);
    min-width: 0;
}

.v16-cd-panel {
    padding: clamp(20px, 3vw, 28px);
    border-radius: var(--tma-radius-md, 18px);
    border: 1px solid rgba(255, 255, 255, 0.74);
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(18px) saturate(145%);
    -webkit-backdrop-filter: blur(18px) saturate(145%);
    box-shadow: 0 14px 42px rgba(10, 54, 82, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.v16-cd-panel h2 {
    margin: 0 0 18px;
    font-size: clamp(1.25rem, 2.4vw, 1.55rem);
    color: var(--tma-dark, #0a3652);
}

.v16-cd-intro p {
    margin: 0 0 14px;
    font-size: 1.02rem;
    line-height: 1.74;
    color: rgba(10, 54, 82, 0.78);
}

.v16-cd-intro p:last-child {
    margin-bottom: 0;
}

/* ---- Impact block ---- */
.v16-cd-impact {
    padding: clamp(22px, 3vw, 30px);
    border-radius: var(--tma-radius-md, 18px);
    border: 1px solid rgba(255, 255, 255, 0.74);
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(18px) saturate(145%);
    -webkit-backdrop-filter: blur(18px) saturate(145%);
    box-shadow: 0 14px 42px rgba(10, 54, 82, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.v16-cd-impact h2 {
    margin: 0 0 14px;
    font-size: clamp(1.2rem, 2.4vw, 1.45rem);
    color: var(--tma-dark, #0a3652);
}

.v16-cd-impact__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
}

.v16-cd-impact__list li {
    position: relative;
    padding-left: 22px;
    font-size: 0.96rem;
    line-height: 1.66;
    color: rgba(10, 54, 82, 0.76);
}

.v16-cd-impact__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.62em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--tma-teal, #00668e);
}

.v16-cd-impact__note {
    margin: 16px 0 0;
    padding-top: 14px;
    border-top: 1px solid rgba(0, 104, 142, 0.10);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--tma-teal, #00668e);
}

/* ---- Season cards ---- */
.v16-cd-seasons {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(14px, 2vw, 20px);
}

.v16-cd-season {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    text-decoration: none;
    color: inherit;
    border-radius: calc(var(--tma-radius-md, 18px) - 2px);
    border: 1px solid rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    box-shadow: 0 12px 32px rgba(10, 54, 82, 0.07);
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.v16-cd-season:hover {
    transform: translateY(-4px);
    border-color: rgba(102, 214, 231, 0.35);
    box-shadow: 0 18px 42px rgba(10, 54, 82, 0.11);
}

.v16-cd-season__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(0, 104, 142, 0.08), rgba(102, 214, 231, 0.12));
}

.v16-cd-season__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 320ms ease;
}

.v16-cd-season:hover .v16-cd-season__media img {
    transform: scale(1.04);
}

.v16-cd-season__num {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #fff;
    background: rgba(10, 54, 82, 0.72);
    backdrop-filter: blur(8px);
}

.v16-cd-season__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
    padding: clamp(16px, 2.2vw, 20px);
}

.v16-cd-season__body h3 {
    margin: 0;
    font-size: 1.02rem;
    color: var(--tma-dark, #0a3652);
}

.v16-cd-season__body p {
    margin: 0;
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.62;
    color: rgba(10, 54, 82, 0.72);
}

.v16-cd-season__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--tma-teal, #00668e);
}

/* ---- Documents ---- */
.v16-cd-docs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.v16-cd-docs__pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--tma-teal, #00668e);
    border: 1px solid rgba(0, 104, 142, 0.14);
    background: rgba(255, 255, 255, 0.82);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.v16-cd-docs__pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(10, 54, 82, 0.08);
}

/* ---- Video ---- */
.v16-cd-video {
    position: relative;
    overflow: hidden;
    border-radius: calc(var(--tma-radius-md, 18px) - 2px);
    border: 1px solid rgba(255, 255, 255, 0.72);
    background: rgba(10, 54, 82, 0.06);
    aspect-ratio: 16 / 9;
    box-shadow: 0 16px 38px rgba(10, 54, 82, 0.10);
}

.v16-cd-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ---- Gallery ---- */
.v16-cd-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(10px, 1.5vw, 14px);
}

.v16-cd-gallery__item {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    cursor: zoom-in;
    overflow: hidden;
    border-radius: calc(var(--tma-radius-md, 18px) - 4px);
    border: 1px solid rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.78);
    aspect-ratio: 4 / 3;
    transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.v16-cd-gallery__item:hover {
    transform: translateY(-2px);
    border-color: rgba(102, 214, 231, 0.35);
    box-shadow: 0 12px 28px rgba(10, 54, 82, 0.10);
}

.v16-cd-gallery__item:focus-visible {
    outline: 2px solid var(--tma-teal, #00668e);
    outline-offset: 2px;
}

.v16-cd-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 280ms ease;
    pointer-events: none;
}

.v16-cd-gallery__item:hover img {
    transform: scale(1.03);
}

/* ---- Gallery lightbox ---- */
.v16-cd-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-cd-lightbox[open] {
    display: block;
}

.v16-cd-lightbox:not([open]) {
    display: none;
}

.v16-cd-lightbox::backdrop {
    background: rgba(10, 54, 82, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.v16-cd-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-cd-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-cd-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-cd-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-cd-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.18);
}

.v16-cd-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-cd-lightbox__figure {
    margin: 0;
    min-width: 0;
    height: min(68vh, 720px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.v16-cd-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-cd-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-cd-lightbox__nav:hover:not(:disabled) {
    background: rgba(102, 214, 231, 0.22);
    border-color: rgba(102, 214, 231, 0.35);
}

.v16-cd-lightbox__nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.v16-cd-lightbox__thumbs {
    display: flex;
    gap: 8px;
    padding: 0 14px 14px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.v16-cd-lightbox__thumbs[hidden] {
    display: none !important;
}

.v16-cd-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-cd-lightbox__thumb:hover,
.v16-cd-lightbox__thumb.is-active {
    opacity: 1;
    border-color: rgba(102, 214, 231, 0.75);
}

.v16-cd-lightbox__thumb.is-active {
    transform: translateY(-2px);
}

.v16-cd-lightbox__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 980px) {
    .v16-cd-seasons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .v16-cd-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .v16-cd-hero__stats {
        grid-template-columns: 1fr;
    }

    .v16-cd-seasons {
        grid-template-columns: 1fr;
    }

    .v16-cd-lightbox__stage {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .v16-cd-lightbox__nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 2;
    }

    .v16-cd-lightbox__nav--prev {
        left: 10px;
    }

    .v16-cd-lightbox__nav--next {
        right: 10px;
    }

    .v16-cd-lightbox__figure {
        height: min(56vh, 520px);
        padding: 0 52px;
    }

    .v16-cd-lightbox__img {
        max-height: min(56vh, 520px);
    }
}

@media (max-width: 480px) {
    .v16-cd-gallery {
        grid-template-columns: 1fr;
    }
}
