/* =============================================
   CORPO MUSICALE SANTA CECILIA - STYLE.CSS
   ============================================= */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --nero:       #1a2330;
  --bianco:     #ffffff;
  --crema:      #f5e6c8;
  --giallo-ch:  #fdf3dc;
  --arancio:    #e85d04;
  --verde:      #4a7c59;
  --oro:        #c9a84c;
  --grigio-ch:  #f5f5f5;
  --grigio-md:  #888;
  --testo:      #222;
  --font-disp:  'Playfair Display', Georgia, serif;
  --font-body:  'Inter', Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--testo);
  background: var(--bianco);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* --- Typography --- */
h1, h2, h3, h4 { font-family: var(--font-disp); line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

.accent { color: var(--arancio); }
.oro    { color: var(--oro); }

/* =============================================
   TOPBAR
   ============================================= */
.topbar {
  background: var(--nero);
  color: #ccc;
  font-size: 0.8rem;
  padding: 6px 40px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
}
.topbar a { color: #ccc; }
.topbar a:hover { color: var(--bianco); }
.topbar-item { display: flex; align-items: center; gap: 6px; }
.topbar-icons { display: flex; gap: 10px; }
.topbar-icons a { font-size: 1rem; }

/* =============================================
   NAVBAR
   ============================================= */
.navbar {
  background: var(--nero);
  padding: 14px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.navbar-logo img { height: 52px; width: auto; }
.navbar-logo span {
  font-family: var(--font-disp);
  color: var(--oro);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.navbar-links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.navbar-links a {
  color: #e0e0e0;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color .2s;
}
.navbar-links a:hover { color: var(--arancio); }
.navbar-links a.active { color: var(--arancio); }

.dropdown { position: relative; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;          /* no gap — was calc(100%+12px) which caused close-on-move */
  left: 0;
  background: var(--nero);
  border: 1px solid rgba(255,255,255,0.1);
  min-width: 180px;
  z-index: 200;
  padding-top: 12px;  /* visual spacing without a physical gap */
}
.dropdown:hover .dropdown-menu,
.dropdown.drop-open .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block;
  padding: 10px 18px;
  font-size: 0.82rem;
  color: #ccc;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.dropdown-menu a:hover { color: var(--arancio); background: rgba(255,255,255,0.04); }
.dropdown > a::after { content: ' ▾'; font-size: 0.7rem; }

/* Hamburger button */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
}
.hamburger .bar {
  display: block;
  width: 24px;
  height: 2px;
  background: #e0e0e0;
  border-radius: 2px;
  transition: all 0.3s ease;
}
.hamburger.is-open .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open .bar:nth-child(2) { opacity: 0; }
.hamburger.is-open .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =============================================
   HERO BANNER (pagine interne)
   ============================================= */
.page-hero {
  background: var(--crema);
  position: relative;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.page-hero-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .55;
}
.page-hero h1 {
  position: relative;
  z-index: 2;
  text-align: center;
  font-size: clamp(2rem, 5vw, 3rem);
}

/* Hero Home */
.hero-home {
  background: var(--crema);
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 60px 40px;
}
.hero-home-content { position: relative; z-index: 2; max-width: 640px; }
.hero-home h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 8px; }
.hero-home .subtitle { font-size: 1.05rem; color: #555; margin-bottom: 6px; }
.hero-home .tagline  { font-size: 1.1rem; color: var(--testo); margin-bottom: 28px; }

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-block;
  padding: 11px 26px;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
  border: none;
}
.btn:hover { opacity: .88; transform: translateY(-1px); }
.btn-primary   { background: var(--arancio); color: var(--bianco); }
.btn-secondary { background: var(--verde);   color: var(--bianco); }
.btn-outline   { background: transparent; border: 2px solid var(--arancio); color: var(--arancio); }
.btn-dark      { background: var(--nero); color: var(--bianco); }

/* =============================================
   SEZIONI COMUNI
   ============================================= */
section { padding: 64px 40px; }
.container { max-width: 1100px; margin: 0 auto; }

.section-title { margin-bottom: 36px; }
.section-title h2 span { color: var(--arancio); }

.bg-crema  { background: var(--giallo-ch); }
.bg-dark   { background: var(--nero); color: var(--bianco); }
.bg-white  { background: var(--bianco); }

/* =============================================
   CARD EVENTO
   ============================================= */
.events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  position: relative;
}
.event-card {
  background: var(--bianco);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.event-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: top center;
}
.event-card-body { padding: 16px; }
.event-badge {
  display: inline-block;
  background: var(--arancio);
  color: var(--bianco);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 3px;
  margin-bottom: 10px;
}
.event-card-body h3 { font-size: 1.05rem; margin-bottom: 10px; }
.event-meta { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; color: #555; }
.event-meta span { display: flex; align-items: center; gap: 6px; }
.event-meta .ico { font-size: 1rem; }

.carousel-btn {
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  background: var(--giallo-ch);
  border: none;
  border-radius: 50%;
  font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.events-cta { text-align: center; margin-top: 32px; }

/* =============================================
   CARD COMPONENTE (strumenti)
   ============================================= */
.instruments-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.instrument-card {
  background: var(--bianco);
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 28px 24px 20px;
  text-align: center;
}
.instrument-card img {
  height: 100px;
  object-fit: contain;
  margin: 0 auto 18px;
}
.instrument-card h3 { margin-bottom: 14px; }
.members-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: center;
  font-size: 0.9rem;
  color: #555;
}

/* =============================================
   CARD DIRETTIVO
   ============================================= */
.board-grid-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.board-grid-three {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 20px;
  margin-bottom: 20px;
}
.board-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 32px 24px;
  text-align: center;
  min-height: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.board-card .role { font-size: 0.85rem; color: var(--grigio-md); }
.board-card .name { font-size: 1.3rem; font-weight: 700; }
.board-card .names { font-size: 1.15rem; font-weight: 700; line-height: 1.8; }

/* =============================================
   CONTATTI CARDS
   ============================================= */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 20px;
}
.contact-card {
  background: var(--bianco);
  border-radius: 8px;
  padding: 28px 22px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}
.contact-card .icon { font-size: 1.8rem; margin-bottom: 16px; }
.contact-card p { font-size: 0.95rem; color: #444; margin-top: 6px; }
.contact-card .label { font-size: 0.85rem; color: var(--grigio-md); margin-bottom: 2px; }
.contact-card .value { font-weight: 600; }
.contact-card .social-row { display: flex; gap: 14px; margin-bottom: 8px; font-size: 1.5rem; }

/* MAP section */
.map-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
  margin-top: 24px;
}
.map-placeholder {
  background: #e0e0e0;
  border-radius: 8px;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 0.9rem;
  overflow: hidden;
}
.map-placeholder iframe { width: 100%; height: 100%; border: 0; border-radius: 8px; }
.map-info { background: var(--bianco); border: 1px solid #e8e8e8; border-radius: 8px; padding: 24px; }
.map-info-item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid #f0f0f0; }
.map-info-item:last-child { border-bottom: none; }
.map-info-item .ico { font-size: 1.3rem; }
.map-info-item .label { font-size: 0.8rem; font-weight: 700; margin-bottom: 4px; }

/* =============================================
   5x1000 CODICE FISCALE BOX
   ============================================= */
.cf-box {
  background: rgba(255,255,255,0.12);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 10px;
  padding: 14px 32px;
  display: inline-block;
  margin: 12px 0 20px;
}
.cf-box .cf-number {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--bianco);
}
.cf-box-dark {
  background: rgba(0,0,0,0.25);
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  padding: 14px 40px;
  display: inline-block;
  margin: 12px 0 20px;
}
.cf-box-dark .cf-number {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--bianco);
}

