/* =========================================================
   AERC Research and Capacity Development Portal - Design System
   ========================================================= */

:root {
    /* AERC brand palette */
    --aerc-navy: #263D56;
    --aerc-navy-dark: #1a2c40;
    --aerc-gold: #E6A141;
    --aerc-gold-dark: #d18f30;
    --aerc-light: #F2F2F2;

    /* Layout */
    --navbar-height: 76px;

    /* Bootstrap variable overrides */
    --bs-primary: var(--aerc-navy);
    --bs-primary-rgb: 38, 61, 86;
    --bs-link-color: var(--aerc-navy);
    --bs-link-color-rgb: 38, 61, 86;
    --bs-link-hover-color: var(--aerc-gold);
    --bs-link-hover-color-rgb: 230, 161, 65;
    --bs-body-bg: var(--aerc-light);
    --bs-body-color: var(--aerc-navy);
    --bs-body-font-family: 'Source Sans Pro', 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

html {
    height: 100%;
    scroll-padding-top: var(--navbar-height);
}
body {
    font-family: var(--bs-body-font-family);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Sticky sidebars must clear the sticky navbar */
.sticky-lg-top,
.sticky-top:not(.navbar) {
    top: calc(var(--navbar-height) + 1rem) !important;
}

/* Push the footer to the bottom on short pages */
body > main,
body > .auth-split {
    flex: 1 0 auto;
}
body > footer {
    flex-shrink: 0;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.navbar-brand,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: 'Lora', Georgia, 'Times New Roman', serif;
    color: var(--aerc-navy);
}

.navbar-brand__logo {
    height: 36px;
    width: auto;
}

.navbar-brand__wordmark {
    font-family: 'Lora', Georgia, serif;
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: 0.12em;
    color: var(--aerc-navy);
    line-height: 1;
}

.navbar-console-badge {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.18rem 0.55rem;
    background: var(--aerc-gold);
    color: #fff;
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    border-radius: 999px;
    line-height: 1.2;
}

/* ===== Navbar groups ===== */

.nav-primary .nav-link,
.nav-user .nav-link {
    padding: 0.4rem 0.85rem;
    color: var(--aerc-navy);
    font-weight: 500;
    border-radius: 8px;
    transition: background-color .15s ease, color .15s ease;
}
.nav-primary .nav-link:hover,
.nav-user .nav-link:hover {
    color: var(--aerc-gold-dark);
    background-color: rgba(38, 61, 86, 0.04);
}

.nav-divider {
    width: 1px;
    height: 26px;
    background: #e3e8ee;
    margin: 0 0.5rem;
    align-self: center;
}

.nav-link--console {
    color: var(--aerc-gold-dark) !important;
    font-weight: 600 !important;
}
.nav-link--console:hover {
    color: var(--aerc-gold) !important;
    background-color: rgba(230, 161, 65, 0.08) !important;
}

.nav-link--accent {
    color: var(--aerc-gold-dark) !important;
    font-weight: 600 !important;
}
.nav-link--accent:hover {
    color: var(--aerc-gold) !important;
    background-color: rgba(230, 161, 65, 0.08) !important;
}

.nav-user__toggle {
    background: #f6f8fa;
}
.nav-user__toggle:hover {
    background: rgba(38, 61, 86, 0.07) !important;
}
.nav-user__toggle::after {
    margin-left: 0.35rem;
}

.nav-user__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--aerc-navy);
    color: #fff;
    font-family: 'Lora', Georgia, serif;
    font-weight: 600;
    font-size: 0.8rem;
    line-height: 1;
}

@media (max-width: 991.98px) {
    /* On mobile, stack groups vertically and hide the inline divider */
    .nav-divider { display: none; }
    .nav-primary { margin-bottom: 0.5rem; }
}

/* Primary button -> AERC navy */
.btn-primary {
    --bs-btn-bg: var(--aerc-navy);
    --bs-btn-border-color: var(--aerc-navy);
    --bs-btn-hover-bg: var(--aerc-navy-dark);
    --bs-btn-hover-border-color: var(--aerc-navy-dark);
    --bs-btn-active-bg: var(--aerc-navy-dark);
    --bs-btn-active-border-color: var(--aerc-navy-dark);
    --bs-btn-disabled-bg: var(--aerc-navy);
    --bs-btn-disabled-border-color: var(--aerc-navy);
}

