/* ==========================================================================
   FeSMuT — Federazione delle Scuole di Musica Ticinesi
   ========================================================================== */
:root {
  --red: #e2001a;
  --red-dark: #b30015;
  --ink: #121212;
  --ink-soft: #3a3a3a;
  --gray: #6b6b6b;
  --line: #e6e2dc;
  --paper: #ffffff;
  --paper-alt: #f7f5f2;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(18, 18, 18, 0.08);
  --shadow-hover: 0 18px 44px rgba(18, 18, 18, 0.14);
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Fraunces", Georgia, serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.container { width: min(1160px, 92%); margin-inline: auto; }

h1, h2, h3 { line-height: 1.15; }
h1, h2 { font-family: var(--font-display); letter-spacing: -0.01em; }

/* --------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 78px; }
.brand { display: flex; align-items: center; gap: 0.8rem; text-decoration: none; }
.brand-logo { height: 48px; width: auto; }
.brand-text { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); line-height: 1.35; }

.site-nav ul { display: flex; align-items: center; gap: 0.4rem; list-style: none; }
.site-nav ul ul { display: block; }
.site-nav a {
  display: flex; align-items: center; gap: 0.35rem;
  text-decoration: none; font-weight: 600; font-size: 0.95rem;
  padding: 0.55rem 0.9rem; border-radius: 999px; color: var(--ink-soft);
  transition: color 0.2s, background 0.2s;
}
.site-nav a:hover { color: var(--red); background: #faf1f2; }
.site-nav a.active { color: var(--red); }
.chev { width: 14px; height: 14px; }

.has-sub { position: relative; }
.submenu {
  position: absolute; top: calc(100% + 10px); left: 0;
  min-width: 330px; background: var(--paper);
  border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-hover);
  padding: 0.5rem;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}
.has-sub:hover .submenu, .has-sub:focus-within .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.submenu li + li { margin-top: 2px; }
.submenu a { border-radius: 10px; font-weight: 500; font-size: 0.9rem; padding: 0.5rem 0.8rem; }
.nav-social a { padding: 0.55rem; }
.nav-social svg { width: 20px; height: 20px; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 10px; }
.nav-toggle span { display: block; width: 24px; height: 2.5px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: 0.25s; }

/* --------------------------------------------------------------- hero */
.hero, .page-hero, .cta-band { position: relative; overflow: hidden; color: #fff; }
.hero-bg, .cta-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay, .cta-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(10, 10, 12, 0.88) 0%, rgba(10, 10, 12, 0.65) 55%, rgba(10, 10, 12, 0.35) 100%);
}
.hero-content { position: relative; padding: 7.5rem 0; }
.page-hero .hero-content { padding: 5rem 0; }
.page-hero-slim .hero-content { padding: 3.6rem 0; }
.hero h1 { font-size: clamp(2.3rem, 5.4vw, 4rem); font-weight: 700; margin: 0.8rem 0 1.2rem; }
.page-hero h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); font-weight: 700; margin-top: 0.6rem; }
.accent { color: var(--red); }
.hero-kicker {
  display: inline-block; font-size: 0.82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em; color: #ffb3bb;
}
.hero-kicker a { color: inherit; text-decoration: none; }
.hero-kicker a:hover { text-decoration: underline; }
.hero-sub { max-width: 640px; font-size: 1.08rem; color: rgba(255, 255, 255, 0.88); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.8rem 1.6rem; border-radius: 999px;
  font-weight: 700; font-size: 0.95rem; text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 8px 22px rgba(226, 0, 26, 0.35); }
.btn-primary:hover { background: var(--red-dark); transform: translateY(-2px); }
.btn-ghost { border: 2px solid rgba(255, 255, 255, 0.55); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.1); }
.btn-outline { border: 2px solid var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }

/* --------------------------------------------------------------- strip */
.strip { background: var(--ink); color: #fff; }
.strip-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; padding: 1.9rem 0; }
.strip-item { display: flex; flex-direction: column; gap: 0.15rem; padding-left: 1.1rem; border-left: 3px solid var(--red); }
.strip-item strong { font-family: var(--font-display); font-size: 1.7rem; line-height: 1.1; }
.strip-item span { font-size: 0.82rem; color: rgba(255, 255, 255, 0.72); line-height: 1.4; }

