/* ========================================
   Dott. Salvatore Astarita — Sito Web
   Palette: teal/blu medicale + crema
   ======================================== */

:root {
  --color-primary: #1d5a7a;
  --color-primary-dark: #133e57;
  --color-primary-light: #5fa8c4;
  --color-accent: #d4a574;
  --color-cream: #f5ede0;
  --color-bg: #ffffff;
  --color-bg-alt: #f7fafc;
  --color-text: #1a3a4f;
  --color-text-light: #5a7384;
  --color-border: #e2e8ed;
  --color-success: #4a8b6f;

  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --shadow-sm: 0 2px 8px rgba(29, 90, 122, 0.06);
  --shadow-md: 0 6px 24px rgba(29, 90, 122, 0.10);
  --shadow-lg: 0 12px 40px rgba(29, 90, 122, 0.15);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --container: 1200px;
  --header-h: 80px;

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.6rem); margin-bottom: 0.75rem; }
h4 { font-size: 1.15rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; color: var(--color-text-light); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============ HEADER ============ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  transition: all var(--transition);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  max-width: var(--container);
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.01em;
}
.logo-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  flex-shrink: 0;
}
.logo-text { line-height: 1.1; }
.logo-text small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--color-text-light);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav { display: flex; align-items: center; gap: 0.5rem; }
.nav a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.nav a:hover, .nav a.active {
  color: var(--color-primary);
  background: var(--color-cream);
}

.btn-nav {
  background: var(--color-primary);
  color: white !important;
  padding: 0.6rem 1.4rem !important;
  border-radius: 100px !important;
  margin-left: 0.5rem;
}
.btn-nav:hover { background: var(--color-primary-dark) !important; }

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0.5rem;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-primary);
  transition: all var(--transition);
  border-radius: 2px;
}
.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.8rem;
  background: var(--color-primary);
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 100px;
  border: 2px solid var(--color-primary);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-body);
}
.btn:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-outline {
  background: transparent;
  color: var(--color-primary);
}
.btn-outline:hover {
  background: var(--color-primary);
  color: white;
}
.btn-light {
  background: white;
  color: var(--color-primary);
  border-color: white;
}
.btn-light:hover {
  background: var(--color-cream);
  color: var(--color-primary-dark);
  border-color: var(--color-cream);
}

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 3rem) 0 4rem;
  background: linear-gradient(135deg, #f5ede0 0%, #e8f1f5 50%, #d8e7ee 100%);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -10%; right: -10%;
  width: 60%; height: 120%;
  background: radial-gradient(circle, rgba(95, 168, 196, 0.15) 0%, transparent 70%);
  z-index: 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-tag {
  display: inline-block;
  background: rgba(29, 90, 122, 0.1);
  color: var(--color-primary);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 1.5rem;
}
.hero h1 {
  margin-bottom: 1.5rem;
  color: var(--color-primary-dark);
}
.hero h1 em {
  font-style: italic;
  color: var(--color-primary);
}
.hero-subtitle {
  font-size: 1.15rem;
  margin-bottom: 2rem;
  max-width: 540px;
}
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-image-wrap {
  position: relative;
  /* niente overflow:hidden qui — il badge deve poter uscire */
}
.hero-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 5;
}
.hero-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.8s ease;
}
.hero-image:hover img { transform: scale(1.03); }

.hero-badge {
  position: absolute;
  bottom: -1.5rem;
  left: -1.5rem;
  background: white;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgba(29, 90, 122, 0.18);
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 2;
  border: 1px solid var(--color-border);
}
.hero-badge .badge-num {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  color: var(--color-primary);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}
.hero-badge .badge-num sup {
  font-size: 0.55em;
  vertical-align: super;
  color: var(--color-primary-light);
  margin-left: 1px;
}
.hero-badge .badge-text {
  font-size: 0.85rem;
  color: var(--color-text-light);
  line-height: 1.35;
}
.hero-badge .badge-text strong {
  color: var(--color-text);
  font-weight: 600;
}

