@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300..700&family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap');

/* ==========================================================================
   Design System & Variables
   ========================================================================== */
:root {
  /* Color Palette */
  --bg-cream: #FCFBF7;
  --bg-white: #FFFFFF;
  --text-dark: #2F3E46;
  --text-muted: #4F606D;
  
  --color-terracotta: #E07A5F;
  --color-terracotta-light: #FBEBE8;
  --color-sage: #81B29A;
  --color-sage-light: #EBF5F0;
  --color-yellow: #F2CC8F;
  --color-yellow-light: #FEF9F0;
  --color-blue: #3D405B;
  --color-blue-light: #EBECEF;
  --color-sky: #A8DADC;
  --color-sky-light: #F0F9F9;
  
  /* Typography */
  --font-headers: 'Fredoka', 'Quicksand', system-ui, -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
  
  /* Spacings & Border Radii */
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 4px 15px rgba(61, 64, 91, 0.04);
  --shadow-md: 0 8px 25px rgba(61, 64, 91, 0.06);
  --shadow-lg: 0 15px 35px rgba(61, 64, 91, 0.1);
  
  /* Transitions */
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
}

/* ==========================================================================
   Base Styles (Mobile First)
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 15px; /* Slightly smaller base font for mobile */
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-cream);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

h1, h2, h3, h4 {
  font-family: var(--font-headers);
  font-weight: 600;
  color: var(--color-blue);
  line-height: 1.25;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }

p {
  color: var(--text-dark);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-padding {
  padding: 4rem 0; /* Shorter padding on mobile */
  position: relative;
}

.text-center { text-align: center; }
.text-terracotta { color: var(--color-terracotta); }
.text-sage { color: var(--color-sage); }
.text-yellow { color: #9E6D19; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-headers);
  font-weight: 500;
  font-size: 1rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
  width: 100%; /* Full width buttons on mobile */
  text-align: center;
}

.btn-primary {
  background-color: var(--color-terracotta);
  color: var(--bg-white);
}

.btn-primary:hover {
  background-color: #d16b50;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background-color: var(--color-sage);
  color: var(--bg-white);
}

.btn-secondary:hover {
  background-color: #72a38b;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-blue);
  border: 2px solid var(--color-blue);
}

.btn-outline:hover {
  background-color: var(--color-blue);
  color: var(--bg-white);
  transform: translateY(-2px);
}

/* ==========================================================================
   Page Headers (for inner pages)
   ========================================================================== */
.page-header {
  background-color: var(--color-sky-light);
  padding: 7rem 0 3rem; /* padding top accounts for fixed navbar */
  text-align: center;
  border-bottom: 1px solid var(--color-blue-light);
  position: relative;
  overflow: hidden;
}

.page-title {
  font-size: 2.8rem;
  margin-bottom: 0.75rem;
}

.breadcrumbs {
  font-family: var(--font-headers);
  font-size: 0.95rem;
  color: var(--text-muted);
}

.breadcrumbs a {
  color: var(--color-terracotta);
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 1rem 0;
  background-color: rgba(252, 251, 247, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-headers);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-blue);
  white-space: nowrap;
}

.logo img {
  height: 58px;
  width: auto;
  display: block;
}

.logo-text span {
  display: block;
  font-size: 0.7rem;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* Mobile Nav Menu styles */
.mobile-nav-toggle {
  background: none;
  border: none;
  cursor: pointer;
  z-index: 110;
  padding: 0.25rem;
}

.mobile-nav-toggle span {
  display: block;
  width: 24px;
  height: 3px;
  background-color: var(--color-blue);
  margin: 4px 0;
  transition: var(--transition-smooth);
}

.nav-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background-color: var(--bg-cream);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  list-style: none;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-smooth);
  z-index: 105;
}

.nav-menu.open {
  right: 0;
}

.mobile-nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.mobile-nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.nav-link {
  font-family: var(--font-headers);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--color-blue);
  padding: 0.5rem 0;
  position: relative;
  white-space: nowrap;
}

.nav-link.active, .nav-link:hover {
  color: var(--color-terracotta);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  min-height: 75vh;
  display: flex;
  align-items: center;
  padding-top: 7.5rem;
  padding-bottom: 3rem;
  background-color: var(--bg-cream);
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 2rem;
  text-align: center;
}

.hero-content {
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-tagline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--color-sage-light);
  color: var(--color-sage);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-family: var(--font-headers);
  font-weight: 500;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

