/* La Casetta Mea — Design */

:root {
  --white:    #ffffff;
  --cream:    #faf7f2;
  --sand:     #f0ead8;
  --navy:     #0c1e2c;
  --navy-2:   #163348;
  --gold:     #c9a96e;
  --teal:     #1a8aad;
  --terra:    #c55a3c;
  --text:     #1a2530;
  --muted:    #7a8a94;
  --border:   rgba(12,30,44,.1);
  --r:        16px;
  --r-sm:     10px;
  --t:        .28s ease;
}

*, *::before, *::after { box-sizing: border-box; }

/* Scala tipografica base: 18px su desktop, 16px su mobile */
html { font-size: 18px; }

@media (max-width: 767px) {
  html { font-size: 16px; }
}

html { scroll-behavior: smooth; }

body {
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--cream);
  line-height: 1.65;
  overflow-x: hidden;
  margin: 0;
  font-size: 1rem;
}

a { text-decoration: none; }

/* ── Navbar ── */
#mea-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  transition: background var(--t), box-shadow var(--t);
}

#mea-nav.scrolled {
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-logo img {
  height: 54px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,.45));
  transition: filter var(--t);
}
#mea-nav.scrolled .nav-logo img { filter: none; }

.nav-wa {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: #25D366;
  color: #fff;
  border-radius: 99px;
  padding: .5rem 1.2rem;
  font-size: .9rem;
  font-weight: 600;
  transition: all var(--t);
}
.nav-wa:hover { background: #20bc5a; color: #fff; transform: translateY(-1px); }
.nav-wa .iconify { font-size: 1.1rem; }

/* ── Hero ── */
#mea-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 580px;
  overflow: hidden;
}

#mea-hero #myCarousel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#mea-hero #myCarousel .carousel-inner,
#mea-hero #myCarousel .item {
  width: 100%;
  height: 100%;
}

#mea-hero #myCarousel .item {
  background-size: cover;
  background-position: 50% 50%;
}

#mea-hero #myCarousel .item > img {
  visibility: hidden;
  width: 100%;
  height: 100%;
}

#mea-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    to bottom,
    rgba(8,20,30,.32) 0%,
    rgba(8,20,30,.12) 40%,
    rgba(8,20,30,.78) 100%
  );
  pointer-events: none;
}

#mea-hero .carousel-control {
  z-index: 4;
  background: none;
  width: 64px;
  opacity: 0;
  transition: opacity var(--t);
}
#mea-hero:hover .carousel-control { opacity: .7; }
#mea-hero .carousel-control:hover { opacity: 1 !important; }
#mea-hero .carousel-control .glyphicon { font-size: 1.6rem; text-shadow: 0 2px 12px rgba(0,0,0,.5); }

#mea-hero .carousel-indicators {
  z-index: 5;
  bottom: 5.5rem;
}
#mea-hero .carousel-indicators li {
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.5);
  background: transparent;
  margin: 0 5px;
  transition: all var(--t);
}
#mea-hero .carousel-indicators li.active {
  background: #fff;
  border-color: #fff;
  transform: scale(1.35);
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 8rem;
  text-align: center;
  pointer-events: none;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.3);
  color: rgba(255,255,255,.92);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .5rem 1.25rem;
  border-radius: 99px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  margin-bottom: 1.1rem;
  pointer-events: auto;
}
.hero-tag .iconify { font-size: 1rem; color: var(--gold); }

.hero-title {
  font-family: "Playfair Display", Georgia, serif;
  /* 18px base: min=3rem=54px, vw=9vw, max=6.5rem=117px */
  font-size: clamp(3rem, 9vw, 6.5rem);
  font-weight: 700;
  color: #fff;
  line-height: .95;
  letter-spacing: -.025em;
  text-shadow: 0 4px 28px rgba(0,0,0,.25);
  margin-bottom: 0;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 2rem;
  color: rgba(255,255,255,.88);
  font-size: 1.1rem;
  font-weight: 400;
  pointer-events: auto;
}
.hero-meta span { display: flex; align-items: center; gap: .45rem; }
.hero-meta .iconify { font-size: 1.2rem; color: var(--gold); }