/* Accent button -> AERC gold (for primary CTAs that should pop) */
.btn-accent {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--aerc-gold);
    --bs-btn-border-color: var(--aerc-gold);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--aerc-gold-dark);
    --bs-btn-hover-border-color: var(--aerc-gold-dark);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--aerc-gold-dark);
    --bs-btn-active-border-color: var(--aerc-gold-dark);
}

.text-aerc-gold { color: var(--aerc-gold) !important; }
.text-aerc-navy { color: var(--aerc-navy) !important; }
.bg-aerc-navy  { background-color: var(--aerc-navy) !important; color: #fff; }
.bg-aerc-light { background-color: var(--aerc-light) !important; }

/* No focus highlight on form controls */
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: #ced4da;
    box-shadow: none;
    outline: none;
}

/* =========================================================
   Split-screen auth layout (login / register)
   ========================================================= */

.auth-split {
    min-height: 100vh;
    display: flex;
    background-color: #fff;
}

.auth-brand {
    flex: 1 1 55%;
    background: #fff;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 1.75rem;
    padding: 3% 3% 5%;
}

.auth-brand__brochure {
    width: 100%;
    height: auto;
    max-height: 75%;
    display: block;
    flex: 0 1 auto;
}

.auth-brand__caption {
    text-align: center;
    color: var(--aerc-navy);
    padding: 0 1.5rem;
    flex: 0 0 auto;
}

.auth-brand__caption-title {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-weight: 500;
    font-size: 1.7rem;
    color: var(--aerc-navy);
    margin: 0 0 0.4rem;
    line-height: 1.25;
    letter-spacing: 0.005em;
}

.auth-brand__caption-tagline {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-weight: 400;
    font-size: 1rem;
    color: rgba(38, 61, 86, 0.78);
    letter-spacing: 0.04em;
    margin: 0;
}


.auth-form-panel {
    flex: 1 1 45%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    background-color: #fff;
}

.auth-form-panel__inner {
    width: 100%;
    max-width: 460px;
}

.auth-portal-header {
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #eceff3;
}

.auth-portal-header__logo {
    height: 72px;
    width: auto;
    display: block;
    margin: 0 auto;
}

.auth-title {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.7rem;
    font-weight: 600;
    color: var(--aerc-navy);
    margin-bottom: 0.35rem;
}

.auth-subtitle {
    color: #6c7a89;
    margin-bottom: 1.75rem;
    font-size: 0.97rem;
}

/* Icon-prefixed input fields */
.auth-field {
    position: relative;
    margin-bottom: 1rem;
}

.auth-field__label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--aerc-navy);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

.auth-field__icon {
    position: absolute;
    left: 16px;
    top: calc(50% + 12px);
    transform: translateY(-50%);
    color: #9aa6b2;
    pointer-events: none;
    display: inline-flex;
}

.auth-field__icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 1.75;
}

.auth-field__input.form-control {
    height: 50px;
    padding-left: 46px;
    background-color: #fafbfc;
    border: 1px solid #e3e8ee;
    border-radius: 10px;
    font-size: 0.97rem;
    transition: background-color .15s ease, border-color .15s ease;
}