.hero-title {
  font-size: 2.8rem;
  color: var(--color-blue);
  margin-bottom: 1.25rem;
}

.hero-title span {
  color: var(--color-terracotta);
}

.hero-description {
  font-size: 1.05rem;
  color: var(--text-dark);
  margin-bottom: 2rem;
  max-width: 500px;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 1rem;
}

.hero-image-container {
  position: relative;
  z-index: 2;
  max-width: 100%;
  margin: 0 auto;
  width: 100%;
}

.hero-illustration {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.illustration-main {
  width: 97%;
  height: 97%;
  border-radius: 60% 40% 60% 40% / 40% 60% 40% 60%;
  background: var(--color-yellow-light);
  overflow: hidden;
  position: relative;
  border: 4px solid var(--color-yellow);
  box-shadow: var(--shadow-lg);
}

.illustration-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

/* Hide floating design details on smaller screens to avoid clutter */
.floating-child-element {
  display: none;
}

/* ==========================================================================
   Section Headers
   ========================================================================== */
.section-header {
  max-width: 650px;
  margin: 0 auto 3.5rem;
  text-align: center;
}

.section-tag {
  font-family: var(--font-headers);
  color: var(--color-terracotta);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
}

/* ==========================================================================
   Polo cards on Home (Polo Didattico overview)
   ========================================================================== */
.polo-home-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.polo-card {
  background-color: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-blue-light);
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

.polo-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.polo-card-img {
  height: 200px;
  overflow: hidden;
}

.polo-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.polo-card-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex-grow: 1;
}

.polo-card-title {
  font-size: 1.6rem;
}

.polo-card-desc {
  font-size: 0.95rem;
  color: var(--text-dark);
}

.polo-card-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--font-headers);
  color: var(--color-terracotta);
  font-weight: 600;
  align-self: flex-start;
}

.polo-card-link:hover {
  color: var(--color-blue);
}

/* ==========================================================================
   Instagram Section (Feed Mockup)
   ========================================================================== */
.instagram-section {
  background-color: var(--color-yellow-light);
}

.instagram-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 colonne su mobile */
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.instagram-post {
  position: relative;
  aspect-ratio: 4 / 5; /* Formato portrait Instagram */
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--bg-white);
  background-color: var(--color-blue-light);
}

.instagram-post img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.instagram-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(61, 64, 91, 0.85);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: var(--transition-smooth);
  color: var(--bg-white);
  padding: 1rem;
  text-align: center;
  font-size: 0.85rem;
}

.instagram-overlay svg {
  width: 28px;
  height: 28px;
  margin-bottom: 0.5rem;
  fill: currentColor;
}

.instagram-stats {
  display: flex;
  gap: 1rem;
  font-family: var(--font-headers);
  font-weight: 500;
  margin-top: 0.25rem;
}

.instagram-post:hover .instagram-overlay {
  opacity: 1;
}

.instagram-post:hover img {
  transform: scale(1.05);
}

/* ==========================================================================
   History Section (Chi Siamo)
   ========================================================================== */
.history-layout {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.history-images {
  position: relative;
  max-width: 100%;
}

.history-img-wrapper {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 4px solid var(--color-sage);
  box-shadow: var(--shadow-lg);
}

.history-img-wrapper img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.history-badge {
  position: absolute;
  bottom: -15px;
  right: 10px;
  background-color: var(--color-yellow);
  color: var(--color-blue);
  padding: 0.75rem;
  border-radius: 50%;
  width: 130px;
  height: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-headers);
  box-shadow: var(--shadow-lg);
  border: 3px solid var(--bg-cream);
  z-index: 2;
  text-align: center;
  line-height: 1.25;
}

.history-badge .years {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.history-badge .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 600;
  line-height: 1.2;
}

.history-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.history-lead {
  font-size: 1.15rem;
  color: var(--color-blue);
  font-weight: 600;
}

.history-text {
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.history-director {
  margin-top: 1rem;
  padding: 1.25rem;
  background-color: var(--color-yellow-light);
  border-radius: var(--radius-md);
  border-left: 5px solid var(--color-yellow);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.director-info h4 {
  font-size: 1rem;
}

.director-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Polo Didattico (Pagine Esterne & Tabs-like sections)
   ========================================================================== */
.polo-sections {
  display: flex;
  flex-direction: column;
  gap: 5rem;
}

.polo-section-block {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.polo-section-block-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 4px solid var(--bg-white);
  height: 250px;
}

.polo-section-block-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.polo-section-block-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.service-features-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.service-feature-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-headers);
  color: var(--color-blue);
  font-size: 0.95rem;
}