.hero-scroll {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  color: rgba(255,255,255,.45);
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  animation: mea-pulse 2.4s ease-in-out infinite;
}
.hero-scroll::after {
  content: '';
  width: 1px;
  height: 28px;
  background: linear-gradient(to bottom, rgba(255,255,255,.5), transparent);
}

@keyframes mea-pulse {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: .45; }
  50%       { transform: translateX(-50%) translateY(7px); opacity: .75; }
}

/* ── Stats bar ── */
.stats-bar { background: var(--navy); }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.stat-item {
  text-align: center;
  padding: 2.5rem 1rem;
  border-right: 1px solid rgba(255,255,255,.07);
}
.stat-item:last-child { border-right: none; }

.stat-number {
  font-family: "Playfair Display", Georgia, serif;
  /* 18px base: min=2.2rem=40px, vw=4vw, max=3.2rem=57px */
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  display: block;
}
.stat-label {
  font-size: .95rem;
  font-weight: 500;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
  letter-spacing: .08em;
  display: block;
  margin-top: .55rem;
}

/* ── Shared section ── */
.mea-section { padding: 5rem 0; }
.mea-section--dark  { background: var(--navy); color: #fff; }
.mea-section--cream { background: var(--cream); }
.mea-section--white { background: var(--white); }
.mea-section--sand  { background: var(--sand); }

.mea-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-label {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}
.section-label::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--gold);
  flex-shrink: 0;
  border-radius: 2px;
}

.section-heading {
  font-family: "Playfair Display", Georgia, serif;
  /* 18px base: min=1.9rem=34px, vw=3.5vw, max=2.8rem=50px */
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -.02em;
  color: var(--navy);
  margin-top: 0;
  margin-bottom: 2rem;
}
.mea-section--dark .section-heading { color: #fff; }
.section-heading em { font-style: italic; color: var(--teal); }
.mea-section--dark .section-heading em { color: var(--gold); }

/* ── Descrizione ── */
.descrizione-layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 4rem;
  align-items: start;
}

.descrizione-side .section-heading { margin-bottom: 1.25rem; }

.map-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--teal);
  font-size: 1rem;
  font-weight: 600;
  border-bottom: 1px solid rgba(26,138,173,.35);
  transition: all var(--t);
}
.map-link:hover { color: var(--terra); border-color: var(--terra); }
.map-link .iconify { font-size: 1.1rem; }

.descrizione-text {
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  line-height: 1.85;
  color: var(--text);
  padding-left: 1.5rem;
  border-left: 3px solid var(--gold);
}
.descrizione-text p { margin-bottom: 1rem; }
.descrizione-text p:last-child { margin-bottom: 0; }

/* ── Services ── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 1px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--r);
  overflow: hidden;
  margin-top: .5rem;
}

.service-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  padding: 2rem 1rem;
  background: rgba(255,255,255,.02);
  text-align: center;
  transition: background var(--t);
}
.service-card:hover { background: rgba(255,255,255,.07); }
.service-card:hover .svc-icon { background: var(--gold); }
.service-card:hover .svc-icon .iconify { color: var(--navy); }

.svc-icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: rgba(255,255,255,.09);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t);
}
.svc-icon .iconify { font-size: 1.9rem; color: var(--gold); transition: color var(--t); }

.svc-name {
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255,255,255,.75);
  line-height: 1.3;
}

/* ── Rules ── */
.rules-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.rule-card {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  padding: 1.4rem;
  background: var(--white);
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  transition: all var(--t);
}
.rule-card:hover {
  border-color: rgba(26,138,173,.3);
  box-shadow: 0 4px 20px rgba(12,30,44,.07);
  transform: translateY(-2px);
}

.rule-icon {
  width: 46px; height: 46px;
  border-radius: 11px;
  background: rgba(26,138,173,.08);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.rule-icon .iconify { font-size: 1.4rem; color: var(--teal); }

.rule-body strong {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .2rem;
}
.rule-body span { font-size: .95rem; color: var(--muted); }

/* ── Cosa vedere ── */
#mea-terracina { padding-bottom: 0; }

.carousel2-wrap { margin-top: 2rem; }

#myCarousel2 {
  width: 100%;
  height: min(60vh, 540px);
  overflow: hidden;
  position: relative;
}

#myCarousel2 .carousel-inner,
#myCarousel2 .item { width: 100%; height: 100%; }

