/* ---------- Font serviti dal sito ----------
   Self-hosted invece che da fonts.googleapis.com: un font di terze parti
   caricato nel <head> invia IP e user-agent a Google prima ancora che il
   visitatore abbia visto il banner cookie. Sottoinsieme latino, il sito è in italiano. */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/lato-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/lato-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/lato-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../fonts/lato-900.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/playfair-display-500-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/playfair-display-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/playfair-display-600-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/playfair-display-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/playfair-display-700.woff2') format('woff2');
}

/* ============================================================
   Studio Canto — Fiscale · Tributario · Legale · Societario
   Palette: #991915 (rosso), bianco, grigio logo #58595b
   Font: Playfair Display (titoli) · Lato (testi)
   ============================================================ */

:root {
  --sc-red: #991915;
  --sc-red-dark: #6e110e;
  --sc-red-soft: #b54a45;
  --sc-red-tint: #faf1f0;
  --sc-grey: #58595b;
  --sc-ink: #2b2b2d;
  --sc-paper: #ffffff;
  --sc-cream: #fbf9f8;
  --sc-line: #eee4e2;
  --sc-radius: 1.5rem;
  --sc-radius-lg: 2.25rem;
  --sc-shadow: 0 18px 50px -18px rgba(86, 17, 14, .22);
  --sc-shadow-soft: 0 10px 34px -14px rgba(43, 43, 45, .18);
  --font-title: 'Playfair Display', Georgia, serif;
  --font-body: 'Lato', 'Helvetica Neue', Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--sc-ink);
  background: var(--sc-paper);
  font-size: 1rem;
  line-height: 1.62;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, .font-title {
  font-family: var(--font-title);
  color: var(--sc-ink);
  text-wrap: balance;
}

p { text-wrap: pretty; }

::selection { background: var(--sc-red); color: #fff; }

a { color: var(--sc-red); text-decoration: none; transition: color .25s ease; }
a:hover { color: var(--sc-red-dark); }

img { max-width: 100%; }

/* ---------- Utility ---------- */
.text-red { color: var(--sc-red) !important; }
.bg-cream { background: var(--sc-cream); }
.bg-red-tint { background: var(--sc-red-tint); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--sc-red);
}
.eyebrow::before {
  content: "";
  width: 2.2rem;
  height: 2px;
  border-radius: 2px;
  background: var(--sc-red);
}
.eyebrow.eyebrow-center::after {
  content: "";
  width: 2.2rem;
  height: 2px;
  border-radius: 2px;
  background: var(--sc-red);
}

.display-title { font-weight: 600; line-height: 1.12; letter-spacing: -.01em; }
.lead-soft { color: var(--sc-grey); font-size: 1.02rem; }

/* ---------- Bottoni ---------- */
.btn-sc {
  --bs-btn-padding-x: 1.75rem;
  --bs-btn-padding-y: .8rem;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: .04em;
  border-radius: 999px;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s ease, background .3s ease, color .3s ease;
}
.btn-sc-red {
  background: var(--sc-red);
  color: #fff;
  border: 2px solid var(--sc-red);
}
.btn-sc-red:hover {
  background: var(--sc-red-dark);
  border-color: var(--sc-red-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -12px rgba(153, 25, 21, .55);
}
.btn-sc-outline {
  background: transparent;
  color: var(--sc-red);
  border: 2px solid rgba(153, 25, 21, .35);
}
.btn-sc-outline:hover {
  border-color: var(--sc-red);
  color: var(--sc-red-dark);
  background: var(--sc-red-tint);
  transform: translateY(-2px);
}
.btn-sc-light {
  background: #fff;
  color: var(--sc-red);
  border: 2px solid #fff;
}
.btn-sc-light:hover { background: var(--sc-red-tint); color: var(--sc-red-dark); transform: translateY(-2px); }
.btn-sc-sm {
  --bs-btn-padding-x: 1.1rem;
  --bs-btn-padding-y: .48rem;
  font-size: .82rem;
  letter-spacing: .03em;
}

/* ---------- Navbar ---------- */
.sc-navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1030;
  padding: 1.1rem 0;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 30px -22px rgba(43, 43, 45, .3);
  transition: padding .4s ease, background .4s ease, box-shadow .4s ease, backdrop-filter .4s ease;
}
.sc-navbar.is-scrolled {
  padding: .45rem 0;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px -18px rgba(43, 43, 45, .35);
}
.sc-navbar .navbar-brand img { height: 52px; width: auto; transition: height .4s ease; }
.sc-navbar.is-scrolled .navbar-brand img { height: 42px; width: auto; }
.sc-navbar .nav-link {
  font-weight: 700;
  font-size: .92rem;
  letter-spacing: .06em;
  color: var(--sc-ink);
  padding: .55rem 1rem !important;
  border-radius: 999px;
  transition: color .25s ease, background .25s ease;
}
.sc-navbar .nav-link:hover { color: var(--sc-red); background: var(--sc-red-tint); }
.sc-navbar .nav-link.active { color: var(--sc-red); }

