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

:root {
  --green-main: #047857;
  --green-light: #22c55e;
  --green-soft: #ecfdf3;
  --green-border: #bbf7d0;
  --text-main: #042f2e;
  --text-muted: #64748b;
  --bg-body: #f9fafb;
  --bg-surface: #ffffff;
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.16);
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
}

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

.container {
  width: min(1120px, 100% - 3rem);
  margin: 0 auto;
}

/* HEADER */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-img {
  height: 175px;   /* circa 2,5 volte il 70px di prima */
  width: auto;
  display: block;
}

@media (max-width: 768px) {
  .logo-img {
    height: 120px; /* un po' più contenuto su mobile */
  }
}


.logo-text {
  display: flex;
  flex-direction: column;
}


.logo-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.main-nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9rem;
}

.main-nav a {
  position: relative;
  padding-bottom: 0.2rem;
  color: #0f172a;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, var(--green-main), var(--green-light));
  transition: width 0.2s ease-out;
}

.main-nav a:hover::after {
  width: 100%;
}

/* HERO */

.hero {
  background: radial-gradient(circle at top, #bbf7d0 0, #f9fafb 55%, #ecfeff 100%);
  padding: 3.5rem 0 3.2rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.1fr);
  gap: 2rem;
  align-items: flex-start;
}

.hero-text h1 {
  font-size: clamp(2.1rem, 4vw, 3rem);
  line-height: 1.1;
  margin-bottom: 1rem;
  color: #022c22;
}

.hero-text p {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin-bottom: 0.9rem;
}

.hero-list {
  list-style: none;
  font-size: 0.9rem;
  color: #0f172a;
  margin-bottom: 1.1rem;
}

.hero-list li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.25rem;
}

.hero-list li::before {
  content: "";
  position: absolute;
  left: 0.35rem;
  top: 0.45rem;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--green-main), var(--green-light));
}

.hero-note {
  display: inline-block;
  margin-top: 0.4rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(220, 252, 231, 0.9);
  color: #14532d;
  font-size: 0.85rem;
}

/* FORM HERO */

.hero-form-card {
  background: var(--bg-surface);
  border-radius: 1.2rem;
  padding: 1.5rem 1.6rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--green-border);
}

.hero-form-card h2 {
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
  color: #064e3b;
}

.form-intro {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}

.contact-form {
  display: grid;
  gap: 0.8rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #065f46;
}

input,
textarea {
  padding: 0.55rem 0.75rem;
  border-radius: 0.6rem;
  border: 1px solid #cbd5f5;
  font: inherit;
  color: #0f172a;
  background: #f9fafb;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--green-main);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.35);
  background: #ffffff;
}

textarea {
  resize: vertical;
  min-height: 90px;
}

.form-note {
  margin-top: 0.6rem;
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* BUTTONS */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, background 0.15s ease-out;
}

.btn-primary {
  background: linear-gradient(to right, var(--green-main), var(--green-light));
  color: #ecfdf3;
  box-shadow: 0 12px 28px rgba(22, 163, 74, 0.4);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(22, 163, 74, 0.45);
}

.btn-outline {
  border-color: rgba(148, 163, 184, 0.7);
  color: #0f172a;
  background: rgba(255, 255, 255, 0.9);
}

.btn-outline:hover {
  background: #e5f9f0;
  transform: translateY(-1px);
}

.btn-full {
  width: 100%;
}

/* SECTIONS */

.section {
  padding: 3.2rem 0;
  background: var(--bg-body);
}

.section-light {
  background: #ecfdf3;
}

.section h2 {
  font-size: 1.5rem;
  margin-bottom: 0.6rem;
  color: #022c22;
}

.section-intro {
  max-width: 640px;
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1.6rem;
}

/* LAYOUT HELPERS */

.two-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.8rem;
  align-items: flex-start;
}

/* VIDEO PLACEHOLDER */

.video-placeholder {
  border-radius: 1.2rem;
  border: 1px dashed var(--green-main);
  background: linear-gradient(to bottom right, #ecfdf3, #f0f9ff);
  padding: 1.2rem;
}

.video-inner {
  border-radius: 0.9rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 1.2rem 1.4rem;
  text-align: left;
}

.video-label {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.1);
  color: #047857;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.video-inner p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* CARDS SERVIZI */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.4rem;
}

