/* Activities page only. The shared header and footer styles remain unchanged. */
:root {
    --activities-container: min(1640px, calc(100% - 48px));
    --activities-blue: var(--primary-deep, #174f82);
    --activities-dark: #0b3154;
    --activities-muted: #647789;
    --activities-line: #dce7f1;
}

.activities-container {
    width: 100%;
    max-width: 1640px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 2cm;
    box-sizing: border-box;
}

/* Dynamic hero slider */
.activities-hero {
    position: relative;
    height: 12cm !important;
    min-height: 12cm !important;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #082e50;
    isolation: isolate;
}

.activities-hero-track,
.activities-hero-slide {
    position: absolute;
    inset: 0;
}

.activities-hero-slide {
    opacity: 0;
    visibility: hidden;
    transition: opacity .75s ease, visibility .75s ease;
}

.activities-hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.activities-hero-slide img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    transform: scale(1.015);
}

.activities-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(5, 28, 49, .77), rgba(5, 28, 49, .48), rgba(5, 28, 49, .62));
}

.activities-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1640px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 2cm;
    box-sizing: border-box;
    color: #fff;
    text-align: center;
}

.activities-eyebrow {
    display: block;
    margin-bottom: 10px;
    color: #b7d7ed;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .17em;
}

.activities-hero h1 {
    max-width: 900px;
    margin: 0 auto 18px;
    color: #fff;
    font-family: var(--font-display, serif);
    font-size: clamp(2.35rem, 5vw, 4.5rem);
    font-weight: 500;
    line-height: 1.08;
}

.activities-hero-content p {
    max-width: 740px;
    margin: 0 auto;
    color: rgba(255, 255, 255, .9);
    font-size: 1.05rem;
    line-height: 1.65;
    text-wrap: balance;
}

.activities-slider-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(5, 35, 62, .46);
    color: #fff;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background .2s ease, transform .2s ease;
}

