/* ============================================================
   Student Academy – scoped glassomorphic styles
   Prefix: .v16-sa-
   Page: student-academy
   ============================================================ */

/* ---- Hero ---- */
.v16-sa-hero {
    background: linear-gradient(
        135deg,
        rgba(10, 54, 82, 0.97) 0%,
        rgba(0, 88, 128, 0.92) 40%,
        rgba(14, 72, 108, 0.95) 70%,
        rgba(10, 54, 82, 0.98) 100%
    );
}

.v16-sa-hero::before {
    background:
        radial-gradient(circle at 12% 22%, rgba(102, 214, 231, 0.16) 0%, transparent 34%),
        radial-gradient(circle at 88% 68%, rgba(216, 180, 106, 0.11) 0%, transparent 30%),
        radial-gradient(circle at 50% 100%, rgba(91, 163, 245, 0.09) 0%, transparent 42%),
        linear-gradient(120deg, rgba(0, 104, 142, 0.24) 0%, transparent 58%);
}

.v16-sa-hero__glass-card {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: clamp(160px, 22vw, 220px);
}

.v16-sa-hero__svg {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 220px;
    display: block;
    margin: 0 auto;
}

/* ---- Page atmosphere ---- */
.v16-sa-page {
    position: relative;
    padding-bottom: clamp(52px, 8vw, 96px);
    background:
        radial-gradient(ellipse 88% 52% at 6% 0%, rgba(102, 214, 231, 0.12), transparent 54%),
        radial-gradient(ellipse 72% 48% at 94% 6%, rgba(216, 180, 106, 0.08), transparent 50%),
        linear-gradient(180deg, #e6f2f8 0%, #f2f8fb 42%, #ffffff 100%);
}

.v16-sa-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(0, 104, 142, 0.045) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
    opacity: 0.5;
}

.v16-sa-page > .container {
    position: relative;
    z-index: 1;
}

.v16-sa-page .v16-inner-layout {
    padding-top: clamp(20px, 3.5vw, 36px);
}

.v16-sa-shell {
    display: grid;
    gap: clamp(18px, 2.5vw, 28px);
}

/* ---- Content panels ---- */
.v16-sa-panel {
    position: relative;
    overflow: hidden;
    padding: clamp(20px, 3vw, 32px);
    border-radius: var(--tma-radius-lg, 28px);
    border: 1px solid rgba(255, 255, 255, 0.65);
    background: rgba(255, 255, 255, 0.76);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    box-shadow:
        0 18px 52px rgba(10, 54, 82, 0.11),
        inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .v16-sa-panel {
        background: rgba(255, 255, 255, 0.97);
    }
}

