/* =========================================================
   STUDENT & ALUMNI ACTIVITIES (home page)
   Pages/Partials/_StudentActivities.cshtml
   Dark band after the light News & Events section; society colours
   come in as --sa-c on each card / row.
========================================================= */

.sa-section {
    --sa-deep: #073b4c;
    --sa-deeper: #052c39;
    --sa-teal: #0b858d;
    --sa-mint: #58c5ca;
    --sa-gold: #e5b83d;

    position: relative;
    padding: 96px 0 100px;
    overflow: hidden;
    background: var(--sa-deep);
    color: #ffffff;
}

    .sa-section::before {
        content: "";
        position: absolute;
        top: -220px;
        right: -180px;
        width: 520px;
        height: 520px;
        border: 1px solid rgba(255,255,255,.06);
        border-radius: 50%;
        pointer-events: none;
    }

    .sa-section .container {
        position: relative;
    }


/* ---------- Header ---------- */

.sa-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 40px;
}

.sa-tag {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 13px;
    color: var(--sa-mint);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
}

    .sa-tag::before {
        content: "";
        width: 28px;
        height: 2px;
        border-radius: 5px;
        background: var(--sa-gold);
    }

.sa-head h2 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: clamp(30px, 4vw, 42px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -.6px;
}

    .sa-head h2 span {
        color: var(--sa-mint);
    }

.sa-head p {
    max-width: none;
    margin: 0;
    color: rgba(255,255,255,.7);
    font-size: 15px;
    line-height: 1.7;
}

.sa-head-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sa-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border: 1px solid var(--sa-gold);
    border-radius: 12px;
    background: var(--sa-gold);
    color: var(--sa-deep);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: transform .2s ease, background .2s ease;
}

    .sa-btn:hover {
        transform: translateY(-2px);
        color: var(--sa-deep);
    }

    .sa-btn.alt {
        border-color: rgba(255,255,255,.3);
        background: transparent;
        color: #ffffff;
    }

        .sa-btn.alt:hover {
            border-color: #ffffff;
            color: #ffffff;
        }


/* One line on wide screens; wraps normally on tablets and phones */
@media (min-width: 992px) {
    .sa-head p {
        white-space: nowrap;
    }
}

/* ---------- Latest reports ---------- */

.sa-reports {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 16px;
    min-height: 420px;
}

    .sa-reports.is-wide {
        grid-template-columns: 1.5fr 1fr 1fr;
        grid-template-rows: 1fr;
        min-height: 340px;
    }

/* Picture on top, caption strip below: most CMS pictures are posters full of their own
   text, so titles never sit on top of the image. */
.sa-report {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    border-radius: 20px;
    background: var(--sa-deeper);
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 0 0 1px rgba(255,255,255,.06);
}

    .sa-report.is-lead {
        grid-row: span 2;
    }

    .sa-reports.is-wide .sa-report.is-lead {
        grid-row: auto;
    }

/* Fills whatever height the caption leaves; the image never overflows it */
.sa-report-img {
    position: relative;
    flex: 1 1 auto;
    min-height: 120px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--sa-c, var(--sa-teal)) 55%, var(--sa-deeper));
    color: rgba(255,255,255,.4);
    font-size: 48px;
}

    .sa-report-img img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: top center;
        transition: transform .5s ease;
    }

.sa-report:hover .sa-report-img img {
    transform: scale(1.04);
}