/* ---------- Dropdown / submenu moderno ---------- */
.sc-navbar .dropdown-toggle::after {
  border: 0;
  content: "\F282";
  font-family: "bootstrap-icons";
  vertical-align: 0;
  margin-left: .25rem;
  font-size: .7rem;
  transition: transform .3s ease;
}
.sc-navbar .sc-dropdown.sc-open .dropdown-toggle::after { transform: rotate(180deg); }
.sc-navbar .dropdown-menu {
  border: 0;
  border-radius: 1.25rem;
  margin-top: .85rem;
  padding: .7rem;
  box-shadow: var(--sc-shadow);
  background: rgba(255, 255, 255, .98);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: scDropIn .28s cubic-bezier(.2,.8,.2,1);
}
@keyframes scDropIn {
  from { opacity: 0; transform: translateY(.5rem); }
  to   { opacity: 1; transform: none; }
}
/* mega menu aree */
.sc-mega { min-width: 30rem; display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; }
.sc-mega-item {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  padding: .85rem 1rem;
  border-radius: .9rem;
  transition: background .25s ease, transform .25s ease;
}
.sc-mega-item:hover { background: var(--sc-red-tint); transform: translateX(3px); }
.sc-mega-item .sc-mega-num {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--sc-red);
  line-height: 1;
  flex: 0 0 auto;
  width: 1.8rem;
}
.sc-mega-item strong { display: block; color: var(--sc-ink); font-size: .98rem; }
.sc-mega-item small { color: var(--sc-grey); font-size: .82rem; }
/* dropdown semplice */
.sc-dropdown-simple { min-width: 13rem; }
.sc-dropdown-simple .dropdown-item {
  border-radius: .8rem;
  padding: .65rem 1rem;
  font-weight: 700;
  font-size: .88rem;
  color: var(--sc-ink);
  transition: background .2s ease, color .2s ease;
}
.sc-dropdown-simple .dropdown-item:hover,
.sc-dropdown-simple .dropdown-item:focus { background: var(--sc-red-tint); color: var(--sc-red); }
/* apertura controllata via JS su desktop (.sc-open) */
@media (min-width: 992px) {
  .sc-navbar .sc-dropdown { position: relative; }
  .sc-navbar .sc-dropdown::after {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 100%;
    height: 1rem;
    pointer-events: none;
  }
  .sc-navbar .sc-dropdown.sc-open::after { pointer-events: auto; }
  .sc-navbar .dropdown-menu { display: none; }
  .sc-navbar .sc-dropdown.sc-open > .dropdown-menu { display: block; }
}
@media (max-width: 991.98px) {
  .sc-navbar .dropdown-menu { display: block; box-shadow: none; background: transparent; backdrop-filter: none; padding: .25rem 0 .25rem .75rem; margin-top: .2rem; animation: none; }
  .sc-mega { min-width: 0; grid-template-columns: 1fr; gap: 0; }
  .sc-mega-item { padding: .6rem .5rem; }
}
.sc-navbar .btn-sc {
  --bs-btn-padding-x: 1.15rem;
  --bs-btn-padding-y: .5rem;
  font-size: .82rem;
}
.sc-navbar .navbar-toggler {
  border: 0;
  padding: .45rem .65rem;
  border-radius: .9rem;
  background: var(--sc-red-tint);
}
.sc-navbar .navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(153,25,21,.2); }

@media (max-width: 991.98px) {
  .sc-navbar .navbar-collapse {
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(14px);
    margin-top: .9rem;
    border-radius: var(--sc-radius);
    box-shadow: var(--sc-shadow);
    padding: 1rem 1.25rem;
  }
  .sc-navbar { background: rgba(255,255,255,.88); backdrop-filter: blur(14px); padding: .55rem 0; }
  .sc-navbar .navbar-brand img { height: 42px; width: auto; }
}

