/* --- Palette "Premium EdTech" con Verde Salvia Accademico --- */
:root {
  --primary: #1E1B4B; /* Blu Notte Profondo */
  --brand-color: #475D73; /* Blu Avio */
  --accent: #D97706; /* Oro Caldo / Ambra */
  --accent-hover: #B45309; /* Ambra Scuro */
  --bg-light: #F9FAFB; /* Grigio Perla Chiarissimo */
  --bg-card: #FFFFFF; /* Bianco Puro */
  --text-dark: #334155; /* Grigio Antracite */
  --text-light: #64748B; /* Grigio Pietra */
  --border-color: rgba(0,0,0,0.05); 
}

* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

html { 
  scroll-behavior: smooth; 
}

body { 
  font-family: 'Inter', sans-serif; 
  color: var(--text-dark); 
  background-color: var(--bg-light); 
}

/* --- Tipografia --- */
h1, h2, h3 { 
  font-family: 'Playfair Display', serif; 
}

h1 { 
  color: var(--primary); 
  font-weight: 700; 
  letter-spacing: -0.01em; 
  line-height: 1.2; 
}

h2 { 
  font-size: 2.5rem; 
  margin-bottom: 40px; 
  line-height: 1.3; 
  color: var(--brand-color); 
  font-weight: 700; 
  letter-spacing: -0.01em; 
}

h3 { 
  color: var(--brand-color); 
  font-weight: 700; 
}

p { 
  margin-bottom: 24px; 
  color: var(--text-light); 
  font-size: 1.15rem; 
  max-width: 65ch; 
  line-height: 1.7; 
}

.text-center { 
  text-align: center; 
}

.text-center p { 
  margin-left: auto; 
  margin-right: auto; 
}

/* --- Layout Base --- */
section { 
  padding: 100px 20px; 
  max-width: 1050px; 
  margin: 0 auto; 
}

.section-bg { 
  background-color: var(--bg-card); 
  max-width: 100%; 
  border-top: 1px solid var(--border-color); 
  border-bottom: 1px solid var(--border-color); 
}

.container { 
  max-width: 1050px; 
  margin: 0 auto; 
}

/* --- Navigazione Base (Desktop) --- */
.navbar { 
  background: rgba(249, 250, 251, 0.95); 
  backdrop-filter: blur(10px); 
  border-bottom: 1px solid var(--border-color); 
  position: sticky; 
  top: 0; 
  z-index: 1000; 
  width: 100%; 
}

.nav-container { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  max-width: 1050px; 
  margin: 0 auto; 
  padding: 15px 20px; 
  width: 100%; 
}

.nav-brand { 
  font-family: 'Playfair Display', serif; 
  font-weight: 700; 
  color: var(--primary); 
  font-size: 1.35rem; 
}

.hamburger { 
  display: none; 
  background: none; 
  border: none; 
  color: var(--primary); 
  cursor: pointer; 
}

.nav-links { 
  display: flex; 
  align-items: center; 
  gap: 5px; 
}

.nav-links a { 
  text-decoration: none; 
  color: var(--text-dark); 
  font-weight: 600; 
  font-size: 0.95rem; 
  transition: color 0.2s ease; 
  padding: 8px 12px; 
}

.nav-links a:hover { 
  color: var(--brand-color); 
}

.nav-btn { 
  padding: 8px 20px !important; 
  margin-left: 10px; 
  font-size: 0.9rem !important; 
  color: var(--primary) !important; 
  font-weight: 700; 
}

.nav-btn:hover {
  color: #ffffff !important; 
}

/* --- Navigazione Mobile (Hamburger Menu) --- */
@media (max-width: 768px) {
  .hamburger { 
    display: block; 
  }
  
  .nav-links { 
    position: absolute; 
    top: 100%; 
    left: 0; 
    right: 0; 
    background: var(--bg-card); 
    flex-direction: column; 
    align-items: center; 
    padding: 0; 
    border-bottom: 1px solid var(--border-color); 
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.1); 
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0); 
    transition: clip-path 0.3s ease-in-out; 
  }
  
  .nav-links.active { 
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%); 
    padding: 10px 0 25px 0; 
  }
  
  .nav-links a { 
    width: 100%; 
    text-align: center; 
    padding: 16px 0; 
    font-size: 1.1rem; 
    border-bottom: 1px solid var(--bg-light); 
  }
  
  .nav-links a:last-child { 
    border-bottom: none; 
  }
  
  .nav-btn { 
    width: calc(100% - 40px); 
    margin: 20px auto 0 auto !important; 
    padding: 14px 0 !important; 
  }
}

/* --- Hero Section --- */
.hero { 
  text-align: center; 
  background: var(--bg-light); 
  padding: 120px 20px 100px; 
}

