/* Public site. Brand colours come from Site Settings via --brand-primary / --brand-secondary
   (defaults: the logo's navy and cyan); the rest of the palette is derived from them. */

:root {
    --brand-dark: color-mix(in srgb, var(--brand-primary) 78%, #000);
    --brand-accent: #8bc541; /* leaf green from the logo */
    --brand-sky: color-mix(in srgb, var(--brand-secondary) 10%, #fff);
    --brand-stripe: linear-gradient(90deg, var(--brand-secondary) 0%, var(--brand-secondary) 55%, var(--brand-accent) 100%);
}

html {
    font-size: 16px;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    color: #23303d;
    background: #f7f8fa;
}

main {
    flex: 1;
}

a {
    color: var(--brand-primary);
}

.skip-link {
    position: absolute;
    top: .5rem;
    left: .5rem;
    z-index: 2000;
    padding: .5rem 1rem;
    color: #fff;
    background: var(--brand-primary);
    border-radius: .25rem;
}

/* ---------- Buttons ---------- */

.btn-brand {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--brand-primary);
    --bs-btn-border-color: var(--brand-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: color-mix(in srgb, var(--brand-primary) 85%, #000);
    --bs-btn-hover-border-color: color-mix(in srgb, var(--brand-primary) 85%, #000);
    --bs-btn-active-bg: color-mix(in srgb, var(--brand-primary) 75%, #000);
    --bs-btn-active-border-color: color-mix(in srgb, var(--brand-primary) 75%, #000);
}

.btn-brand-secondary {
    --bs-btn-color: var(--brand-dark);
    --bs-btn-bg: var(--brand-secondary);
    --bs-btn-border-color: var(--brand-secondary);
    --bs-btn-hover-color: var(--brand-dark);
    --bs-btn-hover-bg: color-mix(in srgb, var(--brand-secondary) 85%, #000);
    --bs-btn-hover-border-color: color-mix(in srgb, var(--brand-secondary) 85%, #000);
    --bs-btn-active-bg: color-mix(in srgb, var(--brand-secondary) 75%, #000);
    --bs-btn-active-border-color: color-mix(in srgb, var(--brand-secondary) 75%, #000);
    font-weight: 600;
}

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

.site-header {
    position: relative;
}

/* Cyan-to-green brand stripe under the header, like the logo's lettering and leaves. */
.site-header::after {
    position: absolute;
    inset: auto 0 0;
    height: 3px;
    content: "";
    background: var(--brand-stripe);
}

.site-header .navbar {
    padding-block: .6rem;
}

.site-logo {
    height: 3.25rem;
    max-height: 3.25rem;
    width: auto;
}

@media (min-width: 992px) {
    .site-logo {
        height: 3.75rem;
        max-height: 3.75rem;
    }
}

.site-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--brand-primary);
}

.site-header .nav-link {
    font-weight: 500;
    color: #2b3946;
}

.site-header .nav-link:hover,
.site-header .nav-link:focus-visible,
.site-header .nav-link.active {
    color: var(--brand-primary);
}

.site-header .dropdown-item.active,
.site-header .dropdown-item:active {
    background: var(--brand-primary);
}

/* ---------- Sections ---------- */

.section-title {
    font-weight: 700;
    color: var(--brand-dark);
}

/* ---------- Footer ---------- */

.site-footer {
    color: rgba(255, 255, 255, .78);
    background: var(--brand-dark);
    border-top: 4px solid transparent;
    border-image: var(--brand-stripe) 1;
}

.site-footer a {
    color: rgba(255, 255, 255, .85);
    text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
    color: #fff;
    text-decoration: underline;
}

.site-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
}

.site-social a:hover,
.site-social a:focus-visible {
    background: var(--brand-secondary);
    color: var(--brand-dark);
    text-decoration: none;
}

.site-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.text-pre-line {
    white-space: pre-line;
}

/* ---------- Hero carousel ---------- */

.hero .carousel-indicators [data-bs-target] {
    width: .75rem;
    height: .75rem;
    border-radius: 50%;
}

@media (prefers-reduced-motion: reduce) {
    .hero .carousel-item {
        transition: none;
    }
}

/* ---------- Content pages ---------- */

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 3.5rem 0;
    color: #fff;
    background:
        radial-gradient(60rem 30rem at 110% -20%, color-mix(in srgb, var(--brand-secondary) 45%, transparent), transparent 60%),
        linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-dark) 100%);
}

.page-hero.has-image {
    padding: 7rem 0 3rem;
}

.page-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-hero.has-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 25, 40, .85), rgba(10, 25, 40, .2));
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.page-hero-title {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
}

.content-narrow {
    max-width: 46rem;
}

.content-wide {
    max-width: 68rem;
}

/* ---------- Post photo gallery (mosaic) ---------- */
/* Layout adapts to the count: 1 = wide, 2 = side by side, 3 = one big + two stacked,
   4 = one wide + three, 5+ = one big + a 2×2 block, then rows of four. */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 9rem;
    gap: .5rem;
}

.gallery-tile:first-child {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-layout-1 {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
}

.gallery-layout-1 .gallery-tile:first-child {
    grid-column: auto;
    grid-row: auto;
    aspect-ratio: 16 / 9;
}

.gallery-layout-2 {
    grid-auto-rows: 13rem;
}

.gallery-layout-2 .gallery-tile:first-child {
    grid-column: auto;
    grid-row: auto;
}

/* Phones: no half-empty last row. */
@media (max-width: 767.98px) {
    .gallery-layout-4 .gallery-tile:last-child,
    .gallery-layout-many .gallery-tile:nth-child(even):last-child {
        grid-column: span 2;
    }
}

@media (min-width: 768px) {
    .gallery-grid {
        gap: .75rem;
    }

    .gallery-layout-2 {
        grid-auto-rows: 20rem;
    }

    .gallery-layout-3 {
        grid-template-columns: 2fr 1fr;
        grid-auto-rows: 12rem;
    }

    .gallery-layout-3 .gallery-tile:first-child {
        grid-column: auto;
    }

    .gallery-layout-4 {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 11rem;
    }

    .gallery-layout-4 .gallery-tile:first-child {
        grid-column: span 3;
    }

    .gallery-layout-many {
        grid-template-columns: repeat(4, 1fr);
        grid-auto-rows: 11rem;
    }
}

@media (min-width: 1200px) {
    .gallery-layout-many,
    .gallery-layout-4 {
        grid-auto-rows: 13rem;
    }

    .gallery-layout-3 {
        grid-auto-rows: 14rem;
    }
}

.gallery-tile {
    min-width: 0;
}

.gallery-link {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #e6e9ee;
    border-radius: .75rem;
    box-shadow: 0 1px 2px rgba(20, 48, 74, .08);
}

.gallery-link:focus-visible {
    outline: 3px solid var(--brand-primary);
    outline-offset: 3px;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease, filter .3s ease;
}

.gallery-link::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(to top, rgba(10, 22, 35, .45), rgba(10, 22, 35, 0) 55%);
    opacity: 0;
    transition: opacity .3s ease;
}

.gallery-link:hover .gallery-img,
.gallery-link:focus-visible .gallery-img {
    transform: scale(1.05);
}

.gallery-link:hover::after,
.gallery-link:focus-visible::after {
    opacity: 1;
}

.gallery-zoom {
    position: absolute;
    right: .75rem;
    bottom: .75rem;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    color: var(--brand-dark);
    background: rgba(255, 255, 255, .92);
    border-radius: 50%;
    opacity: 0;
    transform: translateY(.35rem);
    transition: opacity .25s ease, transform .25s ease;
}

.gallery-link:hover .gallery-zoom,
.gallery-link:focus-visible .gallery-zoom {
    opacity: 1;
    transform: none;
}

.gallery-more {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    color: #fff;
    background: rgba(10, 22, 35, .55);
    backdrop-filter: blur(2px);
}

/* ---------- Full-screen photo viewer ---------- */

.lightbox-open {
    overflow: hidden;
}

.lightbox {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    padding: 0;
    margin: 0;
    color: #fff;
    background: rgba(8, 12, 18, .96);
    border: 0;
}

.lightbox[open] {
    display: grid;
    grid-template-columns: 4.5rem 1fr 4.5rem;
    grid-template-rows: auto 1fr;
    animation: lightbox-in .2s ease;
}

.lightbox::backdrop {
    background: rgba(8, 12, 18, .9);
}

.lightbox-bar {
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1rem;
}

.lightbox-counter {
    font-size: .9rem;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, .75);
    letter-spacing: .04em;
}

