/* =========================================================
   VARIABILI GLOBALI
   ========================================================= */
:root {
  --brand: #1c6f6b;
  --brand-2: #1f4772;
  --accent: #f3b21f;
  --bg: #ffffff;
  --text: #1f4772;
  --muted: #1f4772;
  --surface: #f6f8f9;

  --top-warm: #f5eaf1;
  --top-cool: #e9f2fb;
  --mid-sky: #8bb9d9;
  --deep-blue: #2b6f9f;
  --bottom: #1f5278;

  --ring: rgba(28, 111, 107, 0.35);
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* =========================================================
   RESET E BASE
   ========================================================= */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

html {
  visibility: visible;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

[id] {
  scroll-margin-top: 12px;
}

/* =========================================================
   TOPBAR, HEADER E NAVIGAZIONE
   ========================================================= */
.topbar {
  position: relative;
  z-index: 20;
  background: #0f2f2e;
  color: #e5f6f4;
  font-size: 0.85rem;
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 6px 0;
}

.topbar-social {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-social span {
  opacity: 0.85;
}

.topbar-social a {
  color: #e5f6f4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.topbar-social a i {
  font-size: 0.8rem;
}

.topbar-social a:hover {
  background: rgba(255, 255, 255, 0.12);
}

header {
  position: relative;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  justify-content: unset;
  position: relative;
  z-index: 91;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.brand .logo {
  width: 100px;
  height: auto;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.brand .logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.menu {
  display: flex;
  gap: 22px;
  align-items: center;
  margin: 0 auto;
}

.menu a {
  font-weight: 500;
  color: #1f4772 !important;
  padding: 8px 10px;
  border-radius: 10px;
  white-space: nowrap;
}

.menu a:hover {
  background: #fdfefc;
}

.cta-btn {
  text-align: center;
  background: var(--brand);
  color: #fff;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 600;
  border: 1px solid #0f5b58;
  box-shadow: 0 2px 0 #0f5b58;
}

.cta-btn:hover {
  filter: brightness(1.05);
}

.alt-btn {
  background: #fff;
  border: 1px solid #dbe2e8;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 600;
  color: var(--brand-2);
}

.hamb {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid grey;
/*   background: grey; */
  cursor: pointer;
  background-color: rgba(0, 0, 0, 0.1);
}

.hamb span {
  width: 26px;
  height: 2px;
  /* background: var(--brand-2); */
  background: #0f2f2e;
  display: block;
  border-radius: 2px;
}

#nav-toggle {
  display: none;
}

@media (max-width: 1024px) {
  .nav {
    position: relative;
    justify-content: flex-start;
    gap: 12px;
  }

  .hamb {
    display: flex;
    margin-left: auto;
    position: relative;
    z-index: 10001;
  }

  .menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 12px 4vw 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    z-index: 10000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(135deg, #e8fbfb 0%, #f2fffe 40%, #e9f7f6 100%);
    border-bottom-left-radius: 25px;
    border-bottom-right-radius: 25px;
  }

  #nav-toggle:checked + .hamb + .menu {
    display: flex;
  }

  header.on-hero .menu {
    background: rgba(0, 0, 0, 0.85);
  }

  header.scrolled .menu {
    background: #ffffff;
    border-bottom: 1px solid #eef2f7;
  }

  .menu a {
    width: 100%;
    padding: 10px 0;
    color: #1f4772 !important;
  }

  header.scrolled .menu a {
    color: var(--brand-2) !important;
  }

  .menu .cta-btn {
    width: 100%;
    text-align: center;
  }

  .topbar .container {
    justify-content: center;
  }
}

header.on-hero .hamb span {
  background: #ffffff;
}

/* =========================================================
   SFONDI SEZIONI
   ========================================================= */
.g-teal,
.g-cream,
.g-sky,
.g-mint,
.g-sage {
  background: linear-gradient(135deg, #e8fbfb 0%, #f2fffe 40%, #e9f7f6 100%);
}

.g-footer {
  background: linear-gradient(180deg, #0e2c2b 0%, #0b2423 100%);
}

@media (min-width: 900px) {
  .g-teal,
  .g-cream,
  .g-sky,
  .g-mint,
  .g-sage,
  .g-footer,
  .masthead {
    background-attachment: fixed;
    background-position: center 0;
    background-size: cover;
  }
}

@media (max-width: 899px) {
  .g-teal,
  .g-cream,
  .g-sky,
  .g-mint,
  .g-sage,
  .g-footer,
  .masthead {
    background-attachment: scroll;
  }
}

/* =========================================================
   HERO E MASTHEAD
   ========================================================= */
.masthead {
  position: relative;
  min-width: 100%;
  height: calc(100svh - var(--nav-total-h, 96px));
  background:
    radial-gradient(1200px 600px at 15% -10%, color-mix(in oklab, var(--top-warm) 95%, transparent) 0%, color-mix(in oklab, var(--top-warm) 50%, transparent) 40%, transparent 70%),
    radial-gradient(900px 520px at 85% -15%, color-mix(in oklab, var(--top-cool) 90%, transparent) 0%, transparent 65%),
    linear-gradient(188deg, var(--top-warm) 0%, color-mix(in oklab, var(--top-warm), var(--mid-sky)) 10%, var(--mid-sky) 38%, var(--deep-blue) 68%, var(--bottom) 100%);
  background-attachment: scroll;
}

.hero {
  height: 100%;
  color: #fff;
  background: transparent !important;
  display: grid;
  place-content: center;
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.hero * {
  pointer-events: auto;
}

.hero-inner {
  min-height: 0 !important;
  display: grid;
  place-content: center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: transparent;
}

.hero .kicker {
  color: #e8fffa;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
}

.hero h1 {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
  margin: 12px 0;
  color: #ffffff;
  text-align: center;
}

.hero p {
  display: none;
}

.hero-actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero .cta-btn,
.hero .alt-btn {
  min-width: 180px;
  max-width: fit-content;
}

/* =========================================================
   HERO CAROUSEL
   ========================================================= */
.hero-carousel {
  position: absolute;
  inset: 0;
  height: 100%;
  z-index: 0;
}

.hero-carousel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.25) 35%, rgba(0, 0, 0, 0.35));
  pointer-events: none;
}

.hero-carousel .slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero-carousel .slide.is-active {
  opacity: 1;
}

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

.hero-carousel .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.35);
  border: 0;
  color: #fff;
  padding: 10px 12px;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1;
  font-size: 22px;
}

.hero-carousel .nav:hover {
  background: rgba(0, 0, 0, 0.5);
}

.hero-carousel .nav.prev {
  left: 14px;
}

.hero-carousel .nav.next {
  right: 14px;
}

.hero-carousel .dots {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 18px;
  display: flex;
  gap: 8px;
}

.hero-carousel .dots button {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.6);
}

