/* ===================================================================
   AcquaProget – Tema premium "blu business" (Cassiopeia)
   =================================================================== */
:root {
  --ap-blue: #1aa3e0;
  --ap-blue-2: #0d6fb8;
  --ap-navy: #0a2740;
  --ap-navy-2: #103a5e;
  --ap-ink: #14202b;
  --ap-grad: linear-gradient(120deg, #0a2740 0%, #0d6fb8 60%, #1aa3e0 100%);
  --ap-shadow: 0 10px 30px rgba(10, 39, 64, .12);
}

body {
  font-family: 'Poppins', -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ap-ink);
}

h1,
h2,
h3,
h4,
.page-header h1 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  letter-spacing: -.01em;
}

/* full-bleed: sezioni a tutta larghezza dentro al container */
.ap-fullbleed {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

/* ---------- HEADER blu gradiente ---------- */
.container-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(180deg, #06182a 0%, #0c4675 55%, #1666a6 100%);
  box-shadow: 0 3px 16px rgba(0, 0, 0, .30);
  transition: box-shadow .3s;
  padding-block: .55rem;
}

body.ap-scrolled .container-header {
  box-shadow: 0 6px 26px rgba(0, 0, 0, .45);
}

/* logo direttamente sull'header (no box) */
.container-header .navbar-brand {
  background: none;
  box-shadow: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  transition: transform .3s;
}

.container-header .navbar-brand:hover {
  transform: translateY(-2px);
}

.brand-logo img {
  max-height: 80px;
  width: auto;
  display: block;
  transition: max-height .3s;
}

body.ap-scrolled .brand-logo img {
  max-height: 54px;
}

/* menu su header scuro + effetto wow (sottolineatura animata) */
.container-header .nav-item>a {
  position: relative;
  font-weight: 600;
  color: #e8f3fb !important;
  padding: .5rem .7rem;
  font-size: .97rem;
  letter-spacing: .01em;
  white-space: nowrap;
  transition: color .25s, text-shadow .25s;
}

.container-header .nav-item>a::after {
  content: "";
  position: absolute;
  left: .7rem;
  right: .7rem;
  bottom: .22rem;
  height: 2px;
  border-radius: 2px;
  background: #3fc4f5;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .3s ease;
}

.container-header .nav-item>a:hover {
  color: #fff !important;
  text-shadow: 0 0 12px rgba(63, 196, 245, .6);
}

.container-header .nav-item>a:hover::after,
.container-header .nav-item.current>a::after,
.container-header .nav-item.active>a::after {
  transform: scaleX(1);
}

.container-header .nav-item.current>a,
.container-header .nav-item.active>a {
  color: #fff !important;
}

/* "Richiedi preventivo": pulsante che spicca */
.container-header .nav-item:last-child>a {
  background: #3fc4f5;
  color: #06283d !important;
  font-weight: 700;
  border-radius: 50rem;
  padding: .45rem 1.25rem;
  box-shadow: 0 4px 16px rgba(63, 196, 245, .5);
  transition: .25s;
}

.container-header .nav-item:last-child>a::after {
  display: none;
}

.container-header .nav-item:last-child>a:hover {
  background: #fff;
  color: #0c4675 !important;
  transform: translateY(-2px);
  text-shadow: none;
}

/* sottomenu a tendina su header scuro */
.container-header .mod-menu__sub {
  background: #0c3a5e;
  border-radius: .55rem;
  padding: .35rem 0;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
}

.container-header .mod-menu__sub .nav-item>a {
  color: #dcebf7 !important;
  padding: .45rem 1.1rem;
}

.container-header .mod-menu__sub .nav-item>a::after {
  display: none;
}

.container-header .mod-menu__sub .nav-item>a:hover {
  background: rgba(63, 196, 245, .16);
  color: #fff !important;
  text-shadow: none;
}

/* toggle mobile chiaro */
.container-header .navbar-toggler {
  color: #fff;
  border-color: rgba(255, 255, 255, .45);
}

.container-header .navbar-toggler-icon {
  filter: invert(1) brightness(2);
}

/* ---------- HAMBURGER mobile (3 linee) ---------- */
.ap-burger {
  display: none;
}

@media (max-width:991.98px) {
  .container-header {
    position: relative !important;
  }

  .ap-burger {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 46px;
    height: 44px;
    padding: 9px 8px;
    background: rgba(255, 255, 255, .12);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    position: absolute !important;
    top: 18px;
    right: 16px;
    left: auto;
    z-index: 2000;
  }

  .ap-burger span {
    display: block;
    height: 3px;
    width: 100%;
    background: #fff;
    border-radius: 3px;
    transition: .3s;
  }

  body.ap-nav-open .ap-burger span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  body.ap-nav-open .ap-burger span:nth-child(2) {
    opacity: 0;
  }

  body.ap-nav-open .ap-burger span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* menu nascosto, mostrato col toggle */
  .container-header .container-nav {
    flex-basis: 100%;
    width: 100%;
  }

  .container-header .mod-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: .1rem;
  }

  body.ap-nav-open .container-header .mod-menu {
    display: flex;
    animation: apFade .25s ease;
  }

  .container-header .nav-item>a {
    padding: .75rem 1rem;
    display: block;
  }

  .container-header .nav-item>a::after {
    display: none;
  }

  .container-header .nav-item:last-child>a {
    display: inline-block;
    margin: .6rem 1rem .2rem;
  }

  /* sottomenu inline su mobile */
  .container-header .mod-menu__sub {
    position: static;
    background: transparent;
    box-shadow: none;
    padding: 0 0 0 1rem;
  }

  .container-header .mod-menu__sub .nav-item>a {
    padding: .55rem 1rem;
    font-size: .92rem;
    opacity: .92;
  }
}

