/* =========================================================
   Marina Portolabieno — stylesheet
   ========================================================= */

:root {
  --navy: #002C58;
  --navy-dark: #001A35;
  --navy-darker: #001020;
  --sky: #008BD2;
  --green: #539226;
  --yellow: #FFCB00;
  --orange: #ED7203;
  --red: #E20613;
  --ink: #223142;
  --paper: #f6f8fa;
  --focus: #ffb703;
  --font-body: "Montserrat", "Segoe UI", Arial, Helvetica, sans-serif;
}

html {
  scroll-behavior: smooth;
}
html, body {
  max-width: 100%;
  overflow-x: hidden;
}
#intro,
#servizi,
#dove-siamo,
#main-content,
#numeri,
#contrassegni,
#distributori,
#nautica,
#scuole-vela,
#disposizioni-svizzere,
.page-content section[id] {
  scroll-margin-top: 140px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: #fff;
}

p { line-height: 1.7; color: #445064; }

a { color: var(--navy); }
a:hover, a:focus { color: var(--sky); }

/* ---------- Focus visibility (WCAG 2.4.7 / 2.4.11) ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.nav-link:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 0;
  top: -60px;
  background: var(--navy);
  color: #fff;
  padding: 12px 20px;
  z-index: 2000;
  transition: top 0.2s ease;
  text-decoration: none;
  font-weight: 600;
  border-radius: 0 0 6px 0;
}
.skip-link:focus {
  top: 0;
  color: #fff;
}

/* ---------- Navbar ---------- */
.navbar {
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
  transition: padding 0.4s ease;
}
.site-header {
  transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}
.navbar-brand img { height: 76px; width: auto; transition: opacity 0.4s ease; }
.navbar-brand { display: flex; align-items: center; }
.logo-wrap { position: relative; display: inline-block; height: 76px; }
.logo-wrap img { position: absolute; top: 0; left: 0; height: 76px; }
.logo-wrap .logo-color { opacity: 0; }
.logo-wrap .logo-white { opacity: 1; }

@media (min-width: 992px) {
  .site-header:not(.scrolled):not(.menu-internal) {
    background: linear-gradient(to bottom, rgba(5,20,36,.75) 0%, rgba(5,20,36,0) 100%);
    box-shadow: none;
  }
}
.site-header.scrolled,
.site-header.menu-internal {
  background-color: rgba(255,255,255,.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 18px rgba(0,0,0,.12);
}
.site-header.scrolled .navbar-brand img.logo-white,
.site-header.menu-internal .navbar-brand img.logo-white,
.site-header:not(.scrolled):not(.menu-internal) .navbar-brand img.logo-color { opacity: 0; }
.site-header.scrolled .navbar-brand img.logo-color,
.site-header.menu-internal .navbar-brand img.logo-color,
.site-header:not(.scrolled):not(.menu-internal) .navbar-brand img.logo-white { opacity: 1; }
.site-header.scrolled .navbar,
.site-header.menu-internal .navbar { padding-top: .6rem; padding-bottom: .6rem; }

.navbar .nav-link {
  color: #fff;
  font-weight: 600;
  font-size: .87rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: .55rem .85rem !important;
  transition: color .3s ease;
}
.site-header.scrolled .nav-link,
.site-header.menu-internal .nav-link { color: var(--navy); }
.navbar .nav-link:hover,
.navbar .nav-link:focus,
.navbar .nav-link.active { color: var(--yellow); }
.site-header.scrolled .nav-link:hover,
.site-header.scrolled .nav-link:focus,
.site-header.scrolled .nav-link.active,
.site-header.menu-internal .nav-link:hover,
.site-header.menu-internal .nav-link:focus,
.site-header.menu-internal .nav-link.active { color: var(--sky); }

/* Mentre la tendina è aperta il mouse si sposta sulle voci sottostanti, quindi il
   toggle non è più letteralmente sotto al cursore (niente più :hover) — senza questa
   regola il testo tornava al colore di base. Teniamo il colore acceso per tutta la
   durata dell'apertura, non solo mentre il cursore è esattamente sopra il testo. */
.navbar .dropdown-toggle[aria-expanded="true"] { color: var(--yellow); }
.site-header.scrolled .dropdown-toggle[aria-expanded="true"],
.site-header.menu-internal .dropdown-toggle[aria-expanded="true"] { color: var(--sky); }

.navbar .dropdown-menu {
  border: none;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
  padding: .5rem;
  margin-top: .5rem;
}
.navbar .dropdown-item {
  border-radius: 6px;
  padding: .55rem .9rem;
  font-size: .92rem;
  font-weight: 600;
  color: var(--ink);
}
/* Solo su mobile (navbar collassata): le voci lunghe vanno a capo e la tendina non
   esce dal viewport, così non c'è scroll orizzontale. Su desktop la tendina resta
   larga quanto serve e i testi stanno su una riga. */
@media (max-width: 991.98px) {
  .navbar .dropdown-item { white-space: normal; overflow-wrap: anywhere; }
  .navbar .dropdown-menu { max-width: calc(100vw - 2rem); }
}
.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus,
.navbar .dropdown-item.active,
.navbar .dropdown-item:active {
  background-color: var(--paper);
  color: var(--navy);
}

.navbar-toggler {
  border: none;
  padding: .25rem .4rem;
}
.navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(0,139,210,.35); }

/* Le tendine si aprono anche al passaggio del mouse (vedi main.js), il che mette il
   toggle a fuoco senza che sia navigazione da tastiera: niente contorno in quel caso,
   resta solo per chi naviga davvero con tastiera (:focus-visible). */
.navbar .dropdown-toggle:focus:not(:focus-visible) { outline: none; }

/* Il pannello tab (tabindex=0) riceve il focus anche solo arrivando via URL #tab-...
   (es. link "Cookie Policy" nel footer), mostrando una cornice indesiderata.
   Il pannello contiene già elementi focalizzabili col proprio contorno, quindi
   qui il contorno del pannello si può togliere del tutto. */
.tab-content .tab-pane:focus { outline: none; }
/* Offset per l'header fisso quando si porta in vista la barra delle tab
   (link "Cookie Policy" nel footer cliccato dalla stessa pagina). */
#privacyTabs { scroll-margin-top: 140px; }
/* Tab (nav-pills) della pagina Privacy/Datenschutz allineate ai colori del sito:
   pillola outline navy su bianco, hover riempito sky, attiva riempita navy. */
#privacyTabs .nav-link {
  color: var(--navy);
  font-weight: 600;
  background: #fff;
  border: 2px solid var(--navy);
  border-radius: 50rem;
  padding: .5rem 1.25rem;
  transition: all .25s ease;
}
#privacyTabs .nav-link:hover,
#privacyTabs .nav-link:focus-visible {
  background: var(--sky);
  border-color: var(--sky);
  color: #fff;
}
#privacyTabs .nav-link.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.navbar-toggler-custom-icon {
  font-size: 1.7rem;
  line-height: 1;
  color: #fff;
}
.site-header.scrolled .navbar-toggler-custom-icon,
.site-header.menu-internal .navbar-toggler-custom-icon { color: var(--navy); }

