:root {
  --ptf-color-accent: #9cc3f2;
  /* Replace all the "black" of the theme with brand navy #162435 */
  --ptf-color-2: #162435;
  --ptf-color-3: #162435;
  --ptf-color-6: rgba(22, 36, 53, 0.15);
}

body,
html {
  background-color: #162435;
}

.site-wordmark {
  display: inline-flex;
  align-items: center;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.site-wordmark img {
  height: 36px;
  width: auto;
  display: block;
}

.ptf-footer .site-wordmark img {
  height: 28px;
}

.hero-side-copy {
  max-width: 250px;
  margin-left: auto;
  color: rgba(255, 255, 255, 0.8);
}

.timeline-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  height: 78px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  color: var(--ptf-color-accent-1);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.service-list-intro {
  max-width: 32rem;
}

.service-list-label {
  display: inline-flex;
  margin-bottom: 1rem;
  color: var(--ptf-color-accent-1);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.service-list-intro p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.7);
}

.service-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.service-list li {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.35fr);
  gap: 1.25rem 2rem;
  align-items: start;
  padding: 1.3rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.service-list__name {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.1;
}

.service-list__text {
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.6;
}

.proof-copy {
  max-width: 32rem;
}

.proof-copy__label {
  display: inline-flex;
  margin-bottom: 0.9rem;
  color: var(--ptf-color-accent-1);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.proof-copy p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.72);
}

.proof-grid {
  display: grid;
  gap: 1rem;
}

.proof-grid__item {
  padding: 1.15rem 0 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.proof-grid__item strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
}

.proof-grid__item span {
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.55;
}

.ptf-section[data-anchor="Recensioni"] .ptf-testimonial-item {
  padding: 1.5rem;
  border-radius: 1.35rem;
  background: rgba(11, 14, 18, 0.36);
  backdrop-filter: blur(8px);
}

.ptf-section[data-anchor="Recensioni"] .ptf-testimonial-item__content p {
  font-size: 1rem;
}

.feature-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  padding: 0 1.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-email {
  overflow-wrap: anywhere;
}

.ptf-contact-form .message {
  display: none !important;
}

.ptf-btn--secondary {
  margin-left: 1rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fff;
}

.ptf-btn--secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.ptf-post-title a,
.ptf-work-title a {
  text-transform: none;
}

.ptf-post-title {
  text-wrap: balance;
}

.ptf-post-title svg,
.ptf-work-title br {
  display: none;
}

.ptf-post-thumbnail img,
.ptf-work-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ptf-post-thumbnail {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.ptf-timeline-item__text,
.ptf-post-meta,
.ptf-testimonial-item__content p,
.ptf-post-title,
.ptf-work-title {
  overflow-wrap: anywhere;
}

.ptf-testimonial-item__content p {
  max-width: 30rem;
}

.ptf-contact-form h5,
.ptf-section[data-anchor="Zone"] .ptf-post-title,
.ptf-section[data-anchor="Contatti"] h5 {
  text-wrap: balance;
}

.ptf-section[data-anchor="Zone"] .ptf-post-title {
  font-size: clamp(1.25rem, 1.2rem + 0.55vw, 1.75rem);
  line-height: 1.1;
}

.ptf-section[data-anchor="Zone"] .ptf-post-content,
.ptf-section[data-anchor="Contatti"] .ptf-animate-element,
.ptf-section[data-anchor="Servizi"] .ptf-animate-element {
  max-width: 100%;
}

.ptf-section[data-anchor="Recensioni"] .proof-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.25rem;
}

.ptf-section[data-anchor="Recensioni"] .proof-grid__item {
  padding: 1.1rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.04);
}

.ptf-section__ken-burn-background::after,
.ptf-section[data-anchor="Home"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.36), rgba(0, 0, 0, 0.58));
  pointer-events: none;
}

.ptf-section__ken-burn-background img {
  filter: saturate(0.9) contrast(1.05);
}

.ptf-navbar-socials .ptf-social-icon,
.ptf-offcanvas-menu__socials .ptf-social-icon {
  font-size: 1rem;
}

.ptf-partner-logo.feature-chip {
  height: 68px;
}

html.native-scroll-mode,
body.native-scroll-mode {
  overflow: auto !important;
}

html.native-scroll-mode {
  scroll-behavior: smooth;
}

