/* ══════════════════════════════════════════════════════════════════════════
   Circolo FENAPI Provincia di Torino — Design System v2
   "Refined Editorial" — Distinctive, institutional, trustworthy
   Based on fenapi-group-brand-guidelines.md
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Google Fonts ─────────────────────────────────────────────────────── */
/* Loaded non-blocking via <link media="print" onload> in each HTML <head>.
   Removed from CSS @import to eliminate render-blocking double round-trip.
   URL: fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400
        &family=Open+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400
        &family=Shadows+Into+Light&display=swap
   Removed vs original: Open Sans 300 (unused), Lora italic 500 (unused) */

/* ── CSS Custom Properties ──────────────────────────────────────────── */
:root {
  /* Primary */
  --primary: #206088;
  --primary-hover: #256f9d;
  --primary-dark: #1b5173;
  --primary-darker: #16435f;
  --primary-darkest: #11344a;

  /* Secondary */
  --secondary: #2c79ac;
  --secondary-hover: #3187c0;
  --secondary-dark: #276b98;
  --tertiary: #3a95cf;
  --tertiary-hover: #4fa0d4;
  --accent-legacy: #005d82;

  /* Warm accent — gold for premium touches */
  --accent-warm: #C4A052;
  --accent-warm-light: #D4B76A;

  /* Neutrals */
  --dark: #2e353e;
  --dark-medium: #383f48;
  --text-dark: #1a1f25;
  --text-body: #5a6370;
  --text-muted: #8a9199;
  --text-light: #b7b7b7;
  --text-footer-dark: #1e2329;
  --white: #ffffff;
  --bg-light: #f6f8fa;
  --bg-warm: #faf8f5;
  --border-light: #e8ecf0;
  --border-medium: #ccc;

  /* State */
  --success: #3d9a5f;
  --error: #d45454;

  /* Typography */
  --font-primary: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Lora', Georgia, 'Times New Roman', serif;
  --font-decorative: 'Shadows Into Light', cursive;

  /* Spacing */
  --section-padding: 100px 0;
  --container-width: 1200px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Shadows — more refined */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-glow: 0 4px 30px rgba(32, 96, 136, 0.2);
}

/* ── Reset & Base ────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-body);
  background-color: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
}

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

ul, ol {
  list-style: none;
}

h1, h2, h3, h4 {
  color: var(--text-dark);
  font-family: var(--font-heading);
  line-height: 1.25;
}

h5, h6 {
  color: var(--text-dark);
  font-family: var(--font-primary);
}

h1 { font-size: 42px; font-weight: 600; }
h2 { font-size: 34px; font-weight: 500; letter-spacing: -0.3px; }
h3 { font-size: 26px; font-weight: 500; }
h4 { font-size: 20px; font-weight: 600; }
h5 { font-size: 13px; line-height: 18px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; }
h6 { font-size: 14px; line-height: 20px; font-weight: 600; }

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Utility Classes ─────────────────────────────────────────────────── */
.section-title {
  text-align: center;
  margin-bottom: 60px;
}

.section-title h5 {
  color: var(--primary);
  font-size: 12px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
  font-weight: 700;
}

.section-title h2 {
  font-size: 38px;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.section-title h2::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--accent-warm);
  margin: 16px auto 0;
  border-radius: 2px;
}

.section-title p {
  color: var(--text-body);
  font-size: 17px;
  line-height: 1.7;
  max-width: 580px;
  margin: 0 auto;
}

/* ══════════════════════════════════════════════════════════════════════════
   FLOATING CTA
   ══════════════════════════════════════════════════════════════════════════ */
.floating-cta {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
}

.floating-cta a {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--primary);
  color: var(--white);
  padding: 16px 28px;
  border-radius: 60px;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  box-shadow: 0 6px 24px rgba(32, 96, 136, 0.4), 0 0 0 0 rgba(32, 96, 136, 0.3);
  transition: all var(--transition-base);
  text-decoration: none;
  animation: cta-pulse 3s ease-in-out infinite;
}

