/* ==========================================================================
   CORALE SAN CANCIANO - Foglio di Stile Ufficiale (CSS Puro)
   Stile: Raffinato, Classico e Professionale per Associazione Corale Polifonica
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700;800&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  /* Tavolozza Colori Nobili */
  --bg-primary: #12100e;
  --bg-surface: #1a1715;
  --bg-surface-elevated: #24201c;
  --bg-light: #fcfaf7;
  --bg-light-alt: #f4efe8;
  
  --text-main: #f5f2eb;
  --text-muted: #b8b0a2;
  --text-dark: #231f1d;
  --text-dark-muted: #5e5751;

  --accent-gold: #cfa856;
  --accent-gold-light: #e5c479;
  --accent-gold-dark: #99742a;
  --accent-burgundy: #521320;
  --accent-burgundy-light: #7a1f33;

  --border-subtle: rgba(207, 168, 86, 0.2);
  --border-strong: rgba(207, 168, 86, 0.45);
  
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-display: 'Cinzel', serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.6);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

/* Reset Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Tipografia */
h1, h2, h3, h4, h5 {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
}

.font-display {
  font-family: var(--font-display);
}

.gold-gradient-text {
  background: linear-gradient(135deg, #fcebc2 0%, var(--accent-gold) 50%, #f7d88b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Barra Superiore (Top Bar) */
.topbar {
  background: linear-gradient(90deg, #0d0b0a, #231215, #0d0b0a);
  border-bottom: 1px solid var(--border-subtle);
  padding: 8px 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.topbar-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.topbar-motto {
  font-style: italic;
  font-family: var(--font-serif);
  color: #e8d9c0;
}

/* Header & Barra di Navigazione */
.navbar-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(18, 16, 14, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-gold);
  box-shadow: 0 0 12px rgba(207, 168, 86, 0.3);
  transition: transform 0.3s ease;
}

.brand-link:hover .brand-logo {
  transform: scale(1.05);
}

.brand-title {
  font-family: "UnifrakturMaguntia", cursive;
  font-size: 1.45rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}
.unifrakturmaguntia-regular {
  font-family: "UnifrakturMaguntia", cursive;
  font-weight: 400;
  font-style: normal;
}
.brand-subtitle {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent-gold);
  display: block;
}

/* Nav Links */
.nav-menu {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  position: relative;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: var(--accent-gold-light);
  background: rgba(207, 168, 86, 0.12);
  border: 1px solid var(--border-strong);
  font-weight: 600;
}

/* Pulsanti */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.25s ease;
  cursor: pointer;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
  color: #000;
  box-shadow: 0 4px 15px rgba(207, 168, 86, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-gold-light), var(--accent-gold));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(207, 168, 86, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: var(--accent-gold);
}

.btn-outline-gold {
  background: transparent;
  color: var(--accent-gold-light);
  border: 1px solid var(--border-strong);
}

.btn-outline-gold:hover {
  background: rgba(207, 168, 86, 0.15);
}

/* Hamburger menu per mobile */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 6px;
}

/* Hero Section */
.hero {
  position: relative;
  padding: 70px 20px 90px;
  background: radial-gradient(circle at 50% 20%, #261619 0%, var(--bg-primary) 70%);
  border-bottom: 1px solid var(--border-subtle);
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 50px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(82, 19, 32, 0.6);
  border: 1px solid var(--border-strong);
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-gold-light);
  margin-bottom: 18px;
}

.hero-title {
  font-family: "UnifrakturMaguntia", cursive;
  font-size: 3.2rem;
  margin-bottom: 18px;
  color: #fff;
}

.hero-title em {
  font-style: italic;
  display: block;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-image-wrap {
  position: relative;
}

.hero-image-frame {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--border-strong);
  box-shadow: var(--shadow-lg), 0 0 35px rgba(207, 168, 86, 0.15);
}

.hero-image-frame img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.hero-image-frame:hover img {
  transform: scale(1.03);
}

.hero-caption {
  position: absolute;
  bottom: -20px;
  left: 20px;
  background: rgba(26, 23, 21, 0.95);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  box-shadow: var(--shadow-md);
}

.hero-caption strong {
  color: var(--accent-gold-light);
  display: block;
  font-size: 0.95rem;
}

.hero-caption span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Striscia Statistiche */
.stats-strip {
  max-width: 1200px;
  margin: 50px auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}

.stat-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 20px 14px;
  transition: border-color 0.3s;
}

.stat-box:hover {
  border-color: var(--border-strong);
}

