/* =========================
   VARIABLES & BASE
   ========================= */
:root {
  --brand: #00A3B1;
  --brand-dark: #007f8a;
  --bg: linear-gradient(to bottom, #ffffff, #f2fbfc);
  --overlay: rgba(0,163,177,0.94);
  --text: #111;
}

* { box-sizing: border-box }
html { scroll-behavior: smooth }
body {
  font-family: 'Open Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  margin: 0;
  padding-top: 64px; /* header fisso */
  color: var(--text);
}
a { color: inherit }
img { max-width: 100%; height: auto; }

/* Subtitle italic across languages */
.subtitle { font-style: italic; }

/* Skip link */
.skip-link {
  position: absolute; left: -999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  left: 8px; top: 8px; width: auto; height: auto;
  background: #fff; color: #000; padding: 8px 12px; border-radius: 6px; z-index: 1100;
}

/* =========================
   TOP BANNER / NAV
   ========================= */
.top-banner {
  position: fixed; top: 0; width: 100%; height: 64px;
  background: #fff; border-bottom: 1px solid #e8e8e8;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 16px; z-index: 1000;
}
.brand { display:flex; align-items:center; gap:12px }
.brand img { height:40px; width:auto; border-radius:4px }
.brand .title { font-family:'Montserrat',sans-serif; font-weight:700; letter-spacing:.2px; font-size:1rem; color:#333 }

.nav-buttons { display:flex; gap:16px; align-items:center }
.nav-buttons a {
  color:#555; text-decoration:none;
  font-family:'Montserrat',sans-serif; font-weight:600; transition:color .25s;
}
.nav-buttons a:hover, .nav-buttons a[aria-current="true"]{ color:#111 }

.menu-toggle {
  display:none; background:#fff; border:1px solid #ddd;
  padding:8px 10px; border-radius:8px; font-family:'Montserrat',sans-serif;
}

/* =========================
   HERO / LANG
   ========================= */
.logo-section { background:#fff; text-align:center; padding:40px 20px; position:relative }
.lang-switcher { position:absolute; top:10px; right:10px; display:flex; gap:8px; z-index:2 }
.lang-switcher button{ background:#fff; border:1px solid #ccc; border-radius:6px; padding:0; cursor:pointer }
.lang-switcher img { width:32px; height:22px; display:block }

header {
  background:url('https://images.unsplash.com/photo-1581092334574-4c4c44c86740?auto=format&fit=crop&w=1400&q=80') center/cover;
  color:#fff; padding:96px 20px 88px; position:relative; text-align:center;
}
header::after { content:""; position:absolute; inset:0; background:rgba(0,163,177,0.72); z-index:0 }
header * { position:relative; z-index:1 }
h1{ font-family:'Montserrat',sans-serif; font-size: clamp(1.8rem, 2.7vw, 2.6rem); margin:0 0 12px }
.subtitle{ font-size:clamp(1rem,2.2vw,1.2rem); color:#e6fbff }

/* =========================
   SECTIONS & CARDS
   ========================= */
.section {
  scroll-margin-top:84px;
  padding:60px 20px; max-width:1000px; margin:0 auto 40px;
  background:#ffffffee; border-radius:16px; box-shadow:0 10px 25px rgba(0,0,0,0.08);
  display:flex; gap:20px; align-items:flex-start;
}
.section h2 { color:var(--brand); font-family:'Montserrat',sans-serif; margin:0 0 10px }
.section img.icon{ width:50px; height:50px; flex:0 0 auto }
.section p{ line-height:1.6 }

.cta-buttons a, .popup-btn, .btn {
  display:inline-block; margin:10px 10px 0 0; padding:12px 22px;
  background-color:var(--brand); color:white; text-decoration:none; border-radius:10px;
  font-weight:700; font-family:'Montserrat',sans-serif; cursor:pointer;
  transition:transform .15s, background-color .25s; border:0;
}
.cta-buttons a:hover, .popup-btn:hover, .btn:hover { background-color:var(--brand-dark); transform: translateY(-1px) }

/* =========================
   FOOTER
   ========================= */
footer {
  background-color:#4B4B4B; 
  color:white; 
  text-align:center;
  padding:30px 20px; 
  /*font-size:0.95em;*/

  /* layout */
  display:flex; 
  flex-direction:column;
  align-items:center; 
  /*justify-content:flex-start;*/
  gap:16px; 
  /*flex-wrap:wrap;*/
}

/* logo nel footer */
footer .Green img { height: 60px; width: auto; display: block; }

/* blocco testi centrati 
.footer-texts { flex: 1; text-align: center; }
footer p { margin: 5px 0; }*/
.footer-texts {
  width:100%;
  max-width:1000px;
  margin:0 auto;
}


/* Link footer: no underline, underline solo on hover */
footer a,
footer a:link,
footer a:visited { text-decoration: none; color: inherit; }
footer a:hover { text-decoration: underline; }

/* =========================
   POPUPS
   ========================= */
.popup-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:2000; justify-content:center; align-items:center; padding:20px }
.popup-overlay.open{ display:flex }
.popup-card {
  background:var(--overlay); color:#fff; max-width:720px; width:95vw;
  padding:22px 24px; border-radius:16px; box-shadow:0 20px 50px rgba(0,0,0,.35);
  max-height:85vh; overflow:auto; position:relative;
}
.popup-card h3{ font-family:'Montserrat',sans-serif; margin:0 0 10px }
.popup-close { position:absolute; top:8px; right:12px; font-size:1.6rem; font-weight:700; cursor:pointer; background:transparent; color:#fff; border:0 }

/* =========================
   CONTACTS ALIGNMENT
   ========================= */
#contatti > h2 { padding-left:70px; }
#contatti > div { padding-left:70px; }
@media (max-width:900px){ #contatti > h2 { padding-left:0 } }

/* Contatti: niente sottolineatura su mail/tel */
#contatti a[href^="mailto"],
#contatti a[href^="tel"] {
  text-decoration: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  color: inherit !important;
}
#contatti a[href^="mailto"]:hover,
#contatti a[href^="tel"]:hover { text-decoration: underline !important; }

/* =========================
   MAP EMBED (responsive)
   ========================= */
.map-container { width: 100%; max-width: 1200px; margin: auto; aspect-ratio: 16 / 9; }
.map-container iframe { width: 100%; height: 100%; border: 0; }

/* =========================
   RESPONSIVE & ACCESSIBILITY
   ========================= */

/* Evita che il banner fisso copra l'inizio su schermi piccoli */
@media (max-width: 480px) {
  body { padding-top: 70px; } /* header 64px + margine sicurezza */
}

/* Footer ordinato su smartphone: logo sopra centrato, testi centrati full-width */
@media (max-width: 600px) {
  footer { justify-content: center; }
  footer .footer-texts { flex: 1 1 100%; text-align: center; }
  footer .Green { order: -1; width: 100%; display: flex; justify-content: center; }
}

/* Mappa più alta su mobile */
@media (max-width: 768px) {
  .map-container { aspect-ratio: 4 / 3; }
}

/* Nav mobile */
@media (max-width: 960px){
  .nav-buttons{ display:none }
  .menu-toggle{ display:inline-block }
}

/* Sezioni in colonna su tablet/smartphone */
@media (max-width:900px){ .section{ flex-direction:column } }

/* Riduci animazioni se l’utente lo richiede */
@media (prefers-reduced-motion:reduce){
  *{ transition:none!important; animation:none!important }
}

/* Cookie Banner */
#cb-cookie-banner {
  position: fixed;
  inset: auto 0 0 0;
  display: grid;
  place-items: center;
  padding: 12px;
  z-index: 9999;
}

.cb-cookie-card {
  max-width: 880px;
  width: min(95vw, 880px);
  background: #ffffffee;
  backdrop-filter: blur(6px);
  border: 1px solid #e6e6e6;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.cb-cookie-text {
  margin: 0;
  flex: 1 1 520px;
  font: 500 14px/1.5 "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #4B4B4B;
}

.cb-cookie-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.cb-btn {
  appearance: none;
  border: 0;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  background: #00A3B1;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,163,177,.25);
}

.cb-btn:focus {
  outline: 2px solid #00A3B1;
  outline-offset: 2px;
}

.cb-link {
  font: 600 14px/1 "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #4B4B4B;
  text-decoration: underline;
}

@media (max-width: 540px) {
  .cb-cookie-card { padding: 12px; border-radius: 12px; }
  .cb-btn { padding: 10px 14px; }
}

.Green img{
  width: 400px !important;
  height: 200px !important;    /* aumenta anche l’altezza */
  max-width: none !important;
  max-height: none !important;
  display: block;
  margin: 0 auto;
}
/* Footer layout e centratura contenuti */
footer {
  text-align: center;
  padding: 24px 16px;     /* spazio respirazione */
}

/* Box del logo, sta sotto ai testi */
footer .Green {
  order: 2;                   /* sotto ai testi */
  margin-top: 8px;
}

/* Dimensioni e centratura del logo */
footer .Green img {
  width: 400px !important;
  height: 200px !important;
  display: block;
  margin: 0 auto;
  max-width: none !important;
  max-height: none !important;
}

/* Mobile: mantieni logo SOTTO e centrato */
@media (max-width: 600px) {
  footer { gap: 12px; }
  .footer-texts { width: 100%; }
  footer .Green { order: 2; width: 100%; display: flex; justify-content: center; }
}

/* Rispetta sempre l'attributo hidden */
[hidden] { display: none !important; }