.auth-field__input.form-control:hover { background-color: #fff; }
.auth-field__input.form-control:focus { background-color: #fff; border-color: #e3e8ee !important; }
.auth-field__input.form-control::placeholder { color: #b6bfca; }
.auth-field__input.is-invalid { border-color: #dc3545 !important; }

.auth-field--inline { display: flex; gap: 0.75rem; }
.auth-field--inline > div { flex: 1 1 0; position: relative; }

.auth-error {
    color: #dc3545;
    font-size: 0.82rem;
    margin-top: 0.35rem;
}

/* Elevated CTA */
.btn-auth {
    height: 50px;
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: 0 6px 18px rgba(38, 61, 86, 0.22);
    transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}

.btn-auth:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(38, 61, 86, 0.28);
}

.btn-auth:active { transform: translateY(0); }

.auth-divider {
    border: 0;
    border-top: 1px solid #eceff3;
    margin: 1.75rem 0 1.25rem;
}

.auth-switch {
    text-align: center;
    color: #6c7a89;
    font-size: 0.92rem;
    margin: 0;
}

.auth-switch a {
    color: var(--aerc-navy);
    font-weight: 600;
    text-decoration: none;
}

.auth-switch a:hover { color: var(--aerc-gold); }

@media (max-width: 991.98px) {
    .auth-split { flex-direction: column; }
    .auth-brand {
        flex: 0 0 auto;
        min-height: 220px;
    }
    .auth-form-panel { padding: 2rem 1rem; }
}

/* =========================================================
   Applicant card (console submission detail header)
   ========================================================= */

.applicant-card {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem 1.75rem;
}
.applicant-card__avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--aerc-navy) 0%, var(--aerc-navy-dark) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(38, 61, 86, 0.18);
}
.applicant-card__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.applicant-card__avatar span {
    font-family: 'Lora', Georgia, serif;
    font-weight: 600;
    font-size: 2.25rem;
    line-height: 1;
}
.applicant-card__body { flex: 1; min-width: 0; }
.applicant-card__name {
    font-family: 'Lora', Georgia, serif;
    font-weight: 600;
    font-size: 1.45rem;
    color: var(--aerc-navy);
    margin-bottom: 0.15rem;
    line-height: 1.2;
}
.applicant-card__contact {
    color: #586d83;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}
.applicant-card__sep { color: #c2c9d1; }

.applicant-card__details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem 1.5rem;
    margin: 0 0 1rem;
}
.applicant-card__details > div { display: flex; flex-direction: column; }
.applicant-card__details dt {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--aerc-gold-dark);
    margin: 0;
}
.applicant-card__details dd {
    color: var(--aerc-navy);
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
}
.applicant-card__files {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.applicant-card__file-link {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background: rgba(230, 161, 65, 0.12);
    color: var(--aerc-gold-dark) !important;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}
.applicant-card__file-link:hover {
    background: rgba(230, 161, 65, 0.2);
}

@media (max-width: 575.98px) {
    .applicant-card { flex-direction: column; align-items: center; text-align: center; }
    .applicant-card__contact { justify-content: center; }
}

/* =========================================================
   Submission answer list (console submission detail)
   ========================================================= */

.submission-answers {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}
.submission-answer {
    background: #fafbfc;
    border: 1px solid #eef1f4;
    border-left: 3px solid var(--aerc-gold);
    border-radius: 10px;
    padding: 1rem 1.25rem 1.1rem;
    transition: background-color .15s ease, border-color .15s ease;
}
.submission-answer:hover {
    background: #fff;
    border-left-color: var(--aerc-navy);
}
.submission-answer--wide {
    grid-column: 1 / -1;
}

.submission-answer__label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--aerc-gold-dark);
    margin: 0 0 0.5rem;
}
.submission-answer__value {
    color: var(--aerc-navy);
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 500;
}

@media (max-width: 767.98px) {
    .submission-answers { grid-template-columns: 1fr; }
}
.submission-answer__long-text {
    white-space: pre-wrap;
    background: #fafbfc;
    border-left: 3px solid var(--aerc-gold);
    padding: 0.75rem 1rem;
    border-radius: 6px;
}
.submission-answer__empty {
    color: #9aa6b2;
    font-style: italic;
}

.submission-answer__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.submission-answer__chip {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    background: rgba(38, 61, 86, 0.06);
    color: var(--aerc-navy);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
}