.lightbox-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.25rem;
    color: #fff;
    background: rgba(255, 255, 255, .1);
    border: 0;
    border-radius: 50%;
    transition: background-color .2s ease;
}

.lightbox-btn:hover,
.lightbox-btn:focus-visible {
    background: rgba(255, 255, 255, .22);
}

.lightbox-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.lightbox-prev,
.lightbox-next {
    align-self: center;
    justify-self: center;
}

.lightbox-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    padding: 0 0 1.25rem;
    margin: 0;
}

.lightbox-img {
    max-width: 100%;
    max-height: calc(100dvh - 9rem);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: .35rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, .5);
    opacity: 0;
    transition: opacity .25s ease;
}

.lightbox-img.is-loaded {
    opacity: 1;
}

.lightbox-caption {
    max-width: 46rem;
    padding: .9rem 1rem 0;
    font-size: .95rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, .85);
    text-align: center;
}

@media (max-width: 575.98px) {
    .lightbox[open] {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
    }

    .lightbox-figure {
        grid-row: 2;
    }

    .lightbox-prev,
    .lightbox-next {
        grid-row: 3;
        margin-bottom: 1rem;
    }

    .lightbox-prev {
        justify-self: start;
        margin-left: 1.5rem;
    }

    .lightbox-next {
        grid-column: 1;
        justify-self: end;
        margin-right: 1.5rem;
    }
}

