/* Academy landing page */

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

.academy-hero {
    background: linear-gradient(135deg, #003366 0%, #004a99 40%, #0077cc 75%, #00aeef 100%);
    position: relative;
    overflow: hidden;
}

.academy-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.academy-info-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
}

.academy-sticky-nav {
    position: sticky;
    top: var(--site-header-height, 4rem);
    z-index: 40;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #e2edf5;
    box-shadow: 0 4px 24px rgba(0, 74, 153, 0.06);
}

.academy-sticky-nav a,
.academy-sticky-nav .academy-sticky-nav__link {
    display: inline-flex;
    align-items: center;
    padding: 0.875rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748b;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    text-decoration: none;
}

.academy-sticky-nav a:hover,
.academy-sticky-nav a:focus-visible,
.academy-sticky-nav a.is-active,
.academy-sticky-nav .academy-sticky-nav__link:hover,
.academy-sticky-nav .academy-sticky-nav__link:focus-visible,
.academy-sticky-nav .academy-sticky-nav__link.is-active {
    color: #004a99;
    border-bottom-color: #00aeef;
}

.academy-sticky-nav__row {
    padding: 0.375rem 0;
    gap: 0.5rem;
}

.academy-sticky-nav__divider {
    display: inline-block;
    width: 1px;
    height: 1.5rem;
    margin: 0 0.125rem;
    background: #dbe4ee;
    flex-shrink: 0;
}

.academy-sticky-nav__cohort-group {
    padding: 0.25rem 0.375rem 0.25rem 0.5rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #f0f9fd 0%, #e8f6fc 100%);
    border: 1px solid #c5e8f5;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.academy-sticky-nav__cohort-group.is-active {
    border-color: #9dd9f0;
    box-shadow: 0 0 0 1px rgba(0, 174, 239, 0.15);
}

.academy-sticky-nav__cohort-label {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.625rem 0.5rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #004a99;
    white-space: nowrap;
}

.academy-sticky-nav__cohort-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    background: #fff;
    color: #0077cc;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 1px solid #b8e4f5;
}

.academy-sticky-nav__link--cohort {
    padding: 0.5rem 0.875rem;
}

.academy-sticky-nav__archive {
    margin-left: 0.5rem;
    padding-left: 0.75rem;
    border-left: 1px dashed #d1dde8;
}

@media (min-width: 768px) {
    .academy-sticky-nav__archive {
        margin-left: auto;
        padding-left: 1rem;
    }
}

.academy-sticky-nav__archive-label {
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
    white-space: nowrap;
}

.academy-sticky-nav__archive-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748b;
    white-space: nowrap;
    text-decoration: none;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.academy-sticky-nav__archive-link:hover,
.academy-sticky-nav__archive-link:focus-visible {
    color: #475569;
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.academy-sticky-nav__archive-link svg {
    opacity: 0.6;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.academy-sticky-nav__archive-link:hover svg {
    opacity: 1;
    transform: translateX(2px);
}

/* Cohort dropdown nav */
.academy-nav-cohort {
    position: relative;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;
}

.academy-nav-cohort__home {
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.academy-nav-cohort__home:hover,
.academy-nav-cohort__home:focus-visible {
    color: #004a99;
    border-bottom-color: #00aeef;
}

.academy-nav-cohort__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    cursor: pointer;
    border: none;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.7);
    color: #004a99;
    font: inherit;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}

.academy-nav-cohort__toggle:hover,
.academy-nav-cohort__toggle:focus-visible {
    background: #fff;
    color: #0077cc;
}

.academy-nav-cohort__toggle:focus-visible {
    outline: 2px solid #00aeef;
    outline-offset: 2px;
}

.academy-nav-cohort__chevron {
    transition: transform 0.2s ease;
}

.academy-nav-cohort--dropdown.is-open .academy-nav-cohort__chevron {
    transform: rotate(180deg);
}

.academy-nav-cohort__menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.375rem);
    right: 0;
    z-index: 60;
    min-width: 10.5rem;
    padding: 0.375rem;
    border-radius: 0.875rem;
    background: #fff;
    border: 1px solid #dbe4ee;
    box-shadow: 0 12px 32px rgba(0, 74, 153, 0.12);
}

