:root {
    --brand-primary: #0a3d62;
    --brand-accent: #f39c12;
    --brand-soft: #f7f9fc;
    --sticky-nav-height: 72px;
}

body {
    background: linear-gradient(180deg, #ffffff 0%, var(--brand-soft) 100%);
}

.navbar-brand-logo {
    height: 70px;
    width: auto;
    display: block;
}

.hero-panel {
    background: radial-gradient(circle at top right, #dfe9ff 0%, #ffffff 45%);
    border: 1px solid #e6ebf2;
    border-radius: 16px;
    padding: 2rem;
}

.hero-carousel-wrap {
    position: relative;
    width: 100%;
    margin: 0;
}

.hero-carousel-image {
    height: calc(100vh - var(--sticky-nav-height));
    object-fit: cover;
    filter: brightness(0.7);
}

.hero-carousel-wrap .carousel-item {
    height: calc(100vh - var(--sticky-nav-height));
}

.hero-carousel-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem 9rem 2rem 10rem;
    color: #fff;
    max-width: 920px;
    z-index: 5;
    pointer-events: none;
}

.hero-carousel-content {
    background: linear-gradient(140deg, rgba(8, 24, 45, 0.74), rgba(8, 24, 45, 0.36));
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 18px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
    padding: 1.5rem 1.75rem;
    max-width: 680px;
    pointer-events: auto;
}

.hero-carousel-overlay .lead {
    color: rgba(255, 255, 255, 0.95);
}

.hero-edition-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    padding: 0.6rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-left: 3px solid var(--brand-accent, #f0b429);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.95rem;
}

.hero-edition-name {
    font-weight: 700;
    color: #fff;
}

.hero-edition-deadline {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 600;
}

.hero-status-open {
    color: #4ade80; /* legible green on the dark hero panel */
    font-weight: 700;
}

.hero-status-closed {
    color: #f87171; /* legible red on the dark hero panel */
    font-weight: 700;
}

.hero-free-entry-pill {
    display: inline-block;
    padding: 0.3rem 0.9rem;
    margin-bottom: 0.9rem;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    line-height: 1.2;
    color: #1c1c1c;
    background: var(--brand-accent, #f0b429);
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(240, 180, 41, 0.35);
}

@media (max-width: 768px) {
    .hero-edition-info {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
    }
    .hero-free-entry-pill {
        font-size: 0.68rem;
        padding: 0.25rem 0.7rem;
        margin-bottom: 0.75rem;
    }
}

.hero-carousel-wrap .carousel-control-prev,
.hero-carousel-wrap .carousel-control-next,
.hero-carousel-wrap .carousel-indicators {
    z-index: 3;
}

@media (max-width: 768px) {
     :root {
        --sticky-nav-height: 64px;
    }
    .navbar-brand-logo {
        height: 56px;
    }
    .hero-carousel-image {
        height: calc(100vh - var(--sticky-nav-height));
    }
    .hero-carousel-wrap .carousel-item {
        height: calc(100vh - var(--sticky-nav-height));
    }
    .hero-carousel-overlay {
        padding: 1.25rem;
        max-width: 100%;
        /* Nudge the hero content up on mobile only (visually centered otherwise). */
        transform: translateY(-40px);
    }
    .hero-carousel-content {
        padding: 1rem 1.1rem;
        max-width: 100%;
    }
}

.section-card {
    border: 1px solid #e6ebf2;
    border-radius: 12px;
    background: #fff;
}

.home-info-cards .section-card {
    min-height: 180px;
    box-shadow: 0 10px 24px rgba(10, 61, 98, 0.08);
}

.home-info-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.home-info-link .section-card {
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.home-info-link:hover .section-card,
.home-info-link:focus-visible .section-card {
    transform: translateY(-3px);
    box-shadow: 0 16px 30px rgba(10, 61, 98, 0.14);
    border-color: #bfd4ea;
}

.home-info-cta {
    display: inline-block;
    margin-top: 0.25rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: #1f5f8b;
}

.apply-edition-row {
    min-height: 56px;
}

.apply-edition-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.apply-edition-start {
    align-self: center;
}


/* FAQ */

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.faq-item {
    padding: 1.25rem 0;
    border-bottom: 1px solid #e4eaf0;
}

.faq-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.faq-item:first-child {
    padding-top: 0;
}

.faq-question,
.faq-answer {
    display: flex;
    gap: 0.75rem;
    margin: 0;
    line-height: 1.6;
}

.faq-question {
    font-weight: 700;
    color: var(--brand-primary);
    margin-bottom: 0.35rem;
}

.faq-label {
    flex-shrink: 0;
    font-weight: 800;
    min-width: 1.25rem;
}

.faq-question .faq-label {
    color: var(--brand-accent);
}

.faq-answer .faq-label {
    color: #6c757d;
}

.home-info-cards .section-card .h5 {
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.home-info-cards .section-card .small-note {
    font-size: 1rem;
    line-height: 1.55;
}

.small-note {
    font-size: 0.9rem;
    color: #5d6878;
}

.form-required::after {
    content: ' *';
    color: #dc3545;
}

.application-form .apply-step-title {
    margin-top: 2.25rem;
    margin-bottom: 1.1rem;
}

.application-form .apply-step-title:first-of-type {
    margin-top: 0;
}

.application-form #add-repertoire-btn {
    min-width: 180px;
}

.application-form .select2-container--bootstrap-5 .select2-selection {
    min-height: 38px;
}

.application-form .select2-container--bootstrap-5 .select2-selection__rendered {
    line-height: 1.4;
}

.application-form .select2-container--bootstrap-5 .select2-dropdown {
    font-size: 1rem;
}

@media (max-width: 768px) {
    .application-form .select2-container {
        width: 100% !important;
    }
    .application-form .select2-container--bootstrap-5 .select2-selection {
        min-height: 44px;
    }
    .application-form .select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field {
        min-height: 40px;
        font-size: 16px;
    }
    .application-form .select2-results__option {
        padding-top: 0.6rem;
        padding-bottom: 0.6rem;
    }
    .application-form [data-repertoire-item] .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.5rem;
    }
    .application-form [data-repertoire-item] [data-remove-repertoire] {
        align-self: flex-end;
    }
    .application-form #add-repertoire-btn {
        width: 100%;
    }
}

/* ---------- Winners: individual page ---------- */
.winner-page { padding-top: 1.25rem; padding-bottom: 3rem; }
.winner-topbar { margin-bottom: 1.5rem; }
.winner-back { display: inline-flex; align-items: center; gap: .4rem; color: #5d6878; text-decoration: none; font-size: .9rem; font-weight: 500; }
.winner-back:hover { color: var(--brand-primary); }

.winner-grid { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.winner-aside { position: sticky; top: calc(var(--sticky-nav-height) + 1rem); display: flex; flex-direction: column; gap: 1.25rem; }

.winner-photo-card { margin: 0; background: #fff; border: 1px solid #e6ebf2; border-radius: 16px; padding: .6rem; box-shadow: 0 18px 44px rgba(10, 61, 98, .1); }
.winner-photo-frame { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 5; background: linear-gradient(158deg, #e7eef5 0%, #c9d8e6 58%, #a8bfd4 100%); }
.winner-photo-frame img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block; }
.winner-photo-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.winner-photo-fallback span { width: 6rem; height: 6rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .9); color: var(--brand-primary); font-size: 2rem; font-weight: 600; box-shadow: 0 14px 34px rgba(10, 61, 98, .18); }

.winner-facts { background: #fff; border: 1px solid #e6ebf2; border-radius: 16px; padding: .35rem 1.25rem; margin: 0; }
.winner-fact { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid #eef2f7; }
.winner-fact:last-child { border-bottom: none; }
.winner-fact dt { font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #5d6878; white-space: nowrap; }
.winner-fact dd { margin: 0; font-size: .95rem; font-weight: 600; color: #12324f; text-align: right; }

.winner-main { min-width: 0; max-width: 780px; }
.winner-kicker { display: inline-flex; align-items: center; gap: .6rem; font-size: .72rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: #b9790a; margin-bottom: .35rem; }
.winner-kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-accent); }
.winner-name { font-family: Georgia, "Times New Roman", "Noto Serif SC", serif; font-weight: 600; color: #12324f; font-size: clamp(2.4rem, 5.5vw, 3.75rem); line-height: 1.05; margin: .35rem 0 0; }
.winner-prize-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 1rem; margin-top: .85rem; }
.winner-prize { font-size: .82rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: #b9790a; }
.winner-prize-mid { width: 26px; height: 1px; background: #e6ebf2; align-self: center; }
.winner-prize-sub { color: #5d6878; font-size: .92rem; }
.winner-gold-rule { height: 2px; width: 74px; background: linear-gradient(90deg, var(--brand-accent), rgba(243, 156, 18, .15)); border-radius: 99px; margin: 1.75rem 0 1.5rem; }

.winner-label { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--brand-primary); margin-bottom: .9rem; }
.winner-bio p { color: #3a4756; font-size: 1.05rem; line-height: 1.8; margin-bottom: 1rem; }
.winner-bio p:last-child { margin-bottom: 0; }
.winner-member-list { list-style: none; padding: 0; margin: 0 0 1.75rem; }
.winner-member-list li { font-size: .98rem; color: #3a4756; padding: .1rem 0; }
.winner-member-list li::before { content: "\00b7"; color: var(--brand-accent); margin-right: .6rem; font-weight: 700; }
.winner-member-name { color: #12324f; font-weight: 600; }
.winner-member-instrument { color: #5d6878; }
.winner-member-instrument::before { content: "\2014"; color: #c7d0da; margin: 0 .5rem; }

.winner-teacher { display: flex; gap: .9rem; align-items: stretch; margin-top: 1.75rem; padding: 1.1rem 0; border-top: 1px solid #eef2f7; border-bottom: 1px solid #eef2f7; }
.winner-teacher-bar { flex-shrink: 0; width: 2px; background: linear-gradient(180deg, var(--brand-accent), rgba(243, 156, 18, .2)); }
.winner-teacher em { font-family: Georgia, "Times New Roman", "Noto Serif SC", serif; font-size: 1.12rem; color: #12324f; font-style: italic; line-height: 1.45; }

.winner-awarded { margin-top: 2rem; margin-bottom: 0; font-size: .8rem; letter-spacing: .04em; color: #8a97a6; }

@media (max-width: 1024px) {
    .winner-grid { grid-template-columns: 1fr; gap: 2rem; }
    .winner-aside { position: static; }
}

/* ---------- Winners: list (results page) ---------- */
.winner-list { display: block; }
.winner-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border: 1px solid #e6ebf2; border-radius: 12px; background: #fff; text-decoration: none; color: inherit; margin-bottom: .75rem; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.winner-row:hover { border-color: #bfd4ea; box-shadow: 0 10px 24px rgba(10, 61, 98, .08); transform: translateY(-1px); color: inherit; }
.winner-row-award { display: inline-block; font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #7a5200; background: #fdf0d5; border-radius: 999px; padding: .2rem .7rem; margin-bottom: .45rem; }
.winner-row-name { font-family: Georgia, "Times New Roman", "Noto Serif SC", serif; font-size: 1.2rem; font-weight: 600; color: #12324f; margin: 0; }
.winner-row-members { font-size: .85rem; color: #5d6878; margin-top: .2rem; }
.winner-row-meta { font-size: .85rem; color: #5d6878; margin-top: .25rem; }
.winner-row-cta { flex-shrink: 0; font-size: .85rem; font-weight: 600; color: var(--brand-primary); white-space: nowrap; }
.winner-row:hover .winner-row-cta { text-decoration: underline; }

@media (max-width: 640px) {
    .winner-row { flex-direction: column; align-items: flex-start; }
}