@keyframes lightbox-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-img,
    .gallery-zoom,
    .lightbox-img { transition: none; }
    .gallery-link:hover .gallery-img { transform: none; }
    .lightbox[open] { animation: none; }
}

.preview-banner {
    padding: .6rem 0;
    font-size: .9rem;
    color: var(--brand-dark);
    background: var(--brand-secondary);
}

/* Rich text produced by the admin editor (Quill). */
.rich-text {
    font-size: 1.075rem;
    line-height: 1.75;
}

.rich-text h2,
.rich-text h3,
.rich-text h4 {
    margin-top: 2rem;
    font-weight: 700;
    color: var(--brand-dark);
}

.rich-text img {
    max-width: 100%;
    height: auto;
    border-radius: .5rem;
}

.rich-text blockquote {
    margin: 1.5rem 0;
    padding: .5rem 1.25rem;
    border-left: 4px solid var(--brand-secondary);
    color: #4a5866;
    font-style: italic;
}

.rich-text pre {
    padding: 1rem;
    border-radius: .5rem;
    background: #f1f3f6;
}

.rich-text .ql-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border: 0;
    border-radius: .5rem;
}

.rich-text .ql-align-center { text-align: center; }
.rich-text .ql-align-right { text-align: right; }
.rich-text .ql-align-justify { text-align: justify; }

/* Quill 2 stores bullet lists as <ol><li data-list="bullet">. */
.rich-text li[data-list="bullet"] { list-style-type: disc; }
.rich-text li[data-list="ordered"] { list-style-type: decimal; }

/* ---------- News ---------- */

.post-card {
    overflow: hidden;
    border: 0;
    box-shadow: 0 1px 3px rgba(20, 48, 74, .08), 0 6px 18px rgba(20, 48, 74, .06);
    transition: transform .15s, box-shadow .15s;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(20, 48, 74, .1), 0 12px 28px rgba(20, 48, 74, .1);
}

.post-card-image {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #e9eef4;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 2.5rem;
    color: #a8b6c4;
}

.post-card-category {
    margin-bottom: .35rem;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    text-decoration: none;
}

.post-card .card-title a {
    color: var(--brand-dark);
    text-decoration: none;
}

.post-card .card-title a:hover,
.post-card .card-title a:focus-visible {
    color: var(--brand-primary);
    text-decoration: underline;
}

.category-pills .nav-link {
    padding: .3rem .85rem;
    color: #2b3946;
}

.category-pills .nav-link.active {
    background: var(--brand-primary);
}

@media (prefers-reduced-motion: reduce) {
    .post-card { transition: none; }
    .post-card:hover { transform: none; }
}

/* ---------- Home: focus areas, events, testimonials, partners ---------- */

.focus-card {
    position: relative;
    height: 100%;
    padding: 1.5rem;
    border-radius: .75rem;
    background: #f7f8fa;
    transition: transform .15s, box-shadow .15s;
}

.focus-card:hover,
.focus-card:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(20, 48, 74, .1);
}

.focus-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    font-size: 1.5rem;
    color: #fff;
    border-radius: 50%;
    background: var(--brand-primary);
}

