/* ============================================================
   ACCADEMIA FIORENTINA DI AFFRESCO: Shared Stylesheet
   Palette: Parchment · Burgundy · Gold · Dark Charcoal
   Fonts: Cormorant Garamond (headings) · EB Garamond (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,600&family=EB+Garamond:ital,wght@0,400;0,500;1,400&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --parchment:      #F4EFE6;
  --parchment-mid:  #EAE2D4;
  --parchment-dark: #DDD0BB;
  --white-warm:     #FDFAF5;
  --burgundy:       #7A1A1A;
  --burgundy-dark:  #5C1010;
  --gold:           #C4973A;
  --gold-light:     #D9B060;
  --gold-dark:      #7E5C1C;   /* oro scuro: testo oro sui fondi chiari, contrasto AA */
  --dark:           #1C3A5C;   /* deep celestial navy: from the fresco sky */
  --dark-deeper:    #142D48;
  --sky-blue:       #7BA3BF;   /* lighter fresco sky blue */
  --text:           #2E2416;
  --text-light:     #6B5430;
  --border:         rgba(196,151,58,0.25);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'EB Garamond', Georgia, serif;
  background-color: var(--parchment);
  color: var(--text);
  font-size: 19px;
  line-height: 1.75;
}

img { max-width: 100%; height: auto; display: block; }

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h3, h5 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  color: var(--burgundy);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.15;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.3rem, 3vw, 1.75rem); margin-bottom: 0.75rem; }
h3 { font-size: 1rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1.1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--burgundy); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold-dark); }

em { font-style: italic; }
strong { font-weight: 600; }

/* ── Decorative Divider ─────────────────────────────────────── */
.divider {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 1.4rem auto;
}
.divider.left { margin-left: 0; }
.divider.wide { width: 120px; }
.divider-full {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.85rem 2.4rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: all 0.25s ease;
  cursor: pointer;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--burgundy);
  color: var(--white-warm);
  border-color: var(--burgundy);
}
.btn-primary:hover {
  background: var(--burgundy-dark);
  border-color: var(--burgundy-dark);
  color: var(--white-warm);
}
.btn-outline-dark {
  background: transparent;
  color: var(--burgundy);
  border-color: var(--burgundy);
}
.btn-outline-dark:hover {
  background: var(--burgundy);
  color: var(--white-warm);
}
.btn-outline-light {
  background: transparent;
  color: var(--white-warm);
  border-color: var(--gold);
}
.btn-outline-light:hover {
  background: var(--gold);
  color: var(--dark);
}
.btn + .btn { margin-left: 1rem; }

/* ── Layout Helpers ─────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
.container-narrow { max-width: 780px; margin: 0 auto; padding: 0 2rem; }
section { padding: 5.5rem 2rem; }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-header p { max-width: 680px; margin: 0 auto; font-size: 1.05rem; color: var(--text-light); }

/* ── Placeholder Boxes ──────────────────────────────────────── */
.img-placeholder {
  background: rgba(42,31,14,0.07);
  border: 2px dashed var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 0.95rem;
  text-align: center;
  padding: 2rem;
  gap: 0.75rem;
}
.img-placeholder .ph-icon { font-size: 2rem; opacity: 0.4; }

/* ── Navigation ─────────────────────────────────────────────── */
nav {
  background: var(--dark);
  position: sticky;
  top: 0;
  z-index: 200;
  border-bottom: 1px solid rgba(123,163,191,0.2);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  padding: 0 2rem;
  min-height: 62px;
}
.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  color: var(--parchment);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.nav-logo:hover { color: var(--gold-light); }
.nav-logo span { color: var(--gold-light); }
.nav-links {
  display: flex;
  list-style: none;
  align-items: stretch;
  gap: 0;
}
.nav-links li a {
  color: rgba(245,237,216,0.75);
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.88rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  height: 100%;
  border-bottom: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav-links li a:hover,
.nav-links li a.active {
  color: var(--gold-light);
  border-bottom-color: var(--gold);
}
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}
.lang-toggle button,
.lang-toggle a {
  display: inline-block;
  text-decoration: none;
  background: none;
  border: 1px solid transparent;
  color: rgba(245,237,216,0.55);
  cursor: pointer;
  padding: 0.3rem 0.55rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: all 0.2s;
  border-radius: 2px;
}
.lang-toggle button.active,
.lang-toggle a.active {
  border-color: var(--gold);
  color: var(--gold-light);
}
.lang-toggle button:hover,
.lang-toggle a:hover { color: var(--gold-light); }
.lang-sep { color: rgba(245,237,216,0.2); font-size: 0.75rem; }