.lang-switch .dropdown-toggle::after { margin-left: .35rem; }
.flag-icon {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.12);
  vertical-align: middle;
  margin-right: .4rem;
  margin-top: -2px;
}

@media (max-width: 991.98px) {
  .navbar-collapse {
    background: #fff;
    margin-top: 1rem;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    box-shadow: 0 10px 30px rgba(0,0,0,.15);
    max-height: 80vh;
    overflow-y: auto;
  }
  .navbar .nav-link { color: var(--navy) !important; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--navy-darker);
}
.hero video,
.hero .hero-fallback-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5,20,36,.55) 0%, rgba(5,20,36,.35) 45%, rgba(5,20,36,.75) 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.hero-content .payoff {
  font-size: clamp(1.9rem, 4vw, 3.4rem);
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 3px 18px rgba(0,0,0,.4);
  margin-bottom: 1.1rem;
  white-space: normal;
}
@media (min-width: 1300px) {
  .hero-content .payoff { white-space: nowrap; }
}
.hero-content .payoff .accent { color: var(--yellow); }
.hero-content .sub {
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  font-weight: 300;
  color: #eaf1f7;
  margin-bottom: 2.2rem;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.hero-cta { display: flex; gap: .9rem; flex-wrap: wrap; justify-content: center; }

@media (max-width: 575.98px) {
  /* Il padding verticale (pari all'incirca all'altezza del menu) resta dentro
     al box centrato: il testo non sale mai sopra al menu, pur restando
     visivamente centrato nello schermo invece che ancorato in alto. */
  .hero-content { padding-top: 92px; padding-bottom: 92px; }
  .hero-content .payoff { font-size: 1.55rem; margin-bottom: .7rem; }
  .hero-content .sub { margin-bottom: 1.2rem; font-size: .88rem; }
  .hero-cta { flex-direction: column; align-items: stretch; gap: .55rem; }
  .hero-cta .btn { padding: .6rem 1rem; font-size: .85rem; }
}
@media (max-width: 359.98px) {
  .hero-content .payoff { font-size: 1.35rem; }
  .hero-content .sub { font-size: .82rem; }
}

.btn-brand {
  background: var(--navy);
  border: 2px solid var(--navy);
  color: #fff;
  font-weight: 600;
  padding: .8rem 1.7rem;
  border-radius: 50px;
  transition: all .25s ease;
}
.btn-brand:hover, .btn-brand:focus { background: var(--sky); border-color: var(--sky); color: #fff; }

.btn-outline-brand {
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
  font-weight: 600;
  padding: .8rem 1.7rem;
  border-radius: 50px;
  transition: all .25s ease;
}
.btn-outline-brand:hover, .btn-outline-brand:focus { background: #fff; color: var(--navy); }

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: #fff;
  opacity: .85;
  animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 10px); }
}