.focus-card-image img {
    width: 4rem;
    height: 4rem;
    object-fit: cover;
    border-radius: 50%;
}

.event-card .post-card-image {
    position: relative;
}

.event-date-badge {
    position: absolute;
    top: .75rem;
    left: .75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 3.25rem;
    padding: .35rem .5rem;
    line-height: 1.1;
    color: var(--brand-dark);
    border-radius: .5rem;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}

.event-date-badge span {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .05em;
    color: var(--brand-primary);
}

.event-date-badge strong {
    font-size: 1.35rem;
}

.event-card.is-cancelled .card-title a {
    text-decoration: line-through;
}

.event-details {
    border: 0;
    background: #fff;
    box-shadow: 0 1px 3px rgba(20, 48, 74, .08), 0 6px 18px rgba(20, 48, 74, .06);
}

.testimonials {
    background: linear-gradient(135deg, color-mix(in srgb, var(--brand-primary) 8%, #fff), #fff);
}

.testimonial-card {
    padding: 1.75rem;
    border-radius: .75rem;
    background: #fff;
    box-shadow: 0 1px 3px rgba(20, 48, 74, .08);
}

.testimonial-card blockquote {
    font-size: 1.05rem;
    font-style: italic;
    color: #2b3946;
}

.testimonial-photo img {
    width: 3rem;
    height: 3rem;
    object-fit: cover;
    border-radius: 50%;
}

.partner-logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    margin: 0;
}

.partner-logos img {
    max-width: 9rem;
    max-height: 4rem;
    width: auto;
    height: auto;
    filter: grayscale(1);
    opacity: .75;
    transition: filter .15s, opacity .15s;
}

.partner-logos a:hover img,
.partner-logos a:focus-visible img {
    filter: none;
    opacity: 1;
}

/* ---------- Team & publications ---------- */

.team-card,
.publication-card {
    border: 0;
    box-shadow: 0 1px 3px rgba(20, 48, 74, .08), 0 6px 18px rgba(20, 48, 74, .06);
}

.team-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 7rem;
    height: 7rem;
    overflow: hidden;
    font-size: 3rem;
    color: #a8b6c4;
    border-radius: 50%;
    background: #e9eef4;
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.publication-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    font-size: 3rem;
    color: #a8b6c4;
    background: #e9eef4;
}

.publication-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (prefers-reduced-motion: reduce) {
    .focus-card { transition: none; }
    .focus-card:hover { transform: none; }
}

/* ---------- Contact, newsletter, donate ---------- */

.contact-details li {
    display: flex;
    gap: .75rem;
    margin-bottom: .75rem;
}

.contact-details .bi {
    flex-shrink: 0;
    margin-top: .15rem;
    color: var(--brand-primary);
}

.contact-card,
.donate-card {
    border: 0;
    box-shadow: 0 1px 3px rgba(20, 48, 74, .08), 0 6px 18px rgba(20, 48, 74, .06);
}

.newsletter-form .form-control {
    border: 0;
}

.donate-amounts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
    gap: .75rem;
}

.btn-outline-brand {
    --bs-btn-color: var(--brand-primary);
    --bs-btn-border-color: var(--brand-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--brand-primary);
    --bs-btn-hover-border-color: var(--brand-primary);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--brand-primary);
    --bs-btn-active-border-color: var(--brand-primary);
    font-weight: 600;
}

/* Department tag on event cards and pages (links to that department's calendar). */
.event-dept {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    padding: .2rem .65rem;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--t);
    text-decoration: none;
    background: var(--c);
    border-radius: 999px;
}

.event-dept:hover,
.event-dept:focus-visible {
    color: var(--t);
    filter: brightness(1.08);
}

/* ---------- "I'm not a robot" (our own spam check on public forms) ---------- */
.human-check {
    display: inline-flex;
    align-items: center;
    gap: 1.25rem;
    max-width: 100%;
    padding: .65rem 1rem;
    background: #f9fafb;
    border: 1px solid #d0d5dd;
    border-radius: .5rem;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
}

.human-check-box {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    padding: 0;
    font-weight: 500;
    color: #1d2939;
    background: none;
    border: 0;
    cursor: pointer;
}

.human-check-mark {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    background: #fff;
    border: 2px solid #98a2b3;
    border-radius: .3rem;
    transition: border-color .15s, background-color .15s;
}

.human-check-box:hover .human-check-mark,
.human-check-box:focus-visible .human-check-mark {
    border-color: var(--brand-primary);
}

