/* =========================================================
   GM ZERBINI — PAGINA REALIZZAZIONI
   ========================================================= */


/* =========================================================
   VARIABILI
   ========================================================= */

:root {
  --blue: #074984;
  --navy: #071b32;
  --ink: #07182c;

  --cream: #f5f1e9;
  --cream-light: #fbf9f5;

  --white: #ffffff;
  --muted: #68717d;

  --border: rgba(7, 24, 44, 0.12);

  --container: 1180px;
}


/* =========================================================
   RESET
   ========================================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;

  background: var(--cream-light);
  color: var(--navy);

  font-family: "Manrope", sans-serif;

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body,
button {
  font-family: "Manrope", sans-serif;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}


/* =========================================================
   CONTAINER
   ========================================================= */

.gallery-container {
  width: min(var(--container), calc(100% - 48px));
  margin: 0 auto;
}


/* =========================================================
   HEADER
   ========================================================= */

.gallery-header {
  width: 100%;

  background: #ffffff;

  border-bottom: 1px solid var(--border);

  position: relative;
  z-index: 100;
}


.gallery-header__inner {
  width: min(var(--container), calc(100% - 48px));
  min-height: 86px;

  margin: 0 auto;

  display: flex;
  align-items: center;

  gap: 30px;
}


/* =========================================================
   LOGO
   ========================================================= */

.gallery-header__brand {
  display: flex;
  align-items: center;

  margin-right: auto;

  text-decoration: none;

  flex-shrink: 0;
}


.gallery-header__logo {
  display: block;

  width: auto;
  height: 54px;

  object-fit: contain;
}


/* =========================================================
   NAV
   ========================================================= */

.gallery-header__nav {
  display: flex;
  align-items: center;

  gap: 26px;
}


.gallery-header__nav a {
  color: var(--navy);

  text-decoration: none;

  font-size: 11px;
  font-weight: 700;

  transition: opacity 0.2s ease;
}


.gallery-header__nav a:hover {
  opacity: 0.6;
}


/* =========================================================
   AZIONI HEADER
   Preventivo + WhatsApp
   ========================================================= */

.gallery-header__actions {
  display: flex;
  align-items: center;

  gap: 5px;

  flex-shrink: 0;
}


/* PREVENTIVO */

.gallery-header__cta {
  height: 44px;

  padding: 0 20px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: var(--navy);
  color: #ffffff;

  text-decoration: none;

  border: 0;

  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.35px;

  white-space: nowrap;

  transition:
    background 0.2s ease,
    transform 0.2s ease;
}


.gallery-header__cta:hover {
  background: var(--blue);
}


/* WHATSAPP */

.gallery-header__whatsapp {
  width: 44px;
  height: 44px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 44px;

  background: #25d366;
  color: #ffffff;

  text-decoration: none;

  border-radius: 0;

  transition:
    background 0.2s ease,
    transform 0.2s ease;
}


.gallery-header__whatsapp svg {
  display: block;

  width: 22px;
  height: 22px;
}


.gallery-header__whatsapp:hover {
  background: #20bd5a;
}


/* =========================================================
   INTRO
   ========================================================= */

.gallery-intro {
  padding: 72px 0 52px;
}


.gallery-intro__eyebrow {
  margin-bottom: 25px;

  display: flex;
  align-items: center;

  gap: 16px;

  color: var(--blue);

  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
}


.gallery-intro__eyebrow span {
  display: block;

  width: 30px;
  height: 1px;

  background: var(--blue);
}


.gallery-intro__grid {
  display: grid;

  grid-template-columns:
    minmax(0, 1.3fr)
    minmax(260px, 0.7fr);

  gap: 60px;

  align-items: end;
}


.gallery-intro h1 {
  margin: 0;

  max-width: 650px;

  color: var(--navy);

  font-size: clamp(46px, 6vw, 78px);
  line-height: 0.96;

  font-weight: 400;

  letter-spacing: -4px;
}


.gallery-intro h1 strong {
  display: block;

  color: var(--blue);

  font-weight: 700;
}


.gallery-intro p {
  margin: 0 0 8px;

  max-width: 420px;

  color: var(--muted);

  font-size: 14px;
  line-height: 1.7;
}


/* =========================================================
   GALLERIA
   ========================================================= */

.gallery {
  padding: 0 0 70px;
}


.gallery-grid {
  column-count: 3;
  column-gap: 8px;
}


/* =========================================================
   ITEM
   ========================================================= */

.gallery-item {
  width: 100%;

  display: block;

  margin: 0 0 8px;
  padding: 0;

  break-inside: avoid;

  border: 0;

  background: transparent;

  cursor: pointer;

  overflow: hidden;
}


.gallery-item img {
  width: 100%;
  height: auto;

  display: block;

  transition:
    transform 0.45s ease,
    opacity 0.3s ease;
}