.academy-nav-cohort--dropdown.is-open .academy-nav-cohort__menu {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.academy-nav-cohort__menu .academy-sticky-nav__link {
    width: 100%;
    border-bottom: none;
    border-radius: 0.5rem;
    padding: 0.625rem 0.875rem;
}

.academy-nav-cohort__menu .academy-sticky-nav__link:hover,
.academy-nav-cohort__menu .academy-sticky-nav__link.is-active {
    background: #f0f9fd;
    border-bottom-color: transparent;
}

.academy-sticky-nav__cohort-badge.academy-sticky-nav__cohort-badge--done {
    color: #64748b;
    border-color: #e2e8f0;
    background: #f8fafc;
}

.academy-nav-cohort.is-active > .academy-nav-cohort__toggle {
    color: #004a99;
}

.academy-nav-cohort.is-active > .academy-nav-cohort__home {
    color: #004a99;
    border-bottom-color: #00aeef;
}

@media (max-width: 767px) {
    .academy-sticky-nav__row {
        row-gap: 0.375rem;
    }
}

section[id] {
    scroll-margin-top: var(--section-scroll-offset, 12rem);
}

.academy-section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #00aeef;
    margin-bottom: 0.5rem;
}

.academy-week-card {
    border-left: 3px solid #00aeef;
}

.academy-session-card {
    border-radius: 1rem;
    border: 1px solid #e2edf5;
    background: #fff;
    padding: 1.25rem;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.academy-session-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 74, 153, 0.08);
    border-color: #b8dff0;
}

.academy-session-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 0.875rem;
    background: linear-gradient(135deg, #004a99 0%, #00aeef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.academy-cohort-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.academy-cohort-badge--done {
    background: #f1f5f9;
    color: #64748b;
}

.academy-cohort-badge--open {
    background: #e8f6fc;
    color: #004a99;
}

.academy-cohort-badge--upcoming {
    background: #f8fafc;
    color: #94a3b8;
    border: 1px dashed #cbd5e1;
}

.academy-poster {
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 74, 153, 0.15);
}

/* Academy notice / warning modal */
.academy-notice-modal[hidden] {
    display: none;
}

.academy-notice-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.academy-notice-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
}

.academy-notice-modal-panel {
    position: relative;
    width: 100%;
    max-width: 24rem;
    padding: 2rem 1.75rem 1.75rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid #fde68a;
    box-shadow: 0 24px 48px rgba(180, 83, 9, 0.12);
    text-align: center;
}

.academy-notice-modal-close {
    position: absolute;
    top: 0.875rem;
    right: 0.875rem;
    padding: 0.25rem;
    color: #94a3b8;
    background: transparent;
    border: none;
    cursor: pointer;
}

.academy-notice-modal-close:hover {
    color: #004a99;
}

.academy-notice-modal-icon {
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto 1rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.academy-notice-modal-icon--warn {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    color: #fff;
}

.academy-notice-modal-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #004a99;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.academy-notice-modal-desc {
    font-size: 0.9375rem;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.academy-notice-modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 7rem;
    padding: 0.625rem 1.5rem;
    border-radius: 9999px;
    border: none;
    background: linear-gradient(135deg, #004a99 0%, #0077cc 50%, #00aeef 100%);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: box-shadow 0.2s ease;
}

.academy-notice-modal-btn:hover {
    box-shadow: 0 8px 24px rgba(0, 174, 239, 0.3);
}

body.academy-notice-modal-open {
    overflow: hidden;
}

.academy-gallery-locked {
    color: #64748b;
    font-size: 0.9375rem;
    line-height: 1.6;
    padding: 1.5rem;
    background: #f8fcfe;
    border-radius: 0.75rem;
    border: 1px dashed #d4eaf5;
    text-align: center;
}

.academy-gallery-login {
    margin-right: 0.35rem;
}