.floating-cta a:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 36px rgba(32, 96, 136, 0.5);
  color: var(--white);
  background: var(--primary-dark);
  animation: none;
}

.floating-cta a svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

@keyframes cta-pulse {
  0%, 100% { box-shadow: 0 6px 24px rgba(32, 96, 136, 0.4), 0 0 0 0 rgba(32, 96, 136, 0.3); }
  50% { box-shadow: 0 6px 24px rgba(32, 96, 136, 0.4), 0 0 0 12px rgba(32, 96, 136, 0); }
}

/* ══════════════════════════════════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════════════════════════════════ */

/* Top bar */
.header-top {
  background: var(--primary-darkest);
  padding: 8px 0;
  font-size: 13px;
}

.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-top-contacts {
  display: flex;
  gap: 24px;
  align-items: center;
}

.header-top-contacts a {
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.header-top-contacts a:hover {
  color: var(--white);
}

.header-top-contacts svg {
  width: 13px;
  height: 13px;
  opacity: 0.7;
}

.header-top-social {
  display: flex;
  gap: 14px;
  align-items: center;
}

.header-top-social a {
  color: rgba(255, 255, 255, 0.5);
  transition: color var(--transition-fast);
}

.header-top-social a:hover {
  color: var(--white);
}

.header-top-social svg {
  width: 15px;
  height: 15px;
}

/* Main header */
.header-main {
  background: var(--white);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all var(--transition-base);
  border-bottom: 1px solid transparent;
}

.header-main.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), var(--shadow-sm);
  border-bottom-color: rgba(0, 0, 0, 0.04);
}

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

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  text-decoration: none;
}

.logo-icon {
  width: 55px; /* auto-calculated 70 * 312/400 */
  height: 70px;
  background: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.5px;
  flex-shrink: 0;
  transition: transform var(--transition-base);
}

.logo:hover .logo-icon {
  transform: scale(1.05);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-text strong {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: #034687;
  line-height: 1.2;
  transition: color var(--transition-base);
}

.logo-text span {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Navigation */
.nav-main {
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-main a {
  display: block;
  padding: 26px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-body);
  letter-spacing: 0.3px;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-main a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 24px;
  height: 2px;
  background: var(--primary);
  transition: transform var(--transition-base);
  border-radius: 1px;
}

.nav-main a:hover {
  color: var(--primary);
  background: transparent;
}

.nav-main a:hover::after {
  transform: translateX(-50%) scaleX(1);
}

.nav-main a.active {
  color: var(--primary);
  font-weight: 700;
}

.nav-main a.active::after {
  transform: translateX(-50%) scaleX(1);
}

/* Header CTA */
.header-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 20px;
}

.btn-appointment {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: var(--white) !important;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all var(--transition-base);
  box-shadow: 0 2px 8px rgba(32, 96, 136, 0.25);
}

.btn-appointment:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(32, 96, 136, 0.35);
  color: var(--white) !important;
  background: var(--primary-dark);
}

.btn-appointment svg {
  width: 15px;
  height: 15px;
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-dark);
  transition: all var(--transition-base);
  border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ══════════════════════════════════════════════════════════════════════════
   HERO SECTION
   ══════════════════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(17, 52, 74, 0.95) 0%,
    rgba(27, 81, 115, 0.88) 35%,
    rgba(32, 96, 136, 0.78) 65%,
    rgba(44, 121, 172, 0.7) 100%
  );
}

/* Subtle geometric accent in hero */
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    radial-gradient(ellipse 600px 400px at 75% 60%, rgba(196, 160, 82, 0.08) 0%, transparent 100%),
    radial-gradient(ellipse 800px 600px at 20% 80%, rgba(58, 149, 207, 0.06) 0%, transparent 100%);
}

.hero .container {
  position: relative;
  z-index: 2;
  padding-top: 50px;
  padding-bottom: 50px;
}