.gallery-item:hover img {
  transform: scale(1.015);
}


/* =========================================================
   CTA FINALE
   ========================================================= */

.gallery-cta {
  padding: 80px 0;

  background: var(--navy);
  color: #ffffff;
}


.gallery-cta__inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  gap: 60px;
}


.gallery-cta__inner > div:first-child > span {
  display: block;

  margin-bottom: 16px;

  color: rgba(255, 255, 255, 0.55);

  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.6px;
}


.gallery-cta h2 {
  margin: 0;

  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.02;

  font-weight: 400;

  letter-spacing: -2.5px;
}


.gallery-cta h2 strong {
  display: block;

  font-weight: 700;
}


.gallery-cta__actions {
  display: flex;
  align-items: center;

  gap: 10px;
}


.gallery-cta__secondary,
.gallery-cta__primary {
  min-height: 50px;

  padding: 0 20px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  text-decoration: none;

  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;

  white-space: nowrap;
}


.gallery-cta__secondary {
  border: 1px solid rgba(255, 255, 255, 0.25);

  color: #ffffff;
}


.gallery-cta__primary {
  gap: 20px;

  background: #ffffff;
  color: var(--navy);
}


.gallery-cta__primary span {
  font-size: 16px;
}


/* =========================================================
   LIGHTBOX
   ========================================================= */

.lightbox {
  position: fixed;
  inset: 0;

  z-index: 2000;

  display: none;

  align-items: center;
  justify-content: center;
}


.lightbox.is-visible {
  display: flex;
}


.lightbox__backdrop {
  position: absolute;
  inset: 0;

  background: rgba(2, 12, 23, 0.92);
}


.lightbox__image {
  position: relative;

  z-index: 2;

  width: min(1000px, calc(100% - 120px));
  height: min(760px, calc(100vh - 100px));

  display: flex;
  align-items: center;
  justify-content: center;
}


.lightbox__image img {
  max-width: 100%;
  max-height: 100%;

  object-fit: contain;
}


.lightbox__close {
  position: absolute;

  top: 24px;
  right: 28px;

  z-index: 3;

  width: 46px;
  height: 46px;

  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;

  font-size: 28px;
  font-weight: 300;

  cursor: pointer;
}


.lightbox__arrow {
  position: absolute;

  top: 50%;

  z-index: 3;

  width: 48px;
  height: 48px;

  transform: translateY(-50%);

  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;

  font-size: 20px;

  cursor: pointer;
}


.lightbox__arrow--prev {
  left: 28px;
}


.lightbox__arrow--next {
  right: 28px;
}


/* =========================================================
   FOOTER
   ========================================================= */

.gallery-footer {
  padding: 28px 0;

  background: var(--navy);
  color: #ffffff;

  border-top: 1px solid rgba(255, 255, 255, 0.1);
}


.gallery-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 30px;
}


.gallery-footer__brand {
  color: #ffffff;

  text-decoration: none;

  font-size: 15px;
  font-weight: 800;
}


.gallery-footer p {
  margin: 0;

  color: rgba(255, 255, 255, 0.55);

  font-size: 11px;
}


.gallery-footer__inner > a:last-child {
  color: rgba(255, 255, 255, 0.75);

  text-decoration: none;

  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
}


/* =========================================================
   PULSANTE PREVENTIVO FLOTTANTE
   DESKTOP
   ========================================================= */

.floating-quote {
  position: fixed;

  right: 28px;
  bottom: 28px;

  z-index: 800;

  min-height: 48px;

  padding: 0 22px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: var(--blue);
  color: #ffffff;

  border: 0;
  border-radius: 999px;

  text-decoration: none;

  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.45px;

  box-shadow:
    0 8px 24px rgba(7, 27, 50, 0.18);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}


.floating-quote:hover {
  transform: translateY(-2px);

  box-shadow:
    0 12px 30px rgba(7, 27, 50, 0.24);
}


/* Nasconde la CTA quando il lightbox è aperto */