/* =============================================
   BANNER 5x1000 (scuro con foto bg)
   ============================================= */
.banner-5x1000 {
  position: relative;
  background: var(--nero);
  color: var(--bianco);
  text-align: center;
  padding: 72px 40px;
  overflow: hidden;
}
.banner-5x1000 .bg-photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: .35;
}
.banner-5x1000-content { position: relative; z-index: 2; }
.banner-5x1000 h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: 10px; }
.banner-5x1000 p  { max-width: 520px; margin: 0 auto 20px; font-size: 0.95rem; color: #ddd; }
.highlight-orange { color: var(--arancio); font-weight: 800; }

/* =============================================
   SCHOOL FEATURES
   ============================================= */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--bianco);
  border-radius: 10px;
  padding: 32px 20px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}
.feature-icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto 16px;
}
.feature-card h3 { margin-bottom: 8px; font-size: 1rem; }
.feature-card p  { font-size: 0.88rem; color: #666; }

.instruments-school-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.instrument-school-card {
  background: var(--bianco);
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 20px 12px;
  text-align: center;
}
.instrument-school-card img {
  height: 72px;
  object-fit: contain;
  margin: 0 auto 12px;
}
.instrument-school-card p { font-size: 0.9rem; font-weight: 600; }

/* =============================================
   STORIA
   ============================================= */
.storia-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 48px;
}
.storia-split.reverse { direction: rtl; }
.storia-split.reverse > * { direction: ltr; }
.storia-img {
  border-radius: 8px;
  overflow: hidden;
  background: #ddd;
  height: 320px;
  display: flex; align-items: center; justify-content: center;
  color: #888;
}
.storia-img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.storia-quote {
  font-size: 1.3rem;
  font-style: italic;
  color: var(--testo);
  border-left: 4px solid var(--arancio);
  padding: 16px 20px;
  margin: 24px 0;
  background: var(--giallo-ch);
  border-radius: 0 8px 8px 0;
}

/* =============================================
   MAESTRO
   ============================================= */