.v16-sa-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: clamp(20px, 3vw, 32px);
    right: clamp(20px, 3vw, 32px);
    height: 3px;
    border-radius: 0 0 4px 4px;
    background: linear-gradient(90deg, var(--tma-teal, #00668e), var(--tma-gold, #d8b46a));
    opacity: 0.75;
}

/* ---- Section headings ---- */
.v16-sa-section__head {
    margin: 0 0 clamp(18px, 2.5vw, 24px);
    padding-bottom: clamp(14px, 2vw, 18px);
    border-bottom: 1px solid rgba(10, 54, 82, 0.08);
}

.v16-sa-section__head h2 {
    margin: 0;
    font-family: var(--font-heading, inherit);
    font-size: clamp(1.15rem, 2.2vw, 1.35rem);
    font-weight: 700;
    color: var(--tma-dark, #0a3652);
    letter-spacing: -0.02em;
}

.v16-sa-section__head .v16-sa-contact-heading {
    margin: 0;
}

/* ---- Rich text (CMS HTML) ---- */
.v16-sa-prose {
    display: grid;
    gap: clamp(14px, 2vw, 20px);
    font-size: clamp(0.94rem, 1.5vw, 1.04rem);
    line-height: 1.75;
    color: var(--tma-text, #163247);
}

.v16-sa-prose > p:first-child {
    position: relative;
    margin: 0;
    padding: clamp(18px, 2.6vw, 26px) clamp(18px, 2.6vw, 26px) clamp(18px, 2.6vw, 26px) clamp(22px, 3vw, 30px);
    border-radius: var(--tma-radius-md, 18px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(232, 246, 252, 0.7) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 28px rgba(10, 54, 82, 0.07);
}

.v16-sa-prose > p:first-child::before {
    content: '';
    position: absolute;
    left: 0;
    top: clamp(14px, 2vw, 18px);
    bottom: clamp(14px, 2vw, 18px);
    width: 4px;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--tma-teal, #00668e), var(--tma-gold, #d8b46a));
}

.v16-sa-prose p {
    margin: 0;
}

.v16-sa-prose h4 {
    margin: clamp(8px, 1.2vw, 12px) 0 0;
    padding: clamp(14px, 2vw, 18px) clamp(16px, 2.2vw, 20px) 8px;
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-bottom: none;
    border-radius: var(--tma-radius-md, 18px) var(--tma-radius-md, 18px) 0 0;
    background: rgba(255, 255, 255, 0.82);
    color: var(--tma-dark, #0a3652);
    font-family: var(--font-heading, inherit);
    font-size: clamp(0.92rem, 1.45vw, 1.02rem);
    font-weight: 700;
    line-height: 1.35;
}

.v16-sa-prose h4 + p,
.v16-sa-prose h4 + ul {
    margin-top: 0;
}

.v16-sa-prose a {
    color: var(--tma-teal, #00668e);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 180ms ease;
}

.v16-sa-prose a:hover {
    color: #0088b8;
}

.v16-sa-prose img {
    max-width: 100%;
    height: auto;
    border-radius: var(--tma-radius-md, 18px);
    box-shadow: 0 12px 36px rgba(10, 54, 82, 0.12);
}

.v16-sa-prose ul,
.v16-sa-prose ol {
    margin: 0;
    padding-left: 1.35em;
    list-style-position: outside;
}

.v16-sa-prose ul {
    list-style-type: disc;
}

.v16-sa-prose ol {
    list-style-type: decimal;
}

.v16-sa-prose li {
    margin: 0 0 0.45em;
    padding-left: 0.15em;
}

.v16-sa-prose li:last-child {
    margin-bottom: 0;
}

.v16-sa-prose li::marker {
    color: var(--tma-teal, #00668e);
    font-weight: 600;
}

.v16-sa-article {
    margin: clamp(10px, 1.5vw, 16px) 0 0;
    padding: clamp(12px, 1.8vw, 16px) clamp(14px, 2vw, 18px);
    border-radius: var(--tma-radius-sm, 12px);
    border: 1px solid rgba(0, 104, 142, 0.12);
    background: linear-gradient(135deg, rgba(0, 104, 142, 0.08) 0%, rgba(255, 255, 255, 0.85) 100%);
    color: var(--tma-dark, #0a3652);
    font-family: var(--font-heading, inherit);
    font-size: clamp(0.98rem, 1.55vw, 1.1rem);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.015em;
}

.v16-sa-clauses {
    margin: 0;
    padding: clamp(12px, 1.8vw, 16px) clamp(14px, 2vw, 18px) clamp(12px, 1.8vw, 16px) clamp(28px, 3.2vw, 36px);
    border-radius: var(--tma-radius-sm, 12px);
    border: 1px solid rgba(10, 54, 82, 0.06);
    background: rgba(255, 255, 255, 0.72);
    list-style: none;
    font-size: clamp(0.86rem, 1.35vw, 0.94rem);
    line-height: 1.65;
}

.v16-sa-clauses > li {
    margin: 0 0 0.7em;
    padding-left: 0;
}

.v16-sa-clauses > li:last-child {
    margin-bottom: 0;
}

.v16-sa-clause-num {
    display: inline-block;
    margin-right: 0.2em;
    color: var(--tma-teal, #00668e);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.v16-sa-list,
.v16-sa-sublist {
    margin: 0.55em 0 0.15em;
    padding-left: 1.2em;
    list-style-type: lower-alpha;
}

.v16-sa-sublist {
    margin-top: 0.45em;
    padding: 0.5em 0.75em 0.5em 1.35em;
    border-radius: 10px;
    background: rgba(0, 104, 142, 0.04);
}

.v16-sa-list > li,
.v16-sa-sublist > li {
    margin-bottom: 0.4em;
}

.v16-sa-prose--regulations {
    gap: clamp(10px, 1.5vw, 14px);
}

.v16-sa-prose--regulations > p {
    margin: 0;
    padding: clamp(12px, 1.8vw, 16px) clamp(14px, 2vw, 18px);
    border-radius: var(--tma-radius-sm, 12px);
    border: 1px solid rgba(10, 54, 82, 0.06);
    background: rgba(255, 255, 255, 0.62);
    font-size: clamp(0.86rem, 1.35vw, 0.94rem);
    line-height: 1.65;
}

.v16-sa-prose--regulations > p:first-child::before {
    display: none;
}

.v16-sa-prose--regulations > p:first-child {
    padding: clamp(18px, 2.6vw, 26px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(232, 246, 252, 0.75) 100%);
    font-size: clamp(0.94rem, 1.5vw, 1.04rem);
}

.v16-sa-prose--regulations > .v16-sa-article:first-child,
.v16-sa-prose--regulations > h4:first-child {
    display: none;
}

.v16-sa-prose--regulations > .v16-sa-figure {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.v16-sa-prose--regulations > .v16-sa-figure img {
    display: block;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
}

.v16-sa-contact-heading {
    margin: 0 0 clamp(14px, 2vw, 18px);
    font-family: var(--font-heading, inherit);
    font-size: clamp(1rem, 1.8vw, 1.12rem);
    font-weight: 700;
    color: var(--tma-dark, #0a3652);
    letter-spacing: -0.02em;
}

/* ---- Ambassadors ---- */
.v16-sa-ambassadors {
    margin-top: clamp(24px, 3.5vw, 36px);
    padding-top: clamp(22px, 3vw, 30px);
    border-top: 1px solid rgba(10, 54, 82, 0.08);
}

.v16-sa-section:only-child .v16-sa-ambassadors {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.v16-sa-ambassadors__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
    gap: clamp(16px, 2.2vw, 22px);
}

.v16-sa-ambassador-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: var(--tma-radius-md, 18px);
    border: 1px solid rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(14px) saturate(130%);
    -webkit-backdrop-filter: blur(14px) saturate(130%);
    box-shadow:
        0 12px 32px rgba(10, 54, 82, 0.09),
        inset 0 1px 0 rgba(255, 255, 255, 0.92);
    transition: transform 260ms ease, box-shadow 260ms ease;
}

.v16-sa-ambassador-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        160deg,
        rgba(102, 214, 231, 0.08) 0%,
        transparent 45%,
        rgba(216, 180, 106, 0.06) 100%
    );
    pointer-events: none;
    opacity: 0;
    transition: opacity 260ms ease;
}

.v16-sa-ambassador-card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 20px 44px rgba(10, 54, 82, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.v16-sa-ambassador-card:hover::after {
    opacity: 1;
}

.v16-sa-ambassador-card__media {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: linear-gradient(145deg, #e8f3f9, #d4e8f2);
}

.v16-sa-ambassador-card__media::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(10, 54, 82, 0.18) 100%);
    z-index: 1;
    pointer-events: none;
}

.v16-sa-ambassador-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 400ms ease;
}

.v16-sa-ambassador-card:hover .v16-sa-ambassador-card__media img {
    transform: scale(1.04);
}

.v16-sa-ambassador-card__body {
    position: relative;
    z-index: 2;
    padding: clamp(14px, 2vw, 18px);
    text-align: center;
}

.v16-sa-ambassador-card__name {
    margin: 0 0 6px;
    font-size: clamp(0.98rem, 1.5vw, 1.1rem);
    font-weight: 700;
    color: var(--tma-dark, #0a3652);
    letter-spacing: -0.01em;
}

.v16-sa-ambassador-card__email {
    display: inline-block;
    font-size: clamp(0.84rem, 1.3vw, 0.92rem);
    color: var(--tma-teal, #00668e);
    text-decoration: none;
    word-break: break-word;
    transition: color 180ms ease;
}

.v16-sa-ambassador-card__email:hover {
    color: #0088b8;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---- Legacy fallback (imported student-life markup) ---- */
.v16-sa-legacy .nav-tabs,
.v16-sa-legacy .nav.nav-tabs {
    display: none !important;
}

.v16-sa-legacy .tab-content .tab-pane {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.v16-sa-legacy .profile-card {
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: var(--tma-radius-md, 18px);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 12px 32px rgba(10, 54, 82, 0.09);
    overflow: hidden;
    transition: transform 260ms ease, box-shadow 260ms ease;
}

.v16-sa-legacy .profile-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 44px rgba(10, 54, 82, 0.14);
}

.v16-sa-legacy .profile-card .img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.v16-sa-legacy .profile-card .card-body {
    padding: clamp(14px, 2vw, 18px);
    text-align: center;
}

.v16-sa-legacy .profile-card h5 {
    margin: 0 0 6px;
    font-size: clamp(0.98rem, 1.5vw, 1.1rem);
    font-weight: 700;
    color: var(--tma-dark, #0a3652);
}

.v16-sa-legacy .profile-card a {
    color: var(--tma-teal, #00668e);
    text-decoration: none;
}

.v16-sa-legacy .contact-link {
    color: var(--tma-teal, #00668e);
    font-weight: 600;
    text-decoration: none;
}

.v16-sa-legacy .section-title,
.v16-sa-legacy h1.section-title {
    display: none;
}

.v16-sa-statute-card {
    display: flex;
    align-items: center;
    gap: 18px;
    max-width: 28rem;
    padding: 18px 20px;
    border-radius: 18px;
    border: 1px solid rgba(216, 180, 106, 0.45);
    background: linear-gradient(135deg, rgba(255, 248, 234, 0.95) 0%, rgba(255, 255, 255, 0.82) 52%, rgba(238, 248, 255, 0.9) 100%);
    box-shadow: 0 16px 40px rgba(10, 54, 82, 0.1);
    color: inherit;
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.v16-sa-statute-card:hover,
.v16-sa-statute-card:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(216, 180, 106, 0.7);
    box-shadow: 0 22px 48px rgba(10, 54, 82, 0.14);
}

.v16-sa-statute-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #ffe8e8 0%, #fff5f5 100%);
    color: #c0392b;
    box-shadow: inset 0 0 0 1px rgba(243, 180, 180, 0.8);
}

.v16-sa-statute-card__icon svg {
    width: 28px;
    height: 28px;
}

.v16-sa-statute-card__body {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.v16-sa-statute-card__hint {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(10, 54, 82, 0.55);
}

.v16-sa-statute-card__title {
    font-family: var(--font-heading, inherit);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--tma-dark, #0a3652);
}

.v16-sa-statute-card__lead {
    font-size: 0.92rem;
    line-height: 1.5;
    color: rgba(36, 70, 90, 0.75);
}

.v16-sa-statute-card__action {
    display: inline-block;
    margin-left: 0.35rem;
    font-weight: 700;
    color: var(--tma-teal, #00668e);
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
    .v16-sa-panel {
        padding: clamp(16px, 4vw, 22px);
    }

    .v16-sa-ambassadors__grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .v16-sa-ambassador-card,
    .v16-sa-ambassador-card__media img {
        transition: none;
    }
}