.hero-content {
  max-width: 640px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 20px;
  border-radius: 60px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 28px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hero-badge svg {
  width: 14px;
  height: 14px;
  opacity: 0.8;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 54px;
  line-height: 1.15;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
  letter-spacing: -1px;
}

.hero h1 em {
  font-family: var(--font-decorative);
  color: rgba(255, 255, 255, 0.85);
  font-style: normal;
  font-size: 56px;
  display: block;
  margin-top: 4px;
}

.hero-subtitle {
  font-size: 18px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 36px;
  font-weight: 400;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  color: var(--primary) !important;
  padding: 16px 32px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.3px;
  transition: all var(--transition-base);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  color: var(--primary-dark) !important;
  background: var(--white);
}

.btn-hero-primary svg {
  width: 17px;
  height: 17px;
}

.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: var(--white) !important;
  padding: 15px 30px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  transition: all var(--transition-base);
}

.btn-hero-secondary:hover {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white) !important;
}

/* Hero stats */
.hero-stats {
  display: flex;
  gap: 48px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-stat {
  text-align: left;
}

.hero-stat .number {
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  margin-bottom: 6px;
}

.hero-stat .label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

/* ══════════════════════════════════════════════════════════════════════════
   SERVICES SECTION
   ══════════════════════════════════════════════════════════════════════════ */
.services {
  padding: var(--section-padding);
  background: var(--white);
  position: relative;
}

/* Subtle background pattern */
.services::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(32, 96, 136, 0.03) 1px, transparent 0);
  background-size: 40px 40px;
  pointer-events: none;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  position: relative;
}

.service-card {
  background: var(--white);
  border-radius: 14px;
  padding: 32px 24px 28px;
  border: 1px solid var(--border-light);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 60px;
  height: 60px;
  background: var(--bg-light);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  transition: all var(--transition-base);
}

.service-card:hover .service-icon {
  background: var(--primary);
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(32, 96, 136, 0.25);
}

.service-icon svg {
  width: 26px;
  height: 26px;
  color: var(--primary);
  transition: color var(--transition-base);
}

.service-card:hover .service-icon svg {
  color: var(--white);
}

.service-card h4 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.service-card p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-body);
}

.service-card .service-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  transition: all var(--transition-fast);
}

.service-card .service-link:hover {
  gap: 10px;
  color: var(--primary-dark);
}

/* ══════════════════════════════════════════════════════════════════════════
   CTA BANNER
   ══════════════════════════════════════════════════════════════════════════ */
.cta-banner {
  padding: 90px 0;
  background: var(--primary-darkest);
  position: relative;
  overflow: hidden;
}

/* Geometric accent */
.cta-banner::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -80px;
  width: 450px;
  height: 450px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.cta-banner::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -60px;
  width: 350px;
  height: 350px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 50%;
}

.cta-banner .container {
  position: relative;
  z-index: 2;
  text-align: center;
}

.cta-banner h2 {
  font-family: var(--font-heading);
  font-size: 38px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.cta-banner p {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 36px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.cta-banner .btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  color: var(--primary) !important;
  padding: 16px 36px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.3px;
  transition: all var(--transition-base);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.cta-banner .btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  color: var(--primary) !important;
}

.cta-banner .btn-cta svg {
  width: 18px;
  height: 18px;
}

/* ══════════════════════════════════════════════════════════════════════════
   CHI SIAMO / ABOUT SECTION
   ══════════════════════════════════════════════════════════════════════════ */
.about {
  padding: var(--section-padding);
  background: var(--bg-warm);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 70px;
  align-items: center;
}

.about-image {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
}

.about-image img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: 16px;
}

.about-image-badge {
  position: absolute;
  bottom: 24px;
  left: 24px;
  background: var(--primary);
  color: var(--white);
  padding: 14px 22px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(32, 96, 136, 0.35);
}

.about-image-badge .badge-number {
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
}

.about-image-badge .badge-text {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.8;
  font-weight: 600;
}

.about-content h2 {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 500;
  margin-bottom: 24px;
  letter-spacing: -0.5px;
  line-height: 1.25;
}

.about-content .highlight-text {
  font-family: var(--font-decorative);
  color: var(--primary);
  font-size: 22px;
}

.about-content p {
  margin-bottom: 18px;
  font-size: 15px;
  line-height: 1.75;
}