/* ============ SECTION ============ */
.section { padding: 5rem 0; }
.section-alt { background: var(--color-bg-alt); }
.section-dark {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  color: white;
}
.section-dark h2, .section-dark h3 { color: white; }
.section-dark p { color: rgba(255, 255, 255, 0.85); }

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3.5rem;
}
.section-eyebrow {
  display: inline-block;
  color: var(--color-primary);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.section-header h2 { margin-bottom: 1rem; }
.section-header p { font-size: 1.1rem; }

/* ============ FEATURES (3 punti di forza) ============ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.feature-card {
  background: white;
  padding: 2.5rem 2rem;
  border-radius: var(--radius-md);
  text-align: center;
  border: 1px solid var(--color-border);
  transition: all var(--transition);
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary-light);
}
.feature-icon {
  width: 72px; height: 72px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, var(--color-cream), #e8f1f5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
}

/* ============ ABOUT INTRO ============ */
.about-intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.about-intro-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 5;
}
.about-intro-img img { width: 100%; height: 100%; object-fit: cover; }

.checklist { list-style: none; margin: 1.5rem 0; }
.checklist li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.75rem;
  color: var(--color-text);
  font-weight: 500;
}
.checklist li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.4rem;
  width: 22px; height: 22px;
  background: var(--color-primary);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
  background-size: 16px;
  background-position: center;
  background-repeat: no-repeat;
}

/* ============ SERVIZI GRID ============ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
.service-card {
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.service-card-img {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--color-bg-alt);
}
.service-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s ease;
}
.service-card:hover .service-card-img img { transform: scale(1.06); }
.service-card-body { padding: 1.75rem; flex: 1; display: flex; flex-direction: column; }
.service-card h3 { color: var(--color-primary-dark); }
.service-card .service-tag {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}
.service-card[id] { scroll-margin-top: calc(var(--header-h) + 1rem); }
section[id] { scroll-margin-top: calc(var(--header-h) + 1rem); }
.service-card p { flex: 1; font-size: 0.95rem; }

/* ============ CTA SECTION ============ */
.cta-section {
  text-align: center;
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}
.cta-section h2 { margin-bottom: 1.5rem; }
.cta-section p { font-size: 1.15rem; max-width: 640px; margin: 0 auto 2rem; }

/* ============ CONTACT INFO ============ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}
.contact-card {
  background: white;
  padding: 2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  text-align: center;
  transition: all var(--transition);
}
.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-light);
}
.contact-card-icon {
  width: 60px; height: 60px;
  margin: 0 auto 1.25rem;
  background: var(--color-cream);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
}
.contact-card h3 { margin-bottom: 0.75rem; }
.contact-card a { color: var(--color-text); font-weight: 500; word-break: break-word; }
.contact-card a:hover { color: var(--color-primary); }

/* ============ CONTACT FORM ============ */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}
.contact-info-block h3 { margin-bottom: 1.5rem; }
.contact-info-block .info-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}
.contact-info-block .info-item > div:last-child { flex: 1; min-width: 0; }
.contact-info-block .info-item .info-icon {
  width: 44px; height: 44px;
  background: var(--color-cream);
  color: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-info-block .info-item strong { display: block; color: var(--color-text); margin-bottom: 0.25rem; }
.contact-info-block .info-item span { color: var(--color-text-light); font-size: 0.95rem; }

.contact-form {
  background: white;
  padding: 2.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--color-text);
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background: white;
  transition: all var(--transition);
}
.form-group select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d5a7a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 16px;
  cursor: pointer;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(29, 90, 122, 0.1);
}
.form-group textarea { resize: vertical; min-height: 120px; }

/* ============ ORARI ============ */
.hours-table {
  background: white;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  margin-top: 1.5rem;
}
.hours-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
}
.hours-row:last-child { border-bottom: 0; }
.hours-row.closed { color: var(--color-text-light); }
.hours-day { font-weight: 500; }

/* ============ FOOTER ============ */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 4rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-col h4 {
  color: white;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.6rem; }
.footer-col a { color: rgba(255, 255, 255, 0.75); font-size: 0.95rem; }
.footer-col a:hover { color: white; }
.footer-brand .logo { color: white; margin-bottom: 1rem; }
.footer-brand .logo-text small { color: rgba(255, 255, 255, 0.7); }
.footer-brand p { color: rgba(255, 255, 255, 0.75); font-size: 0.95rem; max-width: 320px; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}
.footer-bottom a { color: rgba(255, 255, 255, 0.8); }

