/* RESET DI BASE -------------------------------------------------------- */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #222;
  background-color: #f7f7f7;
  line-height: 1.5;
}

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

.page-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

/* HERO ----------------------------------------------------------------- */

header.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  margin-bottom: 40px;
  border-radius: 0 0 24px 24px;
  overflow: hidden;
}

header.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  /* FOTO HEADER (puoi cambiarla) */
  background-image: url("media/311724259.jpg");
  background-size: cover;
  background-position: center;
  filter: brightness(0.9);
  z-index: -2;
}

header.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.15),
    rgba(0, 0, 0, 0.75)
  );
  z-index: -1;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px 80px;
}

/* LOGO IN HERO --------------------------------------------------------- */

.hero-logo {
  display: flex;
  flex-direction: column;   /* logo + linea in colonna */
  align-items: center;      /* centrati orizzontalmente */
  justify-content: center;
  margin-bottom: 16px;
  animation: heroFadeIn 0.9s ease-out 0.1s both;
}

.hero-logo-img {
  max-width: 340px;
  width: 100%;
  height: auto;
  display: block;
  /* se il logo sorgente è nero -> lo rendiamo bianco */
  filter: brightness(0) invert(1);
}

/* LINEA SOTTO IL LOGO */
.hero-logo::after {
  content: "";
  margin-top: 14px;
  width: 120px;             /* larghezza linea */
  height: 2px;              /* spessore linea */
  background: rgba(255,255,255,0.85);
  border-radius: 2px;
}

/* BADGE, TITOLI, CTA --------------------------------------------------- */

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  font-size: 0.82rem;
  margin-bottom: 10px;
  opacity: 0.95;
}

.hero-badge span {
  font-weight: 600;
  color: #ffd166;
}

.hero-rating {
  font-size: 0.82rem;
  opacity: 0.92;
  margin-bottom: 12px;
}

.hero-rating strong {
  color: #ffd166;
}

.hero-title {
  font-size: clamp(1.9rem, 3.4vw, 2.8rem);
  margin-bottom: 10px;
  font-weight: 700;
}

.hero-subtitle {
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto 20px;
  opacity: 0.96;
}

.hero-cta {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

/* BOTTONI -------------------------------------------------------------- */

.btn-primary,
.btn-secondary,
.btn-outline {
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease,
    opacity 0.15s ease,
    border-color 0.15s ease;
}

.btn-primary {
  background: #f4a261;
  color: #1b1b1b;
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(0,0,0,0.45);
  background: #f58b3b;
}

.btn-secondary {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.6);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.24);
  opacity: 0.95;
}

.btn-outline {
  background: transparent;
  color: #1b1b1b;
  border: 1px solid #f4a261;
}

.btn-outline:hover {
  background: #fef2e9;
  border-color: #f58b3b;
}

/* LAYOUT GENERALE ------------------------------------------------------ */

main {
  margin-top: -40px;
}

.card {
  background: #fff;
  border-radius: 24px;
  padding: 24px 20px;
  box-shadow: 0 18px 45px rgba(0,0,0,0.08);
  margin-bottom: 24px;
}

.section-title {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.section-subtitle {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 8px;
}

/* ABOUT + SERVIZI ------------------------------------------------------ */

.about-text p {
  margin-bottom: 8px;
  font-size: 0.98rem;
  color: #333;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  margin-bottom: 4px;
}

.pill {
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fef2e9;
  border: 1px solid #f4a26144;
  color: #444;
}

.services-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px 32px;
  margin-top: 14px;
  font-size: 0.94rem;
}

.services-group-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.services-list {
  list-style: none;
}

.services-list li {
  padding-left: 18px;
  position: relative;
  margin-bottom: 4px;
}

.services-list li::before {
  content: "•";
  position: absolute;
  left: 4px;
  color: #f4a261;
  font-weight: 700;
}

/* GALLERY + TAB -------------------------------------------------------- */

.gallery-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
}

.gallery-tab {
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #f5f5f5;
  font-size: 0.88rem;
  cursor: pointer;
}

.gallery-tab.is-active {
  background: #f4a261;
  border-color: #f4a261;
  color: #1b1b1b;
  font-weight: 600;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.gallery-grid figure {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  cursor: pointer;
}

.gallery-grid img {
  width: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.gallery-grid figure:hover img {
  transform: scale(1.03);
  filter: brightness(1.05);
}

/* CONTATTI + MAPPA ----------------------------------------------------- */

.contact-wrapper {
  display: grid;
  grid-template-columns: 1.2fr 1.8fr;
  gap: 24px;
  align-items: start;
}

.contact-details p {
  margin-bottom: 6px;
  font-size: 0.96rem;
}

.highlight {
  font-weight: 600;
}

.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 6px;
}

.trust-badge {
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #d0e6ff;
  background: #f3f8ff;
  color: #355070;
}

.contact-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.map-container {
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  height: 420px;          /* nuova altezza desktop */
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.footer-note {
  text-align: center;
  font-size: 0.8rem;
  color: #777;
  margin-top: 16px;
}

/* LIGHTBOX OVERLAY ----------------------------------------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.lightbox.is-visible {
  display: flex;
}

.lightbox-image {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

/* Nessuna caption visibile */
.lightbox-caption {
  display: none;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  font-size: 2rem;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  line-height: 1;
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.4rem;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0 14px;
  line-height: 1;
}

.lightbox-prev {
  left: 10px;
}

.lightbox-next {
  right: 10px;
}

.lightbox-close:hover,
.lightbox-arrow:hover {
  color: #ffd166;
}

/* ANIMAZIONE LOGO ------------------------------------------------------ */

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* RESPONSIVE ----------------------------------------------------------- */

@media (max-width: 768px) {
  header.hero {
    min-height: 70vh;
    margin-bottom: 32px;
    border-radius: 0 0 20px 20px;
  }

  .hero-logo-img {
    max-width: 200px;
  }

  .hero-logo::after {
    width: 80px;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .card {
    padding: 18px 16px;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
  }

  .lightbox-image {
    max-width: 94vw;
    max-height: 70vh;
  }

  .lightbox-arrow {
    font-size: 2rem;
  }
}