.hero-carousel .dots button[aria-current="true"] {
  background: #fff;
  transform: scale(1.25);
}

@media (prefers-reduced-motion: reduce) {
  .hero-carousel .nav,
  .hero-carousel .dots {
    display: none !important;
  }
}

@media (max-width: 1023px) {
  .hero-carousel .nav {
    display: none;
  }
}

@media (max-width: 560px) {
  .hero-carousel .slide img {
    display: none;
  }

  .hero-carousel {
    background-image: url("img/centro/1 (6).jpeg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }

  .hero-carousel .dots {
    display: none;
  }
}

/* =========================================================
   LAYOUT GENERALE
   ========================================================= */
.stripe {
  /* background: var(--surface); */
  padding: 10vh 0;
}

.section {
  padding: 10vh 0;
}

.sec-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 24px;
}

.sec-head h1,
.sec-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  color: var(--brand-2);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

/* =========================================================
   CARD GENERICHE
   ========================================================= */
.card {
  grid-column: span 4;
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card .thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #e6f3f2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card .thumb i {
  font-size: 3rem;
  color: var(--brand);
  opacity: 0.85;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.card:hover .thumb i {
  transform: scale(1.08);
  opacity: 1;
}

.card .body {
  padding: 18px;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 1.125rem;
  color: var(--brand-2);
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.card .more {
  margin: 14px 18px 18px;
  align-self: flex-start;
  font-weight: 600;
  color: var(--brand);
}

@media (max-width: 1024px) {
  .card {
    grid-column: span 6;
  }

  #chiSiamoCard,
  #chiSiamoImgCard,
  #contatti .card {
    grid-column: span 13 !important;
  }
}

@media (max-width: 640px) {
  .card {
    grid-column: span 12;
  }
}

/* =========================================================
   CARD SERVIZI
   ========================================================= */
#servizi .card {
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  text-align: center;
  justify-content: flex-start;
  align-items: stretch;
  padding-bottom: 20px;
}

#servizi .card .thumb {
  flex: 0 0 auto;
  aspect-ratio: 16 / 9;
  min-height: 140px;
  background: #e6f3f2;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

#servizi .card .thumb i {
  font-size: clamp(36px, 5.2vw, 64px);
  color: var(--brand);
  opacity: 0.9;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

#servizi .card:hover .thumb i {
  transform: scale(1.06);
  opacity: 1;
}