.hero-tag { 
  background: rgba(62, 107, 82, 0.1); 
  color: var(--brand-color); 
  padding: 6px 16px; 
  border-radius: 20px; 
  font-size: 0.85rem; 
  font-weight: 700; 
  display: inline-block; 
  margin-bottom: 24px; 
  text-transform: uppercase; 
  letter-spacing: 0.5px; 
}

.hero h1 { 
  font-size: 3.5rem; 
  margin-bottom: 24px; 
  max-width: 950px; 
  margin-left: auto; 
  margin-right: auto; 
  line-height: 1.2; 
}

.hero p { 
  margin-left: auto; 
  margin-right: auto; 
  margin-bottom: 35px; 
  font-size: 1.25rem; 
}

.hero-subtext { 
  display: block; 
  margin-top: 16px; 
  font-size: 1rem; 
  font-weight: 500; 
  color: var(--text-light); 
}

/* --- Bottoni CTA --- */
.btn { 
  padding: 14px 30px; 
  text-decoration: none; 
  border-radius: 8px; 
  font-weight: 600; 
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  gap: 10px; 
  transition: all 0.3s ease; 
  cursor: pointer; 
  border: none; 
  font-family: 'Inter', sans-serif; 
}

.btn-primary { 
  background: var(--accent); 
  color: #ffffff; 
  box-shadow: 0 4px 15px rgba(217, 119, 6, 0.3); 
}

.btn-primary:hover { 
  background: var(--accent-hover); 
  transform: translateY(-2px); 
  box-shadow: 0 6px 20px rgba(180, 83, 9, 0.4); 
  color: #ffffff; 
}

.btn-hero { 
  padding: 18px 40px; 
  font-size: 1.15rem; 
}

.btn-secondary { 
  background: transparent; 
  color: var(--text-dark); 
  border: 2px solid var(--border-color); 
}

.btn-secondary:hover { 
  border-color: var(--text-light); 
  background: var(--bg-card); 
}

.btn-google { 
  background: #ffffff; 
  color: var(--text-dark); 
  border: 1px solid var(--border-color); 
  display: inline-flex; 
  align-items: center; 
  gap: 10px; 
  font-weight: 600; 
  padding: 12px 24px; 
  border-radius: 8px; 
  text-decoration: none; 
  transition: all 0.3s; 
  box-shadow: 0 4px 6px rgba(0,0,0,0.02); 
  margin-top: 30px; 
}

.btn-google:hover { 
  border-color: var(--text-light); 
  box-shadow: 0 6px 12px rgba(0,0,0,0.05); 
  transform: translateY(-2px); 
}

/* --- Animazione Pulse per le Call to Action --- */
@keyframes softPulse {
  0% { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.5); }
  70% { box-shadow: 0 0 0 15px rgba(217, 119, 6, 0); }
  100% { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0); }
}

.btn-hero {
  animation: softPulse 2.5s infinite;
}

.btn-hero:hover, .nav-btn:hover {
  animation: none;
}

/* --- Cards --- */
.grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
  gap: 40px; 
}

.card { 
  background: var(--bg-card); 
  padding: 45px 40px; 
  border-radius: 12px; 
  border: none; 
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.06); 
  transition: all 0.3s ease; 
}

.card:hover { 
  transform: translateY(-5px); 
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1); 
}

.card h3 { 
  margin-bottom: 18px; 
  font-size: 1.35rem; 
}

.card p { 
  font-size: 1.05rem; 
  margin: 0; 
}

.card-icon { 
  width: 44px; 
  height: 44px; 
  color: var(--brand-color); 
  margin-bottom: 25px; 
  transition: transform 0.3s ease; 
}

.card:hover .card-icon { 
  transform: scale(1.05); 
}

/* --- Recensioni Layout (Scroll orizzontale) --- */
.reviews-wrapper { 
  display: flex; 
  gap: 30px; 
  overflow-x: auto; 
  snap-type: x mandatory; 
  padding-bottom: 30px; 
  scrollbar-width: none; 
}

.reviews-wrapper::-webkit-scrollbar { 
  display: none; 
}

.review-card { 
  min-width: 320px; 
  flex: 1; 
  background: var(--bg-card); 
  padding: 35px 30px; 
  border-radius: 12px; 
  border: none; 
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.06); 
  position: relative; 
  snap-align: start; 
}

.stars { 
  color: var(--accent); 
  margin-bottom: 15px; 
  font-size: 1.2rem; 
  letter-spacing: 2px; 
}

.review-text { 
  font-style: italic; 
  font-size: 1.05rem; 
  color: var(--text-dark); 
  margin-bottom: 20px; 
}