.about-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 28px;
}

.about-value {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  padding: 10px 14px;
  background: var(--white);
  border-radius: 10px;
  border: 1px solid var(--border-light);
  transition: all var(--transition-fast);
}

.about-value:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.about-value svg {
  width: 18px;
  height: 18px;
  color: var(--success);
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   SERVIZI DETTAGLIO — 730 / ISEE
   ══════════════════════════════════════════════════════════════════════════ */
.servizi-dettaglio {
  padding: var(--section-padding);
  background: var(--bg-light);
}

.servizi-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.servizio-detail-card {
  background: var(--white);
  border-radius: 16px;
  padding: 40px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: all var(--transition-base);
}

.servizio-detail-card:hover {
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.servizio-detail-card .card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.servizio-detail-card .card-icon {
  width: 52px;
  height: 52px;
  background: var(--primary);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.servizio-detail-card .card-icon svg {
  width: 24px;
  height: 24px;
  color: var(--white);
}

.servizio-detail-card h3 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 600;
}

.servizio-detail-card p {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-body);
  margin-bottom: 22px;
}

.servizio-detail-card .features-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.servizio-detail-card .features-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-dark);
  font-weight: 500;
}

.servizio-detail-card .features-list li svg {
  width: 18px;
  height: 18px;
  color: var(--success);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ══════════════════════════════════════════════════════════════════════════
   IL GRUPPO FENAPI
   ══════════════════════════════════════════════════════════════════════════ */
.gruppo {
  padding: var(--section-padding);
  background: var(--white);
}

.gruppo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.gruppo-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 28px 20px;
  text-align: center;
  transition: all var(--transition-base);
  cursor: pointer;
}

.gruppo-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.gruppo-card-icon {
  width: 48px;
  height: 48px;
  background: var(--bg-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 20px;
  transition: all var(--transition-base);
}

.gruppo-card:hover .gruppo-card-icon {
  background: rgba(32, 96, 136, 0.08);
}

.gruppo-card h5 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.gruppo-card p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ══════════════════════════════════════════════════════════════════════════
   CONTATTI
   ══════════════════════════════════════════════════════════════════════════ */
.contatti {
  padding: var(--section-padding);
  background: var(--white);
}

.contatti-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: start;
}

.contatti-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contatto-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
  background: var(--bg-light);
  border-radius: 14px;
  border: 1px solid transparent;
  transition: all var(--transition-base);
}