/* --------------------------------------------------------------- sections */
.section { padding: 5rem 0; }
.section-alt { background: var(--paper-alt); }
.section-head { max-width: 680px; margin-bottom: 2.8rem; }
.section-head h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 700; margin-bottom: 0.7rem;
  position: relative; padding-bottom: 0.85rem;
}
.section-head h2::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 56px; height: 4px; border-radius: 4px; background: var(--red);
}
.section-head p { color: var(--gray); font-size: 1.02rem; }

/* --------------------------------------------------------------- schools grid */
.schools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.school-card {
  display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-decoration: none;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.school-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: transparent; }
.school-logo {
  height: 150px; display: flex; align-items: center; justify-content: center;
  background: var(--paper-alt); padding: 1.4rem; border-bottom: 1px solid var(--line);
}
.school-logo img { max-height: 100%; width: auto; max-width: 80%; object-fit: contain; }
.school-info { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: 0.45rem; flex: 1; }
.school-info h3 { font-size: 1.06rem; font-weight: 700; }
.school-info p { font-size: 0.88rem; color: var(--gray); flex: 1; }
.card-link { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.88rem; font-weight: 700; color: var(--red); margin-top: 0.5rem; }
.card-link svg { width: 16px; height: 16px; transition: transform 0.2s; }
.school-card:hover .card-link svg { transform: translateX(4px); }

/* --------------------------------------------------------------- cta band */
.cta-content { position: relative; padding: 5rem 0; max-width: 640px; }
.cta-content h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-bottom: 0.8rem; }
.cta-content p { color: rgba(255, 255, 255, 0.85); margin-bottom: 1.8rem; }

/* --------------------------------------------------------------- features */
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.feature {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem 1.6rem; transition: transform 0.25s, box-shadow 0.25s;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: #fdeaec; color: var(--red); margin-bottom: 1.1rem;
}
.feature-icon svg { width: 26px; height: 26px; }
.feature h3 { font-size: 1.02rem; margin-bottom: 0.5rem; }
.feature p { font-size: 0.9rem; color: var(--gray); }

/* --------------------------------------------------------------- comitato */
.comitato-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.person {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem 1.5rem; text-align: center;
  transition: transform 0.25s, box-shadow 0.25s;
}
.person:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.person img {
  width: 140px; height: 140px; border-radius: 50%; object-fit: cover;
  margin: 0 auto 1.2rem; border: 4px solid var(--paper-alt);
  box-shadow: 0 0 0 2px var(--red);
}
.person h3 { font-size: 1.1rem; }
.person p { color: var(--red); font-weight: 600; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.08em; margin-top: 0.2rem; }
.wide-photo { margin-top: 2.5rem; }
.wide-photo img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.wide-photo figcaption { text-align: center; color: var(--gray); font-size: 0.88rem; margin-top: 0.8rem; }

/* --------------------------------------------------------------- soci / statuti */
.soci-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.soci-card {
  background: var(--paper-alt); border-left: 4px solid var(--red); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.6rem 1.7rem;
}
.soci-card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.soci-card p { font-size: 0.93rem; color: var(--ink-soft); }
.statuti-box {
  margin-top: 2.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
  background: var(--ink); color: #fff; border-radius: var(--radius); padding: 2rem 2.2rem;
}
.statuti-box h3 { font-size: 1.2rem; margin-bottom: 0.3rem; }
.statuti-box p { color: rgba(255, 255, 255, 0.75); font-size: 0.95rem; }

/* --------------------------------------------------------------- contact */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.contact-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem 1.7rem;
}
.contact-card h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--red); margin-bottom: 0.8rem; }
.contact-card p { font-size: 0.97rem; color: var(--ink-soft); }
.contact-card .btn svg { width: 18px; height: 18px; }
.iban-big { font-weight: 700; font-size: 1.05rem; letter-spacing: 0.02em; }