/* ============ PAGE HEADER ============ */
.page-header {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  color: white;
  padding: calc(var(--header-h) + 4rem) 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-header::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 60px;
  background: var(--color-bg);
  clip-path: ellipse(80% 100% at 50% 100%);
}
.page-header h1 { color: white; margin-bottom: 1rem; }
.page-header p { color: rgba(255, 255, 255, 0.9); font-size: 1.1rem; max-width: 640px; margin: 0 auto; }
.breadcrumb {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.75);
}
.breadcrumb a { color: rgba(255, 255, 255, 0.9); }
.breadcrumb a:hover { color: white; }

/* ============ ABOUT PAGE ============ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 5rem;
}
.about-grid:nth-child(even) .about-text { order: 2; }
.about-grid:nth-child(even) .about-img { order: 1; }
.about-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 5 / 4;
}
.about-img img { width: 100%; height: 100%; object-fit: cover; }

/* ============ MAP / SEDI ============ */
.sedi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 3rem;
}
.sede-card {
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}
.sede-map {
  aspect-ratio: 16 / 9;
  background: var(--color-bg-alt);
}
.sede-map iframe { width: 100%; height: 100%; border: 0; }
.sede-body { padding: 1.75rem; }
.sede-body h3 { color: var(--color-primary-dark); margin-bottom: 0.5rem; }
.sede-body .sede-tag {
  color: var(--color-primary);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  display: block;
}

/* ============ FAB WHATSAPP ============ */
.fab-whatsapp {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px; height: 60px;
  background: #25d366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 999;
  transition: all var(--transition);
}
.fab-whatsapp:hover {
  transform: scale(1.1);
  color: white;
}

/* ============ PRIVACY POLICY ============ */
.privacy-content {
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem 0;
}
.privacy-content h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--color-primary-dark);
}
.privacy-content h2:first-of-type { margin-top: 1rem; }
.privacy-content p, .privacy-content ul { color: var(--color-text); margin-bottom: 1rem; }
.privacy-content ul { padding-left: 1.5rem; }
.privacy-content ul li { margin-bottom: 0.4rem; }
.privacy-content a { color: var(--color-primary); }

/* ============ BLOG INDEX ============ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 2rem;
  max-width: 820px;
  margin: 0 auto;
}
.blog-card {
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.blog-card-img {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--color-bg-alt);
}
.blog-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s ease;
}
.blog-card:hover .blog-card-img img { transform: scale(1.06); }
.blog-card-body { padding: 2rem; display: flex; flex-direction: column; gap: 0.75rem; }
.blog-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--color-text-light);
}
.blog-tag {
  display: inline-block;
  background: var(--color-cream);
  color: var(--color-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.blog-card h2 {
  font-size: 1.5rem;
  margin: 0;
}
.blog-card h2 a {
  color: var(--color-primary-dark);
  transition: color var(--transition);
}
.blog-card h2 a:hover { color: var(--color-primary); }
.blog-card p { margin: 0; flex: 1; }

.blog-coming-soon {
  text-align: center;
  max-width: 560px;
  margin: 4rem auto 0;
  padding: 2.5rem 1.5rem;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
}
.blog-coming-soon h3 { color: var(--color-primary-dark); margin-bottom: 0.5rem; }
.blog-coming-soon p { margin: 0; font-size: 0.95rem; }

/* ============ ARTICLE PAGE ============ */
.article-hero {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  color: white;
  padding: calc(var(--header-h) + 4rem) 0 3.5rem;
}
.article-hero .breadcrumb {
  justify-content: flex-start;
  margin-bottom: 1.5rem;
}
.article-hero .blog-tag {
  background: rgba(255, 255, 255, 0.18);
  color: white;
  margin-bottom: 1.25rem;
}
.article-hero h1 {
  color: white;
  max-width: 820px;
  margin-bottom: 1.5rem;
  font-size: clamp(1.9rem, 4vw, 3rem);
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
}