/* Apply button in nav */
.nav-apply {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 1.05rem;
  border: 1px solid var(--gold);
  color: var(--gold-light) !important;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 0.6rem;
}
.nav-apply:hover,
.nav-apply.active {
  background: var(--gold-light);
  color: var(--dark-deeper) !important;
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--dark);
}
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.55;
}
.hero-bg.placeholder-bg {
  background: linear-gradient(160deg, #1a1206 0%, #3a2a12 40%, #2a1a08 100%);
  display: flex; align-items: center; justify-content: center;
}
.hero-bg.placeholder-bg::after {
  content: '[ Hero fresco image: drop your photo here ]';
  color: rgba(245,237,216,0.2);
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 0.9rem;
  position: absolute;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(42,31,14,0.3) 0%, rgba(42,31,14,0.6) 100%);
}
.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 2rem;
  max-width: 860px;
}
.hero-pretitle {
  color: var(--gold-light);
  text-shadow: 0 1px 12px rgba(0,0,0,0.55);
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.9rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  display: block;
}
.hero-content h1 {
  color: var(--white-warm);
  text-shadow: 0 2px 24px rgba(0,0,0,0.4);
  margin-bottom: 0.4rem;
}
.hero-subtitle {
  color: rgba(245,237,216,0.8);
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
  font-style: italic;
  margin: 1.4rem 0 2.2rem;
  letter-spacing: 0.03em;
}
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Intro Band ─────────────────────────────────────────────── */
.intro-band {
  background: var(--white-warm);
  padding: 4rem 2rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.intro-band p {
  max-width: 740px;
  margin: 0 auto 1rem;
  font-size: 1.12rem;
}
.intro-band p:first-of-type { font-style: italic; font-size: 1.2rem; color: var(--text-light); }

/* ── Three Pillars ──────────────────────────────────────────── */
.pillars { background: var(--parchment); }
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem 4rem;
}
.pillar { text-align: left; }
.pillar-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 4rem;
  color: var(--burgundy);
  opacity: 0.12;
  line-height: 1;
  margin-bottom: -0.5rem;
  font-weight: 300;
}
.pillar h3 { font-size: 1.2rem; }
.pillar p { font-size: 0.98rem; color: var(--text-light); }

/* ── Video Section ──────────────────────────────────────────── */
.video-section {
  background: var(--dark);
  color: var(--parchment);
  padding: 5.5rem 2rem;
  text-align: center;
}
.video-section h2 { color: var(--parchment); }
.video-section .divider { background: var(--gold); }
.video-section .section-header p { color: rgba(245,237,216,0.7); max-width: 580px; margin: 0 auto; }
.video-wrapper {
  max-width: 820px;
  margin: 2.5rem auto 0;
  aspect-ratio: 16/9;
  position: relative;
  background: rgba(255,255,255,0.03);
  border: 2px dashed rgba(196,151,58,0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: rgba(245,237,216,0.3);
  font-style: italic;
  font-size: 0.95rem;
}
.video-wrapper video { width: 100%; height: 100%; object-fit: cover; }
.play-ring {
  width: 72px; height: 72px;
  border: 2px solid rgba(196,151,58,0.4);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  color: rgba(196,151,58,0.5);
}

/* ── Maestro Preview ────────────────────────────────────────── */
.maestro-preview { background: var(--parchment-mid); }
.maestro-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 5rem;
  align-items: start;
}
.maestro-img-box {
  aspect-ratio: 3/4;
  position: relative;
  overflow: hidden;
}
.maestro-img-box img { width: 100%; height: 100%; object-fit: cover; }
.maestro-pretitle {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 0.5rem;
}

