/* --- RESET BASE PER COERENZA (Aggiunto dalla home) --- */
* {
  box-sizing: border-box;
}

/* --- FONT PERSONALIZZATO SOFACHROME --- */
@font-face {
  font-family: 'Sofachrome';
  src: url('fonts/Sofachrome-Regular.woff2') format('woff2'),
       url('fonts/Sofachrome-Regular.woff') format('woff'),
       url('fonts/Sofachrome-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* --- MENU NAV RESPONSIVE (aggiunto dalla home) --- */
.main-nav {
  position: absolute;
  top: 24px;
  right: 32px;
  z-index: 10;
  font-family: Arial, sans-serif;
}
.menu {
  list-style: none;
  display: flex;
  gap: 24px;
  background: rgba(255,255,255,0.92);
  border-radius: 8px;
  padding: 7px 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  align-items: center;
}
.menu li a {
  color: #004080;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.08rem;
  transition: color 0.2s;
  padding: 4px 8px;
  border-radius: 4px;
}
.menu li a:hover {
  color: #ff8800;
  background: #f2f2f2;
}
.menu-toggle,
.menu-icon {
  display: none;
}
@media (max-width: 700px) {
  .main-nav {
    top: 14px;
    right: 10px;
  }
  .menu {
    flex-direction: column;
    align-items: flex-end;
    position: absolute;
    top: 44px;
    right: 0;
    background: rgba(255,255,255,0.97);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    padding: 12px 18px;
    min-width: 140px;
    display: none;
  }
  .menu-toggle:checked + .menu-icon + .menu {
    display: flex;
  }
  .menu-icon {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    width: 32px;
    height: 32px;
    justify-content: center;
    align-items: center;
    z-index: 11;
  }
  .menu-icon span {
    display: block;
    width: 26px;
    height: 3px;
    margin: 4px 0;
    background: #f5f2f0;
    border-radius: 2px;
    transition: 0.3s;
  }
}

/* LOGO IN ALTO A SINISTRA, GRANDE */
.logo {
  width: 300px;
  max-width: 100%;
  height: auto;
  display: block;
  position: absolute;
  top: 20px;
  left: 30px;
  margin-bottom: 0;
  z-index: 2;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #1e1e1e;
  background:
    linear-gradient(rgba(240, 243, 247, 0.7), rgba(240, 243, 247, 0.7)),
    url('img/solare_sfondo.webp') no-repeat center center fixed;
  background-size: cover;
}

header {
  position: relative;
  background-image: url('img/sfondo_high_res.webp');
  background-size: cover;
  background-position: center;
  min-height: 250px;
  color: white;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

header h1 {
  color: #fff;
  font-size: 2.2rem; /* Allineato alla home */
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  line-height: 1.15;
  margin: 0;
}

.container {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 20px;
}

.section {
  margin-bottom: 60px;
}

.section h2 {
  color: #004080;
  border-left: 5px solid #004080;
  padding-left: 15px;
  text-align: left;
  text-justify: inter-word;
  hyphens: auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 20px;
}

.feature-card {
  background: #e4e7eb;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  padding: 25px;
  transition: transform 0.2s, box-shadow 0.3s;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.25);
}

.feature-card h3 {
  margin-top: 0;
  color: #004080;
  display: flex;
  align-items: center;
  font-size: 1.1rem;
}

.feature-card i {
  color: #004080;
  margin-right: 10px;
  font-size: 1.2rem;
  min-width: 20px;
}

/* Riquadro "Scarica la Guida..." con stesso sfondo feature-card */
.cta {
  background: #e4e7eb;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  color: #004080;
  text-align: center;
  text-justify: inter-word;
  hyphens: auto;
  padding: 50px 20px;
  border-radius: 12px;
  margin-top: 40px;
}

.cta a {
  display: inline-block;
  margin-top: 20px;
  background: white;
  color: #004080;
  padding: 12px 24px;
  border-radius: 25px;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.3s;
}

.cta a:hover {
  background: #e6f0fa;
}

/* Stile per il logo "A" in Sofachrome */
.logo-A {
  font-family: 'Sofachrome', sans-serif;
  font-size: 1.3em;
  color: #fff;
  vertical-align: middle;
  margin-right: 0.18em;
  display: inline-block;
  line-height: 1;
  position: relative;
  top: -0.20em;
}

/* Footer con sfondo blu e testo bianco */
footer {
  background-color: #004080;
  color: #fff;
  padding: 28px 20px 20px 20px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1.15rem;
  text-align: center;
}

footer .footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

footer .footer-section {
  display: flex;
  align-items: center;
  gap: 15px;
  white-space: nowrap;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

footer .footer-section .footer-brand {
  font-weight: bold;
  font-size: 1.18rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.15em;
}

footer .footer-section p, footer .footer-section a {
  margin: 0;
  color: #fff;
  text-decoration: none;
  font-size: 1.08rem;
}

footer .footer-section a:hover {
  color: #25D366;
  text-decoration: underline;
}

/* Trattini separatori */
footer .footer-section span.separator {
  margin: 0 18px;
  user-select: none;
}

/* Icone social e bottone WhatsApp - SEMPRE AFFIANCATE */
footer .footer-section.social-icons {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 18px;
}
footer .footer-section.social-icons a {
  display: inline-flex;
  align-items: center;
  font-size: 1.7rem;
  color: #fff;
  margin-left: 18px;
  transition: color 0.3s;
}
footer .footer-section.social-icons a:first-child {
  margin-left: 0;
}
footer .footer-section.social-icons a:hover {
  color: #25D366;
}

footer .whatsapp-btn {
  background-color: #25D366;
  border-radius: 50%;
  padding: 7px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.7rem;
  text-decoration: none;
  margin-left: 18px;
  transition: background-color 0.3s;
}

footer .whatsapp-btn:hover {
  background-color: #1ebe57;
}

@media (max-width: 600px) {
  header h1 {
    font-size: 1.45rem; /* Allineato alla home per mobile */
    line-height: 1.2;
  }
  .container {
    padding: 0 8px;
  }
  .features-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  footer .footer-container {
    flex-direction: column;
    gap: 18px;
  }
  footer .footer-section {
    flex-direction: column;
    gap: 6px;
    white-space: normal;
    text-align: center;
  }
  footer .footer-section .footer-brand {
    font-size: 1.05rem;
  }
  footer .footer-section span.separator {
    display: none;
  }
  footer .footer-section.social-icons {
    display: flex !important;
    flex-direction: row !important;
    gap: 10px;
    justify-content: center;
    align-items: center;
  }
  footer .footer-section.social-icons a,
  footer .whatsapp-btn {
    margin-left: 10px;
    margin-right: 10px;
  }
  footer .footer-section.social-icons a:first-child {
    margin-left: 0;
  }
}

/* ------------- REGOLE RESPONSIVE LOGO: SEMPRE ALLA FINE! ------------- */

/* --- RESPONSIVE: TABLET --- */
@media (max-width: 900px) {
  .logo {
    width: 180px !important;
    top: 10px !important;
    left: 10px !important;
    position: absolute !important;
  }
  }
}

/* --- RESPONSIVE: MOBILE --- */
@media (max-width: 600px) {
  .logo {
    width: 170px !important;
    top: 20px !important;
    left:16px !important;
    position: absolute !important;
  }
  }
}

/* --- STILI PER SELETTORE LINGUA (BANDIERINE) --- */
.language-switcher {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 12px;
  margin-left: 20px;
}
.language-switcher a img {
  width: 28px;
  height: auto;
  display: block;
  border-radius: 4px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.language-switcher a:hover img {
  transform: scale(1.1);
  box-shadow: 0 0 8px rgba(0,0,0,0.2);
}
.language-switcher a.inactive-lang {
  opacity: 0.6;
}
.language-switcher a.inactive-lang:hover {
  opacity: 1;
}
@media (max-width: 700px) {
  .language-switcher {
    margin-left: 0 !important;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
    justify-content: center;
    width: 100%;
  }
}