body:has(.lightbox.is-visible) .floating-quote {
  opacity: 0;
  pointer-events: none;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {

  .gallery-header__nav {
    display: none;
  }


  .gallery-grid {
    column-count: 2;
  }


  .gallery-intro__grid {
    grid-template-columns: 1fr;

    gap: 20px;
  }


  .gallery-cta__inner {
    flex-direction: column;
    align-items: flex-start;
  }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {


  /* -------------------------------------------------------
     CONTAINER
     ------------------------------------------------------- */

  .gallery-container {
    width: calc(100% - 28px);
  }


  /* -------------------------------------------------------
     HEADER
     ------------------------------------------------------- */

  .gallery-header__inner {
    width: calc(100% - 28px);

    min-height: 76px;

    display: flex;
    align-items: center;

    gap: 10px;
  }


  /* LOGO */

  .gallery-header__brand {
    margin-right: auto;

    flex-shrink: 0;
  }


  .gallery-header__logo {
    width: auto;
    height: 45px;
  }


  /* NAV NASCOSTA */

  .gallery-header__nav {
    display: none;
  }


  /* PREVENTIVO + WA COME GRUPPO */

  .gallery-header__actions {
    margin-left: auto;

    display: flex;
    align-items: center;

    gap: 4px;

    flex-shrink: 0;
  }


  .gallery-header__cta {
    height: 42px;

    padding: 0 13px;

    font-size: 7px;
    font-weight: 800;
    letter-spacing: 0.2px;

    white-space: nowrap;
  }


  .gallery-header__whatsapp {
    width: 42px;
    height: 42px;

    flex: 0 0 42px;

    border-radius: 0;
  }


  .gallery-header__whatsapp svg {
    width: 21px;
    height: 21px;
  }


  /* -------------------------------------------------------
     INTRO
     ------------------------------------------------------- */

  .gallery-intro {
    padding: 44px 0 42px;
  }


  .gallery-intro__eyebrow {
    margin-bottom: 20px;

    gap: 15px;

    font-size: 8px;
    letter-spacing: 1.8px;
  }


  .gallery-intro__eyebrow span {
    width: 30px;
  }


  .gallery-intro__grid {
    display: block;
  }


  .gallery-intro h1 {
    max-width: 100%;

    font-size: 45px;
    line-height: 0.98;

    letter-spacing: -3.2px;
  }


  .gallery-intro p {
    margin-top: 22px;

    max-width: 340px;

    font-size: 11px;
    line-height: 1.65;
  }


  /* -------------------------------------------------------
     GALLERIA
     Manteniamo le 2 colonne approvate
     ------------------------------------------------------- */

  .gallery {
    padding-bottom: 55px;
  }


  .gallery-grid {
    column-count: 2;
    column-gap: 5px;
  }


  .gallery-item {
    margin-bottom: 5px;
  }


  .gallery-item:hover img {
    transform: none;
  }


  /* -------------------------------------------------------
     CTA FINALE
     ------------------------------------------------------- */

  .gallery-cta {
    padding: 55px 0 75px;
  }


  .gallery-cta__inner {
    display: block;
  }


  .gallery-cta h2 {
    font-size: 36px;
    letter-spacing: -2px;
  }


  .gallery-cta__actions {
    margin-top: 28px;

    display: flex;
    flex-direction: column;

    align-items: stretch;
  }


  .gallery-cta__secondary,
  .gallery-cta__primary {
    width: 100%;
  }


  /* -------------------------------------------------------
     FOOTER
     ------------------------------------------------------- */

  .gallery-footer {
    padding: 24px 0 85px;
  }


  .gallery-footer__inner {
    flex-direction: column;

    align-items: flex-start;

    gap: 10px;
  }


  /* -------------------------------------------------------
     PULSANTE PREVENTIVO FLOTTANTE
     ------------------------------------------------------- */

  .floating-quote {
    left: 50%;
    right: auto;

    bottom: 14px;

    transform: translateX(-50%);

    width: 260px;
    height: 48px;
    min-height: 0;

    padding: 0 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #074984;
    color: #ffffff;

    border: 0;
    border-radius: 999px;

    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.45px;

    white-space: nowrap;

    box-shadow:
      0 8px 22px rgba(7, 27, 50, 0.18);
  }


  .floating-quote:hover {
    transform: translateX(-50%);
  }


  .floating-quote:active {
    transform: translateX(-50%) scale(0.98);
  }


  /* -------------------------------------------------------
     LIGHTBOX MOBILE
     ------------------------------------------------------- */

  .lightbox__image {
    width: calc(100% - 28px);
    height: calc(100vh - 120px);
  }


  .lightbox__close {
    top: 16px;
    right: 16px;

    width: 42px;
    height: 42px;
  }


  .lightbox__arrow {
    width: 40px;
    height: 40px;
  }


  .lightbox__arrow--prev {
    left: 10px;
  }


  .lightbox__arrow--next {
    right: 10px;
  }

}


/* =========================================================
   MOBILE PICCOLI
   ========================================================= */

@media (max-width: 390px) {

  .gallery-header__inner {
    width: calc(100% - 20px);

    gap: 7px;
  }


  .gallery-header__logo {
    height: 40px;
  }


  .gallery-header__actions {
    gap: 3px;
  }


  .gallery-header__cta {
    height: 39px;

    padding: 0 10px;

    font-size: 6.5px;
  }


  .gallery-header__whatsapp {
    width: 39px;
    height: 39px;

    flex-basis: 39px;
  }


  .gallery-header__whatsapp svg {
    width: 19px;
    height: 19px;
  }


  .gallery-intro h1 {
    font-size: 40px;
  }


  .floating-quote {
    width: 250px;
  }

}