.stat-number {
  font-size: 2.2rem;
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--accent-gold);
}

.stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Sezioni Standard */
.section {
  padding: 70px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 50px;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent-gold);
  font-weight: 600;
  margin-bottom: 8px;
}

.section-title {
  font-family: "UnifrakturMaguntia", cursive;
  font-size: 2.4rem;
  color: #fff;
  margin-bottom: 14px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Griglie e Card */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

/* Voci Corali (Soprani, Contralti, Tenori, Bassi) */
.voice-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px;
  text-align: center;
}

.voice-count {
  font-size: 2.5rem;
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--accent-gold);
}

.voice-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 6px;
}

.voice-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Progetto Speciale "I Suns de Nestre Tiare" */
.feature-box {
  background: linear-gradient(135deg, rgba(82, 19, 32, 0.4), rgba(26, 23, 21, 0.95));
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin: 40px 0;
  box-shadow: var(--shadow-md);
}

/* BAHCECA EVENTI & CARICAMENTO LOCANDINE */
.eventi-toolbar {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.search-box {
  display: flex;
  align-items: center;
  background: #0d0c0a;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  width: 320px;
  max-width: 100%;
}

.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.9rem;
  width: 100%;
  margin-left: 8px;
}

.search-box input::placeholder {
  color: #777;
}

.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill-btn {
  padding: 6px 14px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.2s;
}

.pill-btn:hover {
  color: #fff;
  border-color: var(--accent-gold);
}

.pill-btn.active {
  background: var(--accent-gold);
  color: #000;
  font-weight: 700;
  border-color: var(--accent-gold);
}

/* Schede Locandine */
.locandine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

.locandina-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.locandina-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-md), 0 0 20px rgba(207, 168, 86, 0.15);
}

.locandina-poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  background: #000;
  overflow: hidden;
  cursor: pointer;
}

.locandina-poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.locandina-poster-wrap:hover img {
  transform: scale(1.04);
}

.badge-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  z-index: 2;
}

.badge-upcoming {
  background: #1b8543;
  color: #fff;
}

.badge-year {
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--border-strong);
  color: var(--accent-gold-light);
}

.badge-entry {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.72rem;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.locandina-body {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.locandina-date {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-gold);
  margin-bottom: 6px;
}

.locandina-title {
  font-size: 1.35rem;
  margin-bottom: 6px;
  color: #fff;
}

.locandina-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 12px;
}

.locandina-location {
  font-size: 0.85rem;
  color: #d1c8be;
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.locandina-participants {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: auto;
}

.locandina-participants strong {
  color: #e5c479;
  display: block;
  margin-bottom: 4px;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
}

.locandina-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Modale di Caricamento Nuova Locandina */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  max-width: 760px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  padding: 30px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: #fff;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent-gold-light);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: #0d0c0a;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.92rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.upload-dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 24px;
  text-align: center;
  background: rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}

.upload-dropzone:hover {
  border-color: var(--accent-gold);
  background: rgba(207, 168, 86, 0.05);
}

.poster-preview-box {
  margin-top: 12px;
  max-height: 200px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  display: none;
  justify-content: center;
  background: #000;
}

.poster-preview-box img {
  max-height: 200px;
  object-fit: contain;
}

/* Lightbox Immagine Ingrandita */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(10px);
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-container {
  max-width: 950px;
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  max-height: 85vh;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.lightbox-img-pane {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.lightbox-img-pane img {
  max-height: 75vh;
  max-width: 100%;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.lightbox-info-pane {
  padding: 28px;
  overflow-y: auto;
}

/* Galleria Fotografica */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}

/* Footer Ufficiale */
.site-footer {
  background: #090807;
  border-top: 1px solid var(--border-subtle);
  padding: 60px 20px 30px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-title {
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 16px;
  font-family: var(--font-serif);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a:hover {
  color: var(--accent-gold);
}

.social-links {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}

.social-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  font-size: 0.9rem;
  transition: all 0.2s;
}

.social-btn:hover {
  background: var(--accent-gold);
  color: #000;
  border-color: var(--accent-gold);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-cta {
    justify-content: center;
  }
  .hero-title {
    font-size: 2.5rem;
  }
  .stats-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    grid-template-columns: 1fr;
  }
  .lightbox-container {
    grid-template-columns: 1fr;
  }
  .lightbox-img-pane img {
    max-height: 40vh;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    flex-direction: column;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-strong);
    display: none;
    box-shadow: var(--shadow-lg);
  }
  .nav-menu.open {
    display: flex;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
}
