/* =========================
   Milan Digital Nomads — Main CSS
   ========================= */

/* Variables */
:root{
  --bg-body:#F9F7F5;
  --bg-dark:#1f1f1f;
  --bg-light:#FFFFFF;
  --text-primary:#1a1a1a;
   --text-secondary: #666666;
  --text-light:#f1f1f1;
  --accent:#D97706;
  --accent-hover:#B45309;
  --border-color:#E5E7EB;
  --font-heading:'Montserrat',sans-serif;
  --font-body:'Poppins',sans-serif;
  --shadow-sm:0 4px 6px -1px rgb(0 0 0 / 0.05),0 2px 4px -2px rgb(0 0 0 / 0.05);
   --shadow-md: 0 8px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -4px rgba(0,0,0,0.05);
  --shadow-lg: 0 16px 24px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.08);
  --radius:12px;
  --transition:0.3s;
  /* Mobile menu palette */
  --menu-mobile-bg:#111111;
  --menu-mobile-text:#ffffff;
  --menu-mobile-hover:rgba(255,255,255,0.08);
}

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

/* Base */
html,body{height:100%}
body{
  font-family:var(--font-body);
  line-height:1.7;
  color:var(--text-primary);
  background:var(--bg-body);
  overflow-x:hidden;
  /* nessuno smooth scroll: link navigano a nuove pagine */
}
h1,h2,h3,h4,.logo,.nav-cta,.cta-primary{font-family:var(--font-heading); font-weight:700}
.container{max-width:1200px; margin:0 auto; padding:0 24px}

/* =========================
   NAVIGATION
   ========================= */
.nav{
  position:fixed; top:0; width:100%; z-index:1000;
  transition:background-color var(--transition) ease, box-shadow var(--transition) ease, padding var(--transition) ease;
  padding:24px 0;background: linear-gradient(to bottom, rgba(255,255,255,0.35) 0%, transparent 100%);
}