.submission-answer__file {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.65rem 0.9rem;
    background: #fafbfc;
    border: 1px solid #e3e8ee;
    border-radius: 10px;
    color: var(--aerc-navy);
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
    max-width: 100%;
}
.submission-answer__file:hover {
    background: #fff;
    border-color: var(--aerc-gold);
    color: var(--aerc-navy);
    transform: translateY(-1px);
}
.submission-answer__file-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(230, 161, 65, 0.14);
    color: var(--aerc-gold-dark);
    border-radius: 8px;
    flex-shrink: 0;
}
.submission-answer__file-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.submission-answer__file-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 28ch;
}
.submission-answer__file-hint {
    font-size: 0.75rem;
    color: var(--aerc-gold-dark);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

/* =========================================================
   Country select (Tom Select + flag-icons)
   ========================================================= */

.country-flag {
    display: inline-block;
    width: 1.4em;
    height: 1em;
    margin-right: 0.5rem;
    border-radius: 2px;
    vertical-align: -2px;
    background-size: cover;
    background-position: center;
}

/* Tom Select harmonised with the rest of the form controls */
.ts-wrapper.form-select { padding: 0; }
.ts-wrapper .ts-control {
    border-radius: 0.375rem;
    border-color: #ced4da;
    min-height: 38px;
    padding: 0.375rem 0.75rem;
}
.ts-wrapper.focus .ts-control,
.ts-wrapper.focus .ts-control:focus {
    border-color: #ced4da;
    box-shadow: none;
}
.ts-dropdown { border-color: #ced4da; }
.ts-dropdown .option.active { background: rgba(38, 61, 86, 0.08); color: var(--aerc-navy); }
.ts-dropdown .option:hover { background: rgba(38, 61, 86, 0.05); }

/* =========================================================
   Quill rich-text editor
   ========================================================= */

.rich-text-editor {
    border-radius: 0 0 8px 8px;
    background: #fff;
}
.rich-text-editor .ql-editor {
    min-height: 180px;
    font-family: var(--bs-body-font-family);
    font-size: 1rem;
    color: var(--aerc-navy);
}
.ql-toolbar.ql-snow {
    border-radius: 8px 8px 0 0;
    border-color: #ced4da;
    background: #fafbfc;
}
.ql-container.ql-snow {
    border-color: #ced4da;
}

/* Rich content (rendered on public pages) */
.rich-content h2 { font-family: 'Lora', Georgia, serif; font-size: 1.5rem; margin-top: 1.25rem; }
.rich-content h3 { font-family: 'Lora', Georgia, serif; font-size: 1.25rem; margin-top: 1rem; }
.rich-content p { margin-bottom: 0.85rem; }
.rich-content blockquote {
    border-left: 3px solid var(--aerc-gold);
    padding: 0.25rem 0 0.25rem 1rem;
    color: #4f6478;
    margin: 1rem 0;
}
.rich-content ul, .rich-content ol { margin-bottom: 0.85rem; padding-left: 1.5rem; }
.rich-content a { color: var(--aerc-gold-dark); }
.rich-content a:hover { color: var(--aerc-gold); }

/* =========================================================
   Toast notifications (used for messages with extra_tags="toast")
   ========================================================= */

.toast-container .toast {
    min-width: 280px;
    max-width: 420px;
    color: #fff;
    border-radius: 12px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.20);
}
.toast-container .toast .toast-body {
    padding: 0.95rem 1.1rem;
    font-weight: 500;
}
.toast--success { background: linear-gradient(135deg, #1e7c3d 0%, #156a31 100%); }
.toast--danger  { background: linear-gradient(135deg, #b02a37 0%, #92202b 100%); }
.toast--warning { background: linear-gradient(135deg, #d18f30 0%, #b87a25 100%); }
.toast--info    { background: linear-gradient(135deg, var(--aerc-navy) 0%, var(--aerc-navy-dark) 100%); }

/* =========================================================
   Notification modal dialogue
   ========================================================= */

.notify-modal__content {
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.32);
}

.notify-modal__head {
    padding: 2rem 1.5rem 1rem;
    text-align: center;
    color: #fff;
    position: relative;
}
.notify-modal__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    border: 2px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    margin-bottom: 0.85rem;
}
.notify-modal__title {
    font-family: 'Lora', Georgia, serif;
    font-weight: 600;
    font-size: 1.5rem;
    color: #fff;
    margin: 0;
}

.notify-modal--success { background: linear-gradient(135deg, #1e7c3d 0%, #156a31 100%); }
.notify-modal--danger  { background: linear-gradient(135deg, #b02a37 0%, #92202b 100%); }
.notify-modal--warning { background: linear-gradient(135deg, #d18f30 0%, #b87a25 100%); }
.notify-modal--info,
.notify-modal--secondary,
.notify-modal--debug {
    background: linear-gradient(135deg, var(--aerc-navy) 0%, var(--aerc-navy-dark) 100%);
}

.notify-modal__body {
    padding: 1.5rem 2rem 0.5rem;
}
.notify-modal__message {
    color: var(--aerc-navy);
    font-size: 1.05rem;
    line-height: 1.5;
    margin: 0 0 0.5rem;
}
.notify-modal__message:last-child { margin-bottom: 0; }

.notify-modal__footer {
    border: 0;
    justify-content: center;
    padding: 1rem 2rem 1.75rem;
}
.notify-modal__footer .btn {
    min-width: 120px;
}

/* =========================================================
   Shared page patterns
   ========================================================= */

.page-header {
    padding: 2rem 0 1.5rem;
    border-bottom: 1px solid #e6e9ed;
    margin-bottom: 2rem;
}
.page-header__eyebrow {
    color: var(--aerc-gold);
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-weight: 500;
    letter-spacing: 0.06em;
    margin: 0 0 0.4rem;
    font-size: 0.95rem;
}
.page-header__title {
    font-family: 'Lora', Georgia, serif;
    font-weight: 600;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    line-height: 1.15;
    color: var(--aerc-navy);
    margin: 0 0 0.5rem;
}
.page-header__lede {
    color: #6c7a89;
    font-size: 1.05rem;
    margin: 0;
    max-width: 50em;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--aerc-navy);
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none !important;
    margin-bottom: 1rem;
}
.back-link:hover { color: var(--aerc-gold-dark); }
.back-link::before { content: ""; width: 24px; border-top: 2px solid currentColor; }

.surface-card {
    background: #fff;
    border-radius: 14px;
    padding: 1.75rem;
    box-shadow: 0 6px 18px rgba(38, 61, 86, 0.06);
}

.form-section {
    margin-bottom: 1.75rem;
}
.form-section__label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--aerc-gold-dark);
    margin: 0 0 1rem;
}

.detail-hero {
    background: linear-gradient(135deg, var(--aerc-navy) 0%, var(--aerc-navy-dark) 100%);
    color: #fff;
    border-radius: 18px;
    padding: 2.5rem 2.5rem 2.25rem;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}
.detail-hero--bg {
    background-size: cover;
    background-position: center;
    background-color: var(--aerc-navy);
    min-height: 280px;
    padding: 3rem 2.5rem 2.5rem;
}
/* Dark overlay so the title and text stay readable on any image */
.detail-hero--bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(38, 61, 86, 0.88) 0%, rgba(26, 44, 64, 0.72) 60%, rgba(38, 61, 86, 0.55) 100%);
    z-index: 0;
}
.detail-hero--bg .detail-hero__eyebrow,
.detail-hero--bg .detail-hero__title,
.detail-hero--bg .detail-hero__lede,
.detail-hero--bg .detail-hero__meta {
    position: relative;
    z-index: 2;
}
.detail-hero::before {
    content: "";
    position: absolute;
    top: -80px; right: -80px;
    width: 220px; height: 220px;
    background: var(--aerc-gold);
    opacity: 0.18;
    border-radius: 50%;
}
.detail-hero__eyebrow {
    color: var(--aerc-gold);
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    letter-spacing: 0.06em;
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    position: relative;
}
.detail-hero__title {
    font-family: 'Lora', Georgia, serif;
    font-weight: 600;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    line-height: 1.15;
    color: #fff;
    margin: 0 0 0.75rem;
    position: relative;
}
.detail-hero__lede {
    color: rgba(255,255,255,0.85);
    font-size: 1.05rem;
    margin: 0;
    max-width: 50em;
    position: relative;
}
.detail-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-top: 1.25rem;
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
    position: relative;
}
.detail-hero__meta strong { color: #fff; font-weight: 600; }

.tag-pill {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(230, 161, 65, 0.15);
    color: var(--aerc-gold-dark);
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-weight: 600;
}
.tag-pill--on-dark {
    background: rgba(255,255,255,0.18);
    color: #fff;
}

.status-pill {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-weight: 600;
}
.status-pill--draft { background: #eef1f4; color: #586d83; }
.status-pill--submitted { background: rgba(38, 61, 86, 0.12); color: var(--aerc-navy); }
.status-pill--review { background: rgba(230, 161, 65, 0.15); color: var(--aerc-gold-dark); }
.status-pill--accepted { background: rgba(34, 138, 70, 0.15); color: #1e7c3d; }
.status-pill--rejected { background: rgba(220, 53, 69, 0.12); color: #b02a37; }
.status-pill--withdrawn { background: #eef1f4; color: #586d83; }

/* =========================================================
   Plain link / button helpers (no underline, no trailing arrows)
   ========================================================= */
.link-plain,
.link-plain:hover,
.link-plain:focus {
    text-decoration: none;
}
.btn-plain,
.btn-plain:hover,
.btn-plain:focus,
.btn-plain:active {
    text-decoration: none !important;
}

.btn-outline-aerc {
    --bs-btn-color: var(--aerc-navy);
    --bs-btn-border-color: var(--aerc-navy);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--aerc-navy);
    --bs-btn-hover-border-color: var(--aerc-navy);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--aerc-navy-dark);
    --bs-btn-active-border-color: var(--aerc-navy-dark);
    background-color: transparent;
}

/* =========================================================
   Landing page - hero
   ========================================================= */

.landing-hero {
    padding: 3.5rem 0 2.5rem;
    position: relative;
}

.landing-hero__eyebrow {
    color: var(--aerc-gold);
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-weight: 500;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.landing-hero__title {
    font-family: 'Lora', Georgia, serif;
    font-weight: 600;
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    line-height: 1.1;
    color: var(--aerc-navy);
    margin-bottom: 1.25rem;
}

.landing-hero__subtitle {
    font-size: 1.1rem;
    color: #586d83;
    margin-bottom: 2rem;
    max-width: 36em;
}

.landing-hero__cta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.landing-hero__brochure-wrap {
    position: relative;
}

.landing-hero__brochure {
    width: 100%;
    height: auto;
    display: block;
}

/* =========================================================
   Landing page - sections
   ========================================================= */

.landing-section {
    padding: 3rem 0;
    border-top: 1px solid #e6e9ed;
}

.landing-section__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.landing-section__title {
    font-family: 'Lora', Georgia, serif;
    font-weight: 600;
    font-size: 1.85rem;
    color: var(--aerc-navy);
    margin: 0 0 0.25rem;
}

.landing-section__lede {
    color: #6c7a89;
    margin: 0;
}

.landing-empty {
    padding: 2.5rem;
    text-align: center;
    color: #8a96a3;
    background: #fff;
    border-radius: 12px;
    border: 1px dashed #d5dbe2;
}

/* =========================================================
   Program cards (re-styled)
   ========================================================= */

.program-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(38, 61, 86, 0.06);
    transition: transform .18s ease, box-shadow .18s ease;
}
.program-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 32px rgba(38, 61, 86, 0.12);
}
.program-card__img {
    height: 180px;
    width: 100%;
    object-fit: cover;
    display: block;
}
.program-card__placeholder {
    height: 140px;
    background: linear-gradient(135deg, var(--aerc-navy) 0%, var(--aerc-navy-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.program-card__placeholder::after {
    content: "";
    position: absolute;
    top: -30px; right: -30px;
    width: 120px; height: 120px;
    background: var(--aerc-gold);
    opacity: 0.18;
    border-radius: 50%;
}
.program-card__placeholder-type {
    color: #fff;
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}
.program-card__body {
    padding: 1.25rem 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.program-card__badge {
    align-self: flex-start;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(230, 161, 65, 0.15);
    color: var(--aerc-gold-dark);
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    margin-bottom: 0.75rem;
    font-weight: 600;
}
.program-card__title {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--aerc-navy);
    margin: 0 0 0.5rem;
    line-height: 1.3;
}
.program-card__title a { color: inherit; }
.program-card__title a:hover { color: var(--aerc-gold-dark); }
.program-card__summary {
    color: #6c7a89;
    font-size: 0.95rem;
    flex: 1;
    margin-bottom: 1rem;
}
.program-card__meta {
    font-size: 0.85rem;
    color: var(--aerc-navy);
    font-weight: 600;
    border-top: 1px solid #eef1f4;
    padding-top: 0.75rem;
}

.landing-coming-up {
    margin-top: 2rem;
    padding: 1.25rem 1.5rem;
    background: #fff;
    border-left: 3px solid var(--aerc-gold);
    border-radius: 8px;
}
.landing-coming-up__label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    color: var(--aerc-gold-dark);
    font-weight: 700;
    margin: 0 0 0.5rem;
}
.landing-coming-up__list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.landing-coming-up__list li { padding: 0.2rem 0; }

/* =========================================================
   News stack
   ========================================================= */

.news-stack { display: flex; flex-direction: column; gap: 0.75rem; }
.news-stack__item {
    display: block;
    padding: 1rem 1.25rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(38, 61, 86, 0.05);
    border-left: 3px solid transparent;
    transition: border-color .15s ease, transform .15s ease;
    color: inherit;
}
.news-stack__item:hover {
    border-left-color: var(--aerc-gold);
    transform: translateX(2px);
    color: inherit;
}
.news-stack__date {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--aerc-gold-dark);
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.news-stack__title {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--aerc-navy);
    margin: 0 0 0.4rem;
}
.news-stack__summary {
    color: #6c7a89;
    font-size: 0.92rem;
    margin: 0;
}

/* =========================================================
   Event stack
   ========================================================= */

.event-stack { display: flex; flex-direction: column; gap: 0.75rem; }
.event-stack__item {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(38, 61, 86, 0.05);
    color: inherit;
    transition: transform .15s ease;
}
.event-stack__item:hover {
    transform: translateX(2px);
    color: inherit;
}
.event-stack__date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--aerc-navy);
    color: #fff;
    border-radius: 10px;
    flex-shrink: 0;
}
.event-stack__day {
    font-size: 1.35rem;
    line-height: 1;
    font-weight: 700;
    font-family: 'Lora', Georgia, serif;
}
.event-stack__month {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 0.2rem;
}
.event-stack__body { display: flex; flex-direction: column; justify-content: center; }
.event-stack__title {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--aerc-navy);
}
.event-stack__meta {
    color: #6c7a89;
    font-size: 0.88rem;
}

/* =========================================================
   Console (staff admin)
   ========================================================= */

.console-navbar {
    background-color: var(--aerc-navy) !important;
}
.console-navbar .navbar-brand,
.console-navbar .console-brand {
    color: #fff;
}
.console-brand {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-weight: 500;
}
.console-nav-link {
    color: rgba(255,255,255,0.85) !important;
}
.console-nav-link:hover {
    color: var(--aerc-gold) !important;
}
.console-navbar .navbar-brand__logo {
    height: 32px;
}

/* ===== Console content polish ===== */

.console-stat {
    font-family: 'Lora', Georgia, serif;
    font-weight: 600;
    font-size: 2.25rem;
    line-height: 1.1;
    color: var(--aerc-navy);
    margin-bottom: 0.25rem;
}

.console-table-wrap {
    overflow-x: auto;
}

.console-table {
    margin: 0;
}
.console-table > :not(caption) > * > * {
    padding: 0.85rem 1.1rem;
    vertical-align: middle;
}
.console-table thead th {
    background: #fafbfc;
    color: var(--aerc-navy);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.72rem;
    border-bottom: 1px solid #eef1f4;
}
.console-table tbody tr {
    border-bottom: 1px solid #f0f3f6;
}
.console-table tbody tr:last-child { border-bottom: 0; }
.console-table tbody tr:hover {
    background: rgba(38, 61, 86, 0.025);
}

/* Console action buttons (small) - kill the small-btn underline-on-hover */
.console-table .btn-sm { padding: 0.25rem 0.6rem; font-size: 0.82rem; }



/* --- language switcher (pair of form-buttons, no JS) --- */
.nav-lang {
    display: inline-flex;
    gap: 0;
    border: 1px solid #eef1f4;
    border-radius: 999px;
    background: #fafbfc;
    overflow: hidden;
    padding: 2px;
}
.nav-lang__btn {
    border: 0;
    background: transparent;
    padding: 0.25rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #586d83;
    border-radius: 999px;
    cursor: pointer;
    line-height: 1;
    transition: background-color 0.12s ease, color 0.12s ease;
}
.nav-lang__btn:hover {
    color: #263D56;
}
.nav-lang__btn:focus-visible {
    outline: 2px solid #E6A141;
    outline-offset: 1px;
}
.nav-lang__btn.is-active {
    background: #263D56;
    color: #ffffff;
}