.human-check-box:focus-visible {
    outline: none;
}

.human-check-box:focus-visible .human-check-mark {
    box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--brand-primary) 25%, transparent);
}

.human-check.is-working .human-check-mark {
    border-color: transparent;
}

.human-check.is-working .spinner-border {
    color: var(--brand-primary);
}

.human-check.is-done .human-check-mark {
    color: #fff;
    background: #12b76a;
    border-color: #12b76a;
}

.human-check.is-done .human-check-mark .bi {
    font-size: 1.25rem;
}

.human-check.is-done .human-check-box {
    cursor: default;
}

.human-check-brand {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    font-size: .625rem;
    line-height: 1.1;
    color: #667085;
}

.human-check-brand .bi {
    font-size: 1.25rem;
    color: var(--brand-primary);
}

/* ---------- Social media page (/social) ---------- */
/* Each profile sets --net to its brand colour; light colours (.is-light) get a dark icon. */

.social-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.social-hero {
    padding: 4.5rem 0 8rem; /* room for the cards that overlap its bottom edge */
    text-align: center;
}

.social-eyebrow {
    margin-bottom: .5rem;
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--brand-secondary);
}

.social-lead {
    max-width: 36rem;
    margin: 1rem auto 0;
    font-size: 1.125rem;
    color: rgba(255, 255, 255, .85);
}

.social-hero-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .75rem;
    margin: 2rem 0 0;
    padding: 0;
    list-style: none;
}

.social-hero-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    padding: .6rem;
    font-size: 1.3rem;
    color: #fff;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 50%;
    transition: background-color .2s, border-color .2s, transform .2s;
}

.social-hero-icons a:hover,
.social-hero-icons a:focus-visible {
    background: var(--net);
    border-color: var(--net);
    transform: translateY(-3px);
}

.social-hero-icons a.is-light:hover,
.social-hero-icons a.is-light:focus-visible {
    color: #111;
}

.social-hero-icons a:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

/* Cards */

.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
    gap: 1.25rem;
    margin: -5.5rem 0 0; /* overlap the hero a little */
    padding: 0;
    list-style: none;
    position: relative;
    z-index: 1;
}

.social-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.5rem;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    background: #fff;
    border: 1px solid #e3e8ee;
    border-radius: 1rem;
    box-shadow: 0 .5rem 1.5rem rgba(20, 40, 60, .07);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

/* Brand-coloured top edge that grows on hover. */
.social-card::before {
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    content: "";
    background: var(--net);
    transition: height .2s ease;
}

.social-card:hover,
.social-card:focus-visible {
    color: inherit;
    border-color: color-mix(in srgb, var(--net) 35%, #e3e8ee);
    box-shadow: 0 1rem 2.25rem color-mix(in srgb, var(--net) 18%, rgba(20, 40, 60, .08));
    transform: translateY(-4px);
}

.social-card:hover::before,
.social-card:focus-visible::before {
    height: 6px;
}

.social-card:focus-visible {
    outline: 3px solid var(--net);
    outline-offset: 3px;
}

.social-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.social-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.75rem;
    color: #fff;
    background: var(--net);
    border-radius: .9rem;
    box-shadow: 0 .4rem 1rem color-mix(in srgb, var(--net) 35%, transparent);
    transition: transform .2s ease;
}

.social-card.is-light .social-card-icon {
    color: #111;
}

.social-card.has-image .social-card-icon {
    padding: .45rem;
    background: #fff;
    border: 1px solid #e3e8ee;
    box-shadow: none;
}

.social-card:hover .social-card-icon {
    transform: scale(1.06) rotate(-3deg);
}

.social-card-arrow {
    font-size: 1.25rem;
    color: #9aa7b5;
    transition: color .2s ease, transform .2s ease;
}

.social-card:hover .social-card-arrow,
.social-card:focus-visible .social-card-arrow {
    color: var(--net);
    transform: translate(2px, -2px);
}

.social-card.is-light:hover .social-card-arrow {
    color: #111;
}

.social-card-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--brand-dark);
}

.social-card-handle {
    margin-top: .1rem;
    font-size: .9375rem;
    color: #6c7a89;
}

.social-card-desc {
    margin-top: .6rem;
    color: #3d4b59;
}

.social-card-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-top: auto;
    padding-top: 1.25rem;
}