/* ---------- Intro / numbers ---------- */
.section-intro {
  padding: 5.5rem 0;
  background: var(--paper);
}
.section-intro h2 {
  color: var(--navy);
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  margin-bottom: 1.1rem;
}
.section-intro .lead-text {
  max-width: 760px;
  margin: 0 auto 3rem;
  font-size: 1.08rem;
  text-align: center;
}
.stats-row { text-align: center; }
.stat-item { padding: 1.5rem 1rem; }
.stat-number {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  gap: .15rem;
}
.stat-number .suffix { font-size: .55em; font-weight: 700; }
.stat-label {
  margin-top: .6rem;
  font-weight: 600;
  color: var(--ink);
  font-size: .98rem;
}
.stat-item + .stat-item { border-left: 1px solid #d8dee5; }
@media (max-width: 767.98px) {
  .stat-item + .stat-item { border-left: none; border-top: 1px solid #d8dee5; }
}

/* ---------- CTA Prenotazione ---------- */
.section-cta-booking {
  padding: 5rem 0;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-darker) 100%);
  color: #fff;
}
.section-cta-booking .cta-eyebrow { color: var(--yellow); }
.section-cta-booking h2 {
  color: #fff;
  font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  margin-bottom: 1.1rem;
}
.section-cta-booking p {
  color: #dce7f0;
  margin-bottom: 1.9rem;
  max-width: 480px;
}
.cta-booking-figure {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(0,0,0,.35);
}
.cta-booking-figure img { width: 100%; height: auto; display: block; }

