/* Reset & base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --container-max: 900px;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Inter", sans-serif;
  background: #162226;
  color: #ffffff;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Container unico — stesso allineamento su tutta la pagina */
.navbar .container-fluid,
.hero .container-fluid,
.sezioneCards .container-fluid,
.sezionePerchè .container-fluid {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
}

/* Navbar */
.navbar {
  height: 150px;
  background: #162226;
  position: relative;
  z-index: 100;
  width: 100%;
}

.navbar .logo {
  width: 200px;
  height: 150px;
  padding: 30px 0;
}

.navbar .logo img {
  width: 200px;
  height: 90px;
  max-height: 90px;
  object-fit: contain;
  object-position: left center;
}

.navMenu {
  display: flex;
  gap: 5rem;
  align-items: center;
  margin-left: auto;
}

.navMenu li a {
  color: #ffffff;
  font-size: 15px;
  font-weight: 400;
  transition:
    color 0.3s ease,
    transform 0.3s ease;
  position: relative;
  padding-bottom: 6px;
  display: inline-block;
}

.navMenu li a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #ff9933;
  transition: width 0.3s ease;
}

.navMenu li a:hover {
  color: #ff9933;
  transform: translateY(-2px);
}

.navMenu li a:hover::after {
  width: 100%;
}

.btnMenu {
  display: none;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
}

/* Bottone Lingua EN/IT */
.btnLingua {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  outline: none;
  padding: 0 !important;
  margin: 0 0 0 8rem;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.3s ease;
  letter-spacing: 1px;
  line-height: inherit;
  display: inline-block;
  vertical-align: baseline;
  transform: translateY(-10px);
}

.btnLingua:hover {
  color: #ff9933;
}

.btnMenu span {
  display: block;
  width: 100%;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

.btnMenu.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.btnMenu.active span:nth-child(2) {
  opacity: 0;
}

.btnMenu.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Hero */
.hero {
  position: relative;
  height: 650px;
  width: 100%;
  overflow: hidden;
  background: #162226;
}

.heroVideo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.heroOverlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(22, 34, 38, 0.85) 0%,
    rgba(22, 34, 38, 0.5) 50%,
    rgba(22, 34, 38, 0.2) 100%
  );
  z-index: 2;
}

.hero .container-fluid {
  position: relative;
  z-index: 3;
}

.heroTesto {
  max-width: 600px;
}