.service-feature-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ==========================================================================
   Daily Routine (La Giornata Tipo)
   ========================================================================== */
.routine-section {
  background-color: var(--color-yellow-light);
}

.routine-timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 0;
}

.routine-timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 15px; /* Align to the left on mobile */
  width: 4px;
  background-color: var(--color-yellow);
  border-radius: 2px;
}

.routine-item {
  position: relative;
  width: 100%;
  padding-left: 40px; /* Offset text to the right on mobile */
  padding-bottom: 2rem;
  box-sizing: border-box;
}

.routine-dot {
  position: absolute;
  top: 0.25rem;
  left: 7px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--color-terracotta);
  border: 4px solid var(--bg-white);
  box-shadow: var(--shadow-sm);
  z-index: 2;
}

.routine-time {
  font-family: var(--font-headers);
  font-size: 1.2rem;
  color: var(--color-terracotta);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.routine-card {
  background-color: var(--bg-white);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.routine-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.routine-card p {
  font-size: 0.9rem;
  color: var(--text-dark);
}

/* Routine Tabs */
.routine-tabs-nav {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.routine-tab-btn {
  background: var(--bg-white);
  border: 2px solid var(--color-blue-light);
  color: var(--color-blue);
  font-family: var(--font-headers);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.8rem 1.6rem;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-sm);
}

.routine-tab-btn:hover {
  transform: translateY(-2px);
  border-color: var(--color-terracotta);
}

.routine-tab-btn.active {
  background-color: var(--color-blue);
  color: var(--bg-white);
  border-color: var(--color-blue);
  box-shadow: var(--shadow-md);
}

.routine-tab-btn[data-routine-target="routine-nido"].active {
  background-color: var(--color-terracotta);
  border-color: var(--color-terracotta);
  color: var(--bg-white);
}

.routine-tab-btn[data-routine-target="routine-primavera"].active {
  background-color: #c99335;
  border-color: #c99335;
  color: var(--bg-white);
}

.routine-tab-btn[data-routine-target="routine-infanzia"].active {
  background-color: var(--color-sage);
  border-color: var(--color-sage);
  color: var(--bg-white);
}

.routine-tab-pane {
  display: none;
}

.routine-tab-pane.active {
  display: block;
  animation: fadeIn 0.35s ease;
}

.routine-pane-header {
  text-align: center;
  margin-bottom: 2rem;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

.routine-pane-badge {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.35rem 1rem;
  border-radius: 50px;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   Progetti Page (Grid of Projects)
   ========================================================================== */
.progetti-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.progetto-card-detail {
  background-color: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-blue-light);
  display: flex;
  flex-direction: column;
}

.progetto-card-detail-img {
  height: 200px;
}

.progetto-card-detail-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.progetto-card-detail-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.progetto-card-detail-title {
  font-size: 1.6rem;
}

.progetto-card-detail-desc {
  font-size: 0.95rem;
  color: var(--text-dark);
}

.progetti-labs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.project-card {
  background-color: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-blue-light);
  border-bottom: 4px solid var(--color-blue-light);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.project-card[data-color="blue"] {
  border-bottom-color: var(--color-blue);
  .project-icon { background-color: var(--color-blue-light); color: var(--color-blue); }
}
.project-card[data-color="sage"] {
  border-bottom-color: var(--color-sage);
  .project-icon { background-color: var(--color-sage-light); color: var(--color-sage); }
}
.project-card[data-color="terracotta"] {
  border-bottom-color: var(--color-terracotta);
  .project-icon { background-color: var(--color-terracotta-light); color: var(--color-terracotta); }
}
.project-card[data-color="yellow"] {
  border-bottom-color: var(--color-yellow);
  .project-icon { background-color: var(--color-yellow-light); color: #c49950; }
}

.project-card h3 {
  font-size: 1.25rem;
}

.project-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Segreteria & Iscrizioni
   ========================================================================== */
.iscrizioni-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.hours-card {
  background-color: var(--color-sage-light);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-sage);
}

.hours-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  color: var(--color-sage);
}

.hours-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  list-style: none;
}

.hours-item {
  display: flex;
  flex-direction: column;
  border-bottom: 1px dashed rgba(129, 178, 154, 0.4);
  padding-bottom: 0.75rem;
}

.hours-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.hours-label {
  font-family: var(--font-headers);
  font-weight: 600;
  color: var(--color-blue);
  font-size: 1rem;
}

.hours-value {
  font-size: 0.9rem;
  color: var(--text-dark);
}

.extra-services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.extra-service-card {
  background-color: var(--bg-white);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-blue-light);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.extra-service-card svg {
  width: 24px;
  height: 24px;
  color: var(--color-terracotta);
  flex-shrink: 0;
}

.extra-service-card h4 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.extra-service-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Documents / Downloads grid */
.docs-filters {
  display: flex;
  justify-content: flex-start;
  gap: 0.5rem;
  margin-bottom: 2rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  white-space: nowrap;
}

.filter-btn {
  background-color: transparent;
  border: 1px solid var(--color-blue);
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  font-family: var(--font-headers);
  color: var(--color-blue);
  cursor: pointer;
  font-size: 0.85rem;
}

.filter-btn.active, .filter-btn:hover {
  background-color: var(--color-blue);
  color: var(--bg-white);
}

.docs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.doc-card {
  background-color: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--color-blue-light);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.doc-type-icon {
  width: 40px;
  height: 40px;
  background-color: var(--color-terracotta-light);
  color: var(--color-terracotta);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.doc-title {
  font-size: 1.05rem;
  font-family: var(--font-headers);
}

.doc-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.doc-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--font-headers);
  color: var(--color-terracotta);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ==========================================================================
   Contatti & Form Page
   ========================================================================== */
.contact-page-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-icon {
  width: 44px;
  height: 44px;
  background-color: var(--bg-white);
  color: var(--color-blue);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  border: 1px solid var(--color-blue-light);
}

.contact-details h4 {
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.contact-details p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.contact-form-container {
  background-color: var(--bg-white);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-blue-light);
}

.contact-form-container h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-family: var(--font-headers);
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--color-blue);
  font-size: 0.9rem;
}

