:root {
  --purple: #5D5FEF;
  --purple-dark: #4A4CD6;
  --navy: #241F5C;
  --dark: #1D1E20;
  --gray-bg: #F7F7FA;
  --text-muted: #5A5C63;
  --radius: 14px;
  --font-heading: 'Lato', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

/* Scroll reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

body {
  font-family: var(--font-body);
  color: var(--dark);
  line-height: 1.6;
}

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

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

a { text-decoration: none; color: inherit; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  font-family: var(--font-heading);
}

.logo-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  flex-shrink: 0;
}

.main-nav {
  display: flex;
  gap: 32px;
}

.main-nav a {
  font-size: 0.95rem;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: border-color .2s;
}

.main-nav a.active,
.main-nav a:hover {
  border-color: var(--purple);
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}
.burger span {
  width: 24px;
  height: 2px;
  background: var(--dark);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: transform .15s, background .2s;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--purple);
  color: #fff;
}
.btn-primary:hover { background: var(--purple-dark); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--dark);
  color: var(--dark);
}
.btn-outline:hover { background: var(--dark); color: #fff; }

.btn-dark {
  background: var(--dark);
  color: #fff;
}
.btn-dark:hover { background: #000; }

.section-cta {
  margin-top: 40px;
}

/* Page hero (inner pages) */
.page-hero {
  padding: 64px 0 24px;
  text-align: center;
}

.page-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 8px;
}

.page-hero .section-subtitle {
  margin-bottom: 0;
}

/* Hero */
.hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: url('https://images.unsplash.com/photo-1757147517623-ee9a76c9ead2?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
  color: #fff;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 25, 0.55);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  padding: 0 24px;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  margin-bottom: 16px;
}

.hero p {
  font-size: 1.1rem;
  margin-bottom: 32px;
  opacity: 0.95;
}

/* Sections */
.section {
  padding: 96px 0;
}

.section-gray {
  background: var(--gray-bg);
}

.section-title {
  font-size: 2rem;
  margin-bottom: 8px;
}

.section-subtitle {
  color: var(--text-muted);
  margin-bottom: 40px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.two-col.reverse .col-media { order: -1; }

.col-text h2 {
  font-size: 2.2rem;
  margin-bottom: 20px;
}

.col-text p {
  color: var(--text-muted);
  margin-bottom: 28px;
  max-width: 480px;
}

.col-media {
  position: relative;
}

.col-media img {
  border-radius: var(--radius);
  width: 100%;
  height: 420px;
  object-fit: cover;
}

.stats-box {
  position: absolute;
  bottom: -28px;
  left: 24px;
  right: 24px;
  background: var(--purple);
  color: #fff;
  border-radius: var(--radius);
  display: flex;
  gap: 40px;
  padding: 28px 32px;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Blog */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.blog-card img {
  border-radius: var(--radius);
  height: 220px;
  width: 100%;
  object-fit: cover;
  margin-bottom: 20px;
}

.blog-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.blog-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.blog-card .meta {
  font-size: 0.85rem;
  color: #9698a0;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.gallery-grid img {
  border-radius: var(--radius);
  height: 220px;
  object-fit: cover;
}

/* Newsletter */
.newsletter {
  background: var(--gray-bg);
  text-align: center;
}

.newsletter-inner {
  max-width: 480px;
}

.newsletter h2 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.newsletter p {
  color: var(--text-muted);
  margin-bottom: 28px;
}

.newsletter form label,
.footer-col form label {
  display: block;
  text-align: left;
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.newsletter form input,
.footer-col form input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #d9dade;
  border-radius: 10px;
  margin-bottom: 20px;
  font-family: inherit;
  font-size: 0.95rem;
}

.form-success {
  margin-top: 16px;
  color: var(--purple);
  font-weight: 500;
}

/* Stations grid (Cos'è Hyrox) */
.stations-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.station-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px 20px;
}

.station-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  font-weight: 700;
  margin-bottom: 16px;
}

.station-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.station-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* FAQ */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  background: #fff;
  border-radius: 10px;
  padding: 18px 24px;
  margin-bottom: 12px;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  float: right;
  font-weight: 400;
  color: var(--purple);
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item p {
  color: var(--text-muted);
  margin-top: 12px;
}

/* Testimonial */
.testimonial {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.testimonial-stars {
  color: var(--purple);
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.testimonial-quote {
  font-size: 1.3rem;
  font-family: var(--font-heading);
  margin-bottom: 16px;
}

.testimonial-author {
  color: var(--text-muted);
}

/* Article */
.article-container {
  max-width: 760px;
}

.breadcrumb {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.breadcrumb a { text-decoration: underline; }

.article h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: 12px;
}

.article .meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 28px;
  display: block;
}

.article-cover {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 32px;
}

.article h2 {
  font-size: 1.4rem;
  margin: 36px 0 16px;
}

.article p {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.article-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 0.9rem;
}

.article-table th, .article-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
  color: var(--text-muted);
}

.article-table th {
  color: var(--dark);
  font-weight: 700;
}

.article-note {
  font-size: 0.85rem;
  font-style: italic;
  border-top: 1px solid #eee;
  padding-top: 20px;
  margin-top: 20px;
}

/* Event contact form (Eventi page) */
.contact-section .col-text p { max-width: none; }

.event-form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #d9dade;
  border-radius: 10px;
  margin-bottom: 20px;
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
}

.event-form label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.event-form input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #d9dade;
  border-radius: 10px;
  margin-bottom: 20px;
  font-family: inherit;
  font-size: 0.95rem;
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: #fff;
  padding: 72px 0 24px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-col h3 { font-size: 1.4rem; margin-bottom: 12px; }
.footer-col h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.7; margin-bottom: 6px; margin-top: 16px; }
.footer-col p { opacity: 0.85; margin-bottom: 4px; }

.social-icons {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.social-icons a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
}

.footer-col form input {
  background: #fff;
  color: var(--dark);
  border: none;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 24px;
  font-size: 0.85rem;
  opacity: 0.7;
}

/* Responsive */
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
  .two-col.reverse .col-media { order: 0; }
  .blog-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .stations-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid #eee;
    box-shadow: 0 12px 24px rgba(0,0,0,0.06);
  }
  .main-nav.open { display: flex; }
  .main-nav a {
    padding: 16px 24px;
    border-bottom: 1px solid #f2f2f4;
  }
  .main-nav a.active, .main-nav a:hover { border-bottom: 1px solid #f2f2f4; background: var(--gray-bg); }
  .burger { display: flex; }
  .burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .burger.open span:nth-child(2) { opacity: 0; }
  .burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .blog-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .stations-grid { grid-template-columns: 1fr; }
  .stats-box { position: static; margin-top: 20px; flex-wrap: wrap; }
  .col-media img { height: 280px; }
  .article-cover { height: 220px; }
}