@keyframes apFade {
  from {
    opacity: 0;
    transform: translateY(-6px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

/* ---------- Pulsanti ---------- */
.ap-btn {
  display: inline-block;
  background: var(--ap-blue);
  color: #fff !important;
  font-weight: 600;
  padding: .85rem 1.9rem;
  border-radius: 50rem;
  text-decoration: none;
  transition: .25s;
  box-shadow: 0 8px 22px rgba(26, 163, 224, .45);
}

.ap-btn:hover {
  background: var(--ap-blue-2);
  transform: translateY(-2px);
  color: #fff !important;
}

.ap-btn--ghost {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, .85);
  box-shadow: none;
}

.ap-btn--ghost:hover {
  background: #fff;
  color: var(--ap-navy) !important;
  border-color: #fff;
}

/* ---------- HERO ---------- */
.ap-hero {
  position: relative;
  min-height: clamp(560px, 86vh, 840px);
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
  background: var(--ap-navy) center/cover no-repeat;
}

.ap-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(8, 28, 46, .92) 0%, rgba(10, 55, 94, .78) 45%, rgba(13, 111, 184, .35) 100%);
}

.ap-hero__inner {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin-inline: auto;
  padding: 5rem 1.5rem;
  width: 100%;
}

.ap-hero__content {
  max-width: 720px;
}

.ap-eyebrow {
  display: inline-block;
  background: rgba(26, 163, 224, .2);
  border: 1px solid rgba(26, 163, 224, .5);
  color: #bfe6fb;
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .4rem 1rem;
  border-radius: 50rem;
  margin-bottom: 1.4rem;
}

.ap-hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.7rem);
  font-weight: 800;
  line-height: 1.08;
  margin-bottom: 1.2rem;
  color: #fff;
}

.ap-hero h1 .hl {
  color: var(--ap-blue);
}

.ap-hero p.lead {
  font-size: 1.25rem;
  opacity: .95;
  margin-bottom: 2rem;
  max-width: 600px;
}

.ap-hero .ap-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.ap-scrollcue {
  position: absolute;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: #fff;
  opacity: .7;
  animation: apBounce 1.8s infinite;
}

@keyframes apBounce {

  0%,
  100% {
    transform: translate(-50%, 0)
  }

  50% {
    transform: translate(-50%, 10px)
  }
}

/* ---------- STATS ---------- */
.ap-stats {
  background: var(--ap-grad);
  color: #fff;
}

.ap-stats__grid {
  max-width: 1140px;
  margin-inline: auto;
  padding: 2.6rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1.5rem;
  text-align: center;
}

.ap-stat .num {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
}

.ap-stat .lbl {
  font-size: .95rem;
  opacity: .9;
  margin-top: .35rem;
}

/* ---------- SEZIONI generiche ---------- */
.ap-section {
  max-width: 1140px;
  margin-inline: auto;
  padding: 4rem 1.5rem;
}

.ap-section h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 800;
  color: var(--ap-navy);
  text-align: center;
  margin-bottom: .6rem;
}

.ap-section .sub {
  text-align: center;
  color: #5b6b78;
  max-width: 680px;
  margin: 0 auto 2.6rem;
  font-size: 1.08rem;
}