.nav.scrolled{background:var(--bg-light); box-shadow:var(--shadow-sm); padding:16px 0}
.nav-content{display:flex; justify-content:space-between; align-items:center}
.logo{
  font-size:1.15rem; font-weight:700; display:flex; align-items:center; gap:12px; text-decoration:none;text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
.logo i{color:var(--accent)}
.nav:not(.scrolled) .logo{color:var(--bg-light)}
.nav.scrolled .logo{color:var(--text-primary)}

/* Desktop menu */
.nav-links{display:flex; gap:14px; list-style:none; align-items:center}
.nav-links a{
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    padding-bottom: 5px;
    transition: color var(--transition) ease;
    letter-spacing: -0.15px;
}
.nav-links a:after{
  content:''; position:absolute; bottom:0; left:0; width:0; height:2px; background:var(--accent); transition:width var(--transition) ease
}
.nav-links a:hover:after{width:100%}
.nav:not(.scrolled) .nav-links a{color:rgba(255,255,255,.9)}
.nav.scrolled .nav-links a{color:var(--text-secondary)}
.nav-links a:hover{color:var(--accent)}
.nav:not(.scrolled) .nav-links a:hover{color:var(--bg-light)}


/* Pulsante nav-cta */
.nav-cta {
  background: var(--accent);
  color: #fff;
  padding: 12px 28px;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  transition: background-color var(--transition) ease, transform var(--transition) ease;
  white-space: nowrap;
  cursor: pointer; /* aggiunto */
}


.nav-cta:hover{background:var(--accent-hover); transform:translateY(-2px)}

/* Hamburger button */
.nav-toggle { cursor: pointer; }
.nav-close  { cursor: pointer; }
.submenu-toggle { cursor: pointer; }

.nav-toggle{
  display:none; background:#c2c2c2; border:0; width:44px; height:44px; place-items:center; border-radius:8px; color:inherit
}
.nav-toggle:focus-visible{outline:2px solid var(--accent); outline-offset:2px}
.nav-toggle .bar{display:block; width:22px; height:2px; background:currentColor; position:relative}
.nav-toggle .bar::before,.nav-toggle .bar::after{content:""; position:absolute; left:0; width:22px; height:2px; background:currentColor}
.nav-toggle .bar::before{top:-6px}
.nav-toggle .bar::after{top:6px}
.nav-close{border:0px;}
.nav-links .li-signup a.active{
	color:#FFF !important;
}
/* Backdrop when mobile menu is open */
.menu-backdrop{
  position:fixed; inset:0; background:rgba(0,0,0,.4); backdrop-filter:saturate(150%) blur(2px);
  opacity:0; pointer-events:none; transition:opacity .25s ease; z-index:999;
}
.menu-backdrop.show{opacity:1; pointer-events:auto}

/* Mobile menu panel */
/* Mobile menu panel — FULL-SCREEN OVERLAY */
@media (max-width: 992px){
  /* Nascondo la CTA a destra: nel mobile è già nel pannello */
  .nav-cta { 
    display: none !important;
  }
   .nav-links .li-signup .nav-cta { 
    display: block !important;
	text-align: center;
  }

  .nav-right{display:flex; align-items:center; gap:12px}
  .nav-toggle{display:grid; cursor: pointer;}

  /* Le barrette ereditano il colore dal bottone */
  .nav-toggle .bar,
  .nav-toggle .bar::before,
  .nav-toggle .bar::after { 
    background: currentColor; 
  }

  /* Nav sticky su fondo bianco: hamburger scuro e visibile */
  .nav.scrolled .nav-toggle { color: var(--text-primary); }

  /* Quando il menu mobile è APERTO: hamburger (o X) chiaro perché lo sfondo del pannello è scuro */
  html.menu-open .nav .nav-toggle { color: #fff; }

  /* ====== FULL-SCREEN MENU ====== */
  .nav-links{
    position: fixed;
    inset: 0; /* top/right/bottom/left: 0 */
    background: var(--menu-mobile-bg);
    color: var(--menu-mobile-text);
    border: 0;
    border-radius: 0;
    box-shadow: none;

    /* Safe area + spazio interno */
    padding: calc(16px + env(safe-area-inset-top)) 16px 16px 16px;

    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 1000;

    /* spazio per il pulsante X sopra le voci */
    padding-top: calc(64px + env(safe-area-inset-top));

    /* animazione slide-down */
    transform: translateY(-100%);
    opacity: 0;
    transition: transform .35s ease, opacity .3s ease;

    /* scroll per liste lunghe */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav-links.show{
    transform: translateY(0);
    opacity: 1;
  }

  /* Link voce principale */
  .nav-links a{
    color: var(--menu-mobile-text) !important;
    padding: 12px 14px;
    border-radius: 10px;
    text-decoration: none;
    display: block;            /* a tutta larghezza */
    width: 100%;
    text-align: left;
  }
  .nav-links a:hover{ background: var(--menu-mobile-hover); }
  .nav-links a:after{ display: none; } /* niente underline animata su mobile */

  /* CTA mobile (se presente) */
  .nav-links .mobile-cta{
    display:flex; background:var(--accent); color:#fff; border-radius:999px;
    justify-content:center; padding:12px 16px; margin-top:6px; text-decoration:none; font-weight:700;
  }

  /* Bottone X di chiusura */
  .nav-close{
    position: absolute;
    top: calc(8px + env(safe-area-inset-top));
    right: 8px;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.06);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    z-index: 1001;
    transition: background .2s ease, transform .2s ease, border-color .2s ease;
  }
  .nav-close:hover{
    background: rgba(255,255,255,0.1);
    transform: translateY(-1px);
    border-color: rgba(255,255,255,0.35);
  }
  .nav-close:focus-visible{
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
  .nav-close .x{
    position: relative; width: 18px; height: 18px;
  }
  .nav-close .x::before,
  .nav-close .x::after{
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 2px;
    background: #fff;
    transform-origin: center;
  }
  .nav-close .x::before{ transform: translate(-50%, -50%) rotate(45deg); }
  .nav-close .x::after{  transform: translate(-50%, -50%) rotate(-45deg); }

  /* ===== Submenu mobile (accordion) ===== */
  .nav-links{ align-items: stretch; }  /* link a tutta larghezza */
  .nav-links > li { width: 100%; }

  /* Struttura: link padre + caret sulla stessa riga; submenu sotto full-width */
  .nav-links > .dropdown {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0px;
    width: 100%;
  }
  .dropdown > .parent-link { grid-column: 1 / 2; }
  .dropdown > .submenu-toggle { 
    grid-column: 2 / 3; 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.06);
    color: var(--menu-mobile-text);
    transition: background .2s ease, transform .2s ease, border-color .2s ease;
    cursor: pointer;
  }
  .dropdown > .submenu-toggle:hover { background: rgba(255,255,255,0.12); }

  .dropdown > .submenu {
    grid-column: 1 / -1;     /* tutta la riga */
    position: static;
    background: transparent;
    border: 0; border-radius: 0; box-shadow: none;
    padding: 0 6px 6px 6px;

    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: none;
    transition: max-height .3s ease, opacity .25s ease;
  }
  /* Stato aperto */
  .dropdown.open > .submenu { max-height: 700px; opacity: 1; }

  /* Voci figlie leggibili su pannello scuro */
  .dropdown > .submenu a {
    color: var(--menu-mobile-text) !important;
    padding: 10px 12px;
    border-radius: 8px;
  }
  .dropdown > .submenu a:hover { background: var(--menu-mobile-hover); }

  /* Rotazione caret quando aperto */
  .dropdown.open > .submenu-toggle i {
    transform: rotate(180deg);
    transition: transform .25s ease;
  }


  /* ===== Migliorie UI mobile: caret + separatori + gerarchie ===== */

/* separatori tra le VOCI PRINCIPALI */
.nav-links > li {
  width: 100%;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.nav-links > li:first-child {
  border-top: 0;
}

/* stile link primari */
.nav-links > li > a.parent-link {
  font-weight: 700;
  letter-spacing: .2px;
}

/* bottone caret: mostralo come “chip” a destra */
.dropdown > .submenu-toggle {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06);
  color: var(--menu-mobile-text);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease, border-color .2s ease, opacity .2s ease;
}


/* hover/focus sul caret */
.dropdown > .submenu-toggle:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.35);
}
.dropdown > .submenu-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* BLOCCO SOTTOMENU (accordion già presente) */
.dropdown > .submenu {
  grid-column: 1 / -1;
  margin-top: 2px;
  padding: 4px 0 8px 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;

  /* già hai max-height/opacity/transition impostati */
}

/* contenuto sottomenu: rientro, stile diverso, separatori */
.dropdown > .submenu ul,
.dropdown > .submenu {
  list-style: none;
  margin: 0;
  padding: 0 6px 0px 6px;
}

.dropdown > .submenu li {
  border-top: 1px dashed rgba(255,255,255,0.12);
}
.dropdown > .submenu li:first-child {
  border-top: 0;
}

.dropdown > .submenu a {
  display: block;
  color: var(--menu-mobile-text) !important;
  padding: 10px 12px 10px 18px;   /* rientro maggiore per gerarchia */
  border-radius: 8px;
  font-weight: 500;
  opacity: 0.95;
}
.dropdown > .submenu a:hover {
  background: var(--menu-mobile-hover);
  opacity: 1;
}

/* stato OPEN del dropdown: già gestito, qui aggiungo feedback al parent */
.dropdown.open > a.parent-link {
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
}

/* opzionale: micro-sezione “header” del menu (padding top già presente) */
.nav-links::before {
  content: "";
  display: block;
  height: 4px;
  margin-bottom: 4px;
  background: transparent;
}

/* ===== Differenziazione voci principali vs submenu ===== */

/* Voci principali */
.nav-links > li > a.parent-link {
  font-size: 1rem;         /* dimensione base */
  font-weight: 700;        /* più bold */
  letter-spacing: 0.2px;
  padding: 12px 14px;      /* spazio ampio e touch-friendly */
}

/* Voci del submenu */
.dropdown > .submenu a {
  font-size: 0.92rem;      /* leggermente più piccolo */
  font-weight: 500;        /* meno marcato */
  color: rgba(255,255,255,0.85) !important; /* colore più tenue */
  padding: 10px 14px 10px 20px;  /* meno padding verticale + rientro extra */
  border-radius: 6px;
}

/* Hover submenu: maggiore contrasto */
.dropdown > .submenu a:hover {
  background: var(--menu-mobile-hover);
  color: #fff !important;
}

}

/* Active link (desktop & mobile) */
.nav-links a.active,
.nav-links a[aria-current="page"]{color:var(--accent) !important}
.nav-links a.active::after{width:100%}


/* ===== Dropdown desktop ===== */
.nav-links > li { position: relative; }



/* ===== Dropdown desktop: colori sempre leggibili ===== */
/* ===== Dropdown desktop: colori leggibili ===== */
@media (min-width: 993px){
   .nav-links .li-signup	 { 
		display: none !important;
	  }
	  .nav-links .li-signup .nav-cta	 { 
		display: none !important;
	  }
.dropdown > .submenu-toggle {
  display: none; /* visibile solo su mobile */
}
  .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    padding: 8px;
    list-style: none;

    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    z-index: 1100;
  }

  .nav .submenu a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text-primary) !important;
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
  }

  .nav .submenu a:hover,
  .nav .submenu a:focus {
    background: #f5f6f7;
    color: var(--accent) !important;
    outline: none;
  }

  /* Apertura dropdown al hover/focus + ponte anti “buco” */
  .dropdown:hover > .submenu,
  .dropdown:focus-within > .submenu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .submenu::before {
    content: "";
    position: absolute;
    left: 0; right: 0;
    top: -10px;
    height: 12px;
  }
}