.social-card-follow {
    padding: .4rem .95rem;
    font-size: .875rem;
    font-weight: 600;
    color: var(--net);
    background: color-mix(in srgb, var(--net) 10%, #fff);
    border-radius: 2rem;
    transition: background-color .2s ease, color .2s ease;
}

.social-card.is-light .social-card-follow {
    color: #111;
    background: color-mix(in srgb, var(--net) 40%, #fff);
}

.social-card:hover .social-card-follow {
    color: #fff;
    background: var(--net);
}

.social-card.is-light:hover .social-card-follow {
    color: #111;
}

.social-card-host {
    font-size: .8125rem;
    color: #8593a2;
}

.social-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
    margin-top: -5.5rem;
    padding: 3rem 1rem;
    color: #6c7a89;
    text-align: center;
    background: #fff;
    border: 1px solid #e3e8ee;
    border-radius: 1rem;
    position: relative;
    z-index: 1;
}

.social-empty-icon {
    font-size: 2rem;
    color: var(--brand-primary);
}

/* Newsletter call to action under the cards */

.social-cta {
    padding-bottom: 4rem;
}

.social-cta-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem;
    padding: 1.75rem 2rem;
    background: var(--brand-sky);
    border: 1px solid color-mix(in srgb, var(--brand-secondary) 25%, #fff);
    border-radius: 1rem;
}

.social-cta-inner h2 {
    font-weight: 700;
    color: var(--brand-dark);
}

.social-cta-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 3.25rem;
    height: 3.25rem;
    font-size: 1.5rem;
    color: #fff;
    background: var(--brand-primary);
    border-radius: 50%;
}

@media (max-width: 575.98px) {
    .social-hero {
        padding: 3rem 0 7.5rem;
    }

    .social-cta-inner {
        padding: 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .social-card,
    .social-card::before,
    .social-card-icon,
    .social-card-arrow,
    .social-hero-icons a {
        transition: none;
    }

    .social-card:hover,
    .social-card:focus-visible,
    .social-card:hover .social-card-icon,
    .social-hero-icons a:hover {
        transform: none;
    }
}

/* ---------- Home page: upcoming events and latest news ---------- */
/* The row adapts to how many there are: one fills it, two share it, three split it in thirds;
   more than three become a strip that scrolls by itself (home-card-strips.js). */

.home-cards-track {
    display: grid;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-cards-item {
    min-width: 0;
}

@media (min-width: 768px) {
    .home-cards.is-two .home-cards-track {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-cards.is-three .home-cards-track {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    /* A single card spans the row: image on the left, text on the right. */
    .home-cards.is-one .post-card {
        flex-direction: row;
    }

    .home-cards.is-one .post-card-image {
        flex: 0 0 50%;
        aspect-ratio: auto;
        min-height: 18rem;
    }

    .home-cards.is-one .card-body {
        justify-content: center;
        padding: 2rem 2.25rem;
    }

    .home-cards.is-one .card-title {
        font-size: 1.6rem;
    }

    .home-cards.is-one .card-text {
        font-size: 1rem;
    }
}

/* More than three: a sideways strip, three cards at a time on wide screens. */
.home-cards.is-strip .home-cards-track {
    grid-auto-flow: column;
    grid-auto-columns: 85%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    /* Room for the cards' shadows and hover lift inside the scrolling area. */
    margin: -.75rem -.5rem;
    padding: .75rem .5rem;
}

.home-cards.is-strip .home-cards-track::-webkit-scrollbar {
    display: none;
}

.home-cards.is-strip .home-cards-item {
    scroll-snap-align: start;
}

@media (min-width: 576px) {
    .home-cards.is-strip .home-cards-track {
        grid-auto-columns: calc((100% - 1.5rem) / 2);
    }
}

@media (min-width: 992px) {
    .home-cards.is-strip .home-cards-track {
        grid-auto-columns: calc((100% - 3rem) / 3);
    }
}

.card-strip-controls {
    display: inline-flex;
    gap: .35rem;
    margin-left: .5rem;
}

/* Unlike the reels arrows, these stay on phones: the pause button must always be reachable. */
.card-strip-controls .reels-nav {
    display: inline-flex;
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1rem;
}

/* ---------- Home page Reels strip ---------- */

.reels-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.1rem;
    color: var(--brand-primary);
    background: #fff;
    border: 1px solid #d9e0e7;
    border-radius: 50%;
    transition: background-color .15s, color .15s, border-color .15s;
}

.reels-nav:hover:not(:disabled),
.reels-nav:focus-visible {
    color: #fff;
    background: var(--brand-primary);
    border-color: var(--brand-primary);
}

.reels-nav:disabled {
    opacity: .4;
}

@media (max-width: 767.98px) {
    .reels-nav {
        display: none;
    }
}

/* Sideways-scrolling row of tall cards that snap into place. */
.reels-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: clamp(10.5rem, 42vw, 14rem);
    gap: 1rem;
    margin: 0 -.25rem;
    padding: .25rem .25rem 1rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    list-style: none;
}

.reel {
    scroll-snap-align: start;
}

.reel-card {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 9 / 16;
    padding: 0;
    overflow: hidden;
    color: #fff;
    text-align: left;
    text-decoration: none;
    background:
        radial-gradient(18rem 14rem at 20% 10%, color-mix(in srgb, var(--brand-secondary) 55%, transparent), transparent 70%),
        linear-gradient(160deg, var(--brand-primary), var(--brand-dark));
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 .5rem 1.25rem rgba(20, 40, 60, .15);
    transition: transform .2s ease, box-shadow .2s ease;
}

.reel-card:hover,
.reel-card:focus-visible {
    color: #fff;
    box-shadow: 0 1rem 2rem rgba(20, 40, 60, .25);
    transform: translateY(-4px);
}

.reel-card:focus-visible {
    outline: 3px solid var(--brand-secondary);
    outline-offset: 3px;
}

.reel-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.reel-card:hover .reel-cover {
    transform: scale(1.04);
}

/* Darkens the top and bottom so the badge and title stay readable on any cover. */
.reel-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, .35) 0%, transparent 25%, transparent 50%, rgba(0, 0, 0, .78) 100%);
}