/* ---------- Hero cinematico ---------- */
.sc-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #1d0d0c;
}
.sc-hero-media {
  position: absolute;
  /* Sfora a destra restando ancorata a sinistra: il soggetto scivola nella
     metà chiara senza scoprire il bordo del contenitore. */
  inset: -12% -30% -12% 0;
  z-index: 0;
  will-change: transform;
}
.sc-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% 28%;
  animation: kenburns 26s ease-in-out infinite alternate;
}
@keyframes kenburns {
  from { transform: scale(1) translate3d(0,0,0); }
  to   { transform: scale(1.12) translate3d(-1.5%, -2%, 0); }
}
.sc-hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(100deg, rgba(38, 8, 7, .86) 0%, rgba(63, 13, 11, .60) 34%, rgba(63, 13, 11, .10) 62%, rgba(63, 13, 11, .22) 100%),
    linear-gradient(to top, rgba(29, 13, 12, .80) 0%, transparent 35%);
}
.sc-hero-watermark {
  position: absolute;
  z-index: 1;
  right: -4rem;
  bottom: -6rem;
  font-family: var(--font-title);
  font-size: clamp(18rem, 36vw, 34rem);
  line-height: .8;
  color: rgba(255, 255, 255, .05);
  user-select: none;
  pointer-events: none;
  will-change: transform;
}
.sc-hero .container { position: relative; z-index: 2; }
.sc-hero h1 {
  color: #fff;
  /* fluida da 320px a 1600px: niente salti, niente misure fisse */
  font-size: clamp(2.05rem, 1.35rem + 3.15vw, 4.25rem);
  font-weight: 600;
  line-height: 1.12;
  text-wrap: balance;
}
.sc-hero .container > .row { margin-top: clamp(3.25rem, 9vh, 6.3rem); }
.sc-hero h1 em { font-style: italic; color: #f3c8c5; }
.sc-hero .hero-kicker {
  color: rgba(255,255,255,.85);
  letter-spacing: clamp(.18em, .1em + .3vw, .3em);
  font-size: clamp(.72rem, .68rem + .12vw, .8rem);
  font-weight: 700;
  text-transform: uppercase;
}
.sc-hero .hero-sub {
  color: rgba(255,255,255,.82);
  max-width: 34rem;
  font-size: clamp(1rem, .95rem + .22vw, 1.15rem);
}
.hero-pills { display: flex; flex-wrap: wrap; gap: .6rem; }
.hero-pill {
  border: 1px solid rgba(255,255,255,.35);
  color: rgba(255,255,255,.9);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: .45rem 1.1rem;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.sc-scroll-hint {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 1.6rem;
  transform: translateX(-50%);
  color: rgba(255,255,255,.7);
  font-size: .72rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  text-align: center;
}
.sc-scroll-hint::after {
  content: "";
  display: block;
  width: 1px;
  height: 2.6rem;
  margin: .6rem auto 0;
  background: linear-gradient(to bottom, rgba(255,255,255,.8), transparent);
  animation: scrollPulse 2.2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(.4); transform-origin: top; opacity: .4; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* Hero interno (pagine) */
.sc-page-hero {
  position: relative;
  padding: clamp(7rem, 6rem + 6vw, 11rem) 0 clamp(2.5rem, 2rem + 3vw, 5rem);
  overflow: hidden;
  background:
    radial-gradient(60rem 30rem at 110% -20%, rgba(153,25,21,.10), transparent 60%),
    radial-gradient(40rem 24rem at -10% 120%, rgba(153,25,21,.07), transparent 60%),
    var(--sc-cream);
}
.sc-page-hero .watermark {
  position: absolute;
  right: -2rem;
  top: -4rem;
  font-family: var(--font-title);
  font-size: clamp(12rem, 24vw, 22rem);
  line-height: 1;
  color: rgba(153, 25, 21, .055);
  pointer-events: none;
  user-select: none;
}
.sc-page-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 600; }

/* ---------- Sezioni & motion ---------- */
.section-pad { padding: 6rem 0; }
@media (max-width: 767.98px) { .section-pad { padding: 4rem 0; } }

/* Il contenuto si nasconde SOLO se il JavaScript è vivo. Senza la guardia .js,
   un blocco degli script lascerebbe la pagina bianca: il testo resterebbe a
   opacity 0 per sempre. */
.reveal, .reveal-left, .reveal-right {
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--reveal-delay, 0s);
}
.js .reveal { opacity: 0; transform: translateY(2.2rem); }
.js .reveal-left { opacity: 0; transform: translateX(-2.5rem); }
.js .reveal-right { opacity: 0; transform: translateX(2.5rem); }
.reveal.is-visible,
.reveal-left.is-visible,
.reveal-right.is-visible { opacity: 1; transform: none; }

/* Rete di sicurezza: main.js aggiunge .js-pronto appena parte. Se dopo tre
   secondi non l'ha fatto — CDN lenta o irraggiungibile, errore JavaScript —
   la guardia inline aggiunge .js-scaduto e il contenuto si mostra comunque. */
.js-scaduto:not(.js-pronto) .reveal,
.js-scaduto:not(.js-pronto) .reveal-left,
.js-scaduto:not(.js-pronto) .reveal-right {
  opacity: 1 !important;
  transform: none !important;
}

/* Il testo dell'hero non si nasconde mai: è il contenuto più importante della
   pagina e quello che Google misura come LCP. L'ingresso è solo uno scorrimento,
   senza dissolvenza, così il testo è dipinto subito. */
@keyframes sc-hero-entrata {
  from { transform: translateY(1.5rem); }
  to   { transform: none; }
}
.sc-hero .hero-kicker,
.sc-hero h1,
.sc-hero .hero-sub {
  animation: sc-hero-entrata .75s cubic-bezier(.2,.7,.2,1) both;
}
.sc-hero h1 { animation-delay: .06s; }
.sc-hero .hero-sub { animation-delay: .12s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left, .reveal-right {
    opacity: 1 !important; transform: none !important; transition: none; animation: none;
  }
  .sc-hero .hero-kicker, .sc-hero h1, .sc-hero .hero-sub { animation: none; }
  .sc-hero-media img { animation: none; }
  [data-parallax] { transform: none !important; }
  html { scroll-behavior: auto; }
  .sc-scroll-hint::after,
  .sc-navbar .dropdown-menu,
  .skel::after,
  .news-card.is-skeleton .news-media::after { animation: none; }
}

/* Parallax layers */
[data-parallax] { will-change: transform; }

/* ---------- Foto con profondità ---------- */
.photo-stack { position: relative; }
.photo-stack .photo-main {
  position: relative;
  border-radius: var(--sc-radius-lg);
  box-shadow: var(--sc-shadow);
  overflow: hidden;
}
.photo-stack .photo-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-stack .photo-cut {
  position: absolute;
  border-radius: var(--sc-radius);
  overflow: hidden;
  box-shadow: var(--sc-shadow);
  border: 6px solid #fff;
}
.photo-stack .photo-cut img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-stack .blob {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(153,25,21,.16), rgba(153,25,21,.04) 70%, transparent);
  filter: blur(2px);
  z-index: -1;
}