#servizi .card .body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 26px 22px 18px;
  text-align: center;
}

#servizi .card h3 {
  margin: 0;
}

#servizi .card .sep {
  width: 30%;
  height: 2px;
  background: var(--brand);
  border: 0;
  border-radius: 2px;
  opacity: 0.6;
  margin: 3vh 0;
}

#servizi .card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.96rem;
}

#servizi .card .more {
  align-self: center;
  margin-top: auto;
  font-weight: 600;
  color: var(--brand);
  text-align: center;
  display: inline-block;
  border-radius: 10px;
  padding: 8px 16px;
  transition: background 0.25s;
}

#servizi .card .more:hover {
  background: var(--surface);
}

/* =========================================================
   CTA BAND
   ========================================================= */
.cta-band {
  background: linear-gradient(90deg, var(--brand), #2aa59f);
  color: #fff;
  border-radius: 20px;
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: var(--shadow);
}

.cta-band h3 {
  margin: 0;
  font-size: 1.4rem;
}

/* =========================================================
   NEWS / MULTIMEDIA
   ========================================================= */
.news {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.news .post {
  grid-column: span 4;
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: var(--radius);
  overflow: hidden;
}

.news .post .thumb {
  aspect-ratio: 16 / 9;
  background: #e6f3f2;
}

.news .post .body {
  padding: 25px;
}

.news .post h4 {
  margin: 0 0 6px;
  color: var(--brand-2);
}

@media (max-width: 900px) {
  .news .post {
    grid-column: span 6;
  }
}

@media (max-width: 640px) {
  .news .post {
    grid-column: span 12;
  }
}

/* =========================================================
   PAGINE INTERNE
   ========================================================= */
.content-wrap {
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(16px, 3vw, 28px);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 10px 0 18px;
}

.actions .note {
  font-size: 0.95rem;
  color: var(--muted);
  margin-right: 8px;
}

.actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #dbe2e8;
  background: #fff;
  font-weight: 600;
}

.actions .btn:hover {
  background: var(--surface);
}

.prose p {
  line-height: 1.7;
  margin: 0 0 14px;
}

.prose ul {
  margin: 0 0 14px 1.2rem;
  padding-left: 1rem;
}

.prose li {
  margin: 6px 0;
}

.article-end-image {
  margin: 24px 0 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.article-end-image img {
  width: 100%;
  height: clamp(220px, 38vw, 420px);
  object-fit: cover;
  cursor: zoom-in;
}

.contact-cta {
  background: linear-gradient(90deg, var(--brand), #2aa59f);
  color: #fff;
  border-radius: 20px;
  padding: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: var(--shadow);
}

.contact-cta h3 {
  margin: 0;
  font-size: 1.25rem;
}

/* =========================================================
   CAROSELLO CHI SIAMO
   ========================================================= */
#chiSiamoImgCard {
  overflow: hidden;
  display: flex;
}

#chiSiamoImgCard .carousel {
  flex: 1;
  position: relative;
  width: 100%;
  border-radius: var(--radius);
  aspect-ratio: 3 / 2;
}

@media (min-width: 1024px) {
  #chiSiamoImgCard .carousel {
    height: 100%;
    aspect-ratio: auto;
    min-height: 100%;
  }
}