.form-input, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-blue-light);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--color-sage);
  box-shadow: 0 0 0 3px rgba(129, 178, 154, 0.2);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

/* ==========================================================================
   FAQ Section (Accordion)
   ========================================================================== */
.faq-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  border: 1px solid var(--color-blue-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--bg-white);
}

.faq-header {
  padding: 1.2rem 1.5rem;
  background-color: var(--bg-cream);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.faq-header h4 {
  font-size: 1.05rem;
}

.faq-icon-arrow {
  width: 20px;
  height: 20px;
  transition: var(--transition-smooth);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-content-inner {
  padding: 1.5rem;
  border-top: 1px solid var(--color-blue-light);
  font-size: 0.95rem;
}

.faq-item.active {
  border-color: var(--color-sage);
  .faq-icon-arrow {
    transform: rotate(180deg);
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background-color: var(--color-blue);
  color: var(--bg-white);
  padding: 3.5rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 2.5rem;
  margin-bottom: 1.5rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-logo {
  height: 50px;
  width: auto;
  margin-bottom: 0.25rem;
  align-self: flex-start;
  background-color: var(--bg-white);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  display: inline-block;
}

.footer-brand-title {
  font-family: var(--font-headers);
  font-size: 1.35rem;
  color: var(--color-yellow);
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-nav-title {
  font-family: var(--font-headers);
  font-size: 1.05rem;
  color: var(--color-sky);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.footer-link {
  color: rgba(255, 255, 255, 0.7);
}

.footer-link:hover {
  color: var(--color-yellow);
  padding-left: 2px;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 1rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
}

.footer-bottom p,
.footer-bottom p a {
  color: rgba(255, 255, 255, 0.7) !important;
}

.footer-legal-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.footer-legal-links a:hover {
  color: var(--color-yellow);
}

.footer-legal-info {
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  text-align: left;
  max-width: 800px;
}

/* ==========================================================================
   Scroll reveal animations
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}


/* ==========================================================================
   MEDIA QUERIES (Scaling up for Tablet / Desktop)
   ========================================================================== */

/* Tablet & Smaller Desktops (768px and up) */
@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
  
  .section-padding {
    padding: 6rem 0;
  }

  .btn {
    width: auto;
  }
  
  /* Hero */
  .hero-buttons {
    flex-direction: row;
    width: auto;
  }
  
  /* Grid Layouts */
  .polo-home-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .progetti-detail-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .progetti-labs-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .comodita-services {
    grid-template-columns: repeat(2, 1fr);
  }

  .extra-services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .docs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .instagram-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* History */
  .history-badge {
    bottom: -30px;
    right: -20px;
    width: 145px;
    height: 145px;
    padding: 1rem;
  }
  .history-badge .years { font-size: 1.5rem; }
  .history-img-wrapper img {
    height: 380px;
  }

  /* Routine Timeline (Center-aligned line) */
  .routine-timeline::before {
    left: 50%;
    transform: translateX(-50%);
  }
  .routine-item {
    width: 50%;
    padding: 1rem 2.5rem;
  }
  .routine-item:nth-child(odd) {
    left: 0;
    text-align: right;
    padding-left: 0;
    padding-right: 2.5rem;
  }
  .routine-item:nth-child(even) {
    left: 50%;
    text-align: left;
    padding-left: 2.5rem;
  }
  .routine-dot {
    top: 2rem;
    left: auto;
  }
  .routine-item:nth-child(odd) .routine-dot {
    right: -10px;
  }
  .routine-item:nth-child(even) .routine-dot {
    left: -10px;
  }
  
  /* Footer */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
}

/* Large Desktops (1024px and up) */
@media (min-width: 1024px) {
  /* Navigation Menu (Horizontal Desktop layout) */
  .mobile-nav-toggle {
    display: none;
  }
  
  .nav-menu {
    position: static;
    width: auto;
    height: auto;
    background-color: transparent;
    flex-direction: row;
    justify-content: flex-end;
    gap: 1.75rem;
    box-shadow: none;
    flex-wrap: nowrap;
  }
  
  .nav-link {
    font-size: 1rem;
    padding: 0.25rem 0;
    white-space: nowrap;
  }
  
  .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--color-terracotta);
    border-radius: 2px;
    transition: var(--transition-smooth);
  }
  
  .nav-link:hover::after,
  .nav-link.active::after {
    width: 100%;
  }

  /* Hero Section */
  .hero-grid {
    grid-template-columns: 1fr 1.1fr;
    text-align: left;
    gap: 3rem;
  }
  .hero-content {
    align-items: flex-start;
  }
  .hero-title {
    font-size: 3.8rem;
  }
  .hero-description {
    font-size: 1.15rem;
  }
  .hero-image-container {
    max-width: 100%;
    margin: 0;
  }
  .floating-child-element {
    display: block;
    position: absolute;
    z-index: 10;
    filter: drop-shadow(0 6px 12px rgba(61, 64, 91, 0.15));
  }
  /* Floating clouds & sun overlapping the blob image */
  .el-sun     { top: -25px;  left: -20px;  animation: spin-soft 30s infinite linear; }
  .el-cloud-1 { top: -20px;  right: 12%;   animation: float-item 4s   infinite ease-in-out alternate; }
  .el-cloud-2 { bottom: -20px; left: 18%;  animation: float-item 5s   infinite ease-in-out alternate-reverse; }
  .el-cloud-3 { top: 30%;    left: -30px;  animation: float-item 3.5s infinite ease-in-out alternate; }
  .el-cloud-4 { top: 15%;    right: -25px; animation: float-item 6s   infinite ease-in-out alternate-reverse; }
  .el-cloud-5 { bottom: 10%; right: -20px; animation: float-item 4.5s infinite ease-in-out alternate; }
  
  /* Home Grid */
  .polo-home-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .instagram-grid {
    grid-template-columns: repeat(6, 1fr); /* 6 colonne: tutti i post in una sola riga */
    gap: 0.6rem;
  }

  /* History (Chi Siamo) */
  .history-layout {
    flex-direction: row;
    align-items: center;
    gap: 5rem;
  }
  .history-images, .history-content {
    width: 50%;
  }
  .history-img-wrapper img {
    height: 450px;
  }
  .history-badge {
    bottom: -30px;
    right: -30px;
    width: 135px;
    height: 135px;
    padding: 2rem;
  }
  .history-badge .years { font-size: 1.7rem; }

  /* Polo Didattico Sections Layout */
  .polo-section-block {
    flex-direction: row;
    align-items: center;
    gap: 4rem;
  }
  .polo-section-block:nth-child(even) {
    flex-direction: row-reverse;
  }
  .polo-section-block-image, .polo-section-block-content {
    width: 50%;
  }
  .polo-section-block-image {
    height: 380px;
  }
  .service-features-list {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Progetti Page */
  .progetti-detail-grid {
    gap: 3.5rem;
  }
  .progetto-card-detail {
    flex-direction: row;
    align-items: center;
  }
  .progetto-card-detail:nth-child(even) {
    flex-direction: row-reverse;
  }
  .progetto-card-detail-img, .progetto-card-detail-content {
    width: 50%;
  }
  .progetto-card-detail-img {
    height: 340px;
  }
  .progetti-labs-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Segreteria & Iscrizioni */
  .iscrizioni-layout {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
  .docs-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Contatti Page */
  .contact-page-grid {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 5rem;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 4rem;
  }
}


@keyframes float-item {
  0% { transform: translateY(0); }
  100% { transform: translateY(-15px); }
}

@keyframes spin-soft {
  100% { transform: rotate(360deg); }
}

/* ==========================================================================
   Modulo Iscrizione Online – Multi-Step Form
   ========================================================================== */

.iscrizione-hero {
  background: linear-gradient(135deg, var(--color-sky-light) 0%, var(--color-sage-light) 100%);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  margin-bottom: 3rem;
  border: 1px solid var(--color-blue-light);
}

.iscrizione-hero h2 {
  font-size: 2rem;
  color: var(--color-blue);
  margin-bottom: 0.75rem;
}

.iscrizione-hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 540px;
  margin: 0 auto;
}

/* ── Progress Bar ─── */
.form-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 2.5rem;
  position: relative;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  position: relative;
  z-index: 1;
  flex: 1;
  max-width: 120px;
}

.progress-step::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  width: 100%;
  height: 3px;
  background: var(--color-blue-light);
  z-index: -1;
}

.progress-step:last-child::before {
  display: none;
}

.progress-step.done::before,
.progress-step.active::before {
  background: var(--color-sage);
}

.step-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-blue-light);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  transition: var(--transition-smooth);
  border: 3px solid transparent;
}