body.native-scroll-mode .ptf-fullpage-slider {
  height: auto;
  min-height: 100vh;
  scroll-snap-type: y proximity;
}

body.native-scroll-mode .ptf-fullpage-slider .ptf-section,
body.native-scroll-mode .pp-section {
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  left: auto !important;
  display: flex;
  height: auto !important;
  min-height: 100svh;
  scroll-snap-align: start;
  transform: none !important;
}

body.native-scroll-mode .ptf-fullpage-slider .ptf-section__vertical-align {
  overflow: visible;
  min-height: 100svh;
}

body.native-scroll-mode .pp-scrollable {
  overflow: visible !important;
  height: auto !important;
}

body.native-scroll-mode .ptf-footer--fixed {
  position: relative;
  padding-top: 2rem;
}

/* Carosello servizi — scroll orizzontale a card */
.services-carousel {
  position: relative;
}

.services-carousel__track {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.25rem 0.25rem 1rem;
  margin: 0 -0.25rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}

.services-carousel__track::-webkit-scrollbar {
  height: 6px;
}

.services-carousel__track::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.28);
  border-radius: 999px;
}

.services-carousel__card {
  flex: 0 0 78%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  border-radius: 1.1rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  scroll-snap-align: start;
}

.services-carousel__thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.services-carousel__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.services-carousel__body {
  padding: 1rem 1.1rem 1.2rem;
}

.services-carousel__body h4 {
  margin: 0 0 0.45rem;
  color: #fff;
  font-size: 1.02rem;
  line-height: 1.25;
}

.services-carousel__body p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
  line-height: 1.5;
}

.services-carousel__hint {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.25rem;
  color: var(--ptf-color-accent);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

@media (min-width: 768px) {
  .services-carousel__card {
    flex-basis: 60%;
  }
}

@media (min-width: 992px) {
  .services-carousel__card {
    flex-basis: 62%;
    max-width: 340px;
  }
}

/* Timeline compatta del metodo */
.method-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.method-steps > li {
  padding: 1rem 1.1rem 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.03);
}

.method-steps__num {
  display: inline-block;
  margin-bottom: 0.75rem;
  color: var(--ptf-color-accent);
  font-weight: 700;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
}

.method-steps__body h4 {
  margin: 0 0 0.35rem;
  color: #fff;
  font-size: 0.98rem;
  line-height: 1.2;
}

.method-steps__body p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.82rem;
  line-height: 1.45;
}

@media (max-width: 1199px) {
  .method-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575px) {
  .method-steps {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }
  .method-steps > li {
    padding: 0.85rem 1rem 0.95rem;
  }
}

/* Sfondo scuro del navbar per leggibilità del logo negativo */
.ptf-navbar--fixed .ptf-navbar-background {
  background: rgba(22, 36, 53, 0.72);
  backdrop-filter: blur(10px);
}

/* Fallback indipendente dal JS: forza lo scroll nativo su mobile/tablet
   anche se pagepiling si inizializza dopo il nostro disable. */
@media only screen and (max-width: 1199px) {
  html,
  body {
    overflow: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
    min-height: 100% !important;
    touch-action: pan-y !important;
    -webkit-overflow-scrolling: touch;
    position: static !important;
  }
  html {
    scroll-behavior: smooth;
  }
  .ptf-fullpage-slider {
    height: auto !important;
    overflow: visible !important;
    transform: none !important;
  }
  .ptf-fullpage-slider .ptf-section,
  .pp-section {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    left: auto !important;
    display: flex;
    height: auto !important;
    min-height: 100svh;
    transform: none !important;
  }
  .ptf-fullpage-slider .ptf-section__vertical-align {
    overflow: visible;
    min-height: 100svh;
    width: 100%;
  }
  .pp-scrollable {
    overflow: visible !important;
    height: auto !important;
  }
  .ptf-footer--fixed {
    position: relative;
    padding-top: 2rem;
  }
  .ptf-fullpage-slider-nav {
    display: none !important;
  }
}