/* ---------- Card aree tematiche ---------- */
.area-card {
  background: #fff;
  border: 1px solid var(--sc-line);
  border-radius: var(--sc-radius);
  padding: 2.2rem 2rem;
  height: 100%;
  position: relative;
  overflow: hidden;
  transition: transform .45s cubic-bezier(.2,.8,.2,1), box-shadow .45s ease, border-color .45s ease;
}
.area-card::after {
  content: "";
  position: absolute;
  inset: auto -30% -55% auto;
  width: 14rem;
  height: 14rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(153,25,21,.08), transparent 70%);
  transition: transform .5s ease;
}
.area-card:hover {
  transform: translateY(-.5rem);
  box-shadow: var(--sc-shadow);
  border-color: rgba(153,25,21,.25);
}
.area-card:hover::after { transform: scale(1.5); }
.area-card .area-num {
  font-family: var(--font-title);
  font-size: 2.6rem;
  font-weight: 600;
  color: rgba(153,25,21,.16);
  line-height: 1;
}
.area-card h3 { font-size: 1.35rem; margin: .8rem 0 .6rem; }
.area-card p { color: var(--sc-grey); font-size: .98rem; margin-bottom: 1.2rem; }
.area-link {
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}
.area-link::after { content: "→"; transition: transform .3s ease; }
.area-card:hover .area-link::after { transform: translateX(.35rem); }

/* ---------- Area dettaglio (pagina Aree Tematiche) ---------- */
.area-detail-media {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--sc-radius-lg);
  background: linear-gradient(135deg, var(--sc-red), var(--sc-red-dark));
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: var(--sc-shadow);
}
.area-detail-media i {
  font-size: 5.5rem;
  color: rgba(255, 255, 255, .9);
  z-index: 1;
}
.area-detail-media .area-slot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 28px;
  z-index: 1;
}
.area-detail-media .area-detail-num {
  position: absolute;
  right: 1.2rem;
  bottom: -1.5rem;
  font-family: var(--font-title);
  font-size: 11rem;
  font-weight: 600;
  line-height: 1;
  color: rgba(255, 255, 255, .12);
  user-select: none;
  pointer-events: none;
  z-index: 2;
}

/* ---------- Swiper ---------- */
.sc-swiper { padding: 1rem .25rem 3.5rem; }
.sc-swiper .swiper-pagination-bullet { background: rgba(153,25,21,.3); opacity: 1; width: 9px; height: 9px; transition: width .3s ease; }
.sc-swiper .swiper-pagination-bullet-active { background: var(--sc-red); width: 26px; border-radius: 6px; }
.sc-swiper-nav {
  display: flex;
  gap: .6rem;
}
.sc-swiper-nav button {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 2px solid rgba(153,25,21,.3);
  background: #fff;
  color: var(--sc-red);
  font-size: 1.1rem;
  display: grid;
  place-items: center;
  transition: all .3s ease;
}
.sc-swiper-nav button:hover { background: var(--sc-red); color: #fff; border-color: var(--sc-red); }

/* ---------- News ---------- */
.news-card {
  background: #fff;
  border: 1px solid var(--sc-line);
  border-radius: var(--sc-radius);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform .45s cubic-bezier(.2,.8,.2,1), box-shadow .45s ease;
}
.news-card:hover { transform: translateY(-.45rem); box-shadow: var(--sc-shadow); }
.news-card .news-media {
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  background:
    url("../img/news-placeholder.svg") center / cover no-repeat,
    linear-gradient(135deg, var(--sc-red), var(--sc-red-dark));
  display: grid;
  place-items: center;
}
.news-card .news-media .news-glyph {
  font-family: var(--font-title);
  font-size: 4.4rem;
  color: rgba(255,255,255,.28);
  font-style: italic;
}
.news-card .news-media .news-logo {
  position: relative;
  inset: auto;
  width: auto;
  height: 46%;
  max-height: 96px;
  object-fit: contain;
  opacity: .95;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.22));
  transition: transform .6s ease;
}
.news-card:hover .news-media .news-logo { transform: scale(1.05); }
.news-card .news-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.news-card .news-media img.news-brandlogo {
  position: relative;
  inset: auto;
  width: auto;
  height: 46%;
  max-height: 96px;
  object-fit: contain;
  opacity: .92;
  transition: transform .6s ease;
}
.news-card:hover .news-media img.news-brandlogo { transform: scale(1.06); }
.news-card:hover .news-media img { transform: scale(1.06); }
.news-card .news-body { padding: 1.6rem 1.6rem 1.8rem; display: flex; flex-direction: column; flex: 1; }
.news-card h3 { font-size: 1.22rem; line-height: 1.35; }
.news-card h3 a { color: var(--sc-ink); }
.news-card h3 a:hover { color: var(--sc-red); }
.news-meta {
  display: flex;
  align-items: center;
  gap: .8rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--sc-grey);
  margin-bottom: .7rem;
}
.news-meta .badge-cat {
  background: var(--sc-red-tint);
  color: var(--sc-red);
  padding: .3rem .8rem;
  border-radius: 999px;
}
.news-card p { color: var(--sc-grey); font-size: .96rem; flex: 1; }