#myCarousel2 .item {
  background-size: cover;
  background-position: 50% 50%;
}
#myCarousel2 .item > img { visibility: hidden; width: 100%; height: 100%; }

#myCarousel2 .carousel-control {
  background: none; width: 60px; opacity: 0; z-index: 5;
  transition: opacity var(--t);
}
#myCarousel2:hover .carousel-control { opacity: .75; }
#myCarousel2 .carousel-control:hover { opacity: 1 !important; }
#myCarousel2 .carousel-control .glyphicon { font-size: 1.5rem; text-shadow: 0 2px 8px rgba(0,0,0,.5); }

#myCarousel2 .carousel-indicators { z-index: 5; bottom: auto; top: 1rem; }
#myCarousel2 .carousel-indicators li {
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.5);
  background: transparent;
  margin: 0 4px;
  transition: all var(--t);
}
#myCarousel2 .carousel-indicators li.active { background: #fff; border-color: #fff; transform: scale(1.3); }

#myCarousel2 .carousel-caption {
  bottom: 0; left: 0; right: 0;
  padding: 4rem 2.5rem 2.5rem;
  background: linear-gradient(to top, rgba(0,0,0,.65), transparent);
  text-align: left;
  border-radius: 0;
  z-index: 4;
}
#myCarousel2 .carousel-caption .cap-label {
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: .5rem;
}
#myCarousel2 .carousel-caption h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.3rem, 2.5vw, 1.9rem);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,.4);
  margin: 0;
  padding-left: 0;
}

/* ── Posizione ── */
.posizione-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.map-img-wrap {
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(12,30,44,.1);
}
.map-img-wrap img { display: block; width: 100%; height: auto; }

.posizione-info h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.7rem;
  color: var(--navy);
  font-weight: 700;
  margin: 0 0 .75rem;
  line-height: 1.2;
}
.posizione-info p { font-size: 1rem; color: var(--muted); margin-bottom: 1.25rem; line-height: 1.7; }
.posizione-address {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--teal) !important;
  margin-bottom: .75rem !important;
}

.posizione-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--teal);
  font-size: 1rem;
  font-weight: 600;
  border-bottom: 1px solid rgba(26,138,173,.35);
  transition: all var(--t);
}
.posizione-link:hover { color: var(--terra); border-color: var(--terra); }
.posizione-link .iconify { font-size: 1.1rem; }

/* ── Calendario ── */
.cal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}
.cal-top .section-heading { margin-bottom: 0; }