.content-figure { margin: 0; border-radius: 14px; overflow: hidden; box-shadow: 0 10px 26px rgba(0,44,88,.12); }
.content-figure img { width: 100%; height: auto; display: block; }

/* ---------- Services ---------- */
.section-services { padding: 5.5rem 0; }
.section-title-wrap { text-align: center; margin-bottom: 3rem; }
.section-title-wrap h2 {
  color: var(--navy);
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}
.section-title-wrap .rule {
  width: 70px; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--sky), var(--green), var(--yellow), var(--orange), var(--red));
  margin: .9rem auto 0;
}
.service-card {
  height: 100%;
  background: #fff;
  border: 1px solid #e7ebef;
  border-radius: 16px;
  padding: 2rem 1.6rem;
  text-align: center;
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.service-card:hover, .service-card:focus {
  color: inherit;
}
.service-card:hover, .service-card:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 16px 34px rgba(0,44,88,.12);
  border-color: transparent;
}
.service-icon {
  width: 92px; height: 92px;
  margin: 0 auto 1.2rem;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,44,88,.08);
  color: var(--navy);
  font-size: 2.6rem;
}
.service-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0;
}

/* ---------- Services carousel ---------- */
.services-carousel-wrap { padding: 0 4.75rem; }
.services-viewport { position: relative; }
.carousel-item .row { margin: 0 -.75rem; }

.carousel-control-prev,
.carousel-control-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  opacity: 1;
}
.carousel-control-prev { left: -3.75rem; }
.carousel-control-next { right: -3.75rem; }
.services-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
  border: 1px solid #e7ebef;
  box-shadow: 0 8px 20px rgba(0,44,88,.1);
  font-size: 1.2rem;
  line-height: 1;
  transition: background .25s ease, color .25s ease, transform .25s ease;
}
.carousel-control-prev:hover .services-arrow,
.carousel-control-next:hover .services-arrow,
.carousel-control-prev:focus-visible .services-arrow,
.carousel-control-next:focus-visible .services-arrow {
  background: var(--navy);
  color: #fff;
  transform: scale(1.06);
}

.services-footer-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.2rem;
}
.services-play-toggle {
  border: none;
  background: transparent;
  color: #9aa7b4;
  font-size: 1.1rem;
  line-height: 1;
  padding: .3rem;
  cursor: pointer;
  transition: color .2s ease;
}
.services-play-toggle:hover, .services-play-toggle:focus-visible { color: var(--navy); }

.services-indicators { position: static; margin: 0; }
.services-indicators [data-bs-target] {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #d4dbe2;
  opacity: 1;
  border: none;
  text-indent: -9999px;
  transition: background-color .25s ease, transform .25s ease;
}
.services-indicators [data-bs-target].active {
  background-color: var(--navy);
  transform: scale(1.25);
}

@media (max-width: 767.98px) {
  .services-carousel-wrap { padding: 0 2.5rem; }
  .carousel-control-prev,
  .carousel-control-next { width: 2.4rem; height: 2.4rem; }
  .carousel-control-prev { left: -2.5rem; }
  .carousel-control-next { right: -2.5rem; }
  .services-arrow { width: 2.4rem; height: 2.4rem; font-size: 1rem; }
}