@media only screen and (max-width: 991px) {
  .hero-side-copy {
    margin-left: 0;
  }

  .ptf-btn--secondary {
    margin-top: 1rem;
    margin-left: 0;
  }

  .ptf-navbar-socials {
    display: none;
  }

  .timeline-badge {
    min-width: 62px;
    height: 62px;
    font-size: 0.82rem;
  }

  .service-list li {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .ptf-section[data-anchor="Recensioni"] .proof-grid {
    grid-template-columns: 1fr;
  }

  .ptf-fullpage-slider {
    height: auto;
  }

  .ptf-fullpage-slider .ptf-section__content {
    padding-top: 8.5rem;
    padding-bottom: 5rem;
  }

  .ptf-timeline-slider {
    overflow: hidden;
  }

  .ptf-timeline-item__title {
    font-size: 1.45rem;
    line-height: 1.25;
  }

  .ptf-timeline-item__text {
    padding-right: 0;
  }

  .ptf-testimonial-slider {
    margin-left: 0;
  }

  .ptf-testimonial-item {
    padding-left: 0;
  }

  .ptf-testimonial-item__footer {
    margin-top: 3rem;
  }

  .ptf-testimonial-item__navigation {
    position: static;
    justify-content: flex-start;
    margin-top: 1.5rem;
  }

  .ptf-work {
    display: grid;
    gap: 1rem;
    width: 100%;
    padding: 0;
    white-space: normal;
  }

  .ptf-work-content span {
    margin-bottom: 0.5rem;
  }

  .ptf-work-title {
    font-size: 1.6rem;
    line-height: 1.15;
  }

  .ptf-work-thumbnail {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    transform: none;
    opacity: 1;
    border-radius: 1.25rem;
  }

  .ptf-portfolio-marquee,
  .ptf-portfolio-marquee__original,
  .ptf-portfolio-marquee__copy {
    display: grid;
    position: static;
    width: 100%;
    height: auto;
    gap: 2rem;
    animation: none;
    white-space: normal;
  }

  .ptf-portfolio-marquee__copy {
    margin-top: 2rem;
  }

  .ptf-post--masonry .ptf-post-thumbnail + .ptf-post-content {
    padding-top: 1.25rem;
  }

  .ptf-post-title {
    line-height: 1.15;
  }

  .ptf-footer-locales {
    display: none;
  }
}

@media only screen and (max-width: 767px) {
  .site-wordmark {
    font-size: 1rem;
  }

  .feature-chip {
    width: 100%;
    min-width: 0;
  }

  .hero-side-copy {
    max-width: 100%;
  }

  .ptf-post-title {
    font-size: 1.2rem;
  }

  .ptf-fullpage-slider .ptf-section__content {
    padding-top: 7.5rem;
    padding-bottom: 4.25rem;
  }

  .ptf-fullpage-slider .container {
    padding-right: 20px;
    padding-left: 20px;
  }

  .ptf-section h1,
  .ptf-section h2 {
    line-height: 1.05;
  }

  .ptf-section[data-anchor="Home"] h1 {
    max-width: 10ch;
  }

  .ptf-video-button {
    width: 5rem;
    height: 5rem;
  }

  .ptf-cite {
    height: auto;
    padding-right: 0;
    white-space: normal;
    font-size: 1.5rem;
  }

  .ptf-cite svg {
    display: none;
  }

  .timeline-badge {
    min-width: 56px;
    height: 56px;
  }

  .ptf-work-title {
    font-size: 1.35rem;
  }

  .ptf-section[data-anchor="Zone"] .ptf-post-title {
    font-size: 1.1rem;
  }

  .ptf-testimonial-item__meta {
    height: auto;
    text-align: left;
  }

  .ptf-testimonial-item__meta svg {
    display: none;
  }

  .ptf-testimonial-item__meta h6 {
    font-size: 1.6rem;
  }

  .ptf-post-meta {
    gap: 0.4rem 0.75rem;
  }

  .ptf-section[data-anchor="Contatti"] .ptf-btn {
    width: 100%;
    justify-content: center;
  }

  .ptf-section[data-anchor="Contatti"] .ptf-form-row.two-col {
    grid-template-columns: 1fr;
  }

  .ptf-footer {
    display: block;
    padding: 0 1.25rem 1.25rem;
  }

  .ptf-footer-copyright {
    font-size: 0.82rem;
  }
}

/* ===== Hero slideshow ===== */
/* NOTE: do NOT set position on .hero-section — .pp-section already sets
   position:absolute on desktop. Overriding it breaks pagepiling. */
.hero-section {
  overflow: hidden;
  background-color: #162435;
}

.hero-slideshow {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-slideshow > picture,
.hero-slideshow > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  animation: hero-fade 30s infinite;
  will-change: opacity;
}

.hero-slideshow > picture > img,
.hero-slideshow > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-slideshow > *:nth-child(1) { animation-delay: 0s; }
.hero-slideshow > *:nth-child(2) { animation-delay: 6s; }
.hero-slideshow > *:nth-child(3) { animation-delay: 12s; }
.hero-slideshow > *:nth-child(4) { animation-delay: 18s; }
.hero-slideshow > *:nth-child(5) { animation-delay: 24s; }

@keyframes hero-fade {
  0%   { opacity: 0; }
  4%   { opacity: 1; }
  20%  { opacity: 1; }
  24%  { opacity: 0; }
  100% { opacity: 0; }
}

.hero-slideshow__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.35) 45%,
    rgba(0, 0, 0, 0.7) 100%
  );
  pointer-events: none;
}