/* =========================
   HERO
   ========================= */
.hero{
  background:linear-gradient(rgba(0,0,0,.65), rgba(0,0,0,.25)), url('/assets/img/milan-place-duomo-chathedral.jpg') center/cover no-repeat;
  min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; color:var(--bg-light); padding:120px 24px 60px;
}
.hero-content{max-width:850px; animation:fadeIn 1.2s cubic-bezier(0.22,1,0.36,1) forwards}
.hero h1{font-size:clamp(3rem,6vw,4.5rem); font-weight:800; margin-bottom:1.5rem; line-height:1.2; text-shadow: 0 2px 8px rgba(0,0,0,0.5);}
.hero .subtitle{font-size:clamp(1.1rem,2vw,1.4rem); margin-bottom:2.5rem; max-width:700px; margin-inline:auto; color:rgba(255,255,255,.9);}
.hero-stats{display:flex; justify-content:center; gap:35px; margin:40px 0; flex-wrap:wrap}
.hero-stats .stat-item{text-align:center}
.hero-stats .stat-value{font-family:var(--font-heading); font-size:2.5rem; font-weight:700; color:var(--accent);text-shadow: 0 2px 12px rgba(0,0,0,0.85);}
.hero-stats .stat-label{font-size:1.2rem; letter-spacing:-1.25px; opacity:.9;text-shadow: 0 2px 8px rgba(0,0,0,0.5);}

/* Pulsante hero principale */
.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--accent);
  color: #fff;
  padding: 18px 36px;
  text-decoration: none;
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: 700;
  transition: all var(--transition) ease;
  box-shadow: var(--shadow-md);
  cursor: pointer; /* aggiunto */
}
.cta-primary:hover{background:var(--accent-hover); transform:translateY(-3px) scale(1.03); box-shadow:var(--shadow-lg)}

/* CTA primary LINK (same style, no JS scroll binding) */
.cta-primary-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--accent);
  color: #fff;
  padding: 18px 36px;
  text-decoration: none;
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: 700;
  transition: all var(--transition) ease;
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

.cta-primary-link:hover {
  background: var(--accent-hover);
  transform: translateY(-3px) scale(1.03);
  box-shadow: var(--shadow-lg);
}
/* =========================
   SECTIONS & CARDS
   ========================= */
.section{padding:120px 0}
.section-dark{background:var(--bg-dark); color:var(--text-light)}
.section-body {
  background-color: #FAFAFA; /* più chiaro del body, più luminoso */
}
.section-light {
  background-color: #FFFFFF;
}

.section-header{text-align:center; max-width:750px; margin:0 auto 60px}
.section-header .tagline{display:inline-block; color:var(--accent); font-weight:600; margin-bottom:12px; text-transform:uppercase; letter-spacing:1.5px}
.section-header h2{font-size:clamp(2.5rem,4vw,3.2rem); font-weight:800; line-height:1.25; margin-bottom:16px}
.section-header p{font-size:1.1rem; color:var(--text-secondary)}
.section-dark .section-header p{color:rgba(255,255,255,.7)}

/* Section image: full-width, responsive, SEO-friendly */
.section-image{
  display:block;
  margin:16px 0 24px;
  border-radius:12px;
  overflow:hidden;
  background:#f6f7f9;            /* subtle placeholder while loading */
  box-shadow:0 8px 24px rgba(0,0,0,0.06);
}

/* Image behavior: prevents CLS and keeps nice crop */
.section-image img{
  display:block;
  width:100%;
  height:auto;
  aspect-ratio:4 / 3;             /* matches your 1200x800 assets */
  object-fit:cover;
  object-position:center;
  transition:transform .3s ease;
}

/* Gentle hover for cards/links */
.section-image:hover img{
  transform:scale(1.02);
}

/* Optional caption support (if you add <figcaption>) */
.section-image figcaption{
  padding:10px 14px;
  font-size:.9rem;
  line-height:1.45;
  color:#677084;
  background:#fff;
  border-top:1px solid rgba(0,0,0,0.06);
}

/* Responsive tweaks */
@media (min-width: 768px){
  .section-image{ margin:18px 0 26px; }
}

@media (min-width: 993px){
  .section-image{ margin:20px 0 28px; }
  /* if you ever need a wider cinematic feel on desktop */
  .section-image--wide img{ aspect-ratio:16 / 9; }
}

/* Utility modifiers (optional) */
.section-image--no-shadow{ box-shadow:none; }
.section-image--no-radius{ border-radius:0; }
.section-image--tall img{ aspect-ratio:4 / 5; }


.features-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:30px}
.features-grid-2col{grid-template-columns:repeat(auto-fit,minmax(370px,1fr));}
.features-grid-4col{grid-template-columns:repeat(auto-fit,minmax(210px,1fr));}
.features-grid--fixed-3{
  display:grid;
  gap:30px;
  grid-template-columns: 1fr;
}
.feature-card{text-align: center;background:var(--bg-light); padding:20px; border-radius:var(--radius); border:1px solid var(--border-color); transition:transform var(--transition) ease, box-shadow var(--transition) ease}
.feature-card:hover{transform:translateY(-8px); box-shadow:var(--shadow-md)}
.feature-icon{font-size:2rem; color:var(--accent); margin-bottom:20px}
.feature-icon .border-cerchiato{    
border: 1px solid #cbcbcb;
border-radius: 100%;
padding: 30px;
width: 100px;
height: 95px;
}
.feature-card h3{    font-size: 1.3rem;
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: -0.75px;}
.feature-card p{color:var(--text-secondary); font-size:1rem}

/* Feature card media variant: linkable image instead of icon */
.feature-card .feature-media {
  display: block;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
  background: #f7f7f7;
  margin-bottom: 12px;
  /* Keep a consistent visual height across cards */
  aspect-ratio: 16 / 9;
}

.feature-card .feature-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.25s ease;
}

/* Hover and focus feedback for UX and accessibility */
.feature-card .feature-media:hover img {
  transform: scale(1.02);
}

.feature-card .feature-media:focus {
  outline: none;
}

.feature-card .feature-media:focus-visible {
  box-shadow: 0 0 0 3px rgba(59,130,246,0.45);
  border-color: rgba(59,130,246,0.65);
}