.cal-legend {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cal-leg-item {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: .95rem;
  font-weight: 500;
  color: var(--text);
}

.cal-leg-dot {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
}

.calendar-card {
  background: var(--white);
  border-radius: 20px;
  padding: 0;
  overflow: hidden;
  border: none;
  box-shadow: 0 12px 48px rgba(12,30,44,.13), 0 2px 8px rgba(12,30,44,.06);
}

.fc-button {
  background-color: var(--navy) !important;
  border-color: var(--navy) !important;
  border-radius: 8px !important;
  font-size: .85rem !important;
  padding: .3rem .8rem !important;
  box-shadow: none !important;
  font-family: "Poppins", sans-serif !important;
}
.fc-button:hover,
.fc-button.fc-state-hover {
  background-color: var(--navy-2) !important;
  border-color: var(--navy-2) !important;
}

/* ── FullCalendar 3 — visual theme ── */

/* Toolbar layout */
.fc-toolbar {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem !important;
}

/* Month/year heading */
.fc-toolbar h2 {
  font-family: "Playfair Display", Georgia, serif !important;
  font-size: 1.4rem !important;
  font-weight: 700 !important;
  color: var(--navy) !important;
  letter-spacing: -.01em !important;
  border-bottom: none !important;
}

/* Today/state-active button gets gold accent */
.fc-button.fc-state-active,
.fc-button.fc-state-down {
  background-color: var(--gold) !important;
  border-color: var(--gold) !important;
  color: var(--navy) !important;
}

/* Today button: subtle outline style */
.fc-today-button {
  background-color: transparent !important;
  border: 1.5px solid rgba(12,30,44,.2) !important;
  color: var(--navy) !important;
}
.fc-today-button:hover {
  background-color: rgba(12,30,44,.06) !important;
  border-color: rgba(12,30,44,.35) !important;
}
.fc-today-button.fc-state-disabled {
  opacity: .4 !important;
}

/* Day header row (lun, mar, mer…) */
.fc-day-header {
  font-family: "Poppins", sans-serif !important;
  font-size: .78rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: .09em !important;
  color: var(--muted) !important;
  padding: .65rem 0 !important;
  background: transparent !important;
  border-bottom: 2px solid rgba(12,30,44,.06) !important;
}

/* All cell borders: very light */
.fc td,
.fc th {
  border-color: rgba(12,30,44,.07) !important;
}

/* Day cells */
.fc-day {
  background: var(--white) !important;
  transition: background .15s ease;
}
.fc-day:hover {
  background: rgba(201,169,110,.07) !important;
}

/* Today cell */
.fc-today {
  background: rgba(201,169,110,.13) !important;
  border-color: rgba(201,169,110,.35) !important;
}

/* Day number */
.fc-day-number {
  font-family: "Poppins", sans-serif !important;
  font-size: .85rem !important;
  font-weight: 500 !important;
  color: var(--text) !important;
  padding: .45rem .65rem !important;
}

/* Greyed-out days from other months */
.fc-other-month .fc-day-number {
  color: rgba(12,30,44,.22) !important;
}

/* Events */
.fc-event {
  border: none !important;
  border-radius: 6px !important;
  padding: 2px 8px !important;
  font-family: "Poppins", sans-serif !important;
  font-size: .78rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: opacity .15s ease, transform .1s ease !important;
  box-shadow: 0 1px 4px rgba(0,0,0,.15) !important;
}
.fc-event:hover {
  opacity: .85 !important;
  transform: translateY(-1px) !important;
}
.fc-event .fc-title {
  font-weight: 600 !important;
  letter-spacing: .01em !important;
}

/* Remove default FC inner glow/gradient on events */
.fc-event .fc-bg { opacity: 0 !important; }

/* Head container border */
.fc-head-container { border-color: rgba(12,30,44,.07) !important; }

/* Fix overflow on calendar card */
.fc-scroller { overflow: visible !important; height: auto !important; }

/* ── Calendar card — dark header theme ── */
.calendar-card .fc-toolbar {
  background: var(--navy) !important;
  padding: 1.2rem 1.6rem !important;
  margin-bottom: 0 !important;
  border-radius: 0 !important;
}

.calendar-card .fc-toolbar h2 {
  color: #fff !important;
  font-size: 1.25rem !important;
}

.calendar-card .fc-button {
  background: rgba(255,255,255,.14) !important;
  border: 1px solid rgba(255,255,255,.22) !important;
  color: #fff !important;
  font-size: .82rem !important;
  padding: .3rem .9rem !important;
}
.calendar-card .fc-button:hover,
.calendar-card .fc-button.fc-state-hover {
  background: rgba(255,255,255,.25) !important;
  border-color: rgba(255,255,255,.38) !important;
}
.calendar-card .fc-button.fc-state-active,
.calendar-card .fc-button.fc-state-down {
  background: var(--gold) !important;
  border-color: var(--gold) !important;
  color: var(--navy) !important;
}
.calendar-card .fc-today-button {
  background: rgba(255,255,255,.08) !important;
  border: 1.5px solid rgba(255,255,255,.25) !important;
  color: rgba(255,255,255,.8) !important;
}
.calendar-card .fc-today-button:hover {
  background: rgba(255,255,255,.18) !important;
}
.calendar-card .fc-today-button.fc-state-disabled {
  opacity: .35 !important;
}

.calendar-card .fc-view-container {
  padding: 1.25rem !important;
}

/* ── Contatti ── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.contact-name {
  font-size: 1.05rem;
  color: rgba(255,255,255,.52);
  margin-top: -.5rem;
  margin-bottom: 0;
}

.contact-cards { display: flex; flex-direction: column; gap: 1rem; }

.cta-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.35rem 1.6rem;
  border-radius: var(--r);
  transition: all var(--t);
}
.cta-card--tel {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  color: #fff;
}
.cta-card--tel:hover { background: rgba(255,255,255,.12); transform: translateY(-2px); color: #fff; }

.cta-card--wa {
  background: #25D366;
  border: 1px solid #25D366;
  color: #fff;
}
.cta-card--wa:hover {
  background: #20bc5a; border-color: #20bc5a;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37,211,102,.35);
  color: #fff;
}

.cta-icon {
  width: 54px; height: 54px;
  border-radius: 13px;
  background: rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cta-card--wa .cta-icon { background: rgba(255,255,255,.18); }
.cta-icon .iconify { font-size: 1.7rem; color: #fff; }

.cta-meta { flex: 1; }
.cta-label {
  font-size: .85rem;
  color: rgba(255,255,255,.52);
  text-transform: uppercase;
  letter-spacing: .08em;
  display: block;
  margin-bottom: .2rem;
}
.cta-card--wa .cta-label { color: rgba(255,255,255,.72); }

.cta-card--email {
  background: rgba(26,138,173,.18);
  border: 1px solid rgba(26,138,173,.35);
  color: #fff;
}
.cta-card--email:hover {
  background: rgba(26,138,173,.3);
  border-color: rgba(26,138,173,.55);
  transform: translateY(-2px);
  color: #fff;
}
.cta-card--email .cta-icon { background: rgba(26,138,173,.3); }

.cta-value { font-size: 1.2rem; font-weight: 600; color: #fff; }

/* ── Floating WA (mobile) ── */
.mea-float-wa {
  display: none;
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  width: 58px; height: 58px;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(37,211,102,.45);
  transition: all var(--t);
}
.mea-float-wa:hover { background: #20bc5a; color: #fff; transform: scale(1.08); }
.mea-float-wa .iconify { font-size: 1.9rem; }

/* ── Galleria ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.gallery-item {
  display: block;
  overflow: hidden;
  border-radius: var(--r-sm);
  aspect-ratio: 4 / 3;
  background: var(--border);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}

.gallery-item:hover img { transform: scale(1.06); }

/* ── Lightbox ── */
.mea-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.92);
  align-items: center;
  justify-content: center;
}
.mea-lightbox.open { display: flex; }