.review-author { 
  font-weight: 700; 
  color: var(--primary); 
  font-size: 1.1rem; 
  margin: 0; 
}

.review-role { 
  font-size: 0.9rem; 
  color: var(--text-light); 
  margin: 0; 
}

/* --- STILI SEZIONE BLOG --- */
.blog-card { 
  display: flex; 
  flex-direction: column; 
  height: 100%; 
  text-align: left; 
}

.blog-meta { 
  font-size: 0.85rem; 
  font-weight: 700; 
  text-transform: uppercase; 
  color: var(--accent); 
  letter-spacing: 1px; 
  margin-bottom: 12px; 
}

.blog-card h3 { 
  font-size: 1.4rem; 
  color: var(--primary); 
  margin-bottom: 14px; 
  line-height: 1.4; 
}

.blog-card p { 
  font-size: 1rem; 
  color: var(--text-light); 
  margin-bottom: 24px; 
  line-height: 1.6; 
}

.blog-link { 
  font-weight: 700; 
  color: var(--brand-color); 
  text-decoration: none; 
  margin-top: auto; 
  display: inline-flex; 
  align-items: center; 
  gap: 6px; 
  transition: color 0.2s; 
}

.blog-link:hover { 
  color: var(--accent); 
}

/* --- Docente --- */
.about-container { 
  display: flex; 
  align-items: center; 
  gap: 60px; 
  flex-wrap: wrap; 
}

.profile-pic { 
  width: 320px; 
  height: 400px; 
  object-fit: cover; 
  border-radius: 12px; 
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1); 
}

.about-text { 
  flex: 1; 
  min-width: 320px; 
}

/* --- HUB Widget Calendario --- */
#consulenza-wrap { 
  background-color: var(--primary); 
  width: 100%; 
  padding: 120px 20px; 
  color: #ffffff; 
}

#consulenza-wrap h2, 
#consulenza-wrap p.text-center { 
  color: #ffffff; 
}

#consulenza-wrap p.text-center.subtitle { 
  color: #E2E8F0; 
}

#consulenza-wrap section { 
  padding: 0; 
  max-width: 1050px; 
  margin: 0 auto; 
}

.booking-container { 
  display: flex; 
  gap: 60px; 
  flex-wrap: wrap; 
  margin-top: 60px; 
  align-items: flex-start; 
}

.booking-info { 
  flex: 1; 
  min-width: 300px; 
  display: flex; 
  flex-direction: column; 
}

.booking-list { 
  list-style: none; 
  padding: 0; 
  margin-bottom: 35px; 
}

.booking-list li { 
  font-size: 1.15rem; 
  color: #ffffff; 
  margin-bottom: 30px; 
  display: flex; 
  align-items: flex-start; 
  gap: 18px; 
  font-weight: 600; 
}

.booking-list li svg { 
  color: var(--accent); 
  width: 28px; 
  height: 28px; 
  flex-shrink: 0; 
  margin-top: 2px; 
}

.booking-list li span { 
  font-size: 0.95rem; 
  font-weight: 400; 
  color: #CBD5E1; 
  display: block; 
  margin-top: 6px; 
  line-height: 1.6; 
}

.guarantee-box { 
  background: rgba(255, 255, 255, 0.05); 
  padding: 25px; 
  border-radius: 12px; 
  border: 1px solid rgba(255, 255, 255, 0.1); 
}

.guarantee-box p { 
  font-size: 0.95rem; 
  margin: 0; 
  line-height: 1.6; 
  color: #ffffff !important; 
}

.booking-widget { 
  flex: 1.2; 
  min-width: 320px; 
  background: #FFFFFF; 
  border-radius: 16px; 
  border: none; 
  box-shadow: 0 0 30px rgba(217, 119, 6, 0.2); 
  overflow: hidden; 
  height: 680px; 
  position: relative; 
  display: flex; 
  flex-direction: column;
}

#google-calendar-iframe {
  flex-grow: 1;
  width: 100%;
  border: none;
}

.cookie-box { 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  justify-content: center; 
  height: 100%; 
  padding: 40px; 
  text-align: center; 
  background-color: var(--bg-card); 
  color: var(--text-dark); 
}

.cookie-box svg { 
  color: var(--brand-color); 
  margin-bottom: 24px; 
  width: 48px; 
  height: 48px; 
}

.cookie-box h3 { 
  color: var(--primary); 
}

.mobile-scroll-hint { 
  display: none; 
}

/* --- Footer --- */
footer { 
  background: #0B0A1C; 
  color: #ffffff; 
  text-align: center; 
  padding: 70px 20px 50px; 
}