.heroTesto h1 {
  font-size: 56px;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.heroSottotitolo {
  font-size: 13px;
  color: #ff9933;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.heroDescrizione {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
}

/* Banner */
.banner {
  height: auto;
  background: transparent;
  border-top: 3px solid #4a90e2;
  border-bottom: 3px solid #4a90e2;
}

/* Sezione cards */
.sezioneCards {
  background: #c8c8c8;
  padding: 3rem 0;
  color: #1a1a1a;
}

.cardRow {
  margin-bottom: 2rem;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
}

.cardRow:last-child {
  margin-bottom: 0;
}

.cardBox {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  min-height: 400px;
}

.cardRow.reverse .cardBox {
  flex-direction: row-reverse;
}

.cardImmagine {
  flex: 0 0 50%;
  max-width: 50%;
  aspect-ratio: 4 / 3;
}

.cardRow:first-child .cardImmagine {
  aspect-ratio: 3 / 2;
}

.cardImmagine img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cardTesto {
  flex: 0 0 50%;
  max-width: 50%;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 3px solid #4a90e2;
}

.cardRow.reverse .cardTesto {
  border-right: none;
  border-left: 3px solid #4a90e2;
}

.cardTesto h3 {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.3;
  margin-bottom: 1.2rem;
}

.cardTesto p {
  font-size: 13px;
  line-height: 1.7;
  color: #555555;
}

.arancione {
  color: #ff9933;
  font-weight: 600;
}

/* Sezione un'unica tecnologia */
.sezioneUnica {
  background-image: url("../assets/img/videobackground.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 5rem 0;
  color: #ffffff;
}

.unicaContenuto {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: center;
  max-width: 1300px;
  margin: 0 auto;
}

.unicaTesto h2 {
  font-size: 48px;
  font-weight: 700;
  color: #ff9933;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  text-align: right;
}

.unicaTesto p {
  font-size: 16px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.8);
  text-align: right;
  max-width: 90%;
  margin-left: auto;
}

.bold {
  font-weight: 700;
  color: #ffffff;
}

.unicaVideo {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.unicaVideo video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Tablet large — max 1120px (sezione unica diventa verticale) */
@media (max-width: 1120px) {
  .unicaContenuto {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .unicaTesto h2 {
    font-size: 36px;
    text-align: center;
  }

  .unicaTesto p {
    text-align: center;
    max-width: 100%;
    margin: 0 auto;
  }
}

/* Sezione perché sceglierci */
.sezionePerchè {
  background: #162226;
  padding: 5rem 0;
  color: #ffffff;
}

.perchéContenuto {
  text-align: center;
}

.perchéTitolo {
  font-size: 14px;
  font-weight: 700;
  color: #ff9933;
  letter-spacing: 2px;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.perchéLinea {
  width: 50px;
  height: 2px;
  background: #ff9933;
}

.perchéTesto {
  font-size: 22px;
  line-height: 1.5;
  color: #ffffff;
  margin: 0 auto 3rem;
  font-weight: 600;
  max-width: 600px;
}

.perchéSeparatore {
  width: 79%;
  height: 1px;
  background: rgba(255, 255, 255, 0.3);
  margin: 0 auto 4rem;
}

.perchéColonne {
  display: grid !important;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3rem;
}

.perchéColonna {
  text-align: center;
}

/* Sotto 1024px → Carousel */
@media (max-width: 1023px) {
  .perchéSwiper {
    width: 100%;
    padding-bottom: 0;
  }

  .perchéColonne {
    display: flex !important;
    grid-template-columns: none;
    gap: 0;
  }

  .perchéColonna.swiper-slide {
    text-align: center;
    padding: 0 3rem 5rem;
    height: auto;
  }

  .perchéColonna.swiper-slide p {
    max-width: 400px;
    margin: 0 auto;
  }

  .perchéPagination {
    position: static !important;
    text-align: center;
    margin-top: 2rem;
  }

  .perchéPagination .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.3);
    opacity: 1;
    width: 8px;
    height: 8px;
    margin: 0 4px !important;
  }

  .perchéPagination .swiper-pagination-bullet-active {
    background: #ff9933;
    width: 24px;
    border-radius: 4px;
  }
}

.perchéIcona {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.5rem;
  display: block;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.perchéColonna h4 {
  font-size: 16px;
  font-weight: 700;
  color: #ff9933;
  margin-bottom: 1rem;
}

.perchéColonna p {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
}

/* Sezione contatti */
.sezioneContatti {
  background: #162226;
  padding: 4rem 0 5rem;
}

.sezioneContatti .container-fluid {
  max-width: var(--container-max);
  margin: 0 auto;
}

.contattiBox {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  min-height: 500px;
  background-color: #1a2a30;
  background-image: url("../assets/img/backgroundmaps.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.contattiMappa {
  position: absolute;
  top: 25px;
  right: 25px;
  bottom: 25px;
  left: 38%;
  border-radius: 8px;
  overflow: hidden;
  background: #1a2a30;
}

.contattiMappa iframe {
  width: 100%;
  height: 100%;
  border: 0;
  /* Filtri per rendere la mappa SCURA blu */
  filter: invert(0.92) hue-rotate(200deg) brightness(0.9) contrast(0.85)
    saturate(0.7);
}

.contattiInfo {
  position: relative;
  z-index: 2;
  padding: 3rem;
  max-width: 45%;
  color: #ffffff;
}

.contattiTitolo {
  font-size: 32px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1rem;
}

.contattiSottotitolo {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

.contattiItem {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contattiIcona {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.contattiValore {
  font-size: 14px;
  color: #ffffff;
  margin: 0;
  font-weight: 500;
}

.contattiLabel {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

/* Footer */
.footer {
  background: #162226;
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer .container-fluid {
  max-width: var(--container-max);
  margin: 0 auto;
}

.footerContenuto {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr 1.5fr;
  gap: 2rem;
  align-items: start;
}

.footerLogo h3 {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1px;
}

.footerColonna h4 {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.75rem;
  text-transform: capitalize;
}

.footerColonna p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
  margin: 0;
}

.footerColonna ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footerColonna ul li {
  margin: 0;
  padding: 0;
  line-height: 1.2;
}

.footerColonna ul li a {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  transition:
    color 0.3s ease,
    padding-left 0.3s ease;
  display: block;
  padding: 0.3rem 0;
  line-height: 1.2;
  position: relative;
}

.footerColonna ul li a:hover {
  color: #ff9933;
  padding-left: 8px;
}

/* Responsive */

/* Tablet — max 991px */
@media (max-width: 991px) {
  .navbar .container-fluid,
  .hero .container-fluid,
  .sezioneCards .container-fluid,
  .sezionePerchè .container-fluid {
    max-width: 100%;
  }

  .navbar {
    height: 120px;
  }

  .navbar .logo,
  .navbar .logo img {
    width: 160px;
  }

  .navbar .logo {
    height: 120px;
    padding: 25px 0;
  }

  .navbar .logo img {
    max-height: 70px;
    height: 70px;
    transform: none;
  }

  .navMenu {
    gap: 2.5rem;
  }

  .navMenu li a {
    font-size: 14px;
  }

  .heroTesto h1 {
    font-size: 44px;
  }

  .heroTesto {
    max-width: 500px;
  }

  .sezioneCards {
    padding: 4rem 0;
  }

  .cardTesto h3 {
    font-size: 20px;
  }

  .cardTesto {
    padding: 0 1rem;
  }

  .contattiBox {
    min-height: auto;
  }

  .contattiMappa {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    height: 280px;
    margin: 1rem;
  }

  .contattiInfo {
    max-width: 100%;
    padding: 2rem;
  }

  .footerContenuto {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

/* Mobile — max 767px */
@media (max-width: 767px) {
  .navbar {
    height: 100px;
  }

  .navbar .logo,
  .navbar .logo img {
    width: 130px;
  }

  .navbar .logo {
    height: 100px;
    padding: 22px 0;
  }

  .navbar .logo img {
    max-height: 55px;
    height: 55px;
    transform: none;
  }

  .btnMenu {
    display: flex;
  }

  /* Bottone Lingua su mobile: accanto all'hamburger, NON nel dropdown */
  .btnLingua {
    margin: 0 1rem 0 auto;
    font-size: 14px;
  }

  .navMenu {
    position: absolute;
    top: 100px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: #162226;
    padding: 0 1rem;
    max-height: 0;
    overflow: hidden;
    transition:
      max-height 0.4s ease,
      padding 0.4s ease;
  }

  .navMenu.active {
    max-height: 400px;
    padding: 1rem;
  }

  .navMenu li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .navMenu li:last-child {
    border-bottom: none;
  }

  .navMenu li a {
    font-size: 14px;
    padding: 1rem 0;
    display: block;
  }

  .hero {
    height: 550px;
  }

  .heroTesto h1 {
    font-size: 32px;
  }

  .sezioneCards {
    padding: 3rem 0;
  }

  .cardRow,
  .cardRow.reverse {
    margin-bottom: 2.5rem;
  }

  .cardBox,
  .cardRow.reverse .cardBox {
    flex-direction: column;
  }

  .cardImmagine,
  .cardRow:first-child .cardImmagine {
    flex: 0 0 100%;
    max-width: 100%;
    aspect-ratio: 16 / 10;
  }

  .cardTesto {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 1.5rem;
    border-right: none;
    border-top: 3px solid #4a90e2;
  }

  .cardRow.reverse .cardTesto {
    border-left: none;
    border-top: 3px solid #4a90e2;
  }

  .perchéTesto {
    font-size: 18px;
  }

  .contattiTitolo {
    font-size: 24px;
  }

  .contattiInfo {
    padding: 1.5rem;
  }

  .footerContenuto {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Mobile small — max 480px */
@media (max-width: 480px) {
  .navbar .container-fluid,
  .hero .container-fluid {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .heroTesto h1 {
    font-size: 28px;
  }

  .sezioneUnica {
    padding: 3rem 0;
  }

  .unicaTesto h2 {
    font-size: 28px;
  }

  .unicaTesto p {
    font-size: 14px;
  }
}

/* Desktop medio — min 1100px */
@media (min-width: 1100px) {
  .cardRow {
    max-width: 1050px;
  }

  .sezioneCards .container-fluid {
    max-width: 1050px;
  }
}

/* Desktop large — min 1441px */
@media (min-width: 1441px) {
  :root {
    --container-max: 1200px;
  }

  .navbar {
    height: 160px;
  }

  .navbar .logo img {
    max-height: 100px;
  }

  .hero {
    height: 700px;
  }

  .heroTesto h1 {
    font-size: 64px;
  }

  .cardBox {
    min-height: 450px;
  }

  .cardRow {
    max-width: 1300px;
  }

  .sezioneCards .container-fluid {
    max-width: 1300px;
  }

  .cardTesto h3 {
    font-size: 24px;
  }

  .cardTesto p {
    font-size: 15px;
  }

  .unicaContenuto {
    max-width: 1400px;
    gap: 5rem;
  }

  .unicaTesto h2 {
    font-size: 56px;
  }

  .unicaTesto p {
    font-size: 18px;
  }
}