/* ---------- Banda rossa CTA ---------- */
.cta-band {
  position: relative;
  overflow: hidden;
  border-radius: var(--sc-radius-lg);
  background: linear-gradient(115deg, var(--sc-red) 0%, var(--sc-red-dark) 100%);
  color: #fff;
  padding: 4rem 3rem;
}
.cta-band h2 { color: #fff; font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.cta-band .band-glyph {
  position: absolute;
  right: -2rem;
  top: -5rem;
  font-family: var(--font-title);
  font-size: 22rem;
  line-height: 1;
  color: rgba(255,255,255,.07);
  pointer-events: none;
}

/* ---------- Profilo Dott. Canto ---------- */
.quote-mark {
  font-family: var(--font-title);
  font-size: 5rem;
  line-height: .6;
  color: rgba(153,25,21,.25);
}
.credential-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--sc-line);
}
.credential-item:last-child { border-bottom: 0; }
.credential-item .dot {
  flex: 0 0 auto;
  width: .65rem;
  height: .65rem;
  margin-top: .55rem;
  border-radius: 50%;
  background: var(--sc-red);
}

/* ---------- Contatti ---------- */
.contact-card {
  background: #fff;
  border: 1px solid var(--sc-line);
  border-radius: var(--sc-radius);
  padding: 1.8rem;
  height: 100%;
  transition: transform .4s ease, box-shadow .4s ease;
}
.contact-card:hover { transform: translateY(-.35rem); box-shadow: var(--sc-shadow-soft); }
.contact-icon {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 1.05rem;
  background: var(--sc-red-tint);
  color: var(--sc-red);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}
.form-control.sc-input, .form-select.sc-input {
  border-radius: 1rem;
  border: 1.5px solid var(--sc-line);
  padding: .85rem 1.15rem;
  font-family: var(--font-body);
}
.form-control.sc-input:focus, .form-select.sc-input:focus {
  border-color: var(--sc-red-soft);
  box-shadow: 0 0 0 .25rem rgba(153,25,21,.12);
}
.booking-modes .btn-check:checked + .btn-sc-outline {
  background: var(--sc-red);
  color: #fff;
  border-color: var(--sc-red);
}
.booking-modes .btn-check:focus-visible + .btn-sc-outline {
  box-shadow: 0 0 0 .2rem rgba(153,25,21,.2);
}
.booking-hint {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  background: var(--sc-red-tint);
  border-radius: 1rem;
  padding: .85rem 1.1rem;
  font-size: .9rem;
  color: var(--sc-grey);
}
.booking-hint i { color: var(--sc-red); font-size: 1.05rem; margin-top: .1rem; }

/* Orari di ricevimento */
.hours-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-top: .5rem;
}
.hours-row .hours-day { font-weight: 700; color: var(--sc-ink); font-size: .95rem; }
.hours-row .hours-time { color: var(--sc-red); font-weight: 700; font-size: .88rem; white-space: nowrap; }
.hours-note {
  margin-top: 1rem;
  padding: .8rem 1rem;
  background: var(--sc-cream);
  border-left: 3px solid var(--sc-red);
  border-radius: 0 .8rem .8rem 0;
  font-size: .85rem;
  color: var(--sc-grey);
}

/* Flatpickr — tema brand */
.flatpickr-calendar {
  border-radius: 1.1rem;
  box-shadow: var(--sc-shadow);
  font-family: var(--font-body);
}
.flatpickr-day.selected,
.flatpickr-day.selected:hover {
  background: var(--sc-red);
  border-color: var(--sc-red);
}
.flatpickr-day:hover { background: var(--sc-red-tint); }
.flatpickr-day.today { border-color: var(--sc-red-soft); }
.flatpickr-months .flatpickr-month,
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-weekday { color: var(--sc-ink); }
.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover { color: rgba(43,43,45,.18); background: transparent; }

