/* Struttura comune a tutti i temi: i colori e i caratteri stanno nel tema. */

/* Menu a tendina (siti a più pagine) */
.navbar-nav .sub-menu { list-style: none; margin: 0; padding: 0 0 .5rem 1rem; }
.navbar-nav .sub-menu ul { list-style: none; padding-left: 1rem; }
.navbar-nav .sub-menu a { display: block; padding: .35rem 0; text-decoration: none; }
.sub-caret { font-size: .7em; }
@media (min-width: 992px) {
  .navbar-nav .has-sub { position: relative; }
  .navbar-nav .sub-menu { position: absolute; top: 100%; left: 0; z-index: 1000; min-width: 17rem; padding: .5rem 0; background: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .12); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s; }
  .navbar-nav .has-sub:hover > .sub-menu, .navbar-nav .has-sub:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
  .navbar-nav .sub-menu a { padding: .45rem 1.25rem; }
  .navbar-nav .sub-menu ul a { padding-left: 2rem; }
}

/* Apertura con immagine di sfondo */
.hero-bg { position: relative; display: flex; align-items: center; color: #fff; background: #222 center / cover no-repeat; isolation: isolate; }
.hero-bg::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .25); z-index: -1; }
.hero-cover { min-height: min(75vh, 640px); text-align: center; }
.hero-banner { min-height: 260px; text-align: center; }
.hero-bg .hero-title, .hero-bg .lead-text { color: #fff; }
.hero-phone { position: absolute; top: 1.5rem; right: 1.5rem; color: #fff; font-weight: 700; font-size: 1.4rem; text-decoration: none; }

/* Fascia con sfondo */
.banner { position: relative; padding: 6rem 0; color: #fff; background: #333 center / cover no-repeat; isolation: isolate; }
.banner::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .3); z-index: -1; }
.banner-center { text-align: center; }
.banner-inner { max-width: 40rem; }
.banner-center .banner-inner { margin: 0 auto; }
.banner-number { display: inline-block; font-size: clamp(3rem, 7vw, 4.5rem); font-weight: 700; line-height: 1; padding: .5rem .9rem; border: 3px solid currentColor; margin-right: 1rem; vertical-align: middle; }
.banner-title { display: inline-block; vertical-align: middle; color: #fff; }
.banner-number + .banner-title { max-width: 14rem; }

/* Testo */
.rich h2, .rich h3, .rich h4 { margin-top: 1.75rem; }
.rich > :first-child { margin-top: 0; }

/* Galleria */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: .75rem; }
.gallery-grid a { display: block; overflow: hidden; aspect-ratio: 1; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery-grid a:hover img, .gallery-grid a:focus img { transform: scale(1.05); }
.lightbox { padding: 0; border: 0; background: transparent; max-width: 95vw; max-height: 95vh; overflow: visible; }
.lightbox::backdrop { background: rgba(0, 0, 0, .85); }
.lightbox img { display: block; max-width: 95vw; max-height: 90vh; }
.lightbox-close { position: absolute; top: -2.5rem; right: 0; border: 0; background: none; color: #fff; font-size: 1.5rem; }

/* Video e mappa */
.section-video { width: 100%; height: auto; display: block; background: #000; }
.map-frame { display: block; width: 100%; height: 420px; border: 0; }

/* Schede con link */
.card-number { display: block; font-weight: 700; }
.card-link { display: inline-block; margin-top: .75rem; font-weight: 700; text-decoration: none; }
