/* ============================================================
   Student Grant Program – glassomorphic layout
   Prefix: .v16-sgp-
   ============================================================ */

.v16-sgp-hero {
    background: linear-gradient(
        135deg,
        rgba(12, 56, 86, 0.98) 0%,
        rgba(0, 98, 134, 0.93) 34%,
        rgba(20, 74, 104, 0.95) 58%,
        rgba(8, 46, 72, 0.99) 100%
    );
}

.v16-sgp-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-sgp-hero--project .v16-inner-hero__grid {
    align-items: center;
}

.v16-sgp-hero__glass-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: clamp(160px, 22vw, 220px);
    overflow: hidden;
}

.v16-sgp-hero__glass-card--cover {
    min-height: clamp(180px, 24vw, 260px);
    padding: 0;
}

.v16-sgp-hero__svg {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 220px;
    display: block;
    margin: 0 auto;
}

.v16-sgp-hero__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.28;
    filter: saturate(0.9);
}

.v16-sgp-hero__cover {
    width: 100%;
    height: 100%;
    min-height: clamp(180px, 24vw, 260px);
    object-fit: cover;
    display: block;
    border-radius: inherit;
}

.v16-sgp-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-sgp-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-sgp-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-sgp-hero__stats dd {
    margin: 0;
    font-size: clamp(1.25rem, 2.4vw, 1.65rem);
    font-weight: 800;
    line-height: 1.1;
    color: #fff;
}

.v16-sgp-hero__authors {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 14px 0 0;
    font-size: 0.95rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.82);
}

.v16-sgp-hero__authors svg {
    flex-shrink: 0;
    margin-top: 2px;
    opacity: 0.85;
}

.v16-sgp-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-sgp-back:hover {
    color: #fff;
    text-decoration: underline;
}

/* ---- Page atmosphere ---- */
.v16-sgp-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-sgp-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-sgp-page > .container {
    position: relative;
    z-index: 1;
}

.v16-sgp-page .v16-inner-layout {
    padding-top: clamp(20px, 3.5vw, 36px);
}

.v16-sgp-shell {
    display: grid;
    gap: clamp(20px, 3vw, 32px);
    min-width: 0;
}