.article-feature {
  background: linear-gradient(180deg,
    var(--color-primary) 0%,
    var(--color-primary) 50%,
    var(--color-bg) 50%,
    var(--color-bg) 100%);
}
.article-feature .container { max-width: 920px; }
.article-feature img {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.article-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 3.5rem 0;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--color-text);
}
.article-content .lead {
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--color-text);
  margin-bottom: 2rem;
  font-weight: 500;
}
.article-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: clamp(1.5rem, 2.5vw, 1.9rem);
  color: var(--color-primary-dark);
}
.article-content h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.6rem;
  font-size: 1.2rem;
  color: var(--color-primary);
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0;
}
.article-content p { margin-bottom: 1.25rem; color: var(--color-text); }
.article-content ul, .article-content ol {
  margin: 0 0 1.5rem 0;
  padding-left: 1.5rem;
}
.article-content ul li, .article-content ol li {
  margin-bottom: 0.5rem;
}
.article-content strong { color: var(--color-primary-dark); }

.article-cta {
  margin-top: 3rem;
  padding: 2.5rem;
  background: var(--color-cream);
  border-radius: var(--radius-md);
  text-align: center;
}
.article-cta h3 {
  color: var(--color-primary-dark);
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  letter-spacing: -0.01em;
}
.article-cta p { margin-bottom: 1.5rem; }

@media (max-width: 720px) {
  .blog-grid { grid-template-columns: 1fr; }
  .article-content { padding: 2.5rem 0; font-size: 1rem; }
  .article-feature img { aspect-ratio: 16 / 10; }
}

/* ============ ANIMATIONS ============
   Senza JS gli elementi restano visibili; con JS si applica .js-fade
   ============================================================ */
.js-fade .fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.js-fade .fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .js-fade .fade-in { opacity: 1; transform: none; transition: none; }
}

/* ============ ACCESSIBILITY: focus visible ============ */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============ SCROLL TO TOP ============ */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 46px;
  height: 46px;
  background: white;
  color: var(--color-primary);
  border-radius: 50%;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 998;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition), transform var(--transition), background var(--transition);
  pointer-events: none;
}
.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.scroll-top:hover {
  background: var(--color-primary);
  color: white;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1060px) {
  :root { --header-h: 72px; }
  h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
  .hero-grid { gap: 3rem; }
}

@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
  .features-grid { grid-template-columns: 1fr; gap: 1.25rem; max-width: 540px; margin: 0 auto; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 1.25rem; max-width: 520px; margin: 0 auto; }
  .contact-layout, .about-grid, .about-intro-grid, .hero-grid, .sedi-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .about-grid:nth-child(even) .about-text,
  .about-grid:nth-child(even) .about-img { order: initial; }
  .hero { min-height: auto; padding-top: calc(var(--header-h) + 2rem); }
  .hero-image-wrap { max-width: 480px; margin: 0 auto; }
  .article-content { padding: 2.5rem 0; }
}

