/* Variabili CSS aggiornate al logo "Caere Music Show" */
:root {
    --primary-dark: #0a0500; /* Nero profondo caldo (identico allo sfondo del logo, #0a0000) */
    --primary-light: #fcfbfa; /* Sfondo chiaro leggermente panna */
    --sidebar-bg: #f5f2ed; /* Sidebar per staccare dal main content */
    --accent-color: #e3a23a; /* Oro caldo campionato dal logo */
    --accent-light: #ffde88; /* Oro chiaro, dai riflessi del logo */
    --accent-dark: #b8791f; /* Oro/bronzo scuro, dalle ombre del logo */
    --accent-gradient: linear-gradient(135deg, var(--accent-light), var(--accent-color) 55%, var(--accent-dark));
    --text-dark: #2b2013;
    --text-light: #fff8eb;
    --border-color: #e8dfd5;
    --font-headings: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

/* Reset di base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--primary-light);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: var(--font-headings);
    text-transform: uppercase;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

/* Layout Principale */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* --- SIDEBAR SPONSOR (FISSA) --- */
.sidebar {
    width: 220px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    padding: 3rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-title {
    text-align: center;
    margin-bottom: 2.2rem;
}

.sidebar-title i {
    color: var(--accent-color);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    display: block;
}

.sidebar-title span {
    display: block;
    font-family: var(--font-headings);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-dark);
    line-height: 1.4;
}

.sidebar-title::after {
    content: "";
    display: block;
    width: 36px;
    height: 2px;
    background: var(--accent-gradient);
    margin: 0.8rem auto 0;
    border-radius: 2px;
}

.sponsor-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 110px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 10px;
    padding: 1rem 0.8rem;
    font-family: var(--font-headings);
    font-weight: 700;
    font-size: 0.8rem;
    line-height: 1.3;
    color: var(--primary-dark);
    text-transform: uppercase;
    box-shadow: 0 6px 16px rgba(227, 162, 58, 0.35);
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

.sponsor-cta i {
    font-size: 1.3rem;
}

.sponsor-cta:hover {
    filter: brightness(1.08);
    transform: translateY(-4px);
    box-shadow: 0 10px 22px rgba(227, 162, 58, 0.5);
}

.sponsor-item {
    text-align: center;
    margin-bottom: 2rem;
    width: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.sponsor-item img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 110px;
    object-fit: contain;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.sponsor-item:hover {
    transform: translateY(-3px);
}

.sponsor-item:hover img {
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

/* --- MAIN CONTENT --- */
.main-content {
    margin-left: 220px;
    width: calc(100% - 220px);
}

/* Header / Navbar */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    background-color: var(--primary-light);
    position: sticky;
    top: 0;
    z-index: 999;
    border-bottom: 1px solid var(--border-color);
}

.logo-container img {
    height: 55px; /* Dimensione adattata per il logo */
    width: auto;
    object-fit: contain;
    border-radius: 8px; /* Opzionale, smussa leggermente gli angoli del jpeg */
    filter: drop-shadow(0 0 10px rgba(227, 162, 58, 0.35));
}

nav ul {
    display: flex;
    gap: 2rem;
}

nav a {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

nav a:hover, nav a.active {
    color: var(--accent-color);
}

/* --- STILI DEL MENU A TENDINA SOCIAL NELL'HEADER (CORRETTO E STABILE) --- */
.header-social-dropdown {
    position: relative;
    display: inline-block;
}

/* Immagine pulsante coordinata all'altezza del logo principale (55px) */
.dropdown-trigger {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    border: 2.5px solid var(--accent-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dropdown-trigger:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(227, 162, 58, 0.5);
}

/* Pannello della tendina allargato */
.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%; /* Posizionato subito sotto il contenitore */
    margin-top: 12px; /* Crea il distacco visivo elegante */
    background-color: var(--primary-light);
    min-width: 210px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    border-radius: 10px;
    z-index: 1000;
    /* Nota: rimosso overflow:hidden per permettere al ponte invisibile di funzionare */
}

/* IL TRUCCO DEL PONTE INVISIBILE: 
   Questo blocco riempie lo spazio vuoto tra l'immagine e la tendina.
   Il mouse ci passa sopra e il menù capisce che vuoi rimanerci dentro, evitando di chiudersi! */
.dropdown-content::before {
    content: "";
    position: absolute;
    top: -15px; /* Si estende verso l'alto per coprire il margine */
    left: 0;
    width: 100%;
    height: 15px;
    background: transparent; /* Rimane totalmente invisibile alla vista */
}

/* Mantiene gli angoli arrotondati anche al passaggio del mouse sui link */
.dropdown-content a:first-child {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}
.dropdown-content a:last-child {
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

/* Mostra la tendina al click quando attiva */
.header-social-dropdown.active .dropdown-content {
    display: block;
}

/* Scritte interne grandi e leggibili */
.dropdown-content a {
    color: var(--text-dark);
    padding: 15px 20px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: var(--font-headings);
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Icone dei social ingrandite */
.dropdown-content a i {
    font-size: 1.4rem;
    color: var(--accent-color);
    width: 25px;
    text-align: center;
}

/* Effetto al passaggio del mouse sulle voci interne */
.dropdown-content a:hover {
    background-color: var(--sidebar-bg);
    color: var(--accent-dark);
}
/* Bottoni */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border: 1px solid var(--primary-dark);
    background: transparent;
    color: var(--primary-dark);
    font-family: var(--font-headings);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
}

.btn:hover {
    background-color: var(--primary-dark);
    color: var(--primary-light);
}

.btn-accent {
    border-color: var(--accent-dark);
    background: var(--accent-gradient);
    color: var(--primary-dark);
}

.btn-accent:hover {
    background: transparent;
    color: var(--accent-light);
    border-color: var(--accent-light);
}

/* Layout a due colonne */
.split-section {
    display: flex;
    min-height: 500px;
}

.split-section > div {
    flex: 1;
}

.content-box {
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.image-box {
    background-size: cover;
    background-position: center;
    min-height: 300px;
}

/* Specific Sections */
.section-subtitle {
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

/* HERO SECTION */
.hero-section {
    background-color: var(--primary-dark);
    color: var(--text-light);
}

.hero-section .section-title {
    font-size: 4rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(227, 162, 58, 0.25);
}

.hero-logo-box {
    background-color: var(--primary-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1.5rem;
}

.hero-logo-large {
    max-width: 32%;
    height: auto;
    filter: drop-shadow(0 0 45px rgba(227, 162, 58, 0.4));
}

.hero-logo-slogan {
    font-family: var(--font-headings);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 1.1rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

/* Lists */
.info-list {
    margin-top: 1.5rem;
}

.info-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: var(--primary-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.info-text h4 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.info-text p {
    font-size: 0.9rem;
    color: #666;
}

/* Grid per Programma e Giuria */
.grid-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background-color: var(--primary-light);
}

.grid-section .content-box {
    border-right: 1px solid var(--border-color);
}

.jury-member .icon-circle {
    background-color: transparent;
    border-radius: 50%;
    overflow: hidden;
}

.jury-member .icon-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Premi */
.premi-section {
    background-color: var(--primary-dark);
    color: var(--text-light);
}

.premi-section .info-list li {
    align-items: center;
}

.premi-section .info-text p {
    color: #bbb;
}

.premi-section .icon-circle {
    background: transparent;
    color: var(--accent-light);
    border: 1px solid var(--accent-color);
}

/* Contatti */
.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icons a {
    font-size: 1.5rem;
    color: var(--primary-dark);
}

/* Footer */
footer {
    background-color: var(--primary-dark);
    color: #888;
    display: flex;
    justify-content: space-between;
    padding: 1.5rem 3rem;
    font-size: 0.8rem;
    border-top: 1px solid #333;
}

/* --- PAGINA CHI SIAMO (dettaglio + team) --- */
.page-intro {
    padding: 5rem 4rem 3rem;
    max-width: 900px;
}

.page-intro .section-subtitle {
    color: var(--accent-color);
}

.page-intro .section-title {
    font-size: 2.8rem;
}

.page-intro p {
    margin-bottom: 1rem;
    color: #555;
    font-size: 1.05rem;
}

.team-section {
    padding: 1rem 4rem 5rem;
}

.team-section .section-title {
    font-size: 1.8rem;
    margin-bottom: 2.5rem;
    text-align: center;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
}

.team-card {
    text-align: center;
}

.team-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1.2rem;
    background-size: cover;
    background-position: center;
    border: 3px solid var(--accent-color);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.team-photo.team-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    color: var(--primary-dark);
    font-size: 2.2rem;
}

.team-card h4 {
    font-size: 1rem;
    letter-spacing: 0.03em;
    margin-bottom: 0.2rem;
}

.team-card .team-role {
    color: var(--accent-dark);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

.team-card p.team-bio {
    font-size: 0.88rem;
    color: #666;
}

.back-home-wrap {
    padding: 0 4rem 3rem;
}

@media (max-width: 1024px) {
    .page-intro, .team-section, .back-home-wrap, .rules-section, .download-section {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* --- PAGINA REGOLAMENTO --- */
.rules-section {
    padding: 1rem 4rem 3rem;
}

.rules-list {
    counter-reset: rule-counter;
    margin-top: 1rem;
}

.rules-list li {
    counter-increment: rule-counter;
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.rules-list li:last-child {
    border-bottom: none;
}

.rule-number {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: var(--primary-dark);
    font-family: var(--font-headings);
    font-weight: 800;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rule-content h4 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.rule-content p {
    font-size: 0.92rem;
    color: #666;
}

.download-section {
    background-color: var(--primary-dark);
    color: var(--text-light);
    padding: 3.5rem 4rem;
    text-align: center;
}

.download-section h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
}

.download-section p {
    color: #ccc;
    margin-bottom: 1.8rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 2rem;
    background: var(--accent-gradient);
    color: var(--primary-dark);
    font-family: var(--font-headings);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.download-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .app-container {
        display: block;
    }
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 2rem;
        padding: 1.5rem;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    .sidebar-title, .sponsor-cta {
        width: 100%;
    }
    .sponsor-cta {
        max-width: 300px;
    }
    .sponsor-item {
        margin-bottom: 0;
        width: 130px;
    }
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    .split-section {
        flex-direction: column;
    }
    .grid-section {
        grid-template-columns: 1fr; /* Forza CSS Grid a mettersi su una colonna singola */
    }
    .grid-section > div {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    .split-section > div {
        width: 100%;
    }
    .image-box {
        min-height: 400px;
    }
    header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    .hero-section .section-title {
        font-size: 2.8rem;
    }
    .hero-logo-large {
        max-width: 38%;
    }
}