/* ---- Shared glass panels ---- */
.v16-sgp-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-sgp-panel h2 {
    margin: 0 0 18px;
    font-size: clamp(1.25rem, 2.4vw, 1.55rem);
    color: var(--tma-dark, #0a3652);
}

.v16-sgp-intro p {
    margin: 0 0 14px;
    font-size: 1.02rem;
    line-height: 1.74;
    color: rgba(10, 54, 82, 0.78);
}

.v16-sgp-intro__heading {
    margin: 0 0 16px;
    font-size: clamp(1.2rem, 2.2vw, 1.45rem);
    line-height: 1.35;
    color: var(--tma-dark, #0a3652);
}

.v16-sgp-intro p:last-child {
    margin-bottom: 0;
}

.v16-sgp-footer-note p {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.68;
    color: rgba(10, 54, 82, 0.76);
}

/* ---- Resources ---- */
.v16-sgp-docs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.v16-sgp-docs__pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid rgba(0, 104, 142, 0.16);
    background: rgba(102, 214, 231, 0.10);
    color: var(--tma-teal, #00668e);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.v16-sgp-docs__pill:hover {
    background: rgba(102, 214, 231, 0.20);
    border-color: rgba(0, 104, 142, 0.28);
    transform: translateY(-1px);
}

/* ---- Highlight ---- */
.v16-sgp-highlight {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: clamp(18px, 2.8vw, 24px);
    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-sgp-highlight svg {
    flex-shrink: 0;
    color: var(--tma-teal, #00668e);
    margin-top: 2px;
}

.v16-sgp-highlight p {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.68;
    color: rgba(10, 54, 82, 0.78);
}

/* ---- Project cards ---- */
.v16-sgp-projects {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(14px, 2.4vw, 22px);
}

.v16-sgp-project {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-radius: calc(var(--tma-radius-md, 18px) - 2px);
    border: 1px solid rgba(255, 255, 255, 0.78);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    box-shadow: 0 10px 32px rgba(10, 54, 82, 0.07);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.v16-sgp-project:hover {
    transform: translateY(-4px);
    border-color: rgba(102, 214, 231, 0.55);
    box-shadow: 0 18px 44px rgba(10, 54, 82, 0.12);
}

.v16-sgp-project__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: rgba(10, 54, 82, 0.06);
}

.v16-sgp-project__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 320ms ease;
}

.v16-sgp-project:hover .v16-sgp-project__media img {
    transform: scale(1.04);
}

.v16-sgp-project__num {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #fff;
    background: rgba(10, 54, 82, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.v16-sgp-project__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
    padding: clamp(14px, 2.2vw, 18px);
}

.v16-sgp-project__body h3 {
    margin: 0;
    font-size: clamp(0.98rem, 1.8vw, 1.08rem);
    line-height: 1.35;
    color: var(--tma-dark, #0a3652);
}

.v16-sgp-project__authors {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.5;
    color: rgba(10, 54, 82, 0.62);
}

.v16-sgp-project__authors svg {
    flex-shrink: 0;
    margin-top: 2px;
    opacity: 0.7;
}

.v16-sgp-project__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--tma-teal, #00668e);
}

/* ---- Video ---- */
.v16-sgp-video {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: calc(var(--tma-radius-md, 18px) - 4px);
    overflow: hidden;
    background: rgba(10, 54, 82, 0.08);
    box-shadow: inset 0 0 0 1px rgba(10, 54, 82, 0.08);
}

.v16-sgp-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ---- Gallery ---- */
.v16-sgp-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(10px, 2vw, 16px);
}

.v16-sgp-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-sgp-gallery__item:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(10, 54, 82, 0.12);
}

.v16-sgp-gallery__item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    transition: transform 260ms ease;
}

.v16-sgp-gallery__item:hover img {
    transform: scale(1.03);
}

/* ---- Gallery lightbox ---- */
.v16-sgp-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-sgp-lightbox[open] {
    display: block;
}

.v16-sgp-lightbox:not([open]) {
    display: none;
}

.v16-sgp-lightbox::backdrop {
    background: rgba(10, 54, 82, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.v16-sgp-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-sgp-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-sgp-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-sgp-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-sgp-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.18);
}

.v16-sgp-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-sgp-lightbox__figure {
    margin: 0;
    min-width: 0;
    height: min(68vh, 720px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.v16-sgp-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-sgp-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-sgp-lightbox__nav:hover:not(:disabled) {
    background: rgba(102, 214, 231, 0.22);
    border-color: rgba(102, 214, 231, 0.45);
}

.v16-sgp-lightbox__nav:disabled {
    opacity: 0.35;
    cursor: default;
}

.v16-sgp-lightbox__thumbs {
    display: flex;
    gap: 8px;
    padding: 0 14px 14px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.v16-sgp-lightbox__thumbs[hidden] {
    display: none !important;
}

.v16-sgp-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-sgp-lightbox__thumb:hover,
.v16-sgp-lightbox__thumb.is-active {
    opacity: 1;
    border-color: rgba(102, 214, 231, 0.75);
}

.v16-sgp-lightbox__thumb.is-active {
    transform: translateY(-2px);
}

.v16-sgp-lightbox__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---- Responsive ---- */
@media (max-width: 980px) {
    .v16-sgp-projects {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .v16-sgp-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .v16-sgp-hero__stats {
        grid-template-columns: 1fr;
    }

    .v16-sgp-projects {
        grid-template-columns: 1fr;
    }

    .v16-sgp-lightbox__stage {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .v16-sgp-lightbox__nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 2;
    }

    .v16-sgp-lightbox__nav--prev {
        left: 10px;
    }

    .v16-sgp-lightbox__nav--next {
        right: 10px;
    }

    .v16-sgp-lightbox__figure {
        height: min(56vh, 520px);
        padding: 0 52px;
    }

    .v16-sgp-lightbox__img {
        max-height: min(56vh, 520px);
    }
}

@media (max-width: 480px) {
    .v16-sgp-gallery {
        grid-template-columns: 1fr;
    }
}