#chiSiamoCarousel .slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  will-change: opacity;
}

#chiSiamoCarousel .slide.is-active {
  opacity: 1;
}

#chiSiamoCarousel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#chiSiamoCarousel .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  border: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  user-select: none;
  z-index: 2;
}

#chiSiamoCarousel .nav:hover {
  background: rgba(0, 0, 0, 0.5);
}

#chiSiamoCarousel .nav:focus {
  outline: 3px solid var(--ring);
}

#chiSiamoCarousel .nav.prev {
  left: 10px;
}

#chiSiamoCarousel .nav.next {
  right: 10px;
}

#chiSiamoCarousel .dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  z-index: 2;
}

#chiSiamoCarousel .dots button {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.6);
}

#chiSiamoCarousel .dots button[aria-current="true"] {
  background: #fff;
  transform: scale(1.15);
}

@media (max-width: 1023px) {
  #chiSiamoImgCard {
    display: block;
    height: auto !important;
    overflow: hidden;
  }

  #chiSiamoCarousel {
    position: relative;
    display: block;
    height: auto;
    aspect-ratio: auto;
  }

  #chiSiamoCarousel::before {
    content: "";
    display: block;
    padding-top: 66.6667%;
  }

  #chiSiamoCarousel .slide {
    display: none !important;
    opacity: 1 !important;
    position: static !important;
  }

  #chiSiamoCarousel .slide:first-child {
    display: block !important;
    position: absolute !important;
    inset: 0;
    margin: 0;
  }

  #chiSiamoCarousel .slide:first-child img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  #chiSiamoCarousel .nav,
  #chiSiamoCarousel .dots {
    display: none !important;
  }
}

/* =========================================================
   PROFESSIONISTI
   ========================================================= */
.people-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
  align-items: stretch;
}

.person-card {
  grid-column: span 6;
  display: block;
}

.person-inner {
  display: flex;
  gap: 18px;
  background: #fff;
  border: 1px solid #eef2f7;
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 16px 18px;
  height: 100%;
}

.person-avatar-block {
  flex: 0 0 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
}

.person-card .avatar {
  width: 200px;
  height: 200px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--surface) center/cover no-repeat;
  background-image: var(--img);
  overflow: hidden;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #e8eef5;
}

.person-open,
.contentNameRole {
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0;
  text-align: center;
}

.person-open {
  cursor: pointer;
}

.person-avatar-block .name {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--brand-2);
}

.person-avatar-block .role {
  font-size: 0.9rem;
  color: var(--muted);
  opacity: 0.9;
}

.person-open:hover .name,
.person-text .cv-link:hover {
  text-decoration: underline;
}