.activities-slider-arrow:hover { background: rgba(5, 35, 62, .85); }
.activities-slider-prev { left: max(20px, calc((100% - 1640px) / 2)); }
.activities-slider-next { right: max(20px, calc((100% - 1640px) / 2)); }
.activities-slider-dots { position: absolute; left: 50%; bottom: 24px; z-index: 3; display: flex; gap: 9px; transform: translateX(-50%); }
.activities-slider-dot { width: 10px; height: 10px; padding: 0; border: 1px solid #fff; border-radius: 50%; background: transparent; cursor: pointer; }
.activities-slider-dot.is-active { width: 28px; border-radius: 999px; background: #fff; }

/* Main content and reusable subsection card system */
.activities-section {
    padding: 68px 0 80px;
    background: #f2f7fa;
}

.activities-section-heading {
    max-width: 780px;
    margin: 0 auto 34px;
    text-align: center;
}

.activities-section-heading > span {
    display: block;
    margin-bottom: 8px;
    color: #7893aa;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .15em;
}

.activities-section-heading h2 {
    margin: 0 0 9px;
    color: var(--activities-dark);
    font-size: clamp(1.9rem, 3vw, 2.7rem);
    line-height: 1.2;
}

.activities-section-heading p {
    margin: 0;
    color: var(--activities-muted);
    font-size: .96rem;
    line-height: 1.6;
}

.activities-grid,
.activity-subsection-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 30px;
    align-items: stretch;
}

.activity-category-card,
.activity-content-card {
    min-width: 0;
    min-height: 300px;
    padding: 30px 26px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--activities-line);
    border-radius: 18px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 9px 28px rgba(15, 55, 88, .055);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.activity-category-card:hover,
.activity-content-card:hover {
    transform: translateY(-5px);
    border-color: #bfd5e9;
    box-shadow: 0 18px 38px rgba(15, 55, 88, .1);
}

.activity-card-icon {
    width: 58px;
    height: 58px;
    margin-bottom: 24px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    flex: 0 0 58px;
    background: #eaf3fc;
    color: var(--activities-blue);
    font-size: 1.42rem;
}

.activity-category-card h3,
.activity-content-card h3 {
    margin: 0 0 12px;
    color: var(--activities-blue);
    font-size: 1.2rem;
    line-height: 1.3;
}

.activity-category-card p,
.activity-content-card p {
    margin: 0 0 24px;
    color: var(--activities-muted);
    font-size: .9rem;
    line-height: 1.65;
}

.explore-link {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-coral, #1a5fbd);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
}

.explore-link i { transition: transform .2s ease; }
.activity-category-card:hover .explore-link i { transform: translateX(4px); }

/* Optional reusable image card for Events, Workshops, Webinars and Talks pages. */
.activity-content-card { padding: 0; }
.activity-content-card-media { height: 190px; overflow: hidden; background: #eaf3fc; }
.activity-content-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.activity-content-card:hover .activity-content-card-media img { transform: scale(1.035); }
.activity-content-card-body { padding: 24px 22px 26px; display: flex; flex: 1; flex-direction: column; }

@media (max-width: 767px) {.activities-eyebrow {
        text-align: center;
    }

    .activities-hero h1,
    .activities-hero-content p {
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }
}

#goTopBtn {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 900;
    width: 50px;
    height: 50px;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #1a5fbd, #0d3d85);
    color: #fff;
    box-shadow: 0 7px 25px rgba(26,95,189,.35);
    opacity: 0;
    pointer-events: none;
    transform: translateY(15px);
    transition: .25s ease;
}

#goTopBtn.visible { opacity: 1; pointer-events: auto; transform: none; }
.floating-cta .btn { width: 100%; }

@media (max-width: 1199px) {
.activities-grid,
    .activity-subsection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
.activities-hero-slide img { object-position: center; }
    .activities-hero-overlay { background: linear-gradient(180deg, rgba(5,28,49,.26), rgba(5,28,49,.48) 45%, rgba(5,28,49,.86)); }
    .activities-hero-content { align-self: flex-end; padding: 30px 8px 70px; }
    .activities-eyebrow { font-size: .68rem; }
    .activities-hero h1 { margin-bottom: 12px; font-size: clamp(1.9rem, 10vw, 2.6rem); }
    .activities-hero-content p { max-width: 340px; font-size: .86rem; line-height: 1.5; }
    .activities-slider-arrow { width: 42px; height: 42px; top: 46%; }
    .activities-slider-prev { left: 12px; }
    .activities-slider-next { right: 12px; }
    .activities-slider-dots { bottom: 22px; }
    .activities-section { padding: 48px 0 64px; }
    .activities-section-heading { margin-bottom: 28px; }
    .activities-section-heading h2 { font-size: 1.75rem; }
    .activities-section-heading p { font-size: .88rem; }
    .activities-grid,
    .activity-subsection-grid { grid-template-columns: 1fr; gap: 18px; }
    .activity-category-card,
    .activity-content-card { min-height: 0; border-radius: 16px; }
    .activity-category-card { padding: 25px 21px; }
    .activity-card-icon { width: 52px; height: 52px; margin-bottom: 19px; flex-basis: 52px; }
    .activity-category-card h3 { font-size: 1.12rem; }
    #goTopBtn { display: none !important; }
}

@media (max-width: 359px) {
.activities-hero-content p { font-size: .81rem; }
}

/* Hero navigation is touch-free on smaller screens. On desktop, its controls
   are revealed only when the cursor reaches the corresponding banner edge. */
@media (max-width: 991px) {
    .activities-hero .activities-slider-arrow {
        display: none !important;
    }
}

@media (min-width: 992px) and (hover: hover) and (pointer: fine) {
    .activities-hero .activities-slider-arrow {
        top: 0;
        bottom: 0;
        width: 88px;
        height: 100%;
        transform: none;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .activities-hero .activities-slider-prev { left: 0; }
    .activities-hero .activities-slider-next { right: 0; }

    .activities-hero .activities-slider-arrow i {
        width: 46px;
        height: 46px;
        display: grid;
        place-items: center;
        border: 1px solid rgba(255, 255, 255, .55);
        border-radius: 50%;
        background: rgba(5, 35, 62, .66);
        opacity: 0;
        transition: opacity .18s ease, transform .18s ease, background .18s ease;
    }

    .activities-hero .activities-slider-prev i { transform: translateX(-12px); }
    .activities-hero .activities-slider-next i { transform: translateX(12px); }

    .activities-hero .activities-slider-arrow:hover,
    .activities-hero .activities-slider-arrow:focus-visible {
        background: transparent;
        outline: none;
    }

    .activities-hero .activities-slider-arrow:hover i,
    .activities-hero .activities-slider-arrow:focus-visible i {
        opacity: 1;
        transform: translateX(0);
    }

    .activities-hero .activities-slider-arrow:hover i {
        background: rgba(5, 35, 62, .88);
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