.lb-img-wrap {
  max-width: min(90vw, 1100px);
  max-height: 86vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-img-wrap img {
  max-width: 100%;
  max-height: 86vh;
  object-fit: contain;
  display: block;
  border-radius: 8px;
  box-shadow: 0 12px 56px rgba(0,0,0,.5);
}

.lb-close {
  position: absolute;
  top: 1rem; right: 1.25rem;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--t);
}
.lb-close:hover { background: rgba(255,255,255,.25); }

.lb-prev, .lb-next {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  font-size: 2.4rem;
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--t);
  line-height: 1;
}
.lb-prev { left: 1.25rem; }
.lb-next { right: 1.25rem; }
.lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,.28); }

.lb-counter {
  position: absolute;
  bottom: 1.25rem; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.55);
  font-size: .82rem;
  font-family: "Poppins", sans-serif;
  letter-spacing: .1em;
}

@media (max-width: 767px) {
  .lb-prev { left: .5rem; }
  .lb-next { right: .5rem; }
  .lb-prev, .lb-next { width: 44px; height: 44px; font-size: 1.8rem; }
}

/* ── Calendar info note ── */
.cal-info {
  font-size: .98rem;
  color: var(--text);
  background: rgba(12,30,44,.06);
  border-left: 3px solid var(--gold);
  padding: .85rem 1.25rem;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin-bottom: 2rem;
  line-height: 1.7;
}

/* ── Contact license ── */
.contact-license {
  margin-top: -.25rem;
}
.contact-license p {
  margin: 0;
  font-size: .93rem;
  color: rgba(255,255,255,.52);
  line-height: 1.65;
}
.contact-license p strong { color: rgba(255,255,255,.8); }

/* ── Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.d1 { transition-delay: .1s; }
.d2 { transition-delay: .2s; }
.d3 { transition-delay: .3s; }

/* ── Tablet ── */
@media (max-width: 1024px) {
  .descrizione-layout  { grid-template-columns: 1fr; gap: 2rem; }
  .posizione-layout    { grid-template-columns: 1fr; }
  .contact-layout      { grid-template-columns: 1fr; gap: 2.5rem; }
  .stats-grid          { grid-template-columns: repeat(2, 1fr); }
  .stat-item           { border-bottom: 1px solid rgba(255,255,255,.06); }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(3) { border-bottom: none; }
  .stat-item:nth-child(4) { border-bottom: none; border-right: none; }
  .services-grid       { grid-template-columns: repeat(3, 1fr); }
}