.card {
  background: var(--bg-surface);
  border-radius: 1.1rem;
  padding: 1.3rem 1.35rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.card h3 {
  font-size: 1.02rem;
  margin-bottom: 0.6rem;
  color: #064e3b;
}

.card ul {
  list-style: none;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.card li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.25rem;
}

.card li::before {
  content: "";
  position: absolute;
  left: 0.25rem;
  top: 0.55rem;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 0, var(--green-light), var(--green-main));
}
.main-nav .menu-button {
  padding: 0.45rem 1rem;
  background-color: #22c55e;
  color: white;
  border-radius: 6px;
  font-weight: 600;
  margin-left: 0.5rem;
  transition: background-color 0.2s ease;
}

.main-nav .menu-button:hover {
  background-color: #15803d;
}

/* CONTATTI */

.contacts-grid {
  gap: 1.6rem;
}

.contact-box {
  border-radius: 1.1rem;
  padding: 1.3rem 1.4rem 1.4rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  font-size: 0.9rem;
}

.contact-box h3 {
  margin-bottom: 0.4rem;
  font-size: 1rem;
  color: #064e3b;
}

.contact-addr {
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.contact-data a {
  color: var(--green-main);
}

/* FOOTER */

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  background: #ffffff;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.1rem 0 1.3rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-mail a {
  font-weight: 600;
  color: var(--green-main);
}

/* RESPONSIVE */

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .main-nav {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
    font-size: 0.86rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-form-card {
    order: -1;
  }

  .hero {
    padding-top: 3rem;
  }

  .two-cols {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(100% - 2rem, 100%);
  }

  .main-nav {
    font-size: 0.82rem;
  }
}
.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* proporzione 16:9 */
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.main-nav .menu-button {
  padding: 0.45rem 1rem;
  background-color: #22c55e; /* verde tema */
  color: white;
  border-radius: 6px;
  font-weight: 600;
  margin-left: 0.5rem;
  transition: background-color 0.2s ease;
}

.main-nav .menu-button:hover {
  background-color: #15803d; /* verde più scuro */
}
/* ===============================
   GALLERIA + ATTESTATI (FIX)
   =============================== */

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

.gallery-grid img,
.attestati-grid img{
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 1rem;
  cursor: zoom-in;
}

.gallery-grid figure,
.attestati-grid figure{
  margin: 0;
}

.gallery-grid figcaption,
.attestati-grid figcaption{
  font-size: 0.82rem;
  text-align: center;
  margin-top: 0.45rem;
  color: var(--text-muted);
}
/* ===== FIX DEFINITIVO GALLERIA (DESKTOP + MOBILE) ===== */

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

@media (min-width: 768px){
  .gallery-grid{
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.gallery-grid figure{
  margin: 0;
}

.gallery-grid img{
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  cursor: zoom-in;
}

.gallery-grid figcaption{
  font-size: 0.8rem;
  text-align: center;
  margin-top: 6px;
  color: var(--text-muted);
}
/* =========================================
   GALLERIA + ATTESTATI + LIGHTBOX (FIX FINALE)
   ========================================= */

/* griglia immagini (desktop + mobile) */
.gallery-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
}

@media (min-width: 768px){
  .gallery-grid{
    grid-template-columns: repeat(4, 1fr);
  }
}

.gallery-grid figure{
  margin: 0;
}

.gallery-grid img{
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  cursor: zoom-in;
}

.gallery-grid figcaption{
  font-size: 0.8rem;
  text-align: center;
  margin-top: 6px;
  color: var(--text-muted);
}

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

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

.lightbox img{
  max-width: 92vw;
  max-height: 85vh;
  border-radius: 12px;
}

.lightbox-caption{
  margin-top: 10px;
  text-align: center;
  color: #fff;
  font-size: 0.9rem;
}

.lightbox-close{
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 28px;
  cursor: pointer;
}
/* CONTENUTO LIGHTBOX (immagine + didascalia sotto) */
.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 92vw;
}

.lightbox-content img {
  max-width: 92vw;
  max-height: 80vh;
  border-radius: 12px;
}

.lightbox-caption {
  margin-top: 10px;
  text-align: center;
  color: #fff;
  font-size: 0.9rem;
  opacity: 0.95;
}