.maestro-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 420px;
}
.maestro-hero-text {
  background: var(--giallo-ch);
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.maestro-hero-text h2 { font-size: 2rem; margin-bottom: 14px; }
.maestro-hero-img {
  position: relative;
  overflow: hidden;
}
.maestro-hero-img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.maestro-blockquote {
  font-size: 1.1rem;
  font-style: italic;
  line-height: 1.7;
  margin-top: 20px;
  position: relative;
  padding: 0 10px;
}
.maestro-blockquote::before { content: '"'; font-size: 3rem; line-height: 0; vertical-align: -0.4em; color: var(--arancio); margin-right: 4px; }
.maestro-blockquote::after  { content: '"'; font-size: 3rem; line-height: 0; vertical-align: -0.4em; color: var(--arancio); margin-left: 4px; }

.bio-section {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  padding: 56px 40px;
  max-width: 1100px;
  margin: 0 auto;
}
.bio-section h3 { font-size: 1.5rem; font-family: var(--font-disp); color: var(--testo); }
.bio-section p  { font-size: 0.95rem; line-height: 1.8; color: #444; margin-bottom: 14px; }

/* =============================================
   SOSTIENICI
   ============================================= */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.step-card {
  background: var(--bianco);
  border-radius: 8px;
  padding: 24px 16px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}
.step-number {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--arancio);
  color: var(--bianco);
  font-weight: 800;
  font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
.step-card p { font-size: 0.88rem; color: #555; }

.uso-list { list-style: none; }
.uso-list li {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.95rem; margin-bottom: 10px;
}
.uso-list li::before {
  content: '';
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--arancio);
  flex-shrink: 0;
}

/* =============================================
   FOOTER
   ============================================= */
footer {
  background: var(--nero);
  color: #bbb;
  padding: 52px 40px 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto 40px;
}
footer h4 { color: var(--bianco); font-family: var(--font-body); font-size: 0.9rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
footer p, footer a { font-size: 0.88rem; line-height: 1.8; color: #bbb; }
footer a:hover { color: var(--bianco); }
.footer-brand { font-size: 0.95rem; font-weight: 600; color: var(--bianco); margin-bottom: 10px; }
.footer-social { display: flex; gap: 12px; margin-top: 10px; font-size: 1.3rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 16px 0;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #777;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-bottom a { color: #777; }
.footer-bottom a:hover { color: #ccc; }

/* =============================================
   HOME - sezioni specifiche
   ============================================= */
.home-about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.home-about img { border-radius: 8px; width: 100%; height: 340px; object-fit: cover; object-position: top center; }
.home-about p { color: #555; margin-bottom: 20px; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

.home-school {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.home-school img { border-radius: 8px; width: 100%; height: 320px; object-fit: cover; object-position: top center; }

/* =============================================
   SOSTIENICI - hero specifico
   ============================================= */
.sostienici-hero {
  background: var(--crema);
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 60px 40px;
}
.sostienici-hero-content { position: relative; z-index: 2; }
.sostienici-hero h1 { margin-bottom: 8px; }
.sostienici-hero .sub { font-size: 1.05rem; color: #666; margin-bottom: 20px; }
.cf-hero-box {
  background: rgba(255,255,255,0.7);
  border-radius: 10px;
  padding: 14px 40px;
  display: inline-block;
  margin-bottom: 16px;
}
.cf-hero-box .cf-label { font-size: 0.85rem; color: #666; margin-bottom: 4px; }
.cf-hero-box .cf-number { font-size: 2.2rem; font-weight: 800; color: var(--testo); letter-spacing: 2px; }

/* =============================================
   SPLIT SECTION (testo + foto)
   ============================================= */
.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
}
.split-section .split-text {
  padding: 60px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.split-section .split-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.split-check { list-style: none; }
.split-check li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 0.95rem; margin-bottom: 10px;
}
.split-check li::before {
  content: '';
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--arancio);
  flex-shrink: 0;
  margin-top: 3px;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  section { padding: 48px 20px; }
  .navbar { padding: 12px 20px; flex-wrap: wrap; position: relative; }
  .topbar { padding: 6px 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 6px; }

  .home-about, .home-school,
  .storia-split, .maestro-hero,
  .split-section,
  .map-section { grid-template-columns: 1fr; }

  .storia-split.reverse { direction: ltr; }
  .maestro-hero-img { min-height: 280px; }
  .split-section .split-img { min-height: 240px; }

  .events-grid { grid-template-columns: 1fr; }
  .contact-cards { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .instruments-grid { grid-template-columns: 1fr; }
  .instruments-school-grid { grid-template-columns: repeat(2, 1fr); }
  .board-grid-three { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .bio-section { grid-template-columns: 1fr; gap: 16px; }

  /* Mobile nav */
  .hamburger { display: flex; }
  .navbar-links {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 8px 0 16px;
    gap: 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 10px;
  }
  .navbar-links.nav-open { display: flex; }
  .navbar-links > li { border-bottom: 1px solid rgba(255,255,255,0.07); }
  .navbar-links > li > a { display: block; padding: 12px 4px; }

  /* Mobile dropdowns */
  .dropdown-menu {
    position: static;
    padding: 0 0 4px 16px;
    border: none;
    background: transparent;
    min-width: auto;
    display: none !important;
  }
  .dropdown.drop-open > .dropdown-menu { display: block !important; }
  .dropdown-menu a { padding: 10px 4px; border-bottom: none; font-size: 0.85rem; }
}

@media (max-width: 480px) {
  .instruments-school-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: 1fr; }
  h1 { font-size: 1.8rem; }
}