.progress-step.active .step-dot {
  background: var(--color-blue);
  color: #fff;
  border-color: var(--color-blue);
  transform: scale(1.1);
}

.progress-step.done .step-dot {
  background: var(--color-sage);
  color: #fff;
  border-color: var(--color-sage);
}

.step-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
}

.progress-step.active .step-label {
  color: var(--color-blue);
}

.progress-step.done .step-label {
  color: var(--color-sage);
}

/* ── Step Panels ─── */
.form-step {
  display: none;
  animation: fadeSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-step.active {
  display: block;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.step-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--color-blue-light);
}

.step-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.step-icon.sage   { background: var(--color-sage-light);      color: var(--color-sage); }
.step-icon.terra  { background: var(--color-terracotta-light); color: var(--color-terracotta); }
.step-icon.yellow { background: var(--color-yellow-light);     color: #b8860b; }
.step-icon.sky    { background: var(--color-sky-light);        color: var(--color-blue); }

.step-heading h3 {
  font-size: 1.35rem;
  color: var(--color-blue);
  margin: 0;
}

/* ── Sezione Choice Cards ─── */
.sezione-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 600px) {
  .sezione-cards { grid-template-columns: repeat(3, 1fr); }
}

.sezione-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sezione-card label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 1.25rem 1rem;
  border: 2px solid var(--color-blue-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: center;
  transition: var(--transition-smooth);
  background: var(--bg-white);
  font-family: var(--font-headers);
  font-size: 1rem;
  color: var(--color-blue);
}

