/*RESET BASE*/

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Roboto", sans-serif;
  color: #003b66;
  background: #e0f2fc;
  line-height: 1.6;
}

/*HEADER*/

.header {
  position: fixed;
  top: 0;
  width: 100%;
  height: 70px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 0 20px;
  background: rgba(224, 242, 252, 0.9);
  backdrop-filter: blur(6px);

  z-index: 9999;
}

.logo {
  height: 50px;
}

/*MENU*/

.menu {
  display: flex;
  gap: 20px;
  list-style: none;
}

.menu a {
  text-decoration: none;
  color: #003b66;
  position: relative;
  transition: 0.3s;
}

/* hover underline */
.menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 2px;
  background: #004c88;
  transition: width 0.3s ease;
}

.menu a:hover::after {
  width: 100%;
}

/*MENU MOBILE*/

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  cursor: pointer;
}

.menu-toggle span {
  height: 3px;
  width: 100%;
  background: #003b66;
  border-radius: 2px;
}

/*HERO BASE*/

.hero {
  height: 100vh;
  position: relative;
}

.hero video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

/* TESTO HERO */
.hero-text {
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 2;

  max-width: 700px;
  padding: 0 20px;
}

/* grandezza leggibile */
.hero-text h1 {
  font-size: 3rem;
  margin-bottom: 12px;
}

.hero-text p {
  font-size: 1.3rem;
  margin-top: 10px;
}

/* colori per pagina */
.home .hero-text h1,
.home .hero-text p {
  color: white;
}

.servizi .hero-text p {
  color: whitesmoke;
}

/*SEZIONI*/

.section {
  padding: 80px 20px;
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
}

/*GRID HOME*/

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

/*CARD*/

.card {
  display: block;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}

.card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card h3 {
  padding: 15px;
}

.card:hover img {
  transform: scale(1.05);
}

.card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/*MAPPA*/

.map iframe {
  width: 100%;
  height: 300px;
  border-radius: 10px;
}

/*BOTTONI*/

.btn {
  background: #004c88;
  color: white;
  padding: 12px 20px;
  border-radius: 10px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: 0.3s;
  display: inline-block;
}

.btn:hover {
  background: #003366;
  transform: translateY(-2px);
}

/*FOOTER*/

.footer {
  background: #004c88;
  color: white;
  padding: 40px 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

/* evita sovrapposizioni */
.footer-grid div {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* bottone footer FIX */
.footer .btn {
  background: white;
  color: #004c88;
  margin-top: 10px;
  align-self: flex-start;
}

.footer .btn:hover {
  background: #003366;
  color: white;
}

/*SERVIZI*/

.page-hero {
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: url("contents/mare.jpeg") center/cover no-repeat;
  position: relative;
}

.page-hero .hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 60, 100, 0.55);
}

.service-block {
  padding: 80px 20px;
}

.service-content {
  max-width: 1100px;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.service-text {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.service-cta {
  margin-top: 10px;
}

.service-content img {
  width: 100%;
  border-radius: 12px;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.service-block.alt {
  background: #f4fbff;
}

/*CHI SIAMO FIX*/

.about-page {
  padding: 100px 20px;
}

.about-grid {
  max-width: 1100px;
  margin: auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
}

/* TESTO LEGGIBILE */
.about-text {
  font-size: 1.05rem;
  line-height: 1.7;
}

.about-text h2 {
  margin-top: 20px;
  margin-bottom: 10px;
}

.about-text p {
  margin-bottom: 14px;
}

.about-image img {
  width: 100%;
  border-radius: 12px;
}

/*CONTATTI*/

.contact-section {
  padding: 80px 20px;
}

.contact-grid {
  max-width: 1100px;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.info-box {
  background: #e0f2fc;
  padding: 20px;
  border-radius: 10px;
  margin: 20px 0;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: white;
  padding: 25px;
  border-radius: 10px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  padding: 12px;
  border: 1px solid #b6d4ea;
  border-radius: 8px;
}

/*MOBILE*/

@media (max-width: 768px) {

  .menu {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .menu.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 70px;
    right: 20px;
    background: white;
    padding: 10px;
    border-radius: 10px;
  }

  .service-content,
  .about-grid,
  .contact-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-text h1 {
    font-size: 2.2rem;
  }

  .hero-text p {
    font-size: 1.1rem;
  }
}