/* ── Modules Preview ────────────────────────────────────────── */
.modules-preview { background: var(--white-warm); }
.modules-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.module-card {
  border: 1px solid var(--parchment-dark);
  padding: 2rem 1.5rem;
  background: var(--white-warm);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
  cursor: default;
}
.module-card:hover {
  border-color: var(--gold);
  box-shadow: 0 8px 32px rgba(42,31,14,0.1);
  transform: translateY(-5px);
}
.module-roman {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3.5rem;
  color: var(--burgundy);
  opacity: 0.15;
  line-height: 1;
  margin-bottom: 0.5rem;
  font-weight: 300;
}
.module-card h3 { font-size: 0.82rem; color: var(--burgundy); }
.module-date {
  font-family: 'Cormorant Garamond', serif;
  color: var(--gold-dark);
  font-style: italic;
  font-size: 1rem;
  margin: 0.25rem 0 0.75rem;
}
.module-card p { font-size: 0.93rem; color: var(--text-light); margin: 0; }

/* ── CTA Band ───────────────────────────────────────────────── */
.cta-band {
  background: var(--burgundy);
  padding: 5rem 2rem;
  text-align: center;
}
.cta-band h2 { color: var(--white-warm); }
.cta-band .divider { background: var(--gold); }
.cta-band p { color: rgba(253,248,239,0.8); max-width: 600px; margin: 0 auto 2rem; font-size: 1.05rem; }

/* ── Footer ─────────────────────────────────────────────────── */
footer {
  background: var(--dark-deeper);
  color: var(--parchment-mid);
  padding: 4rem 2rem 0;
}
.footer-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr;
  gap: 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(196,151,58,0.12);
}
footer h3 {
  color: var(--gold);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}
footer p, footer a {
  color: rgba(224,207,168,0.65);
  font-size: 0.95rem;
  line-height: 1.9;
}
footer a:hover { color: var(--gold); }
.footer-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--parchment);
  margin-bottom: 1rem;
  display: block;
}
.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(245,237,216,0.25);
}

/* ── Page Hero (inner pages) ────────────────────────────────── */
.page-hero {
  background: var(--dark);
  padding: 5rem 2rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(28,58,92,0.5), rgba(20,45,72,0.85));
}
.page-hero-bg { position: absolute; inset: 0; }
.page-hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.3; }
.page-hero-content { position: relative; z-index: 10; }
.page-hero h1 { color: var(--white-warm); margin-bottom: 0.5rem; }
.page-hero p {
  color: rgba(245,237,216,0.7);
  max-width: 600px;
  margin: 0 auto;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.2rem;
}

/* ── Utility ─────────────────────────────────────────────────── */
.text-gold { color: var(--gold); }
.text-burgundy { color: var(--burgundy); }
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

/* ── Hamburger / Mobile Nav ─────────────────────────────────── */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.6rem 0;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--parchment);
  transition: all 0.25s;
  transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* On desktop, nav-collapse is a flex row taking up remaining nav space */
.nav-collapse {
  display: flex;
  flex: 1;
  align-items: stretch;
  justify-content: flex-end;
}

/* ── Responsive ─────────────────────────────────────────────── */

/* Fra 1260 e 1000 px il menu resta orizzontale ma si compatta,
   altrimenti le voci escono dallo schermo. */
@media (max-width: 1260px) {
  .nav-inner        { padding: 0 1.2rem; }
  .nav-logo         { font-size: 0.9rem;  letter-spacing: 0.09em; }
  .nav-links li a   { font-size: 0.82rem; letter-spacing: 0.08em; padding: 0 0.7rem; }
  .nav-apply        { font-size: 0.76rem; letter-spacing: 0.1em; padding: 0.3rem 0.75rem; margin-right: 0.8rem; }
}