.ap-lead {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ap-navy);
}

/* ---------- CARDS sezioni ---------- */
.ap-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.6rem;
}

.ap-card {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  min-height: 300px;
  display: flex;
  align-items: flex-end;
  color: #fff;
  text-decoration: none;
  box-shadow: var(--ap-shadow);
  transition: .3s;
}

.ap-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(10, 39, 64, .25);
}

.ap-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s;
}

.ap-card:hover img {
  transform: scale(1.07);
}

.ap-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 39, 64, 0) 25%, rgba(8, 28, 46, .92) 100%);
}

.ap-card__body {
  position: relative;
  z-index: 2;
  padding: 1.4rem 1.4rem 1.6rem;
  width: 100%;
}

.ap-card__body h3 {
  color: #fff;
  font-weight: 700;
  margin: 0 0 .4rem;
  font-size: 1.35rem;
}

.ap-card__body span {
  color: var(--ap-blue);
  font-weight: 600;
}

/* ---------- FEATURES "perché noi" ---------- */
.ap-feat-wrap {
  background: #f4f8fb;
}

.ap-feats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.6rem;
}

.ap-feat {
  background: #fff;
  border-radius: 1rem;
  padding: 2rem 1.6rem;
  box-shadow: var(--ap-shadow);
  transition: .3s;
}

.ap-feat:hover {
  transform: translateY(-5px);
}

.ap-feat .ic {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ap-grad);
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.ap-feat h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ap-navy);
  margin-bottom: .5rem;
}

.ap-feat p {
  color: #5b6b78;
  margin: 0;
  font-size: .98rem;
}

/* ---------- CTA ---------- */
.ap-cta {
  background: var(--ap-grad);
  color: #fff;
  text-align: center;
}

.ap-cta__inner {
  max-width: 820px;
  margin-inline: auto;
  padding: 4rem 1.5rem;
}

.ap-cta h2 {
  color: #fff;
  font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  margin-bottom: .7rem;
}

.ap-cta p {
  opacity: .92;
  margin-bottom: 1.8rem;
  font-size: 1.12rem;
}

/* ---------- pagine interne ---------- */
.item-page,
.contact {
  font-size: 1.05rem;
  line-height: 1.75;
}

.page-header h1 {
  color: var(--ap-navy);
  font-weight: 800;
  border: 0;
}

.com-content-article__body img,
.item-page img {
  border-radius: .5rem;
  height: auto;
}

/* ---------- TESTATA pagina (banner con titolo) ---------- */
.ap-pagehero {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-top: -1rem;
  min-height: clamp(280px, 40vh, 380px);
  display: flex;
  align-items: center;
  background: var(--ap-navy) center/cover no-repeat;
  color: #fff;
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.ap-pagehero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(8, 28, 46, .9) 0%, rgba(10, 55, 94, .7) 60%, rgba(13, 111, 184, .35) 100%);
}

.ap-pagehero__inner {
  position: relative;
  z-index: 2;
  max-width: 1140px;
  margin-inline: auto;
  padding: 2.5rem 1.5rem;
  width: 100%;
}

.ap-pagehero h1 {
  color: #fff;
  font-weight: 800;
  font-size: clamp(1.7rem, 3.5vw, 2.7rem);
  margin: 0 0 .4rem;
  border: 0;
}

.ap-pagehero p {
  color: #bfe6fb;
  font-size: 1.15rem;
  margin: 0;
  max-width: 620px;
}

.item-page>.ap-pagehero img {
  display: none;
}

/* ---------- Galleria immagini (3 col) ---------- */
.ap-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 2rem auto;
  max-width: 1000px;
}

.ap-gallery img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  border-radius: .8rem;
  box-shadow: var(--ap-shadow);
}

/* ---------- Footer ---------- */
.container-footer {
  background: var(--ap-navy);
}

.container-footer .mod-custom {
  padding-block: 1.4rem;
  color: #cfe1ee;
}

.container-footer a {
  color: var(--ap-blue);
  text-decoration: none;
}

.container-footer a:hover {
  color: #fff;
}

/* responsive */
@media(max-width:767px) {
  .ap-hero {
    min-height: 80vh;
  }

  .ap-section {
    padding: 3rem 1.2rem;
  }
}

/* ---------- Form contatto: nascondi etichette "Contatto" e "Campi aggiuntivi" ---------- */
.com-contact__container > h2:first-of-type {
  display: none;
}
.com-contact__form fieldset.m-0:last-of-type > legend {
  display: none;
}