/* ---------- Footer ---------- */
.sc-footer {
  background: #270b0a;
  color: rgba(255,255,255,.75);
  padding: 4.5rem 0 2rem;
  margin-top: 0;
}
.sc-footer h5 { color: #fff; font-size: 1.05rem; margin-bottom: 1.2rem; }
.sc-footer a { color: rgba(255,255,255,.75); }
.sc-footer a:hover { color: #fff; }
.sc-footer .footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .55rem; }
.sc-footer .social-btns { display: flex; gap: .7rem; }
.sc-footer .social-btns a {
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.25);
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  transition: all .3s ease;
}
.sc-footer .social-btns a:hover { background: #fff; color: var(--sc-red); border-color: #fff; transform: translateY(-3px); }
.sc-footer .footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  margin-top: 3rem;
  padding-top: 1.6rem;
  font-size: .85rem;
  color: rgba(255,255,255,.55);
}
.sc-footer .footer-credit {
  display: inline-block;
  margin-top: .5rem;
  font-size: .8rem;
  color: rgba(255,255,255,.5);
}
.sc-footer .footer-credit a {
  color: rgba(255,255,255,.7);
  font-weight: 700;
}
.sc-footer .footer-credit a:hover { color: #fff; }
.sc-footer .footer-logo-white {
  height: 92px;
  width: auto;
  margin-bottom: 1.3rem;
}

/* Badge appartenenza CNDCEC */
.cndcec-badge {
  display: inline-flex;
  align-items: center;
  gap: .9rem;
  background: #fff;
  border-radius: 1.1rem;
  padding: .85rem 1.15rem;
  margin-top: 1.4rem;
  max-width: 100%;
  box-shadow: 0 10px 30px -18px rgba(0,0,0,.6);
}
.cndcec-badge img { height: 46px; width: auto; display: block; }
.cndcec-badge .cndcec-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--sc-grey);
  line-height: 1.3;
  border-left: 1px solid var(--sc-line);
  padding-left: .9rem;
}
@media (max-width: 575.98px) {
  .cndcec-badge { gap: .7rem; padding: .7rem .9rem; }
  .cndcec-badge img { height: 38px; width: auto; }
}

/* ---------- SweetAlert2 brand ---------- */
.swal2-popup.sc-swal {
  border-radius: var(--sc-radius);
  font-family: var(--font-body);
  padding: 2.2rem;
}
.swal2-popup.sc-swal .swal2-title { font-family: var(--font-title); color: var(--sc-ink); }
.sc-swal-body { text-align: left; font-size: .92rem; color: var(--sc-grey); max-height: 50vh; overflow-y: auto; padding-right: .5rem; }
.sc-swal-body h6 { font-family: var(--font-title); color: var(--sc-ink); font-size: 1.05rem; margin: 1.1rem 0 .35rem; }
.sc-swal-body p { margin-bottom: .6rem; }

/* Cookie bar */
.cookie-bar {
  /* sopra la navbar (1030), sotto le finestre SweetAlert (1060) */
  position: fixed;
  z-index: 1040;
  left: 50%;
  bottom: 1.2rem;
  transform: translate(-50%, 140%);
  width: min(92vw, 46rem);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  border: 1px solid var(--sc-line);
  border-radius: var(--sc-radius);
  box-shadow: var(--sc-shadow);
  padding: 1.3rem 1.5rem;
  transition: transform .6s cubic-bezier(.2,.8,.2,1);
}
.cookie-bar.show { transform: translate(-50%, 0); }
.cookie-bar[hidden] { display: none; }
.cookie-bar p { font-size: .88rem; color: var(--sc-grey); margin: 0; }

/* ---------- Login ---------- */
.login-page {
  min-height: 100svh;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background: #1d0d0c;
  padding: 2rem 1rem;
}
.login-page .login-bg {
  position: absolute; inset: -8%;
  background: url("../img/ott/studio-900.webp") center 35% / cover no-repeat;
  filter: blur(6px) brightness(.45) saturate(.9);
  animation: kenburns 30s ease-in-out infinite alternate;
}
.login-card {
  position: relative;
  z-index: 2;
  width: min(94vw, 27rem);
  background: rgba(255,255,255,.97);
  border-radius: var(--sc-radius-lg);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.55);
  padding: 2.8rem 2.4rem;
}

/* ---------- Dettaglio news ---------- */
.article-body { font-size: 1.08rem; }
.article-body h2 { font-size: 1.6rem; margin: 2.2rem 0 .8rem; }
.article-body blockquote {
  border-left: 4px solid var(--sc-red);
  background: var(--sc-red-tint);
  border-radius: 0 var(--sc-radius) var(--sc-radius) 0;
  padding: 1.4rem 1.8rem;
  font-family: var(--font-title);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--sc-red-dark);
  margin: 2rem 0;
}
.article-hero-img {
  position: relative;
  border-radius: var(--sc-radius-lg);
  overflow: hidden;
  box-shadow: var(--sc-shadow);
  aspect-ratio: 21 / 9;
}
.article-hero-img > img,
.article-hero-img > picture > img { width: 100%; height: 100%; object-fit: cover; }
/* il logo dentro il segnaposto non deve essere stirato dalla regola qui sopra */
.article-hero-img .art-hero-ph img {
  width: auto;
  height: auto;
  max-height: 42%;
  object-fit: contain;
}