/* Dark section adaptation if reused elsewhere */
.section-dark .feature-card .feature-media {
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
}

/* Optional small caption overlay hook if ever needed */
.feature-card .feature-media .media-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1;
  background: rgba(0,0,0,0.6);
  color: #fff;
}


/* =========================================
   CTA Secondary Button
   Usage: replace "cta-primary" with "cta-secondary" on feature-card links
   Accessible, responsive, and works on light and dark sections
   ========================================= */

/* Base variables with safe fallbacks */
:root {
  --cta-secondary-text: #111827;       /* gray-900 */
  --cta-secondary-bg: transparent;
  --cta-secondary-border: #111827;
  --cta-secondary-hover-text: #ffffff; /* white */
  --cta-secondary-hover-bg: #111827;
  --cta-secondary-hover-border: #111827;
  --cta-secondary-focus-ring: rgba(59, 130, 246, 0.45); /* blue focus */
}

/* Container spacing inside cards */
.feature-card .card-cta {
  margin-top: 12px;
}

/* Full width by default inside feature cards for better tap target */
.feature-card .cta-secondary {
  width: 100%;
  text-align: center;
}

/* Core style */
.cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;            /* accessible hit area */
  padding: 0.75rem 1rem;
  border: 2px solid var(--cta-secondary-border, #111827);
  border-radius: 12px;
  background: var(--cta-secondary-bg, transparent);
  color: var(--cta-secondary-text, #111827);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(0,0,0,0.05);
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.06s ease;
}

/* Hover and active */
.cta-secondary:hover {
  background: var(--cta-secondary-hover-bg, #111827);
  color: var(--cta-secondary-hover-text, #ffffff);
  border-color: var(--cta-secondary-hover-border, #111827);
  transform: translateY(-1px);
}

.cta-secondary:active {
  transform: translateY(0);
}

/* Focus visibility */
.cta-secondary:focus {
  outline: none;
}

.cta-secondary:focus-visible {
  box-shadow: 0 0 0 3px var(--cta-secondary-focus-ring, rgba(59,130,246,0.45));
}

/* Disabled states */
.cta-secondary[aria-disabled="true"],
.cta-secondary.is-disabled {
  opacity: 0.6;
  pointer-events: none;
  cursor: not-allowed;
}

/* Icon alignment if you add <i> inside the button */
.cta-secondary i {
  font-size: 0.95em;
  line-height: 1;
}

/* Size variants */
.cta-secondary--sm {
padding: 0.25rem 0.55rem;
border-width: 1px;
border-radius: 10px;
font-weight: 400;
font-size: 0.95rem;
}

.cta-secondary--lg {
  padding: 0.9rem 1.25rem;
  border-radius: 14px;
  font-weight: 700;
}

/* Block variant for full width outside feature cards if needed */
.cta-secondary--block {
  display: flex;
  width: 100%;
}

/* Dark section inversion for contrast */
.section-dark .cta-secondary {
  color: #e5e7eb;              /* gray-200 */
  border-color: #e5e7eb;
  background: transparent;
}

.section-dark .cta-secondary:hover {
  background: #e5e7eb;
  color: #111827;
  border-color: #e5e7eb;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .cta-secondary {
    transition: none;
  }
}

.community-grid{display:grid; grid-template-columns:1fr 1fr; gap:60px; align-items:center}
.community-image{border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow-lg)}
.community-image img{width:100%; height:100%; object-fit:cover; display:block}
.benefits-list{list-style:none; margin-top:30px; display:flex; flex-direction:column; gap:20px}
.benefits-list li{position:relative; padding-left:45px; font-size:1.1rem; font-weight:500}
.benefits-list li::before{content:'\f00c'; font-family:"Font Awesome 6 Free"; font-weight:900; position:absolute; left:0; top:50%; transform:translateY(-50%); width:30px; height:30px; background:var(--accent); color:var(--bg-light); border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:.9rem}

.testimonials-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(320px,1fr)); gap:30px; margin-top:60px}
.testimonial-card{background:var(--bg-light); border-radius:var(--radius); padding:35px; box-shadow:var(--shadow-md); border:1px solid var(--border-color)}
.testimonial-header{display:flex; align-items:center; margin-bottom:20px}
.testimonial-avatar{width:60px; height:60px; border-radius:50%; overflow:hidden; margin-right:15px; border:3px solid var(--accent); flex-shrink:0}
.testimonial-avatar img{width:100%; height:100%; object-fit:cover}
.testimonial-author{font-family:var(--font-heading); font-weight:700; color:var(--text-primary)}
.testimonial-role{color:var(--text-secondary); font-size:.9rem; font-weight:500}
.testimonial-text{color:var(--text-secondary); font-style:italic; position:relative; padding-left:30px; font-size:1rem}
.testimonial-text::before{content:'\f10d'; font-family:"Font Awesome 6 Free"; font-weight:900; position:absolute; left:0; top:-5px; color:var(--accent); opacity:.3; font-size:1.8rem}
.rating{color:var(--accent); margin-top:15px; font-size:1rem}

.gallery-grid{display:grid; grid-template-columns:repeat(4,1fr); grid-auto-rows:200px; gap:20px}
.gallery-item{position:relative; overflow:hidden; border-radius:var(--radius); box-shadow:var(--shadow-md); cursor:pointer}
.gallery-item img{width:100%; height:100%; object-fit:cover; transition:transform .4s ease}
.gallery-item:hover img{transform:scale(1.1)}
.gallery-overlay{position:absolute; inset:0; display:flex; align-items:flex-end; padding:20px}
.gallery-overlay h4{color:#fff; font-size:1.1rem; font-weight:600; transform:translateY(100%); opacity:0; transition:transform .4s ease, opacity .4s ease}
.gallery-item:hover h4{transform:translateY(0); opacity:1}
.item-1{grid-column:span 2; grid-row:span 2}
.item-2{grid-row:span 2}
.item-3{grid-row:span 2}
.item-4{grid-column:span 2}
.item-5{grid-row:span 2}
.item-6{grid-row:span 2}


/* Full-width CTA bar centered under the two-column community grid */
.community-cta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 18px;          /* space from grid */
  width: 100%;
}

.community-cta .cta-primary {
  min-height: 44px;          /* accessible touch target */
  min-width: 160px;
  text-align: center;
}