footer p { 
  color: #94A3B8; 
  font-size: 0.95rem; 
  margin-bottom: 12px; 
  max-width: 100%; 
}

footer a { 
  color: #ffffff; 
  transition: opacity 0.2s; 
  text-decoration: none; 
  border-bottom: 1px solid transparent; 
  padding-bottom: 2px; 
}

footer a:hover { 
  opacity: 0.9; 
  border-bottom: 1px solid var(--accent); 
}

/* --- Cookie Consent Banner --- */
#cookie-banner { 
  position: fixed; 
  left: 0; 
  right: 0; 
  bottom: 0; 
  z-index: 2000; 
  background: var(--primary); 
  color: #ffffff; 
  padding: 22px 20px; 
  box-shadow: 0 -10px 30px rgba(0,0,0,0.25); 
  display: none; 
}

#cookie-banner.visible { 
  display: block; 
}

.cookie-banner-inner { 
  max-width: 1050px; 
  margin: 0 auto; 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  gap: 30px; 
  flex-wrap: wrap; 
}

.cookie-banner-text { 
  flex: 1; 
  min-width: 260px; 
  font-size: 0.9rem; 
  color: #E2E8F0; 
  line-height: 1.5; 
}

.cookie-banner-text a { 
  color: #ffffff; 
  text-decoration: underline; 
}

.cookie-banner-actions { 
  display: flex; 
  gap: 12px; 
  flex-wrap: wrap; 
}

.cookie-banner-actions .btn { 
  padding: 10px 20px; 
  font-size: 0.9rem; 
}

.btn-reject { 
  background: transparent; 
  color: #ffffff; 
  border: 2px solid rgba(255,255,255,0.3); 
}

.btn-reject:hover { 
  border-color: #ffffff; 
}

@media (max-width: 600px) {
  .cookie-banner-inner { 
    flex-direction: column; 
    align-items: stretch; 
    text-align: center; 
  }
  
  .cookie-banner-actions { 
    justify-content: center; 
  }
}

/* --- Mobile-First --- */
@media (max-width: 768px) {
  section { 
    padding: 60px 20px; 
  }
  
  #consulenza-wrap { 
    padding: 80px 20px; 
  }
  
  .hero { 
    padding: 100px 20px 60px; 
  }
  
  .hero h1 { 
    font-size: 2.2rem; 
    line-height: 1.3; 
  }
  
  h2 { 
    font-size: 1.8rem; 
    margin-bottom: 35px; 
  }
  
  .about-container { 
    gap: 40px; 
    text-align: center; 
  }
  
  .profile-pic { 
    margin: 0 auto; 
    width: 90%; 
    max-width: 320px; 
    height: auto; 
    aspect-ratio: 4/5; 
  }
  
  .about-text p { 
    text-align: left; 
  }
  
  .grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    gap: 20px;
    padding-bottom: 20px;
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
  }
  
  .grid::-webkit-scrollbar {
    display: none;
  }
  
  .grid .card {
    flex: 0 0 85%;
    scroll-snap-align: center;
  }
  
  .booking-container { 
    flex-direction: column; 
    gap: 40px; 
  }
  
  .booking-widget {
    height: 950px; 
    min-height: 950px;
    width: 100%;
    padding-top: 10px;
    -webkit-overflow-scrolling: touch;
  }
  
  .mobile-scroll-hint { 
    display: block; 
    text-align: center; 
    color: var(--accent); 
    font-weight: 700; 
    margin-bottom: 10px; 
    font-size: 0.95rem; 
    position: absolute; 
    top: 15px; 
    width: 100%; 
    z-index: 10; 
    background: rgba(255,255,255,0.95); 
    padding: 10px; 
    border-bottom: 1px solid var(--border-color); 
  }
  
  .btn-hero {
    width: 100%;
    padding: 20px 10px;
    font-size: 1.2rem;
  }
}

/* --- Pulsante WhatsApp Fluttuante --- */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 75px; 
  height: 75px; 
  background-color: #25d366;
  color: #fff;
  border-radius: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  transition: all 0.3s ease;
}

.whatsapp-float svg {
  width: 45px; 
  height: 45px; 
}

.whatsapp-float:hover {
  background-color: #128c7e;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.2);
  color: #fff;
}

/* Adattamento WhatsApp Mobile */
@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 20px;
    right: 20px;
    width: 72px; /* Ingrandito ulteriormente per mobile (prima era 60px) */
    height: 72px; /* Ingrandito ulteriormente per mobile (prima era 60px) */
  }
  .whatsapp-float svg {
    width: 42px; /* Icona proporzionalmente più grande (prima era 35px) */
    height: 42px; /* Icona proporzionalmente più grande (prima era 35px) */
  }
}