.reel-badge {
    position: absolute;
    top: .65rem;
    left: .65rem;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .2rem .55rem;
    font-size: .75rem;
    font-weight: 600;
    background: rgba(0, 0, 0, .45);
    border-radius: 2rem;
    backdrop-filter: blur(4px);
}

.reel-play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.6rem;
    color: var(--brand-dark);
    background: rgba(255, 255, 255, .92);
    border-radius: 50%;
    box-shadow: 0 .5rem 1.25rem rgba(0, 0, 0, .3);
    transform: translate(-50%, -50%);
    transition: transform .2s ease, background-color .2s ease;
}

.reel-play .bi-play-fill {
    margin-left: .2rem; /* optical centring of the triangle */
}

.reel-card:hover .reel-play {
    background: #fff;
    transform: translate(-50%, -50%) scale(1.1);
}

.reel-text {
    position: absolute;
    inset: auto 0 0;
    display: flex;
    flex-direction: column;
    gap: .15rem;
    padding: .9rem;
}

.reel-title {
    display: -webkit-box;
    overflow: hidden;
    font-weight: 700;
    line-height: 1.25;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.reel-caption {
    display: -webkit-box;
    overflow: hidden;
    font-size: .8125rem;
    color: rgba(255, 255, 255, .85);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Pop-up player: a tall 9:16 frame that fits the screen. */
.reel-modal .modal-dialog {
    max-width: min(26rem, calc((100vh - 7rem) * 9 / 16), 100vw - 1rem);
}

.reel-modal .modal-content {
    overflow: hidden;
    background: #000;
    border: 0;
    border-radius: 1rem;
}

.reel-modal .modal-header {
    padding: .6rem .9rem;
}

.reel-frame {
    aspect-ratio: 9 / 16;
    background: #000;
}

.reel-frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    .reel-card,
    .reel-cover,
    .reel-play {
        transition: none;
    }

    .reel-card:hover,
    .reel-card:focus-visible,
    .reel-card:hover .reel-cover {
        transform: none;
    }

    .reel-card:hover .reel-play {
        transform: translate(-50%, -50%);
    }
}

/* ---------- Public upload page (/upload/{token}) ---------- */

/* A slimmer header band than other pages, so the form starts higher up. */
.page-hero.upload-hero {
    padding: 1.5rem 0;
}

.upload-hero .page-hero-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

/* Countdown to when the link closes. */
.upload-expiry {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .75rem 1rem;
    background: #fff;
    border: 1px solid #e3e8ee;
    border-left: 4px solid var(--brand-secondary);
    border-radius: .6rem;
}

.upload-expiry-icon {
    font-size: 1.5rem;
    color: var(--brand-secondary);
}

.upload-expiry-body {
    display: flex;
    flex-direction: column;
}

.upload-expiry-count {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--brand-dark);
    font-variant-numeric: tabular-nums;
}