.sezione-card label:hover {
  border-color: var(--color-sage);
  background: var(--color-sage-light);
}

.sezione-card input[type="radio"]:checked + label {
  border-color: var(--color-sage);
  background: var(--color-sage-light);
  box-shadow: 0 0 0 3px rgba(129, 178, 154, 0.25);
}

.sezione-card .card-emoji {
  font-size: 2rem;
}

/* ── Form Fields ─── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 600px) {
  .form-grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .form-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-field.full-width {
  grid-column: 1 / -1;
}

.form-field label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-blue);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-field label .req {
  color: var(--color-terracotta);
  margin-left: 2px;
}

.form-field input,
.form-field select,
.form-field textarea {
  padding: 0.75rem 1rem;
  border: 2px solid var(--color-blue-light);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-dark);
  background: var(--bg-white);
  transition: var(--transition-fast);
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-sage);
  box-shadow: 0 0 0 3px rgba(129, 178, 154, 0.2);
}

.form-field input.error,
.form-field select.error {
  border-color: var(--color-terracotta);
  box-shadow: 0 0 0 3px rgba(224, 122, 95, 0.15);
}

.form-field textarea {
  resize: vertical;
  min-height: 100px;
}

.form-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%233D405B' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* ── Checkbox/Orari ─── */
.orario-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.check-pill input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.check-pill label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: 2px solid var(--color-blue-light);
  border-radius: 50px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-blue);
  transition: var(--transition-fast);
  background: var(--bg-white);
}