@media (max-width: 720px) {
  /* HEADER & MENU */
  .menu-toggle { display: flex; }
  .nav {
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    background: white;
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem;
    gap: 0.25rem;
    box-shadow: var(--shadow-md);
    transform: translateY(-150%);
    transition: transform var(--transition);
    border-top: 1px solid var(--color-border);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .nav.open { transform: translateY(0); }
  .nav a { padding: 0.85rem 1rem; font-size: 1rem; }
  .btn-nav { margin: 0.5rem 0 0; text-align: center; justify-content: center; }
  .logo-text { font-size: 1rem; }
  .logo-text small { font-size: 0.62rem; letter-spacing: 0.04em; }
  .logo-icon { width: 38px; height: 38px; font-size: 1rem; }

  /* HERO */
  .hero { padding-bottom: 3rem; }
  .hero-grid { gap: 2rem; }
  .hero-tag { font-size: 0.78rem; padding: 0.35rem 0.85rem; }
  .hero-subtitle { font-size: 1.02rem; }
  .hero-cta { flex-direction: column; gap: 0.75rem; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .hero-image-wrap { max-width: none; }
  .hero-image { aspect-ratio: 4 / 4.4; }
  .hero-badge {
    left: 0;
    bottom: -1rem;
    padding: 0.9rem 1.15rem;
    gap: 0.75rem;
  }
  .hero-badge .badge-num { font-size: 2rem; }
  .hero-badge .badge-text { font-size: 0.78rem; }

  /* GENERAL */
  .container { padding: 0 1.25rem; }
  .section { padding: 3rem 0; }
  .section-header { margin-bottom: 2.25rem; }
  .section-header p { font-size: 1rem; }

  /* SERVIZI */
  .services-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .service-card-body { padding: 1.5rem; }

  /* FEATURES */
  .feature-card { padding: 2rem 1.5rem; }

  /* ABOUT BLOCKS — la foto sotto il testo */
  .about-grid { gap: 1.75rem; }
  .about-text h2 { margin-bottom: 0.75rem; }

  /* CTA SECTIONS */
  .cta-section { padding: 3.5rem 0; }
  .cta-section h2 { font-size: 1.7rem; }
  .cta-section p { font-size: 1rem; }

  /* PAGE HEADER */
  .page-header { padding: calc(var(--header-h) + 2.5rem) 0 3rem; }
  .page-header::after { height: 40px; }
  .page-header p { font-size: 1rem; }

  /* CONTATTI */
  .contact-grid { grid-template-columns: 1fr; }
  .contact-card { padding: 1.5rem; }
  .contact-form { padding: 1.75rem; }
  .contact-info-block .info-item { gap: 0.85rem; }
  .contact-info-block .info-item .info-icon {
    width: 40px; height: 40px;
  }
  .hours-table { padding: 1.1rem; }
  .hours-row { font-size: 0.92rem; }

  /* SEDI */
  .sede-map { aspect-ratio: 4 / 3; }
  .sede-body { padding: 1.4rem; }

  /* FOOTER */
  .site-footer { padding: 3rem 0 1.25rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; margin-bottom: 2rem; }
  .footer-brand p { max-width: none; }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    font-size: 0.78rem;
    gap: 0.5rem;
  }

  /* BLOG */
  .blog-grid { gap: 1.5rem; }
  .blog-card-body { padding: 1.5rem; gap: 0.6rem; }
  .blog-card h2 { font-size: 1.25rem; }
  .blog-coming-soon { margin-top: 2.5rem; padding: 1.75rem 1.25rem; }

  /* ARTICLE */
  .article-hero { padding: calc(var(--header-h) + 2.5rem) 0 2.5rem; }
  .article-hero h1 { font-size: clamp(1.6rem, 5.5vw, 2.2rem); }
  .article-meta { font-size: 0.82rem; gap: 0.35rem 0.55rem; }
  .article-feature img { aspect-ratio: 16 / 10; }
  .article-content { padding: 2rem 0; font-size: 0.98rem; }
  .article-content .lead { font-size: 1.08rem; }
  .article-content h2 { font-size: 1.45rem; margin-top: 2rem; }
  .article-content h3 { font-size: 1.1rem; }
  .article-cta { padding: 1.75rem 1.25rem; }
  .article-cta h3 { font-size: 1.25rem; }

  /* PRIVACY */
  .privacy-content h2 { font-size: 1.25rem; margin-top: 2rem; }

  /* FORM FIELDS */
  .form-group input, .form-group textarea, .form-group select {
    font-size: 16px; /* evita zoom su iOS */
  }

  /* FLOATING BUTTONS */
  .fab-whatsapp {
    bottom: 1rem; right: 1rem;
    width: 52px; height: 52px;
  }
  .fab-whatsapp svg { width: 26px; height: 26px; }
  .scroll-top {
    bottom: 1rem; left: 1rem;
    width: 40px; height: 40px;
  }
}

@media (max-width: 420px) {
  .hero-tag { font-size: 0.72rem; }
  .hero h1 { font-size: 1.85rem; }
  .breadcrumb { font-size: 0.82rem; flex-wrap: wrap; }
  .article-meta { font-size: 0.78rem; }
  .service-card h3 { font-size: 1.2rem; }
  .feature-card h3 { font-size: 1.15rem; }
}