.upload-expiry-date {
    font-size: .8125rem;
    color: #6c7a89;
}

.upload-expiry.is-soon {
    background: #fff8e6;
    border-left-color: #f0a500;
}

.upload-expiry.is-soon .upload-expiry-icon {
    color: #c98a00;
}

.upload-expiry.is-closed {
    background: #fdecec;
    border-left-color: #d64545;
}

.upload-expiry.is-closed .upload-expiry-icon,
.upload-expiry.is-closed .upload-expiry-count {
    color: #b42318;
}

/* "Images up to 60 MB · Videos up to 2 GB" */
.upload-limits {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
    margin: 0;
    padding: 0;
    font-size: .9375rem;
    color: #4a5a6a;
    list-style: none;
}

.upload-limits .bi {
    margin-right: .25rem;
    color: var(--brand-primary);
}

.upload-destination {
    padding: 1rem 1.25rem;
    background: var(--brand-sky);
    border: 1px solid color-mix(in srgb, var(--brand-secondary) 30%, #fff);
    border-radius: .75rem;
}

.upload-destination-label {
    display: block;
    margin-bottom: .35rem;
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #5b6b7b;
}

/* Full folder path: "Events › 2026 › Gala", the chosen folder in bold. */
.upload-path {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .25rem .5rem;
    margin: 0;
    padding: 0;
    font-size: 1.35rem;
    list-style: none;
    color: #4a5a6a;
}

.upload-path li {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    overflow-wrap: anywhere;
}

.upload-path li + li::before {
    margin-right: .1rem;
    content: "\203A"; /* › */
    font-size: 1.5rem;
    line-height: 1;
    color: #9aa7b5;
}

.upload-path .bi {
    color: var(--brand-secondary);
}

.upload-path li.is-current {
    font-weight: 700;
    color: var(--brand-dark);
}

.upload-path li.is-current .bi {
    color: var(--brand-primary);
}

/* Folder chooser: a tree of large, tappable rows. */
.upload-folders {
    max-height: 24rem;
    overflow-y: auto;
    padding: .35rem;
    background: #f7f9fb;
    border: 1px solid #e3e8ee;
    border-radius: .75rem;
}

.upload-folder {
    position: relative;
    padding-left: calc(var(--depth, 0) * 1.5rem);
}

.upload-folder-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.upload-folder-label {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-height: 3.25rem;
    margin: .15rem 0;
    padding: .7rem 1rem;
    font-size: 1.125rem;
    background: #fff;
    border: 2px solid transparent;
    border-radius: .6rem;
    cursor: pointer;
    transition: border-color .15s, background-color .15s;
}

.upload-folder-icon {
    font-size: 1.4rem;
    color: var(--brand-secondary);
}

.upload-folder-icon.is-open,
.upload-folder-input:checked + .upload-folder-label .upload-folder-icon.is-closed {
    display: none;
}

.upload-folder-input:checked + .upload-folder-label .upload-folder-icon.is-open {
    display: inline;
    color: var(--brand-primary);
}

.upload-folder-name {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

.upload-folder-note {
    font-size: .8125rem;
    color: #8593a2;
}

.upload-folder-check {
    font-size: 1.25rem;
    color: var(--brand-primary);
    visibility: hidden;
}

.upload-folder-label:hover {
    border-color: color-mix(in srgb, var(--brand-primary) 25%, transparent);
}

.upload-folder-input:checked + .upload-folder-label {
    font-weight: 600;
    background: color-mix(in srgb, var(--brand-primary) 7%, #fff);
    border-color: var(--brand-primary);
}

.upload-folder-input:checked + .upload-folder-label .upload-folder-check {
    visibility: visible;
}

.upload-folder-input:focus-visible + .upload-folder-label {
    outline: 3px solid var(--brand-secondary);
    outline-offset: 2px;
}

@media (max-width: 575.98px) {
    .upload-path {
        font-size: 1.15rem;
    }

    .upload-folder {
        padding-left: calc(var(--depth, 0) * 1rem);
    }
}

/* Footer: uploaded icons fit the round buttons. */
.site-social .social-icon-img {
    width: 1.1rem;
    height: 1.1rem;
}