.check-pill label:hover {
  border-color: var(--color-sky);
  background: var(--color-sky-light);
}

.check-pill input[type="checkbox"]:checked + label {
  background: var(--color-blue);
  border-color: var(--color-blue);
  color: #fff;
}

/* ── Genitore 2 Toggle ─── */
.g2-toggle-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--color-yellow-light);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-yellow);
  cursor: pointer;
  margin-bottom: 0.5rem;
}

.g2-toggle-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-blue);
  cursor: pointer;
}

.g2-toggle-row span {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-blue);
}

#g2-fields {
  display: none;
  margin-top: 1rem;
}

/* ── Upload zone ─── */
.upload-zone {
  border: 2px dashed var(--color-blue-light);
  border-radius: var(--radius-md);
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  background: var(--bg-white);
  position: relative;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--color-sage);
  background: var(--color-sage-light);
}

.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-icon {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  display: block;
}

.upload-zone p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.upload-zone strong {
  color: var(--color-blue);
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.upload-file-name {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--color-sage);
  font-weight: 700;
  background: var(--color-sage-light);
  padding: 0.2rem 0.7rem;
  border-radius: 50px;
}

/* ── Consent checkboxes ─── */
.consent-box {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--color-blue-light);
  background: var(--bg-white);
  transition: var(--transition-fast);
}

.consent-box:has(input:checked) {
  border-color: var(--color-sage);
  background: var(--color-sage-light);
}

.consent-box input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--color-sage);
  cursor: pointer;
}

.consent-box p {
  font-size: 0.85rem;
  color: var(--text-dark);
  margin: 0;
  line-height: 1.5;
}

.consent-box p a {
  color: var(--color-terracotta);
  text-decoration: underline;
}

/* ── Divider genitore ─── */
.genitore-divider {
  font-family: var(--font-headers);
  font-size: 1.1rem;
  color: var(--color-blue);
  margin: 1.75rem 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.genitore-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-blue-light);
}

/* ── Nav buttons ─── */
.form-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  gap: 1rem;
}

.form-nav .btn {
  width: auto;
  min-width: 150px;
}

/* ── Success / Error message ─── */
.form-result {
  display: none;
  text-align: center;
  padding: 3rem 2rem;
  border-radius: var(--radius-lg);
}

.form-result.success {
  background: var(--color-sage-light);
  border: 2px solid var(--color-sage);
}

.form-result.error {
  background: var(--color-terracotta-light);
  border: 2px solid var(--color-terracotta);
}

.form-result .result-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.form-result h3 {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}

.form-result p {
  color: var(--text-muted);
  max-width: 450px;
  margin: 0 auto;
}

/* ── Loading state ─── */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.8;
}

.btn-loading::after {
  content: '';
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin-soft 0.7s linear infinite;
}

/* ── Form wrapper card ─── */
.enrollment-form-wrapper {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-blue-light);
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .enrollment-form-wrapper {
    padding: 3rem 2.5rem;
  }
}

/* ==========================================================================
   Progetti Page Extensions (Labs, Continuity, Sports, Equipe)
   ========================================================================== */

/* Subnav Filter / Anchor Pills */
.progetti-subnav {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 1.5rem auto 0;
  max-width: 960px;
}

.progetti-subnav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: var(--bg-white);
  border: 1.5px solid var(--color-blue-light);
  color: var(--color-blue);
  padding: 0.55rem 1.15rem;
  border-radius: 50px;
  font-family: var(--font-headers);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.progetti-subnav-btn:hover {
  background-color: var(--color-blue);
  color: #fff;
  border-color: var(--color-blue);
  transform: translateY(-2px);
}

