/* IOTter release — layout custom (no Elementor) */

@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700&family=Nunito+Sans:ital,wght@0,400;0,600;1,400&display=swap");

:root {
  --max: 1180px;
  --gutter: clamp(20px, 4.5vw, 52px);
  --ink: #152042;
  --muted: #5a6785;
  --line: rgba(21, 32, 66, 0.1);
  --blue: #1d4ed8;
  --blue-dark: #0f2a6e;
  --surface: #f4f7fc;
  --radius: 16px;
  --shadow: 0 18px 48px rgba(15, 42, 110, 0.08);
  /* Hero impilata (<700px): ~80% viewport, senza superare la colonna .shell */
  --hero-stack-width: min(100%, 80vw);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Nunito Sans", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  background: #fff;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  font-family: Montserrat, system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--blue);
}

.shell {
  width: 100%;
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section {
  padding: clamp(48px, 7vw, 88px) 0;
}

.section--surface {
  background: var(--surface);
}

.section__title {
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  color: var(--blue-dark);
  margin: 0 0 1.25rem;
}

.section__title--center {
  text-align: center;
  margin-bottom: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff !important;
  font-family: Montserrat, sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: none;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(29, 78, 216, 0.25);
}

.btn:hover {
  filter: brightness(1.05);
}

/* —— Nav —— */

.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.nav-logo img {
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links > a {
  color: var(--ink);
  font-family: Montserrat, sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
}

.nav-links > a[aria-current="page"] {
  color: var(--blue);
  background: #eef3ff;
}

.lang {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 10px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.lang a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--muted);
  font-family: Montserrat, sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.lang a.is-current {
  color: var(--ink);
  background: var(--surface);
}

.lang svg {
  width: 18px;
  height: 12px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--ink);
  position: relative;
  content: "";
}

.nav-toggle span::before,
.nav-toggle span::after {
  position: absolute;
  left: 0;
}

.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 12px var(--gutter) 20px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  body.nav-open .nav-links {
    display: flex;
  }

  .nav {
    position: sticky;
  }

  .lang {
    margin: 8px 0 0;
    align-self: flex-start;
  }
}

/* —— Hero —— */

.hero {
  background-image: linear-gradient(105deg, rgba(8, 14, 40, 0.72), rgba(8, 14, 40, 0.35)),
    url("/wp-content/uploads/2025/02/bg-pheader.jpg");
  background-size: cover;
  background-position: center;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  /* solo verticale: non sovrascrivere padding-left/right di .shell */
  padding-block: clamp(72px, 10vw, 112px);
}

.hero h1 {
  color: #fff;
  font-size: clamp(1.75rem, 3.2vw, 2.65rem);
  letter-spacing: 0.02em;
  margin: 0 0 16px;
}

.hero__lead {
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1rem, 1.6vw, 1.08rem);
  max-width: 100%;
  margin: 0;
}

/* Stack solo sotto 700px: stesso ingombro per testo e immagine */
.hero__copy,
.hero__visual {
  width: 100%;
  max-width: var(--hero-stack-width);
  margin-inline: auto;
}

.hero__copy {
  text-align: left;
}

.hero__visual img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1024 / 473;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.25));
}

@media (min-width: 700px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: clamp(16px, 2.5vw, 48px);
    padding-block: clamp(64px, 8vw, 112px);
  }

  .hero__copy,
  .hero__visual {
    max-width: none;
    margin-inline: 0;
  }

  .hero__lead {
    max-width: 36em;
  }

  .hero__visual img {
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
  }
}

/* 700–1120px: tipografia un po’ più compatta per restare in riga */
@media (min-width: 700px) and (max-width: 1120px) {
  .hero h1 {
    font-size: clamp(1.45rem, 2.35vw, 1.95rem);
    margin-bottom: 12px;
  }

  .hero__lead {
    font-size: clamp(0.9rem, 1.45vw, 1rem);
    line-height: 1.55;
  }
}

/* —— Aree —— */

.areas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.area-card {
  margin: 0;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.area-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.area-card figcaption {
  padding: 14px 16px 18px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--muted);
}

.area-card h4 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--ink);
}

/* —— Cloud platform —— */

.cloud-platform {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 4vw, 40px);
}

@media (min-width: 900px) {
  .cloud-platform {
    flex-direction: row;
    align-items: flex-start;
    gap: clamp(28px, 4vw, 48px);
  }

  .cloud-platform__col--copy {
    flex: 1 1 0;
    min-width: 0;
  }

  .cloud-platform__col--slider {
    flex: 0 0 min(46%, 520px);
    width: min(46%, 520px);
    max-width: 520px;
  }
}

.cloud-platform__col--copy p:last-child {
  margin-bottom: 0;
}

.cloud-carousel {
  width: 100%;
}

.cloud-carousel__bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cloud-carousel__arrow {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--blue-dark);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
  padding: 0;
}

.cloud-carousel__arrow:hover {
  background: var(--surface);
}

.cloud-carousel__arrow span {
  display: block;
  margin-top: -2px;
}

.cloud-carousel__viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.cloud-carousel__track {
  display: flex;
  transition: transform 0.45s ease;
}

.cloud-carousel__slide {
  flex: 0 0 100%;
  padding: clamp(20px, 4vw, 32px);
}