/* --------------------------------------------------------------- school detail */
.school-detail { display: grid; grid-template-columns: 360px 1fr; gap: 2.5rem; align-items: start; }
.school-side {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem; display: flex; flex-direction: column; gap: 1.4rem;
  position: sticky; top: 100px;
}
.school-logo-big { display: flex; justify-content: center; padding: 1rem; background: var(--paper-alt); border-radius: 14px; }
.school-logo-big img { max-height: 150px; width: auto; max-width: 100%; object-fit: contain; }
.contact-list { list-style: none; display: flex; flex-direction: column; gap: 0.9rem; }
.contact-list li { display: flex; gap: 0.8rem; align-items: flex-start; font-size: 0.95rem; }
.contact-list svg { width: 20px; height: 20px; color: var(--red); flex-shrink: 0; margin-top: 2px; }
.contact-list a { color: var(--ink-soft); text-decoration: none; }
.contact-list a:hover { color: var(--red); text-decoration: underline; }
.school-social { display: flex; gap: 0.7rem; }
.school-social a {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper-alt); color: var(--ink-soft);
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.school-social a:hover { background: var(--red); color: #fff; transform: translateY(-2px); }
.school-social svg { width: 20px; height: 20px; }
.school-map iframe {
  width: 100%; height: 380px; border: 0; border-radius: var(--radius); box-shadow: var(--shadow);
}
.map-link { display: inline-block; margin-top: 0.7rem; font-size: 0.88rem; font-weight: 600; color: var(--red); }
.school-video { margin-top: 2.2rem; }
.school-video h2 { font-size: 1.4rem; margin-bottom: 1rem; }
.video-wrap { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.video-wrap iframe { position: absolute; inset: 0; width: 100% !important; height: 100% !important; border: 0; }
.back-row { margin-top: 2.4rem; }

/* --------------------------------------------------------------- footer */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, 0.8); margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2.5rem; padding: 3.5rem 0 2.5rem; }
.footer-logo { width: 190px; background: #fff; padding: 10px 14px; border-radius: 12px; margin-bottom: 1.1rem; }
.footer-col h4 { color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 0.9rem; }
.footer-col p { font-size: 0.92rem; line-height: 1.7; }
.footer-col .iban { margin-top: 0.9rem; font-weight: 600; color: #fff; }
.partner-logos { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.partner-logos img { background: #fff; border-radius: 10px; padding: 8px; max-height: 74px; width: auto; }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.14); padding: 1.3rem 0; font-size: 0.85rem;
}
.footer-fb { display: inline-flex; align-items: center; gap: 0.5rem; color: #fff; text-decoration: none; font-weight: 600; }
.footer-fb:hover { color: var(--red); }
.footer-fb svg { width: 18px; height: 18px; }

/* --------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .schools-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .strip-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    height: calc(100vh - 78px);
    background: var(--paper); padding: 1.5rem 6%;
    transform: translateX(100%); transition: transform 0.3s ease, visibility 0.3s;
    overflow-y: auto; z-index: 99;
    visibility: hidden;
  }
  .site-nav.open { transform: translateX(0); visibility: visible; }
  .site-nav > ul { flex-direction: column; align-items: stretch; gap: 0.2rem; }
  .site-nav a { padding: 0.85rem 0.6rem; border-radius: 10px; font-size: 1.05rem; }
  .site-nav ul ul.submenu {
    position: static; min-width: 0; opacity: 1; visibility: hidden; transform: none;
    box-shadow: none; border: 0; border-left: 3px solid var(--red);
    border-radius: 0; margin: 0.2rem 0 0.4rem 0.8rem; padding: 0 0 0 0.4rem;
    display: none;
  }
  .site-nav .sub-open ul.submenu { display: block; visibility: visible; }
  .school-detail { grid-template-columns: 1fr; }
  .school-side { position: static; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 640px) {
  .hero-content { padding: 5rem 0; }
  .schools-grid, .features-grid, .soci-grid, .contact-grid, .comitato-grid { grid-template-columns: 1fr; }
  .strip-grid { grid-template-columns: 1fr 1fr; gap: 1.1rem; }
  .brand-text { display: none; }
  .statuti-box { flex-direction: column; align-items: flex-start; }
}