/* Sotto 1000 px il menu diventa a tendina con il pulsante hamburger:
   sotto questa larghezza le voci non ci stanno più in orizzontale. */
@media (max-width: 1000px) {
  /* Show hamburger */
  .nav-hamburger { display: flex; }

  /* La barra resta attaccata in alto anche qui: sticky ancora comunque la tendina. */
  .nav-inner { padding: 0 1.2rem; }
  .nav-collapse {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 62px;
    left: 0;
    right: 0;
    background: var(--dark-deeper);
    border-top: 1px solid rgba(123,163,191,0.2);
    max-height: calc(100vh - 62px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem 1.2rem 1.5rem;
    z-index: 199;
    gap: 0;
  }
  .nav-collapse.open { display: flex; }

  /* Nav links stacked */
  .nav-links {
    flex-direction: column;
    width: 100%;
    align-items: stretch;
  }
  .nav-links li a {
    height: auto;
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(245,237,216,0.07);
    border-left: none;
    font-size: 1rem;
  }
  .nav-links li:last-child a { border-bottom: none; }
  .nav-links li:last-child a.active { border-bottom: 1px solid var(--gold); }

  /* Apply button inside mobile menu */
  .nav-apply {
    margin-right: 0;
    margin-top: 1.2rem;
    align-self: flex-start;
    padding: 0.7rem 1.4rem;
  }

  /* Lang toggle inside mobile menu */
  .lang-toggle { margin-top: 0.8rem; }
  .lang-toggle button,
  .lang-toggle a { padding: 0.6rem 0.9rem; }

  /* Nav logo: smaller on mobile to avoid overflow */
  .nav-logo {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
  }
}

@media (max-width: 960px) {

  .pillars-grid    { grid-template-columns: 1fr; gap: 2.5rem; }
  .modules-grid    { grid-template-columns: repeat(2, 1fr); }
  .maestro-grid    { grid-template-columns: 1fr; gap: 2.5rem; }
  .maestro-img-box { aspect-ratio: 4/3; max-width: 420px; }
  .footer-grid     { grid-template-columns: 1fr; gap: 2.5rem; }
}
@media (max-width: 640px) {
  /* Telefoni molto stretti: il logo non deve toccare il pulsante del menu. */
  .nav-logo { font-size: 0.72rem; letter-spacing: 0.05em; }

  /* General mobile tweaks */
  .modules-grid    { grid-template-columns: 1fr; }
  section          { padding: 3.5rem 1.2rem; }
  .container, .container-narrow { padding: 0 1.2rem; }
  .hero            { min-height: 70vh; }
  h1               { font-size: clamp(2rem, 10vw, 3rem); }
  .cta-band        { padding: 3.5rem 1.2rem; }
  .page-hero-content { padding: 0 1.2rem; }

  /* Hero CTA buttons: stack vertically on small screens */
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
  .btn + .btn { margin-left: 0; margin-top: 0.75rem; }

  /* Gallery teaser grid: single column on mobile */
  .gallery-teaser-grid {
    grid-template-columns: 1fr !important;
  }
}


/* Schede informative e domande frequenti (spostate qui dalla pagina del corso il 12 set 2026,
   servono anche alla pagina Candidati). */
.modules-detail { background: var(--parchment); padding: 5rem 2rem; }
.info-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 2.5rem;
    }
.info-card {
      background: var(--white-warm);
      padding: 2.5rem 2rem;
      border-top: 3px solid var(--gold);
    }
.info-card h3 {
      font-size: 1rem;
      letter-spacing: 0.18em;
      margin-bottom: 1rem;
    }
.info-card p { font-size: 0.96rem; color: var(--text-light); }
#faq .info-card h3 { text-transform: none; letter-spacing: 0.02em; font-size: 1.15rem; line-height: 1.3; }
section[id] { scroll-margin-top: 80px; }
@media (max-width: 960px) {
  .info-grid { grid-template-columns: 1fr; }
}