.contatto-item:hover {
  border-color: var(--border-light);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.contatto-icon {
  width: 44px;
  height: 44px;
  background: var(--primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contatto-icon svg {
  width: 20px;
  height: 20px;
  color: var(--white);
}

.contatto-text h5 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
  text-transform: none;
  letter-spacing: 0;
}

.contatto-text p,
.contatto-text a {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.6;
}

.contatto-text a:hover {
  color: var(--primary);
}

.contatti-map {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  height: 100%;
  min-height: 400px;
}

.contatti-map iframe {
  width: 100%;
  height: 100%;
  min-height: 400px;
  border: 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════════════════ */

/* Footer Ribbon */
.footer-ribbon {
  background: var(--primary);
  padding: 18px 0;
  text-align: center;
}

.footer-ribbon p {
  font-family: var(--font-decorative);
  color: var(--white);
  font-size: 20px;
  opacity: 0.9;
}

/* Footer Main */
.footer-main {
  background: var(--text-footer-dark);
  padding: 64px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-col h5 {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.footer-col p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.7;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  padding: 3px 0;
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: var(--white);
}

.footer-logo-section .footer-logo-text {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.footer-logo-section .logo-mark {
  width: 47px;
  height: 60px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 800;
  font-size: 14px;
}

.footer-logo-section .logo-name {
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 600;
}

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  padding: 0;
}

.footer-social a:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.footer-social a svg {
  width: 15px;
  height: 15px;
  color: rgba(255, 255, 255, 0.7);
}

.footer-social a:hover svg {
  color: var(--white);
}

/* Footer Bottom */
.footer-bottom {
  background: rgba(0, 0, 0, 0.15);
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.35);
  font-size: 12px;
}

.footer-bottom a:hover {
  color: rgba(255, 255, 255, 0.7);
}

/* ══════════════════════════════════════════════════════════════════════════
   SCROLL TO TOP BUTTON
   ══════════════════════════════════════════════════════════════════════════ */
.scroll-top {
  position: fixed;
  bottom: 100px;
  right: 34px;
  z-index: 9998;
  width: 42px;
  height: 42px;
  background: var(--white);
  color: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid var(--border-light);
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-md);
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-top:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.scroll-top svg {
  width: 18px;
  height: 18px;
}

/* ══════════════════════════════════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════════════════════════════════ */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Staggered child animations */
.stagger-children > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.05s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.15s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.25s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(7) { transition-delay: 0.35s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(8) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }

/* Counter animation */
.counter-animated {
  display: inline-block;
}

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gruppo-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero h1 em {
    font-size: 44px;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 70px 0;
  }

  /* Header */
  .header-top {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-wrapper {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    flex-direction: column;
    border-top: 1px solid var(--border-light);
  }

  .nav-wrapper.open {
    display: flex;
  }

  .nav-main {
    flex-direction: column;
  }

  .nav-main a {
    padding: 14px 24px;
    border-bottom: 1px solid var(--border-light);
    width: 100%;
  }

  .nav-main a::after {
    display: none;
  }

  .header-cta {
    padding: 16px 24px;
    margin-left: 0;
  }

  .btn-appointment {
    width: 100%;
    justify-content: center;
  }

  /* Hero */
  .hero {
    min-height: 520px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero h1 em {
    font-size: 36px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .hero-stats {
    gap: 24px;
  }

  .hero-stat .number {
    font-size: 30px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-hero-primary,
  .btn-hero-secondary {
    justify-content: center;
    text-align: center;
  }

  /* Sections */
  .about-grid,
  .contatti-grid,
  .servizi-detail-grid {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .gruppo-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom .container {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }

  /* Floating CTA */
  .floating-cta a {
    padding: 12px 18px;
    font-size: 12px;
  }

  .floating-cta a .cta-text-full {
    display: none;
  }

  .floating-cta a .cta-text-short {
    display: inline;
  }

  .section-title h2 {
    font-size: 28px;
  }

  .section-title p {
    font-size: 15px;
  }

  .about-content h2 {
    font-size: 28px;
  }

  .cta-banner h2 {
    font-size: 28px;
  }
}

@media (min-width: 769px) {
  .floating-cta a .cta-text-short {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-stats {
    flex-wrap: wrap;
    gap: 16px;
  }

  .hero-stat {
    flex: 1 1 40%;
  }

  .gruppo-grid {
    grid-template-columns: 1fr;
  }

  .about-values {
    grid-template-columns: 1fr;
  }

  .floating-cta {
    bottom: 16px;
    right: 16px;
  }
}

/* ─────────────────────────────────────────────────────────────
   HEADER LANGUAGES BANNER
   ───────────────────────────────────────────────────────────── */
.header-languages {
  background: #f4f1ea;
  border-bottom: 1px solid rgba(196, 160, 82, .35);
  font-family: 'Open Sans', sans-serif;
}
.header-languages .container {
  display: flex;
  justify-content: center;
  padding: 6px 24px;
}
.header-languages-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 22px;
  font-size: 13px;
  color: #1a3a5c;
  font-weight: 500;
  letter-spacing: .01em;
}
.header-languages-list li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.header-languages-list li + li {
  position: relative;
}
.header-languages-list li + li::before {
  content: "·";
  color: #C4A052;
  margin-right: 22px;
  margin-left: -16px;
  font-weight: 700;
}
.header-languages .flag { font-size: 15px; line-height: 1; }

@media (max-width: 640px) {
  .header-languages .container {
    padding: 6px 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
  }
  .header-languages-list {
    flex-wrap: nowrap;
    font-size: 12px;
    gap: 0 16px;
  }
  .header-languages-list li + li::before { margin-right: 16px; margin-left: -12px; }
}