/* ---------- Page hero (pagine interne) ---------- */
.page-hero {
  position: relative;
  padding: 150px 0 3.5rem;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-darker) 100%);
  color: #fff;
  overflow: hidden;
}
.page-hero.has-image {
  background-size: cover;
  background-position: center;
}
.page-hero.has-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(8,34,56,.88) 0%, rgba(5,20,36,.82) 100%);
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero-eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--sky);
  margin-bottom: .7rem;
}
.page-hero h1 {
  font-weight: 800;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  margin-bottom: .6rem;
}
.page-hero p.lead {
  color: #dce7f0;
  font-size: 1.05rem;
  max-width: 720px;
  margin-bottom: 0;
}
.breadcrumb-nav {
  font-size: .82rem;
  color: #a9bccb;
  margin-bottom: 1.1rem;
}
.breadcrumb-nav a { color: #cfe0ee; }
.breadcrumb-nav a:hover, .breadcrumb-nav a:focus { color: var(--yellow); }
.breadcrumb-nav .sep { margin: 0 .4rem; opacity: .6; }

/* ---------- Page content (pagine interne) ---------- */
.page-content { padding: 4rem 0; }
.page-content section + section { margin-top: 3.2rem; }
.page-content h2 {
  color: var(--navy);
  font-weight: 700;
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.page-content h2 i { color: var(--sky); font-size: 1.1em; }
.page-content h3 {
  color: var(--navy);
  font-weight: 700;
  font-size: 1.1rem;
  margin: 1.6rem 0 .8rem;
}
.page-content p { margin-bottom: 1.1rem; }
.page-content ul.check-list { list-style: none; padding: 0; margin: 0 0 1.1rem; }
.page-content ul.check-list li {
  position: relative;
  padding-left: 1.7rem;
  margin-bottom: .6rem;
  color: #445064;
  line-height: 1.6;
}
.page-content ul.check-list li::before {
  content: "\f26a";
  font-family: "bootstrap-icons";
  position: absolute;
  left: 0;
  top: .05em;
  color: var(--sky);
}
.callout-box {
  background: var(--paper);
  border-left: 4px solid var(--sky);
  border-radius: 8px;
  padding: 1.2rem 1.4rem;
  margin-bottom: 1.6rem;
  font-size: .95rem;
  color: var(--ink);
}
.callout-box.warn { border-left-color: var(--red); }
.callout-box strong { color: var(--navy); }

/* Badge reCAPTCHA v3 nascosto su richiesta cliente — testo di attribuzione obbligatorio
   aggiunto a mano vicino al form (vedi .recaptcha-disclaimer), come richiesto da Google. */
.grecaptcha-badge { visibility: hidden; }
.recaptcha-disclaimer { font-size: .7rem; color: #8593a3; }
.recaptcha-disclaimer a { color: #8593a3; text-decoration: underline; }

.table-responsive-card {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid #e7ebef;
  margin-bottom: 1.8rem;
  /* Scrollbar sempre visibile: su mobile quella nativa è invisibile
     e nasconde il fatto che la tabella si può scorrere lateralmente. */
  scrollbar-width: thin;
  scrollbar-color: var(--sky) var(--paper);
}
.table-responsive-card::-webkit-scrollbar { height: 9px; }
.table-responsive-card::-webkit-scrollbar-track { background: var(--paper); }
.table-responsive-card::-webkit-scrollbar-thumb {
  background: var(--sky);
  border-radius: 5px;
  border: 2px solid var(--paper);
}
@media (max-width: 767.98px) {
  .table-responsive-card { overflow-x: scroll; padding-bottom: 2.2rem; position: relative; }
  .table-responsive-card::after {
    content: "\2194  scorri per vedere tutta la tabella";
    position: sticky;
    left: 0;
    bottom: 0;
    display: inline-block;
    font-size: .72rem;
    font-weight: 600;
    color: #fff;
    background: var(--navy);
    padding: .3rem .7rem;
    border-radius: 0 6px 0 0;
  }
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  min-width: 480px;
}
.data-table caption {
  caption-side: top;
  text-align: left;
  font-weight: 700;
  color: var(--navy);
  padding: .8rem 1rem 0;
}
.data-table th, .data-table td {
  padding: .65rem .9rem;
  border-bottom: 1px solid #eef1f4;
  text-align: center;
}
.data-table thead th {
  background: var(--paper);
  color: var(--navy);
  font-weight: 700;
  white-space: nowrap;
}
.data-table tbody th {
  text-align: left;
  color: var(--navy);
  font-weight: 700;
  background: #fbfcfd;
}

.contact-card-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.contact-card {
  background: #fff;
  border: 1px solid #e7ebef;
  border-radius: 14px;
  padding: 1.4rem;
  transition: box-shadow .2s ease, transform .2s ease;
}
.contact-card:hover { box-shadow: 0 12px 26px rgba(0,44,88,.1); transform: translateY(-3px); }
.contact-card .icon {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,44,88,.08);
  color: var(--navy);
  font-size: 1.25rem;
  margin-bottom: .8rem;
}
.contact-card h3 { margin: 0 0 .3rem; font-size: 1rem; }
.contact-card a.stretched-link::after { content: ""; position: absolute; inset: 0; }
.contact-card { position: relative; }
.contact-card p { margin: 0; font-size: .88rem; color: #5a6a7a; }

.cda-section { margin-top: 3.5rem; }
.cda-section-inner {
  background: var(--paper);
  border-radius: 20px;
  padding: 3rem clamp(1.2rem, 4vw, 3rem) 3.6rem;
  text-align: center;
}
.cda-section-inner h2 { margin-bottom: .6rem; justify-content: center; }

.org-chart { display: flex; flex-direction: column; align-items: center; width: 100%; margin: 3rem 0 1.5rem; }
.org-node {
  position: relative;
  background: #fff;
  border: 1px solid #e7ebef;
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  text-align: center;
  width: 210px;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0,44,88,.06);
  transition: box-shadow .2s ease, transform .2s ease;
}
.org-node:hover { box-shadow: 0 10px 22px rgba(0,44,88,.12); transform: translateY(-2px); }
.org-node.org-node-top { border-color: var(--sky); box-shadow: 0 8px 20px rgba(0,139,210,.18); }
.org-node .avatar {
  width: 52px; height: 52px;
  margin: 0 auto .6rem;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,44,88,.08);
  color: var(--navy);
  font-size: 1.6rem;
}
.org-node h3 { margin: 0 0 .2rem; font-size: 1rem; }
.org-node .role { margin: 0; font-size: .8rem; font-weight: 600; color: var(--sky); text-transform: uppercase; letter-spacing: .03em; }

.org-connector { width: 2px; height: 2rem; background: #c9d3db; }

.org-tier-group { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.4rem 1.8rem; position: relative; width: 100%; }
.org-tier-group::before { content: ''; position: absolute; top: 0; left: 12%; right: 12%; height: 2px; background: #c9d3db; }
.org-tier-group .org-node { margin-top: 2rem; }
.org-tier-group .org-node::after { content: ''; position: absolute; top: -2rem; left: 50%; width: 2px; height: 2rem; background: #c9d3db; transform: translateX(-50%); }

@media (max-width: 767.98px) {
  .org-tier-group { flex-direction: column; align-items: center; }
  .org-tier-group::before { display: none; }
}

.link-card-grid { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.link-card {
  position: relative;
  display: block;
  background: #fff;
  border: 1px solid #e7ebef;
  border-radius: 14px;
  padding: 1.3rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.link-card:hover, .link-card:focus {
  box-shadow: 0 14px 28px rgba(0,44,88,.12);
  transform: translateY(-3px);
  border-color: transparent;
  color: inherit;
}
.link-card .icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,44,88,.08);
  color: var(--navy);
  font-size: 1.15rem;
  margin-bottom: .9rem;
}
.link-card .logo-img {
  display: block;
  width: 100%;
  height: 72px;
  object-fit: contain;
  object-position: left center;
  margin-bottom: .9rem;
}
.webcam-placeholder {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: .375rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-darker) 100%);
  color: rgba(255,255,255,.75);
}
.webcam-placeholder i { font-size: 2rem; }
.webcam-placeholder span { font-size: .78rem; font-weight: 600; }
.link-card .icon.icon-lg {
  width: 60px; height: 60px;
  background: rgba(0,139,210,.12);
  color: var(--sky);
  font-size: 1.7rem;
}
.link-card h3 { font-size: .98rem; margin-bottom: .25rem; color: var(--navy); }
.link-card span.url { font-size: .8rem; color: #8593a3; word-break: break-word; }
.link-card .go-icon { position: absolute; top: 1.1rem; right: 1.1rem; color: #c3cdd6; font-size: .95rem; }

.emergency-box {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%);
  border-radius: 16px;
  padding: 2rem;
  color: #fff;
}
.emergency-box h2 { color: #fff; }
.emergency-box h2 i { color: var(--yellow); }
.emergency-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.emergency-list li {
  display: flex; align-items: center; gap: .8rem;
  background: rgba(255,255,255,.07);
  border-radius: 10px;
  padding: .8rem 1rem;
}
.emergency-list .num { font-weight: 800; font-size: 1.15rem; color: var(--yellow); margin-left: auto; white-space: nowrap; }
.emergency-list .lbl { font-size: .88rem; color: #dce7f0; }
.emergency-list a { color: var(--yellow); }

.figure-card { border-radius: 14px; overflow: hidden; border: 1px solid #e7ebef; margin-bottom: 1.6rem; }
.figure-card img { width: 100%; height: auto; display: block; }
.figure-card figcaption { padding: .8rem 1.1rem; font-size: .85rem; color: #5a6a7a; background: var(--paper); }

.pdf-card {
  display: flex; align-items: center; gap: 1rem;
  background: #fff; border: 1px solid #e7ebef; border-radius: 14px;
  padding: 1.1rem 1.3rem; text-decoration: none; color: inherit;
  transition: box-shadow .2s ease, transform .2s ease;
  margin-bottom: 1rem;
}
.pdf-card:hover, .pdf-card:focus { box-shadow: 0 12px 26px rgba(0,44,88,.1); transform: translateY(-2px); color: inherit; }
.pdf-card .icon { font-size: 1.7rem; color: var(--red); flex: 0 0 auto; }
.pdf-card strong { display: block; color: var(--navy); font-size: .95rem; }
.pdf-card span { font-size: .8rem; color: #8593a3; }

.side-nav-card {
  background: var(--paper);
  border-radius: 14px;
  padding: 1.4rem;
  position: sticky;
  top: 140px;
}
.side-nav-card h2 { font-size: 1rem; margin-bottom: .9rem; }
.side-nav-card ul { list-style: none; padding: 0; margin: 0; }
.side-nav-card li { margin-bottom: .4rem; }
.side-nav-card a {
  display: block;
  padding: .5rem .7rem;
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink);
}
.side-nav-card a:hover, .side-nav-card a:focus { background: #fff; color: var(--navy); }

/* Variante blu del box principale (es. "Serve aiuto?", "Indice"), per farlo risaltare
   rispetto al box grigio "Pagine correlate" sotto. */
.side-nav-card.side-nav-card-blue {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%);
}
.side-nav-card-blue h2 { color: #fff; }
.side-nav-card-blue a { color: #dce7f0; }
.side-nav-card-blue a:hover, .side-nav-card-blue a:focus { background: rgba(255,255,255,.1); color: #fff; }

/* Box secondario sotto un .side-nav-card già sticky: stesso stile grigio, ma non sticky
   (evita che due box sticky nella stessa colonna si sovrappongano allo scroll). */
.side-nav-card-secondary {
  background: var(--paper);
  border-radius: 14px;
  padding: 1.4rem;
  margin-top: 1.2rem;
}
.side-nav-card-secondary h2 { font-size: 1rem; margin-bottom: .9rem; }
.side-nav-card-secondary ul { list-style: none; padding: 0; margin: 0; }
.side-nav-card-secondary li { margin-bottom: .4rem; }
.side-nav-card-secondary a {
  display: block;
  padding: .5rem .7rem;
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink);
}
.side-nav-card-secondary a:hover, .side-nav-card-secondary a:focus { background: #fff; color: var(--navy); }

/* ---------- Form (pagine interne) ---------- */
.page-content .form-label { font-weight: 600; color: var(--navy); font-size: .9rem; margin-bottom: .35rem; }
.page-content .form-control,
.page-content .form-select {
  border: 1px solid #dbe2e8;
  border-radius: 8px;
  padding: .6rem .85rem;
}
.page-content .form-control:focus,
.page-content .form-select:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 .2rem rgba(0,139,210,.18);
}
.page-content .form-check-input:checked {
  background-color: var(--navy);
  border-color: var(--navy);
}
.page-content .form-check-input:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 .2rem rgba(0,139,210,.18);
}

/* ---------- Map ---------- */
.section-map { line-height: 0; position: relative; }
.section-map iframe { width: 100%; height: 480px; border: 0; display: block; }
.map-caption {
  position: absolute;
  top: 1.5rem; left: 1.5rem;
  background: #fff;
  padding: .9rem 1.3rem;
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(0,0,0,.15);
  z-index: 2;
  line-height: 1.5;
}
.map-caption strong { color: var(--navy); display: block; }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  color: #eef2f6;
  background-color: var(--navy-darker);
  background-image: linear-gradient(180deg, rgba(5,20,36,.82), rgba(5,20,36,.93)), url("../../images/footer-parallax.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding: 4.5rem 0 0;
}
@media (max-width: 991.98px) {
  .site-footer { background-attachment: scroll; }
}
.site-footer a { color: #cfe0ee; text-decoration: none; }
.site-footer a:hover, .site-footer a:focus { color: var(--yellow); }
.site-footer h2, .site-footer h3 {
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 1.1rem;
}
.footer-logo img { height: 60px; margin-bottom: 1.2rem; }
.footer-about p { color: #c3d1de; font-size: .92rem; }
/* Icone social sotto il testo di presentazione (prima colonna, la più corta: bilancia il footer) */
.footer-social { list-style: none; padding: 0; margin: 1.2rem 0 0; display: flex; gap: .6rem; }
.footer-social a { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 50%; border: 1px solid rgba(255,255,255,.25); color: #cfe0ee; font-size: 1.2rem;
  transition: background-color .2s, border-color .2s, color .2s; }
.footer-social a:hover, .footer-social a:focus-visible { background: var(--sky); border-color: var(--sky); color: #fff; }
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { margin-bottom: .55rem; }
.footer-list a { font-size: .92rem; }
.footer-contact li { display: flex; gap: .6rem; margin-bottom: .8rem; font-size: .92rem; color: #cfe0ee; }
.footer-contact i { color: var(--sky); margin-top: .15rem; }
.footer-bottom {
  margin-top: 3.5rem;
  padding: 1.4rem 0;
  border-top: 1px solid rgba(255,255,255,.15);
  font-size: .85rem;
  color: #a9bccb;
}
.footer-bottom a { color: #a9bccb; text-decoration: underline; }
.lang-list { display: flex; gap: .9rem; list-style: none; padding: 0; margin: 0; }
.lang-list a { display: inline-flex; align-items: center; }
.lang-list .flag-icon { width: 18px; height: 13px; margin-right: .35rem; }

.ext-link-icon { font-size: .75em; margin-left: .3em; vertical-align: middle; }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 1040;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: #fff;
  font-size: 1.3rem;
  box-shadow: 0 8px 20px rgba(0,0,0,.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .3s ease, transform .3s ease, background .25s ease, visibility .3s;
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover, .back-to-top:focus {
  background: var(--sky);
  color: #fff;
}
@media (max-width: 575.98px) {
  .back-to-top { right: 1rem; bottom: 1rem; width: 2.6rem; height: 2.6rem; font-size: 1.1rem; }
}

/* ---------- Utility ---------- */
.section-eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--sky);
  margin-bottom: .6rem;
}