.cloud-carousel__slide h3 {
  margin: 0 0 12px;
  font-size: 1.15rem;
  color: var(--blue-dark);
}

.cloud-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.cloud-carousel__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: #c5d0e8;
  cursor: pointer;
  padding: 0;
}

.cloud-carousel__dot.is-active {
  background: var(--blue);
}

/* —— Split —— */

.split {
  display: grid;
  gap: clamp(28px, 5vw, 48px);
  align-items: center;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 1fr 1fr;
  }
}

.split__media {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

/* —— Product blocks —— */

.product-rows {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 4vw, 40px);
}

.product-row {
  display: grid;
  gap: clamp(20px, 4vw, 36px);
  align-items: center;
}

@media (min-width: 768px) {
  .product-row {
    grid-template-columns: minmax(140px, 280px) 1fr;
  }

  .product-row--reverse {
    grid-template-columns: 1fr minmax(140px, 280px);
  }

  .product-row--reverse .product-row__figure {
    order: 2;
  }

  .product-row--reverse .product-block {
    order: 1;
  }
}

.product-row__figure {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.product-row__figure img {
  display: block;
  width: min(100%, 260px);
  height: auto;
  object-fit: contain;
}

.product-block {
  padding: clamp(32px, 5vw, 48px);
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.product-block--text {
  background: #fff;
}

.prose ul {
  margin: 0.75rem 0 1rem 1.25rem;
  padding: 0;
}

.prose li {
  margin-bottom: 0.35rem;
}

.product-block ul {
  margin: 0;
  padding-left: 1.2em;
}

/* —— Industry —— */

.industry-cols {
  display: grid;
  gap: 2rem;
}

@media (min-width: 900px) {
  .industry-cols {
    grid-template-columns: 1fr 1fr;
  }
}

/* —— Diagram —— */

.diagram {
  text-align: center;
}

.diagram__title {
  max-width: min(100%, 46rem);
  margin-left: auto;
  margin-right: auto;
  line-height: 1.35;
  text-wrap: balance;
}

.diagram__img {
  display: block;
  width: min(100%, 880px);
  margin: 0 auto 24px;
  padding: 16px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

/* —— Footer —— */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-inner img {
  height: 36px;
  width: auto;
}

.footer-inner p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* —— Contatti (stile Engitech / originale) —— */

.page-header {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: clamp(200px, 32vw, 350px);
  background: #262051 center center / cover no-repeat;
  background-image: linear-gradient(105deg, rgba(8, 14, 40, 0.78), rgba(8, 14, 40, 0.45)),
    url("/wp-content/uploads/2025/02/bg-pheader.jpg");
}

.page-header .shell {
  width: 100%;
}

.page-header .page-title {
  margin: 0;
  padding: 10px 0;
  text-align: left;
  color: #fff;
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
}

.contact-page .section--contact {
  background: var(--surface);
}

.contact-layout {
  display: grid;
  gap: clamp(32px, 5vw, 48px);
  align-items: start;
}

@media (min-width: 900px) {
  .contact-layout {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-page .main-heading {
  margin: 0 0 1.25rem;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  color: var(--ink);
}

.contact-page .contact-intro p {
  color: var(--muted);
}

.contact-info {
  display: grid;
  gap: 8px;
  margin-top: 28px;
}

.contact-info__item {
  padding: 20px 0 16px;
  border-bottom: 1px solid var(--line);
}

.contact-info__item:last-child {
  border-bottom: 0;
}

.contact-info__item h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.contact-info__item p {
  margin: 0;
  color: var(--muted);
  font-weight: 500;
}

.contact-info__item a {
  color: var(--ink);
  text-decoration: none;
}

.contact-info__item a:hover {
  color: #43baff;
}

/* Form gradient come tema originale (CF7 .main-form) */
.contact-form.main-form {
  padding: clamp(36px, 5vw, 60px) clamp(28px, 4vw, 48px);
  border: none;
  border-radius: var(--radius);
  background-image: linear-gradient(90deg, #00deff 0%, #7141b1 100%);
  color: #fff;
  box-shadow: 0 16px 48px rgba(113, 65, 177, 0.22);
}

.contact-form.main-form h2 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.35rem;
  color: #fff;
}

.contact-form.main-form .hint {
  margin-bottom: 24px;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.95);
}

.contact-form.main-form input,
.contact-form.main-form textarea {
  width: 100%;
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  font: inherit;
  color: #fff;
  background: rgba(255, 255, 255, 0.28);
}

.contact-form.main-form input::placeholder,
.contact-form.main-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.92);
}

.contact-form.main-form textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-form.main-form .btn {
  background: #fff;
  color: #7141b1 !important;
  font-weight: 800;
  box-shadow: none;
}

.contact-form.main-form .btn:hover {
  background: #7141b1;
  color: #fff !important;
  filter: none;
}

.contact-form.main-form .form-alert--ok,
.contact-form.main-form .form-alert--err {
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.contact-page .section--map {
  padding-top: 0;
  background: var(--surface);
}

.contact-page .map-wrap {
  border-radius: 0;
  border-left: 0;
  border-right: 0;
}

.form-alert {
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.form-alert--ok {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.form-alert--err {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.map-wrap {
  margin-top: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 9;
  min-height: 280px;
}

.map-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