/* ── Mobile ── */
@media (max-width: 767px) {
  html { font-size: 15px; }

  .mea-section      { padding: 2.75rem 0; }
  .mea-container    { padding: 0 1.1rem; }
  #mea-nav          { padding: 0 1.1rem; height: 60px; }

  .nav-logo img     { height: 40px; }
  .nav-wa           { font-size: .82rem; padding: .4rem .9rem; gap: .3rem; }

  /* Hero */
  .hero-content     { padding-bottom: 5.5rem; }
  .hero-title       { font-size: clamp(2.6rem, 11vw, 4.5rem); }
  .hero-scroll      { display: none; }
  #mea-hero .carousel-indicators { bottom: 1.5rem; }

  /* Section typography */
  .section-heading  { font-size: clamp(1.55rem, 5.5vw, 2rem); margin-bottom: 1.5rem; }
  .section-label    { font-size: .88rem; letter-spacing: .09em; }

  /* Stats */
  .stats-grid       { grid-template-columns: repeat(2, 1fr); }
  .stat-item        { padding: 1.6rem .75rem; }
  .stat-number      { font-size: clamp(1.8rem, 6vw, 2.4rem); }
  .stat-label       { font-size: .8rem; letter-spacing: .05em; }

  /* Descrizione */
  .descrizione-text { padding-left: .85rem; font-size: .95rem; line-height: 1.75; }
  .descrizione-text p { margin-bottom: .85rem; }

  /* Services */
  .services-grid    { grid-template-columns: repeat(2, 1fr); }
  .service-card     { padding: 1.35rem .6rem; gap: .6rem; }
  .svc-icon         { width: 48px; height: 48px; }
  .svc-icon .iconify { font-size: 1.5rem; }
  .svc-name         { font-size: .85rem; }

  /* Rules */
  .rules-grid       { grid-template-columns: 1fr; gap: .75rem; }
  .rule-card        { padding: 1.1rem; gap: .85rem; }
  .rule-icon        { width: 40px; height: 40px; border-radius: 9px; }
  .rule-icon .iconify { font-size: 1.2rem; }
  .rule-body strong { font-size: .95rem; }
  .rule-body span   { font-size: .88rem; }

  /* Terracina carousel */
  #myCarousel2      { height: min(50vh, 340px); }

  /* Posizione */
  .posizione-info h3 { font-size: 1.35rem; }
  .posizione-info p  { font-size: .93rem; }

  /* Gallery */
  .gallery-grid     { grid-template-columns: repeat(2, 1fr); gap: .55rem; }

  /* Calendar */
  .cal-top          { flex-direction: column; align-items: flex-start; margin-bottom: 1.75rem; }
  .cal-legend       { gap: .85rem; }
  .cal-info         { font-size: .88rem; }
  .calendar-card .fc-toolbar { padding: .9rem 1rem !important; }
  .fc-toolbar h2    { font-size: 1.05rem !important; }
  .fc-button        { font-size: .75rem !important; padding: .25rem .65rem !important; }

  /* Contacts */
  .contact-layout   { gap: 2rem; }
  .contact-license p { font-size: .88rem; }
  .cta-card         { padding: 1.1rem 1.25rem; gap: 1rem; }
  .cta-icon         { width: 46px; height: 46px; }
  .cta-value        { font-size: 1.05rem; }

  .mea-float-wa     { display: flex; }
}

/* ── Small mobile ── */
@media (max-width: 479px) {
  html { font-size: 14px; }

  .mea-section      { padding: 2.25rem 0; }
  .mea-container    { padding: 0 .9rem; }
  #mea-nav          { padding: 0 .9rem; }
  .nav-wa-text      { display: none; }

  .hero-title       { font-size: clamp(2.4rem, 13vw, 3.5rem); }

  .stats-grid       { grid-template-columns: repeat(2, 1fr); }
  .stat-item        { padding: 1.35rem .5rem; }
  .stat-label       { font-size: .75rem; }

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

  .section-heading  { font-size: clamp(1.45rem, 6.5vw, 1.9rem); }
}