.hero-section .ptf-section__vertical-align,
.hero-section .ptf-section__content {
  position: relative;
  z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
  .hero-slideshow > picture,
  .hero-slideshow > img {
    animation: none;
  }
  .hero-slideshow > *:first-child {
    opacity: 1;
  }
}

/* On mobile pagepiling is disabled and .pp-section is never applied,
   so we need an explicit positioning context for the absolute slideshow. */
@media (max-width: 1199px) {
  .hero-section {
    position: relative;
    min-height: 100vh;
  }
}

/* ===== Section with background image (dark overlay for legibility) ===== */
.section-image .ptf-section__ken-burn-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.76) 0%, rgba(0, 0, 0, 0.58) 42%, rgba(0, 0, 0, 0.68) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.64) 0%, rgba(0, 0, 0, 0.42) 45%, rgba(0, 0, 0, 0.78) 100%);
  pointer-events: none;
  z-index: 1;
}

.section-image .ptf-section__ken-burn-background img {
  filter: saturate(0.82) contrast(1.04) brightness(0.82);
  z-index: 0;
}

.section-image .ptf-animate-element {
  border-radius: 1.25rem;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.48);
}

.section-image .ptf-animate-element > p,
.section-image .proof-copy {
  display: inline-block;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  background: rgba(7, 12, 18, 0.48);
  backdrop-filter: blur(6px);
}

.section-image .ptf-animate-element > p {
  color: rgba(255, 255, 255, 0.86);
}

.section-image .proof-copy p {
  color: rgba(255, 255, 255, 0.84);
}

/* ===== Section eyebrow + headline hierarchy ===== */
.section-eyebrow {
  display: inline-block;
  color: var(--ptf-color-accent);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.headline-stack {
  margin: 0;
}

.headline-light {
  font-weight: 300;
  opacity: 0.82;
}

/* ===== Mobile-only content rules (phones + small tablets) ===== */
.mobile-only { display: none; }

@media (max-width: 991px) {
  /* Toggle helper visibility */
  .mobile-only { display: inline-flex; }

  /* Home: shrink the enormous H1 */
  .hero-section h1 {
    font-size: clamp(2.3rem, 11vw, 3.6rem);
    line-height: 1.05;
  }

  /* Home: remove the long side copy "Installazione, sostituzione..." */
  .hero-side-copy {
    display: none !important;
  }

  /* Home: compact gap before the call CTA */
  .hero-mobile-cta {
    margin-top: 1.25rem;
  }
  .hero-mobile-cta .ptf-btn__icon {
    margin-right: 0.5rem;
    display: inline-flex;
    align-items: center;
  }

  /* Cosa facciamo: smaller headlines */
  #Servizi h2,
  #Servizi .headline-stack {
    font-size: clamp(1.9rem, 8vw, 2.6rem);
    line-height: 1.12;
  }

  /* Cosa facciamo: drop the "Lavoriamo per migliorare..." paragraph */
  #Servizi .servizi-intro-row,
  #Servizi .servizi-intro-gap {
    display: none !important;
  }

  /* Cosa facciamo: drop the "Cosa offriamo" label only (keep intro line) */
  #Servizi .cosa-offriamo-label {
    display: none !important;
  }

  /* Recensioni: drop the "Scegliere il fornitore..." paragraph */
  #Recensioni .proof-copy {
    display: none !important;
  }
}