.article-hero-img .art-hero-ph {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background:
    url("../img/news-placeholder.svg") center / cover no-repeat,
    linear-gradient(135deg, var(--sc-red), var(--sc-red-dark));
}

.article-fonte {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--sc-line);
  font-size: .9rem;
  color: var(--sc-grey, #6b6b6e);
}

/* ---------- Admin ---------- */
.admin-shell { background: var(--sc-cream); min-height: 100svh; }
.admin-side {
  background: #270b0a;
  color: rgba(255,255,255,.8);
  min-height: 100svh;
  position: sticky;
  top: 0;
}
.admin-side .nav-link {
  color: rgba(255,255,255,.7);
  border-radius: .9rem;
  padding: .7rem 1rem;
  font-weight: 700;
  font-size: .92rem;
}
.admin-side .nav-link.active, .admin-side .nav-link:hover { background: rgba(255,255,255,.1); color: #fff; }
.admin-card {
  background: #fff;
  border: 1px solid var(--sc-line);
  border-radius: var(--sc-radius);
  box-shadow: var(--sc-shadow-soft);
}

.sc-mappa {
  position: relative;
  background:
    repeating-linear-gradient(45deg, transparent 0 14px, rgba(153,25,21,.03) 14px 28px),
    var(--sc-red-tint);
  display: grid;
  place-items: center;
}
.sc-mappa-invito {
  text-align: center;
  padding: 2rem 1.6rem;
  max-width: 26rem;
}
.sc-mappa-invito .bi {
  font-size: 1.9rem;
  color: var(--sc-red);
  display: block;
  margin-bottom: .6rem;
}
.sc-mappa-titolo {
  font-family: var(--font-title);
  font-size: 1.1rem;
  color: var(--sc-ink);
  margin: 0 0 .4rem;
}
.sc-mappa-testo {
  font-size: .86rem;
  line-height: 1.55;
  color: var(--sc-grey, #6b6b6e);
  margin: 0 0 1rem;
}
.sc-mappa-alt {
  display: block;
  margin-top: .8rem;
  font-size: .82rem;
}
.sc-mappa iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Mappa a caricamento differito ---------- */

/* ---------- Pagine legali ---------- */
.testo-legale { font-size: 1rem; line-height: 1.75; color: var(--sc-grey, #5b5b5e); }
.testo-legale h2 {
  font-family: var(--font-title);
  font-size: clamp(1.25rem, 1.1rem + .5vw, 1.5rem);
  color: var(--sc-ink);
  margin: 2.6rem 0 .8rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--sc-line);
}
.testo-legale h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.testo-legale p { margin: 0 0 1.1rem; }
.testo-legale ul { margin: 0 0 1.3rem; padding-left: 1.1rem; }
.testo-legale li { margin-bottom: .55rem; }
.testo-legale strong { color: var(--sc-ink); }
.testo-legale code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .88em;
  background: var(--sc-red-tint);
  color: var(--sc-red);
  padding: .1rem .38rem;
  border-radius: .3rem;
}
.tabella-scroll { overflow-x: auto; margin: 0 0 1.4rem; }
.tabella-legale { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: .92rem; }
.tabella-legale th {
  text-align: left;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--sc-red);
  padding: .7rem .9rem;
  border-bottom: 2px solid var(--sc-line);
  white-space: nowrap;
}
.tabella-legale td {
  padding: .8rem .9rem;
  border-bottom: 1px solid var(--sc-line);
  vertical-align: top;
}
.aggiornamento {
  margin-top: 2.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--sc-line);
  font-size: .85rem;
  color: var(--sc-ink-faint, #8b8180);
}

.contact-card .lead-soft { font-size: .95rem; }

/* ---------- reCAPTCHA ---------- */
.sc-recaptcha { min-height: 78px; }
.sc-recaptcha .g-recaptcha { display: inline-block; }
.sc-recaptcha .sc-recaptcha-attesa {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 78px;
  font-size: .86rem;
  color: var(--sc-grey, #6b6b6e);
}

/* ---------- Moduli ---------- */
/* trappola anti-spam: fuori schermo ma non display:none, così i bot la compilano */
.sc-hp {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.sc-input.is-invalid,
.form-select.sc-input.is-invalid {
  border-color: var(--sc-red);
  box-shadow: 0 0 0 .18rem rgba(153, 25, 21, .12);
}
.form-check-input.is-invalid { border-color: var(--sc-red); }
.invalid-feedback { color: var(--sc-red); font-size: .84rem; }
.form-status { min-height: 1.2em; }
.form-status.is-error { color: var(--sc-red); font-weight: 700; }
.sc-form button[disabled] { opacity: .65; cursor: progress; }

/* ---------- Skeleton di caricamento ---------- */
:root {
  --sc-skel: #efe6e4;
  --sc-skel-shine: rgba(255, 255, 255, .72);
}

@keyframes sc-skel-sweep { to { transform: translateX(100%); } }

/* blocco segnaposto generico: righe di testo, media, badge */
.skel {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--sc-skel);
  border-radius: .4rem;
  user-select: none;
}
.skel::after,
[data-skeleton].is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, var(--sc-skel-shine), transparent);
  animation: sc-skel-sweep 1.5s ease-in-out infinite;
}
.skel-line { height: .8rem; }
.skel-line + .skel-line { margin-top: .55rem; }
.skel-title { height: 1.25rem; border-radius: .3rem; }
.skel-badge { height: 1.6rem; width: 5.5rem; border-radius: 999px; }
.skel-w-30 { width: 30%; }
.skel-w-45 { width: 45%; }
.skel-w-60 { width: 60%; }
.skel-w-75 { width: 75%; }
.skel-w-90 { width: 90%; }
.skel-stack { display: flex; flex-direction: column; }
.skel-stack > * + * { margin-top: .55rem; }

