:root {
  --primary: #004e89;
  --accent: #7ec8e3;
  --light: #f5f5f5;
  --dark: #333333;
  --white: #ffffff;
  --highlight: #94d2bd;
  --font: 'Segoe UI', sans-serif;

  /* Altezza navbar per offset scroll */
  --header-height: 80px;
}

/* Offset globale per anchor link */
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font);
  background-color: var(--light);
  color: var(--dark);
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* NAVBAR STICKY */
header.navbar {
  background-color: var(--primary);
  color: var(--white);
  padding: 20px 0;

  position: sticky;
  top: 0;
  z-index: 1000;

  /* Ombra per evidenziare la barra */
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.logo img {
  max-width: 140px;
  height: auto;
}

.menu-toggle {
  display: none;
  font-size: 28px;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
}

.mobile-menu {
  width: 100%;
}

.menu {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 0;
  margin: 0;
}

.menu li a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.menu li a:hover,
.menu li a.active {
  background-color: var(--accent);
  color: var(--dark);
}

/* HERO */
.hero {
  background: linear-gradient(to right, var(--primary), var(--accent));
  color: var(--white);
  text-align: center;
  padding: 80px 20px;
}

.hero .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  line-height: 1.5;
}

.cta-button {
  background-color: var(--highlight);
  color: var(--dark);
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

/* SEZIONI */
.section {
  padding: 60px 20px;
  background-color: var(--white);
}

.section.alt {
  background-color: var(--light);
}

.services-list {
  list-style: none;
  padding-left: 0;
  margin-top: 20px;
}

.services-list li {
  margin-bottom: 10px;
  padding-left: 20px;
  position: relative;
}

.services-list li::before {
  content: "✔";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* BLOCCO TESTO + IMMAGINE */
.content-block {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  align-items: center;
  justify-content: space-between;
}

.content-block .text {
  flex: 1 1 50%;
}

.content-block .image {
  flex: 1 1 40%;
  text-align: center;
}

.content-block .image img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* MAPPA */
.map-container {
  margin-top: 30px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* FOOTER */
footer {
  background-color: var(--primary);
  color: var(--white);
  text-align: center;
  padding: 20px 0;
  font-size: 0.9rem;
}

/* ----------------------------- */
/* AVVISO IN EVIDENZA (FUORI MEDIA QUERY) */
/* ----------------------------- */

.site-status-container {
  display: flex;
  justify-content: center;
}

.site-status {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dark);
  background: rgba(0, 0, 0, 0.05);
  padding: 12px 20px;
  border-radius: 6px;
  margin: 25px 0;
}

/* MOBILE */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .menu {
    flex-direction: column;
    align-items: center;
    display: none;
    background-color: var(--primary);
    width: 100%;
    margin-top: 10px;
  }

  .mobile-menu.show .menu {
    display: flex;
    animation: slideDown 0.3s ease forwards;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* ================================
   FORM IoThink – Stile personalizzato
   ================================ */

form input,
form textarea,
form select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #cccccc;
  border-radius: 6px;
  font-size: 1rem;
  font-family: var(--font);
  background: var(--white);
  transition: border-color 0.3s ease;
}

form input:focus,
form textarea:focus,
form select:focus {
  border-color: var(--primary);
  outline: none;
}

form label {
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
  color: var(--dark);
}

/* Righe del modulo */
.form-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.form-field {
  flex: 1 1 calc(50% - 20px);
  display: flex;
  flex-direction: column;
}

/* Checkbox in griglia */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 20px;
  margin-bottom: 20px;
}

.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.checkbox-grid input[type="checkbox"] {
  width: auto;
}

/* Titoli sezioni modulo */
.section h3 {
  margin-top: 25px;
  margin-bottom: 10px;
  font-size: 1.3rem;
  color: var(--primary);
}

/* Divider */
.section hr {
  margin: 30px 0;
  border: none;
  border-top: 1px solid #ddd;
}

/* Pulsante invio */
form .cta-button {
  margin-top: 20px;
  cursor: pointer;
}

/* Mobile */
@media (max-width: 768px) {
  .form-field {
    flex: 1 1 100%;
  }

  .form-row {
    gap: 15px;
  }
}

/* Footer Links always white */

footer a,
footer a:visited,
footer a:active,
footer a:hover,
footer a:focus {
  color: #ffffff !important;
  text-decoration: none;
}