/* Larger screens: add a bit more breathing room */
@media (min-width: 993px) {
.features-grid--fixed-3{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .community-cta {
    margin-top: 24px;
  }
}

/* =========================
   CTA / FORM
   ========================= */
#newsletter{text-align:center}
.cta-box{background:var(--bg-dark); color:var(--bg-light) !important; padding:80px 40px; border-radius:var(--radius); box-shadow:var(--shadow-lg); max-width:900px; margin:0 auto}
.cta-box h2{font-size:clamp(2.2rem,4vw,3rem) !important; font-weight:800 !important;color:#fff !important; line-height:1.2 !important; margin-bottom:20px;text-align: center;}
.cta-box p{font-size: 0.95rem !important;color: rgba(255, 255, 255, .8) !important;margin-bottom: 40px !important;margin-inline: auto !important;text-align: center !important;letter-spacing: -0.25px !important;}
.email-signup{display:flex; max-width:500px; margin:0 auto; gap:10px}
.email-input{flex:1; padding:16px 24px; border:1px solid #444; border-radius:50px; font-size:1rem; outline:none; background:#FFF; color:var(--text-primary); transition:border-color var(--transition)}
.email-input:focus{border-color:var(--accent)}
.email-input::placeholder{color:#888}
.submit-btn{background:var(--accent); color:#fff; padding:16px 32px; border:0; border-radius:50px; font-size:1rem; font-weight:600; cursor:pointer; transition:all var(--transition) ease}
.submit-btn:hover{background:var(--accent-hover)}

.slug-signup #signup{padding: 30px 0;}
.slug-community #signup{padding: 30px 0;}
#newsletter{padding: 30px 0;}
.slug-home #newsletter{padding: 120px 0;}

/* ===== Registration form layout ===== */
.mdn-form *,
.mdn-form *::before,
.mdn-form *::after {
  box-sizing: border-box;
}
.mdn-form .input-field,
.mdn-form select,
.mdn-form textarea {
  width: 100%;
  max-width: 100%;
}
.mdn-form .form-grid{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap:16px;
}
.mdn-form .form-field{display:flex; flex-direction:column; gap:8px}
.mdn-form .form-field.full{grid-column:1 / -1}
/* 3 fields on one row (desktop only) */

@media (min-width: 769px){
  .mdn-form .form-grid.three-cols{
    grid-template-columns: repeat(3, 1fr);
    gap:14px;
  }
}

.mdn-form label, .mdn-form .label{
  font-weight:600;
  font-size:0.95rem;
}

.input-field{
  padding:14px 16px;
  border:1px solid var(--border-color);
  border-radius:12px;
  background:#fff;
  font-size:1rem;
  outline:none;
  transition:border-color var(--transition), box-shadow var(--transition);
}
.input-field:focus{
  border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(217,119,6,0.15);
}

/* Checkbox grid */
.checkbox-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:10px 16px;
  margin-top:6px;
}
.checkbox-grid label{
  display:flex; align-items:center; gap:8px; font-weight:500;
}
.checkbox-grid input[type="checkbox"]{
  width:18px; height:18px;
}

/* "Other" inline input */
.checkbox-grid .other-line{grid-column:span 1}
.checkbox-grid .other-input{grid-column: span 2}

/* Center the register button */
.form-actions {
  text-align: center;
  margin-top: 20px;
}

/* Privacy policy checkbox */
.privacy-check {
  grid-column: 1 / -1; /* full width */
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
  margin-top: 24px;
}

.privacy-check label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.privacy-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.privacy-check a {
  color: var(--accent);
  text-decoration: underline;
}

.privacy-check a:hover {
  color: var(--accent-hover);
}

/* --- Notice cards: chiaro su sfondo scuro --- */
.notice {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  line-height: 1.5;
  animation: fadeIn .25s ease-out;
  text-align:center;
}
.notice h3 {
  margin: 0 0 6px 0;
  font-size: 1.05rem;
  font-weight: 600;
}
.notice p { margin: 0; color:#565656 !important;}

/* Success: verde molto chiaro */
.notice--success {
  background: #f3fff5;           /* chiaro */
  border-color: #cfead6;
  color: #0e4d2f;
}

/* Error: rosato molto chiaro */
.notice--error {
  background: #fff5f5;
  border-color: #f3cccc;
  color: #7a1e1e;
}

/* Stato inline (quando il form resta visibile) */
.form-message {
  margin-top: 10px;
  font-size: .95rem;
}
.email-signup .form-message.error{display:none;}

/* Container del feedback post-submit (il messaggio grande) */
.form-feedback {
  margin-top: 18px;
}

/* Transizione/animazione semplice */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Nascondi il form dopo successo, mantenendo spaziatura coerente */
.mdn-form.is-hidden {
  display: none;
}
.email-signup.is-hidden { display: none; }
/* Se il form ha sfondo scuro, aumentiamo contrasto dei placeholder di default */
.mdn-form.has-dark-bg ::placeholder { color: rgba(255,255,255,.7); }

.mdn-form input[type="date"],
.mdn-form input[type="datetime-local"]{
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 12px 8px; /* leggermente meno del tuo 14px 16px */
}
.mdn-form input[type="date"],
.mdn-form input[type="datetime-local"]{
  -webkit-appearance: none;
  appearance: none;
}

/* Responsive */
@media (max-width: 768px){
 .mdn-form .form-grid {
    overflow-x: hidden;
  }
  .mdn-form .form-grid{grid-template-columns:1fr}
  .checkbox-grid{grid-template-columns:1fr 1fr}
  .checkbox-grid .other-input{grid-column: span 1}
}
@media (max-width: 480px){
	.checkbox-grid{grid-template-columns:1fr}
	.checkbox-grid .other-input{grid-column: span 1}
	.breadcrumb {
	margin: 6px 0 10px;
	}
	.breadcrumb a,
	.breadcrumb li{
	font-size: .75rem !important;
	letter-spacing:-0.5px;
	}
	.breadcrumb li:not(:last-child)::after{
	font-size: .9rem !important;
	letter-spacing:-0.5px;
	}
	.breadcrumb ol {
	gap: 4px !important;
	}
	.feature-card{
		text-align:center;
	}
}


/* =========================
   FOOTER
   ========================= */
.footer{background:var(--bg-dark); color:var(--text-light); padding:80px 0 40px}
.footer-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:40px; margin-bottom:60px}
.footer-col h3{font-size:1.4rem; margin-bottom:25px; position:relative; padding-bottom:15px}
.footer-col h3::after{content:''; position:absolute; bottom:0; left:0; width:50px; height:3px; background:var(--accent)}
.footer-links{list-style:none}
.footer-links li{margin-bottom:15px}
.footer-links a{color:rgba(255,255,255,.7); text-decoration:none; transition:color var(--transition) ease, transform var(--transition) ease}
.footer-links a:hover{color:#fff; transform:translateX(5px)}
.social-links{display:flex; gap:15px; margin-top:20px}
.social-links a{display:inline-flex; align-items:center; justify-content:center; width:45px; height:45px; background:rgba(255,255,255,.1); border-radius:50%; color:#fff; font-size:1.2rem; text-decoration:none; transition:background-color var(--transition) ease, transform var(--transition) ease}
.social-links a:hover{background:var(--accent); transform:translateY(-5px)}
.footer-bottom{text-align:center; padding-top:40px; border-top:1px solid rgba(255,255,255,.1); color:rgba(255,255,255,.6); font-size:.95rem}
.footer-bottom .footer-legal{
  margin-top:8px;
  display:flex;
  gap:10px;
  justify-content:center;
  font-size:.95rem;
}
.footer-bottom .footer-legal a{
  color:rgba(255,255,255,.7);
  text-decoration:none;
}
.footer-bottom .footer-legal a:hover{ color:#fff; text-decoration:underline; }

/* Add-on */
.footer-links--cols-2{ columns:2; column-gap:24px }
.footer-links--cols-2 li{ break-inside:avoid }
@media (max-width:768px){
  .footer-links--cols-2{ columns:1 }
}


/* ===== Back to Top Button ===== */
.back-to-top {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 48px;
  height: 48px;
  border-radius: 50%; /*  rotondo; usa 8px se vuoi quadrato stondato */
  background: var(--accent);
  color: #fff;
  border: none;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  z-index: 1100;
}
.back-to-top:hover {
  background: var(--accent-hover);
  transform: translateY(-3px);
}
.back-to-top.show {
  opacity: 1;
  visibility: visible;
}


/* =========================
   ANIMATIONS & RESPONSIVE
   ========================= */
@keyframes fadeIn{from{opacity:0; transform:translateY(30px)} to{opacity:1; transform:translateY(0)}}
.fade-in{opacity:0; transform:translateY(30px); transition:all .8s cubic-bezier(0.22,1,0.36,1)}
.fade-in.visible{opacity:1; transform:translateY(0)}

@media (max-width: 992px){
  .community-grid{grid-template-columns:1fr; gap:40px}
  .community-image{order:-1}
  .gallery-grid{grid-template-columns:repeat(2,1fr); grid-auto-rows:250px}
  .gallery-item{grid-column:auto!important; grid-row:auto!important}
  .cta-box {
		padding: 20px 20px !important;
	}
	#signup .container{padding: 0 12px;}
	#newsletter .container{padding: 0 12px;}
}
@media (max-width: 768px){
  .email-signup{flex-direction:column}
  .footer-grid{grid-template-columns:1fr}
  .hero-stats{gap:20px}
}
@media (max-width: 576px){
  .gallery-grid{grid-template-columns:1fr; grid-auto-rows:250px}
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  *{animation:none!important; transition:none!important}
}

/* =========================
   Extra small devices (<400px)
   ========================= */
@media (max-width: 400px) {
  .logo {
    font-size: 1.2rem !important; /* ridotto rispetto al default 1.5rem */
  }
}

/* ===== Lightbox / Gallery Modal ===== */
.lightbox{
  position: fixed; inset: 0;
  background: rgba(0,0,0,.82);
  display: none;
  align-items: center; justify-content: center;
  z-index: 2000;
  padding: 24px;
}
.lightbox.show{ display: flex; }

.lightbox__figure{
  position: relative;
  max-width: 92vw; max-height: 86vh;
  display: grid; grid-template-rows: 1fr auto; gap: 12px;
}
.lightbox__img{
  max-width: 92vw; max-height: 80vh;
  object-fit: contain; border-radius: 12px;
  box-shadow: var(--shadow-lg);
  background: #111;
}
.lightbox__caption{
  color: #f5f5f5; text-align: center;
  font-size: .95rem; line-height: 1.4;
  max-width: 80ch; margin: 0 auto;
  opacity: .9;
}

/* Controls */
.lightbox__close,
.lightbox__prev,
.lightbox__next{
  position: absolute;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.35);
  color: #fff; cursor: pointer;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
  backdrop-filter: blur(2px);
}
.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.45);
}
.lightbox__close{ top: 16px; right: 16px; font-size: 1.4rem; line-height: 1; }
.lightbox__prev{ left: 16px; }
.lightbox__next{ right: 16px; }
.lightbox__prev, .lightbox__next{ font-size: 1.6rem; }

@media (max-width: 768px){
  .lightbox{ padding: 16px; }
  .lightbox__prev{ left: 8px; }
  .lightbox__next{ right: 8px; }
  .lightbox__close{ top: 8px; right: 8px; }
}

/* Chiudi cliccando sullo sfondo (ma non sull'immagine) */
.lightbox:has(.lightbox__img:hover){ cursor: default; }
.lightbox{ cursor: pointer; }
.lightbox__figure, .lightbox__img, .lightbox__caption,
.lightbox__prev, .lightbox__next, .lightbox__close{ cursor: auto; }

@media (min-width: 993px) and (max-width: 1200px){
.logo {
    font-size: 1.1rem;
}
.nav-links a {
    font-size: 0.82rem;
    letter-spacing: -0.5px;
}
.nav-links {
    gap: 9px;
}
}

/* ===== PAGE LAYOUT (pagine interne, no homepage) ===== */
.page-content {
  background: var(--bg-body);
}
body.home .page-content {
  padding: 110px 0 80px; /* spazio per navbar fissa */
}
body:not(.home) .page-content {
  padding: 80px 0 60px; /* più compatto per pagine interne */
}

.page-content .container {
  max-width: 1200px; 
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}


/* ---- Breadcrumb ---- */
.breadcrumb{
   margin: 8px 0 8px;
   line-height: 1.4;  
  overflow: hidden;               /* per la versione fade edges opzionale */
}
.breadcrumb ol{
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 0;
  margin: 0;
}
.breadcrumb a{
  color: var(--text-secondary);
  text-decoration: none;
  font-size: .95rem;
}
.breadcrumb a:hover{ color: var(--accent); }
.breadcrumb li{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: .9rem;
}
.breadcrumb li:not(:last-child)::after{
  content: "\2192";
  opacity: .6;
  font-size: 1rem;
}

/* ---- Page header ---- */
.page-header{
  margin-bottom: 28px;
}
.page-image{
  margin: 0 0 18px 0;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: #111;
      border-radius: 0px;
}
.page-image img{
 width: 100%;
  height: clamp(220px, 36vw, 520px);
  object-fit: contain;
  background: #111;
  display: block;
}

.page-header h1{
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}

.page-subtitle{
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 95ch;
}

/* ---- Body copy ---- */
.page-body{
  margin-top: 28px;
}

.page-body h2{
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  line-height: 1.25;
  margin: 26px 0 10px;
  color: var(--text-primary);
}
.page-body h3{
  font-size: clamp(1.1rem, 2.2vw, 1.25rem);
  line-height: 1.35;
  margin: 20px 0 8px;
  color: var(--text-primary);
}
.page-body p,
.page-body li{
  color: var(--text-primary);
  font-size: 1rem;
}
.page-body p{ margin: 0 0 14px; }
.page-body ul, .page-body ol{ padding-left: 20px; margin: 0 0 14px; }

/* ---- Related boxes / internal links ---- */
.related-boxes{
  margin-top: 34px;
  padding: 18px 18px 22px;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.related-boxes > h2{
  font-size: 1.15rem;
  margin: 0 0 12px;
  color: var(--text-primary);
}

.related-grid{
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.related-item{
  grid-column: span 12;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  transition: transform var(--transition) ease, box-shadow var(--transition) ease, border-color var(--transition) ease;
}
.related-item:hover{
  transform: translateY(-3px);
  border-color: rgba(0,0,0,0.08);
  box-shadow: var(--shadow-md);
}

.related-item h3{
  font-size: 1.05rem;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.related-item p{
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.related-item .cta-link{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.related-item .cta-link:hover{ color: var(--accent-hover); }
.related-item .cta-link::after{
  content: "\2192";
  transition: transform .2s ease;
}
.related-item .cta-link:hover::after{
  transform: translateX(2px);
}

/* ---- Responsive ---- */
@media (min-width: 680px){
  .related-item{ grid-column: span 6; }
}
@media (min-width: 993px){
  .related-item{ grid-column: span 4; } /* 3 colonne */
}

/* ---- Optional: breadcrumb fade edges quando è lungo e scrollabile ---- */
.breadcrumb.is-scrollable{
  position: relative;
  overflow-x: auto;
  scrollbar-width: none;     /* Firefox */
}
.breadcrumb.is-scrollable::-webkit-scrollbar{ display: none; } /* WebKit */

.breadcrumb.is-scrollable::before,
.breadcrumb.is-scrollable::after{
  content: "";
  position: sticky;
  top: 0;
  width: 32px;
  height: 100%;
  pointer-events: none;
}
.breadcrumb.is-scrollable::before{
  left: 0;
  background: linear-gradient(to right, var(--bg-body), transparent);
}
.breadcrumb.is-scrollable::after{
  right: 0;
  background: linear-gradient(to left, var(--bg-body), transparent);
}

/* TOC minimale (non sticky) */
.toc-anchor { scroll-margin-top: calc((#navbar ? #navbar.offsetHeight : 0) + 8px); }
.toc {
  margin: 16px 0 12px;
}
.toc details {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-light);
}
.toc summary {
  cursor: pointer;
  padding: 10px 12px;
  font-weight: 700;
  list-style: none; /* Safari */
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after {
  content: "\2193";
  float: right;
  opacity: .7;
  transition: transform .2s ease;
}
.toc[open] summary::after { transform: rotate(180deg); }
#page-toc-list {
  padding: 8px 12px 12px 35px; /* elenco semplice */
}
/* solo H2: elenco numerato semplice */
#page-toc-list li {
  margin: 6px 0;
}
#page-toc-list a {
  text-decoration: none;
  color: var(--text-secondary);
}
#page-toc-list a:hover { color: var(--accent); }

/* offset naturale quando salti ad un h2 via link/scrollTo */
.page-body > section > h2 { scroll-margin-top: 84px; } /* altezza navbar */
@media (max-width: 992px){
  .page-body > section > h2 { scroll-margin-top: 72px; }
}


/* =============== Accordion FAQ (details/summary) =============== */

/* Contenitore generico: va bene per tutte le FAQ negli article.page-body */
.faq details{
  background: #ffffff;
  border: 1px solid #e3e3e7;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  margin: 12px 0;
  overflow: hidden;
}

/* Stato aperto con ombra piu evidente */
.faq details[open]{
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Riga cliccabile */
.faq details > summary{
  list-style: none;          /* rimuove il marker nativo */
  cursor: pointer;
  padding: 16px 48px 16px 16px;
  position: relative;
  font-weight: 600;
  user-select: none;
}

/* rimuove il marker su WebKit */
.faq details > summary::-webkit-details-marker{
  display: none;
}

/* accessibilita focus */
.faq details > summary:focus{
  outline: none;
}
.faq details > summary:focus-visible{
  outline: 2px solid #4c8bf5;
  outline-offset: 2px;
}

/* titolo dentro il summary (il tuo h3) */
.faq details > summary h3{
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
}

/* icona + / - a destra */
.faq details > summary::after{
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  border-radius: 4px;
  background: #f2f3f5;
  color: #111;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

/* cambia icona e stile quando aperto */
.faq details[open] > summary::after{
  content: "-";
  background: #e9ebee;
  color: #000;
  transform: translateY(-50%) rotate(180deg);
}

/* contenuto della risposta */
.faq details summary ~ *{
  padding: 0 16px 16px;
  animation: faq-in 0.25s ease;
}

/* paragrafo interno */
.faq details p{
  margin: 12px 0 0 0;
}

/* piccola animazione di ingresso */
@keyframes faq-in{
  from{ opacity: 0; transform: translateY(-4px); }
  to{ opacity: 1; transform: translateY(0); }
}

/* riduci animazioni per chi ha impostato riduzione del movimento */
@media (prefers-reduced-motion: reduce){
  .faq details summary ~ *{ animation: none; }
}

/* Variante scura opzionale: applica .dark su <html> o su un wrapper */
.dark .faq details{
  background: #111;
  border-color: #333;
}
.dark .faq details > summary{
  color: #eee;
}
.dark .faq details > summary::after{
  background: #222;
  color: #ddd;
}
.dark .faq details[open] > summary::after{
  background: #2a2a2a;
  color: #fff;
}


/* WORK section enhancements aligned with community layout */
/* Two stacked responsive rows for WORK, keeping existing look-and-feel */

/* Base grid for each row */
.work-split-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start; /* top align so images start under the header line */
  margin-bottom: 28px; /* space between the two rows */
}

/* Last row spacing reset */
.work-split-grid:last-child {
  margin-bottom: 0;
}

/* Desktop: two columns and side swapping via modifiers */
@media (min-width: 993px) {
  .work-split-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  /* Row 1: image left, content right */
  .work-split-grid--image-left .community-image { order: 1; }
  .work-split-grid--image-left .community-content { order: 2; }

  /* Row 2: image right, content left */
  .work-split-grid--image-right .community-content { order: 1; }
  .work-split-grid--image-right .community-image { order: 2; }
}

/* Image polish (reuse existing community-image styles) */
.work-split-grid .community-image img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 12px;
  object-fit: cover;
}

/* Benefits list items (keep current visual system) */
.work-split-grid .work-benefits .benefit-item,
.work-split-grid .work-benefits .benefits-list .benefit-item {
  padding: 14px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  display: grid;
  grid-template-columns: 1fr;
  grid-row-gap: 6px;
}

.work-split-grid .benefits-list .benefit-item:last-child { border-bottom: 0; }

.work-split-grid .benefits-list .benefit-item h3 {
  font-size: 1.05rem;
  line-height: 1.35;
  margin: 0;
}

.work-split-grid .benefits-list .benefit-item p { margin: 0; }

.work-split-grid .benefit-actions { margin-top: 8px; }

/* Small buttons adapt to container */
.benefit-actions .cta-secondary { width: auto; }
@media (max-width: 640px) {
.work-split-grid .benefit-actions .cta-secondary { width: 100%; }
}

/* If your theme injects bullets via ::before on benefits-link, hide them here */
.work-split-grid .benefits-link li::before,
.work-split-grid .work-benefits .benefit-item::before {
  display: none !important;
}


/* Grid variant: two columns with image on the left at >=992px */
.community-grid-variant {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: stretch;
}

@media (min-width: 993px) {
  .community-grid-variant {
    grid-template-columns: 1fr 1fr;
    gap: 60px;
  }
  .community-grid-variant.community-grid-variant--image-left .community-image {
    order: 1; /* visual left */
  }
  .community-grid-variant.community-grid-variant--image-left .community-content {
    order: 2; /* visual right */
  }
  .footer-grid{
    grid-template-columns: 1fr 0.8fr 1.6fr 1fr; /* 1 | 2 | 3 | 4 */
  }
  .footer-links li{margin-bottom:10px}
}

/* Image polish */
.community-image img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 12px;
}

/* Work benefits list layout */
.benefits-link .benefit-item {
  padding: 14px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  display: grid;
  grid-template-columns: 1fr;
  grid-row-gap: 6px;
}
.benefits-link .benefit-item:last-child { border-bottom: 0; }
.benefits-link .benefit-item h3 {
  font-size: 1.25rem;
  line-height: 1.35;
  margin: 0;
  text-transform: uppercase;
}
.benefits-link .benefit-item p { margin: 0; }
.benefits-link .benefit-actions { margin-top: 8px; }

/* Buttons inside list */
.benefits-link .benefit-actions .cta-secondary { width: auto; }
@media (max-width: 640px) {
  .benefits-link .benefit-actions .cta-secondary { width: 100%; }
    .feature-card .feature-media {
    margin-bottom: 10px;
  }
}

/* Hide any custom bullets if present on your existing list class */
.benefits-link .benfits-link li::before { display: none !important; }
.benefits-link .benefit-item::before { display: none !important; }

/* Optional hover affordance */
.benefits-link .benefit-item:hover h3 {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* ===== Cookie Banner ===== */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #111;
  color: #fff;
  box-shadow: 0 -8px 24px rgba(0,0,0,.18);
  z-index: 1600;
  transform: translateY(100%);
  opacity: 0; visibility: hidden;
  transition: transform .3s ease, opacity .3s ease, visibility .3s ease;
}
.cookie-banner.show { transform: translateY(0); opacity: 1; visibility: visible; }

.cookie-banner__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px 24px;
  /* spazio per la X in alto a dx */
  padding-right: 72px; /* 40px btn + margini */
}

.cookie-banner__text {
  margin: 0;
  font-size: .95rem;
  line-height: 1.5;
  color: rgba(255,255,255,.9);
}
.cookie-banner__link { color: #fff; text-decoration: underline; }
.cookie-banner__link:hover { color: var(--accent); }

.cookie-banner__actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

/* Bottoni azione */
.cookie-btn {
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.06);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s ease, transform .1s ease, border-color .2s ease;
}
.cookie-btn:hover {
  background: rgba(255,255,255,.12);
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.45);
}
.cookie-btn--accept { background: var(--accent); border-color: var(--accent); }
.cookie-btn--accept:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

/* NUOVO: close in alto a destra del banner */
.cookie-banner__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.06);
  color: #fff;
  font-size: 1.2rem; line-height: 1;
  display: grid; place-items: center;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .1s ease;
}
.cookie-banner__close:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.45);
  transform: translateY(-1px);
}

/* Mobile */
@media (max-width: 768px){
  .cookie-banner__inner {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px 16px;
    /* riduci ma lascia spazio per la X */
    padding-right: 45px;
    text-align: center;
  }
  .cookie-banner__actions {
    justify-content: center;
    flex-wrap: wrap;
  }
  .cookie-banner__text {
    font-size: .85rem;
    margin-bottom: 6px;
  }
  .cookie-banner__close {
    top: 8px; right: 8px;
    width: 36px; height: 36px;
  }
}

/* (Opzionale) puoi rimuovere questa classe se non usi più il vecchio close
.cookie-btn--close { display:none; }
*/


/* Service quick navigation */
.cow-service-nav{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 18px;
}

.cow-service-nav__btn{
  background: rgba(0,0,0,.05);
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: .95rem;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.cow-service-nav__btn:hover{
  background: rgba(0,0,0,.08);
  border-color: rgba(0,0,0,.2);
  transform: translateY(-1px);
}

/* Service blocks */
.cow-service{
padding-bottom: 64px;
  margin-bottom: 64px;
}

.cow-service__grid{
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 18px;
  align-items: start;
}

.cow-service__media img{
  border-radius: 16px;
  width: 100%;
  height: auto;
  display: block;
}

.cow-service__subtitle{
  margin-top: -6px;
  opacity: .9;
}

.cow-service__cta{
  margin-top: 14px;
}

.cow-service:not(:last-of-type)::after {
  content: "";
  display: block;
  margin: 64px auto 0;
  width: 100%;
  max-width: 900px;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(0,0,0,0.12),
    transparent
  );
}


/* Responsive */
@media (max-width: 768px){
	.cow-service__grid{ grid-template-columns: 1fr; }
	.cow-service {
	padding-bottom: 40px;
	margin-bottom: 40px;
	}

	.cow-service:not(:last-of-type)::after {
	margin-top: 40px;
	}
	#coworking-lead-minimal .container, #coworking-hub-form .container{
	padding:0px;
	}
	.section#coworking-lead-minimal,.section#coworking-hub-form{
	padding: 60px 0 !important;
	}
}
/* Alterna immagine/testo solo su desktop */
@media (min-width: 769px){
  .cow-service:nth-of-type(even) .cow-service__media{
    order: 2;
  }
  .cow-service:nth-of-type(even) .cow-service__content{
    order: 1;
  }
}