/* media: lo scheletro copre il contenitore finché l'immagine non è pronta */
[data-skeleton] > img,
[data-skeleton] > picture > img { transition: opacity .45s ease; }
[data-skeleton].is-loading > img,
[data-skeleton].is-loading > picture > img { opacity: 0; }
[data-skeleton].is-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--sc-skel);
}
[data-skeleton].is-loading::after { z-index: 2; }
/* variante su fondo scuro (hero, media delle news) */
[data-skeleton="dark"].is-loading::before { background: #2c0a09; }
[data-skeleton="dark"].is-loading::after { --sc-skel-shine: rgba(255, 255, 255, .1); }

@media (prefers-reduced-motion: reduce) {
  .skel::after,
  [data-skeleton].is-loading::after { animation: none; }
}

/* card news in caricamento: stessa struttura della card reale */
.news-card.is-skeleton { pointer-events: none; }
.news-card.is-skeleton .news-media {
  background: var(--sc-skel);
  position: relative;
  overflow: hidden;
}
.news-card.is-skeleton .news-media::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, var(--sc-skel-shine), transparent);
  animation: sc-skel-sweep 1.5s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .news-card.is-skeleton .news-media::after { animation: none; }
}

/* Hero su schermi stretti: la foto è 3:2 dentro un contenitore verticale,
   quindi il ritaglio è forte. Il testo scende in basso, su un fondo scuro,
   e il volto resta libero nella parte alta. */
@media (max-width: 767.98px) {
  /* La foto è 3:2 dentro un contenitore verticale: sovrapporre il testo
     significherebbe coprire il viso. Su mobile la foto occupa la fascia alta
     e il testo scende su fondo pieno. */
  .sc-hero { align-items: flex-end; min-height: 90svh; background: #23100e; }
  .sc-hero .container { padding-bottom: clamp(2.25rem, 7vh, 3.5rem); }
  .sc-hero .container > .row { margin-top: 0; }
  /* la fascia parte sotto la navbar, così la testa non finisce coperta */
  /* niente parallax sulla fascia: sposterebbe la foto sotto la navbar */
  .sc-hero-media { inset: 4.5rem 0 auto 0; height: 50%; transform: none !important; }
  /* il ken burns zooma e taglierebbe la testa nella fascia stretta */
  .sc-hero-media img { object-position: 50% 50%; animation: none; }
  .sc-hero-scrim {
    background:
      linear-gradient(to top,
        #23100e 0%,
        #23100e 44%,
        rgba(35, 16, 14, .55) 58%,
        rgba(35, 16, 14, .1) 82%,
        rgba(35, 16, 14, .3) 100%);
  }
  .sc-hero-watermark,
  .sc-scroll-hint { display: none; }
  .sc-hero .hero-sub { max-width: none; }
}

/* ---------- Misc responsive ---------- */
@media (min-width: 768px) and (max-width: 1199.98px) {
  /* Fascia tablet: la colonna di testo occupa quasi tutta la larghezza e
     finisce sopra la camicia chiara. Serve più velo sotto il testo. */
  .sc-hero-media { inset: -12% -42% -12% 0; }
  .sc-hero-scrim {
    background:
      linear-gradient(100deg,
        rgba(38, 8, 7, .92) 0%,
        rgba(52, 11, 9, .82) 46%,
        rgba(63, 13, 11, .34) 76%,
        rgba(63, 13, 11, .3) 100%),
      linear-gradient(to top, rgba(29, 13, 12, .85) 0%, transparent 42%);
  }
  .sc-hero h1 em { color: #f7dad7; }
}
@media (max-width: 575.98px) {
  .cta-band { padding: 2.6rem 1.7rem; }
  .hero-pill { font-size: .7rem; padding: .35rem .8rem; }
}