.person-text {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.person-text .summary {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.person-text .cv-link {
  align-self: flex-start;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--brand);
  text-decoration: none;
  border-radius: 10px;
  padding: 4px 0;
}

.group-title {
  grid-column: 1 / -1;
  margin: 12px 0 4px;
  font-size: clamp(18px, 2vw, 20px);
  font-weight: 700;
  color: var(--brand-2);
}

@media (max-width: 900px) {
  .person-card {
    grid-column: span 12;
  }
}

@media (max-width: 640px) {
  .person-card .avatar {
    width: 120px;
    height: 120px;
    margin: 0;
  }

  .person-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .person-avatar-block {
    width: 100%;
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
}

/* =========================================================
   MODALE PROFESSIONISTI
   ========================================================= */
.person-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  height: 100%;
}

.person-modal[aria-hidden="false"] {
  display: flex;
}

.person-modal .modal-card {
  width: min(960px, 96vw);
  height: 90%;
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  position: relative;
  animation: pop 0.18s ease-out;
}

@keyframes pop {
  from {
    transform: translateY(6px);
    opacity: 0;
  }

  to {
    transform: none;
    opacity: 1;
  }
}

.person-modal .modal-body {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 0;
  align-items: stretch;
  height: 100%;
}

.person-modal .modal-body .avatar.lg {
  width: 100%;
  height: 100%;
  min-height: 320px;
  background: var(--surface) center/cover no-repeat;
  background-image: var(--img);
  border: 0;
  box-shadow: none;
  border-radius: 0;
  margin: 0 !important;
}

.person-modal .modal-body .info {
  padding: 22px;
  overflow: auto;
}

.person-modal .info h3 {
  margin: 0.2rem 0;
  color: var(--brand-2);
  font-size: clamp(22px, 2.4vw, 30px);
}

.person-modal .info .role {
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-weight: 600;
}

.person-modal .desc {
  margin: 0.6rem 0 1rem;
  line-height: 1.5;
}

.person-modal .contacts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.person-modal .contacts i {
  margin-right: 6px;
}

.person-modal .close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 28px;
  line-height: 1;
  border: 0;
  background: transparent;
  color: #6b7a90;
  cursor: pointer;
}

html:has(.person-modal[aria-hidden="false"]) .reveal {
  transform: none !important;
}

@media (max-width: 760px) {
  .person-modal .modal-body {
    grid-template-columns: 1fr;
  }

  .person-modal .modal-body .avatar.lg {
    height: 45vh !important;
    min-height: 240px;
  }
}

/* =========================================================
   GALLERIA E LIGHTBOX
   ========================================================= */
.gallery-card {
  width: 100%;
  height: auto !important;
  overflow: visible !important;
  padding: 18px;
}

.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.gallery-item {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: block;
  line-height: 0;
}

.gallery-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
  filter: brightness(0.96);
}

.gallery-item:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 20000;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-image {
  max-width: min(96vw, 1400px);
  max-height: 92vh;
  width: auto;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  object-fit: contain;
  background: #fff;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

@media (max-width: 900px) {
  .image-gallery {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }

  .gallery-item img {
    height: 190px;
  }
}

@media (max-width: 640px) {
  .gallery-card {
    padding: 12px;
  }

  .image-gallery {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
  }

  .gallery-item img {
    height: 150px;
  }

  .lightbox {
    padding: 14px;
  }

  .lightbox-image {
    max-width: 100%;
    max-height: 88vh;
    border-radius: 10px;
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
  }
}

/* =========================================================
   FOOTER
   ========================================================= */
footer {
  margin-top: 40px;
  background: #0f2f2e;
  color: #bfe5e3;
  padding: 28px 0;
}

.fgrid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.fcol {
  grid-column: span 4;
}

.fcol h5 {
  margin: 0 0 10px;
  color: #fff;
}

.legal {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 16px;
  padding-top: 12px;
  font-size: 0.9rem;
  color: #d1f3f1;
}

@media (max-width: 900px) {
  .fcol {
    grid-column: span 12;
  }
}

/* =========================================================
   ACCESSIBILITA' E ANIMAZIONI
   ========================================================= */
.btn-focus:focus {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

.no-transition * {
  transition: none !important;
}

html:not(.no-transition) header,
html:not(.no-transition) .topbar {
  animation: fadeDown 0.2s ease-out;
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  will-change: opacity, transform;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 768px) {
  .reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }

  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 767px) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* =========================================================
   WHATSAPP FLOATING BUTTON
   ========================================================= */
.whatsapp-fab {
  position: fixed;
  bottom: 18px;
  right: 18px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  color: #fff;
  z-index: 90;
}

.whatsapp-fab i {
  font-size: 28px;
}

@media (max-width: 560px) {
  .whatsapp-fab {
    display: flex;
  }
}