/* Lab Cards with Images */
.lab-card-image {
  height: 160px;
  margin: -2rem -2rem 1.25rem -2rem;
  overflow: hidden;
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
  position: relative;
}

.lab-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .lab-card-image img {
  transform: scale(1.05);
}

.lab-target-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.25rem 0.65rem;
  border-radius: 50px;
  margin-bottom: 0.5rem;
  align-self: flex-start;
}

.badge-sage {
  background-color: var(--color-sage-light);
  color: var(--color-sage);
}

.badge-terracotta {
  background-color: var(--color-terracotta-light);
  color: var(--color-terracotta);
}

.badge-yellow {
  background-color: var(--color-yellow-light);
  color: #a07421;
}

.badge-blue {
  background-color: var(--color-sky-light);
  color: var(--color-blue);
}

.lab-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--color-blue-light);
}

.lab-keyword-chip {
  font-size: 0.78rem;
  background-color: var(--bg-cream);
  color: var(--text-dark);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-weight: 500;
}

/* Continuity Roadmap / Steps */
.continuity-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.continuity-card {
  background-color: var(--bg-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-blue-light);
  padding: 2.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.continuity-steps-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.continuity-step-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background-color: var(--bg-cream);
  padding: 0.9rem 1.15rem;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--color-sage);
}

.step-month-badge {
  background-color: var(--color-blue);
  color: #fff;
  font-family: var(--font-headers);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.step-content h4 {
  font-size: 1rem;
  margin-bottom: 0.2rem;
  color: var(--color-blue);
}

.step-content p {
  font-size: 0.88rem;
  color: var(--text-dark);
  margin: 0;
}

/* Sports Grid & Nuoto Banner */
.sports-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.sport-badge-card {
  background-color: var(--bg-white);
  border: 1px solid var(--color-blue-light);
  border-radius: var(--radius-md);
  padding: 1.25rem 0.75rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}

.sport-badge-card:hover {
  transform: translateY(-3px);
  border-color: var(--color-terracotta);
  box-shadow: var(--shadow-md);
}

.sport-badge-card .sport-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.4rem;
}

.sport-badge-card .sport-title {
  font-family: var(--font-headers);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-blue);
}

.sport-badge-card .sport-time {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.nuoto-highlight-box {
  background: linear-gradient(135deg, #e8f4f8 0%, #d8edf3 100%);
  border: 2px solid var(--color-sky);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  overflow: hidden;
}

.nuoto-highlight-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--color-blue);
  color: #fff;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-family: var(--font-headers);
  font-size: 0.85rem;
  font-weight: 700;
  align-self: flex-start;
}

/* Equipe Specialisti */
.equipe-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.specialist-card {
  background-color: var(--bg-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-blue-light);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.specialist-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.specialist-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  background-color: var(--color-sage-light);
  color: var(--color-sage);
  flex-shrink: 0;
}

.specialist-name {
  font-size: 1.25rem;
  margin-bottom: 0.2rem;
  color: var(--color-blue);
}

.specialist-role {
  font-family: var(--font-headers);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-terracotta);
}

.sportello-genitori-banner {
  background-color: var(--color-yellow-light);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--color-yellow);
  padding: 1.5rem;
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

@media (min-width: 600px) {
  .sports-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 768px) {
  .continuity-grid {
    grid-template-columns: 1fr 1fr;
  }
  .equipe-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .nuoto-highlight-box {
    flex-direction: row;
    align-items: center;
    gap: 2rem;
  }
  .nuoto-highlight-box-content {
    flex: 1;
  }
}

@media (min-width: 1024px) {
  .progetti-labs-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================================================
   Accessibilità (WCAG 2.1 AA / AgID / European Accessibility Act)
   ========================================================================== */

/* Skip to main content link (visibile al focus da tastiera) */
.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 9999;
  background-color: var(--color-blue);
  color: var(--bg-white);
  font-family: var(--font-headers);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  box-shadow: var(--shadow-lg);
  transition: top 0.2s ease;
  text-decoration: none;
}

.skip-link:focus,
.skip-link:focus-visible {
  top: 1rem;
  outline: 3px solid var(--color-terracotta);
  outline-offset: 2px;
}

/* Screen Reader Only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus visibile ad alto contrasto per navigazione da tastiera (Tab) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="tab"]:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
  outline: 3px solid var(--color-blue);
  outline-offset: 3px;
}

/* Rispetto preferenza utente per riduzione movimento (vestibolare / epilessia) */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}