/* Caption: white strip, teal date with a calendar icon, bold navy title */
.sa-report-body {
    display: flex;
    flex: none;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px 14px;
    border-top: 3px solid var(--sa-c, var(--sa-teal));
    background: #ffffff;
}

    .sa-report-body small {
        display: flex;
        align-items: center;
        gap: 6px;
        overflow: hidden;
        color: #0b858d;
        font-size: 11.5px;
        font-weight: 700;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

        .sa-report-body small i {
            font-size: 11px;
        }

        .sa-report-body small span {
            overflow: hidden;
            color: #7a8d94;
            font-weight: 600;
            text-overflow: ellipsis;
        }

    /* Two lines on the small cards, three on the lead; the full title shows on hover */
    .sa-report-body strong {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        color: #073b4c;
        font-size: 14.5px;
        font-weight: 800;
        line-height: 1.35;
        transition: color .2s ease;
    }

.sa-report.is-lead .sa-report-body {
    padding: 14px 20px 16px;
}

    .sa-report.is-lead .sa-report-body strong {
        -webkit-line-clamp: 3;
        font-size: 18px;
        line-height: 1.3;
    }

.sa-report:hover .sa-report-body strong,
.sa-report:focus-visible .sa-report-body strong {
    color: #0b858d;
}

/* ---------- Carousel (one activity at a time) ---------- */

.sa-carousel {
    position: relative;
}

.sa-track {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 20px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}

    .sa-track::-webkit-scrollbar {
        display: none;
    }

    .sa-track:focus-visible {
        outline: 3px solid var(--sa-gold);
        outline-offset: 3px;
    }

/* All slides take the height of the tallest one: the white caption grows to fill
   it, so a one-line title never leaves a dark gap underneath */
.sa-slide {
    flex: 0 0 100%;
    border-radius: 0;
    background: #ffffff;
    scroll-snap-align: start;
    box-shadow: none;
}

    .sa-slide .sa-report-body {
        flex: 1 0 auto;
    }

    /* Same picture shape on every slide, so the caption never jumps */
    .sa-slide .sa-report-img {
        flex: none;
        aspect-ratio: 16 / 9;
        min-height: 0;
    }

    .sa-slide .sa-report-body {
        padding: 14px 20px 16px;
    }

        .sa-slide .sa-report-body strong {
            font-size: 18px;
            line-height: 1.3;
        }

/* Arrows sit on the picture, centred on its height (picture = 16:9 of the width) */
.sa-nav {
    position: absolute;
    top: 0;
    /* Vertical margins in % are measured against the WIDTH: 28.125% = half of a 16:9 picture */
    margin-top: calc(28.125% - 21px);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    color: #073b4c;
    font-size: 15px;
    box-shadow: 0 6px 18px rgba(4,32,45,.25);
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

    .sa-nav.prev { left: 12px; }
    .sa-nav.next { right: 12px; }

    .sa-nav:hover {
        background: var(--sa-gold);
        transform: scale(1.06);
    }

    .sa-nav:focus-visible {
        outline: 3px solid var(--sa-gold);
        outline-offset: 2px;
    }

.sa-under {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
}

    .sa-under .sa-more {
        margin-top: 0;
    }

.sa-dots {
    display: flex;
    gap: 6px;
}

    .sa-dots button {
        width: 9px;
        height: 9px;
        padding: 0;
        border: 0;
        border-radius: 999px;
        background: rgba(255,255,255,.3);
        cursor: pointer;
        transition: width .25s ease, background .25s ease;
    }

        .sa-dots button[aria-current="true"] {
            width: 26px;
            background: var(--sa-gold);
        }

        .sa-dots button:focus-visible {
            outline: 2px solid #ffffff;
            outline-offset: 2px;
        }

@media (prefers-reduced-motion: reduce) {
    .sa-dots button,
    .sa-nav {
        transition: none;
    }
}

.sa-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 260px;
    border: 1px dashed rgba(255,255,255,.25);
    border-radius: 20px;
    color: rgba(255,255,255,.65);
    text-align: center;
}

    .sa-empty i {
        font-size: 34px;
        color: var(--sa-mint);
    }

    .sa-empty p {
        margin: 0;
    }

.sa-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    color: var(--sa-gold);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

    .sa-more:hover {
        color: #ffffff;
    }


/* ---------- Coming up ---------- */

.sa-upcoming {
    height: 100%;
    padding: 26px 26px 22px;
    border-radius: 20px;
    background: var(--sa-deeper);
}

    .sa-upcoming h3 {
        margin: 0 0 14px;
        color: #ffffff;
        font-size: 20px;
        font-weight: 800;
    }

    .sa-upcoming ul {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .sa-upcoming li + li {
        border-top: 1px solid rgba(255,255,255,.08);
    }

    .sa-upcoming a:not(.sa-more) {
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 13px 4px;
        color: #ffffff;
        text-decoration: none;
        transition: background .2s ease;
    }

        .sa-upcoming a:not(.sa-more):hover {
            background: rgba(255,255,255,.04);
        }

.sa-date {
    display: flex;
    flex: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 62px;
    border-top: 4px solid var(--sa-c, var(--sa-gold));
    border-radius: 12px;
    background: rgba(255,255,255,.07);
    line-height: 1;
}

    .sa-date b {
        font-size: 22px;
        font-weight: 800;
    }

    .sa-date small {
        margin-top: 4px;
        color: rgba(255,255,255,.65);
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
    }

    .sa-date.is-week small:first-child {
        margin: 0 0 3px;
        font-size: 8px;
        letter-spacing: .5px;
    }

.sa-up-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

    .sa-up-body strong {
        font-size: 15px;
        font-weight: 700;
        line-height: 1.35;
    }

    .sa-up-body small {
        overflow: hidden;
        color: rgba(255,255,255,.62);
        font-size: 12px;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

.sa-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-radius: 50%;
    background: var(--sa-c, var(--sa-gold));
    vertical-align: 0;
}


/* ---------- Focus, motion, small screens ---------- */

.sa-btn:focus-visible,
.sa-report:focus-visible,
.sa-upcoming a:focus-visible,
.sa-more:focus-visible {
    outline: 3px solid var(--sa-gold);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .sa-btn,
    .sa-report-img img {
        transition: none;
    }
}

@media (max-width: 991px) {
    .sa-section {
        padding: 72px 0 76px;
    }

    .sa-reports,
    .sa-reports.is-wide {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
        min-height: 0;
    }

        .sa-report.is-lead,
        .sa-reports.is-wide .sa-report.is-lead {
            grid-column: span 2;
            grid-row: auto;
        }

    /* No fixed grid height on small screens: give the pictures a shape instead */
    .sa-report-img {
        flex: none;
        aspect-ratio: 16 / 10;
    }

    .sa-report.is-lead .sa-report-img {
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 575px) {
    .sa-reports,
    .sa-reports.is-wide {
        grid-template-columns: 1fr;
    }

        .sa-report.is-lead,
        .sa-reports.is-wide .sa-report.is-lead {
            grid-column: auto;
        }

    .sa-upcoming {
        padding: 20px 16px;
    }
}
