/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black: #1a1a1a;
  --white: #f5f5f0;
  --gold: #c9a84c;
  --gold-light: #e8c97a;
  --gray: #4a4a4a;
  --gray-light: #e8e8e4;
  --section-dark: #2a2a2a;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(8px);
  transition: box-shadow 0.3s;
}

.navbar.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.4); }

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--white);
  font-family: var(--font-serif);
  font-size: 1.1rem;
}

.nav-logo img {
  height: 40px;
  width: auto;
  opacity: 0.6;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: var(--gray-light);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--gold); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: all 0.3s;
}

.nav-social {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-social a {
  color: var(--gray-light);
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.nav-social a:hover { color: var(--gold); }

@media (max-width: 768px) {
  .nav-social { display: none; }
}
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.carousel {
  position: absolute;
  inset: 0;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.carousel-slide.active { opacity: 1; }

.carousel-dots {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.6rem;
  z-index: 2;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.7);
  background: transparent;
  cursor: pointer;
  transition: background 0.3s;
  padding: 0;
}

.dot.active { background: var(--gold); border-color: var(--gold); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.75) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  color: var(--white);
  padding: 2rem;
}

.hero-logo {
  width: 120px;
  height: auto;
  margin: 0 auto 1.5rem;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
  opacity: 0.6;
}

.hero-content h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--gray-light);
  margin-bottom: 2rem;
  font-weight: 300;
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-block;
  background: var(--gold);
  color: var(--black);
  padding: 0.85rem 2.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
}

/* ===== SECTIONS ===== */
.section { padding: 5rem 0; }

.section-dark {
  background: var(--section-dark);
  color: var(--white);
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--gold);
  margin: 0.75rem auto 0;
}

/* ===== CHI SIAMO ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text p { margin-bottom: 1rem; color: var(--gray); font-size: 1.05rem; }

.affiliazioni {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.affiliazioni-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gray);
}

.affiliazioni-loghi {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.affiliazioni-loghi a {
  opacity: 0.75;
  transition: opacity 0.2s;
}

.affiliazioni-loghi a:hover { opacity: 1; }

.affiliazioni-loghi img {
  height: 90px;
  width: auto;
  object-fit: contain;
}

/* ===== CARDS ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(201,168,76,0.3);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.card h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  color: var(--gold);
}

.card p { font-size: 0.9rem; color: #ccc; }

/* ===== CALENDARIO ===== */
.events-list { display: flex; flex-direction: column; gap: 1rem; }

.event-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  border-left: 4px solid var(--gold);
  background: var(--gray-light);
  transition: background 0.2s;
}

.event-item:hover { background: #ddd; }

.event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 56px;
  text-align: center;
}

.event-day {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.event-month {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray);
}

.event-info h3 { font-size: 1.05rem; margin-bottom: 0.25rem; }
.event-info p { font-size: 0.9rem; color: var(--gray); }

/* ===== SLIDESHOW GALLERIA ===== */
.slideshow {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.slideshow-track {
  flex: 1;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #111;
}

.slide-img {
  display: none;
  width: 100%;
  height: 100%;
}

.slide-img.active { display: block; }

.slide-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-arrow {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(201,168,76,0.4);
  color: var(--gold);
  font-size: 2.5rem;
  line-height: 1;
  width: 48px;
  height: 48px;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

.slide-arrow:hover { background: rgba(201,168,76,0.2); }

.slideshow-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.slideshow-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.5);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.3s;
}

.slideshow-dots .dot.active { background: var(--gold); border-color: var(--gold); }

@media (max-width: 768px) {
  .slide-arrow { width: 36px; height: 36px; font-size: 1.8rem; }
}

/* ===== CONTATTI ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  color: var(--gold);
}

.contact-info p { margin-bottom: 0.5rem; color: var(--gray); }
.contact-info a:hover { color: var(--gold); }

.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }

.form-group { display: flex; flex-direction: column; gap: 0.4rem; }

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gray);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-light);
  background: var(--white);
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--black);
  transition: border-color 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
}

.form-group textarea { resize: vertical; }

.form-feedback {
  font-size: 0.9rem;
  color: var(--gold);
  min-height: 1.2em;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--black);
  color: #888;
  text-align: center;
  padding: 1.5rem;
  font-size: 0.85rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: rgba(26,26,26,0.98);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.25rem;
  }

  .nav-links.open { display: flex; }

  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-stats { grid-template-columns: repeat(3, 1fr); }

  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
}

/* ===== GDPR ===== */
.form-check {
  flex-direction: row !important;
  align-items: flex-start;
  gap: 0.75rem;
}

.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--gold);
  cursor: pointer;
}

.form-check label {
  font-size: 0.85rem;
  text-transform: none !important;
  letter-spacing: 0 !important;
  color: var(--gray);
  cursor: pointer;
}

.form-check label a { color: var(--gold); text-decoration: underline; }

.privacy-content h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
  color: var(--gold);
}

.privacy-content p { color: var(--gray); margin-bottom: 0.5rem; }
.privacy-content a { color: var(--gold); text-decoration: underline; }

.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(26,26,26,0.97);
  color: var(--gray-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 2rem;
  z-index: 200;
  font-size: 0.85rem;
  flex-wrap: wrap;
}

.cookie-banner a { color: var(--gold); text-decoration: underline; }

.cookie-banner.hidden { display: none; }

.footer a { color: #aaa; text-decoration: underline; }
.footer a:hover { color: var(--gold); }

.btn-dark {
  background: var(--black);
  color: var(--gold);
  border: 1px solid var(--gold);
}

.btn-dark:hover {
  background: var(--gold);
  color: var(--black);
}

/* ===== TORNEI ===== */
.torneo-card {
  border: 1px solid var(--gray-light);
  margin-bottom: 2rem;
}

.torneo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.torneo-header h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.torneo-meta { font-size: 0.9rem; color: var(--gray); }

.torneo-tabella { padding: 0 1.5rem 1.5rem; overflow-x: auto; }

.classifica-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.classifica-table th {
  background: var(--black);
  color: var(--gold);
  padding: 0.6rem 1rem;
  text-align: left;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.classifica-table td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--gray-light);
  color: var(--gray);
}

.classifica-table tr.primo td  { background: #fff8dc; color: var(--black); font-weight: 600; border-left: 4px solid #ffd700; }
.classifica-table tr.secondo td { background: #f0f0f0; color: var(--black); font-weight: 600; border-left: 4px solid #c0c0c0; }
.classifica-table tr.terzo td  { background: #fdf0e8; color: var(--black); font-weight: 600; border-left: 4px solid #cd7f32; }

.classifica-table tbody tr:hover td { background: #f0f0f0; }

/* ===== TABS ABBINAMENTI ===== */
.torneo-btns { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.torneo-sezione { padding: 0 1.5rem 1.5rem; overflow-x: auto; }

.active-btn {
  background: var(--gold) !important;
  color: var(--black) !important;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tab-btn {
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--gray-light);
  background: var(--white);
  cursor: pointer;
  transition: all 0.2s;
  color: var(--gray);
}

.tab-btn:hover { border-color: var(--gold); color: var(--black); }
.tab-btn.active { background: var(--black); color: var(--gold); border-color: var(--black); }

.tab-content { display: none; }
.tab-content.active { display: block; }

.risultato { text-align: center; font-weight: 600; color: var(--black); }
