/* ==========================================================================
   Finlat Srl - stylesheet unico, nessuna dipendenza esterna
   Palette: #497593 (blu) / #f0eee8 (avorio)
   ========================================================================== */

:root {
  --blu:        #497593;
  --blu-scuro:  #3b6079;
  --avorio:     #f0eee8;
  --testo:      #6b6b6b;
  --testo-alt:  #7d7d7d;
  --bianco:     #ffffff;

  --container:  940px;
}

/* --- Reset minimo ------------------------------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--avorio);
  color: var(--testo);
  font-family: "Century Gothic", "Questrial", "Futura", "Trebuchet MS",
               "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; border: 0; }

a {
  color: var(--blu);
  text-decoration: none;
  transition: color .2s ease;
}

a:hover,
a:focus { color: var(--blu-scuro); text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--blu);
  outline-offset: 2px;
}

/* --- Layout ------------------------------------------------------------- */

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.main { flex: 1 0 auto; padding: 60px 0 70px; }

/* --- Header / navigazione ----------------------------------------------- */

.site-header { background: var(--blu); }

.nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
  list-style: none;
}

.nav a {
  display: block;
  padding: 14px 20px;
  color: var(--bianco);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: .2px;
  text-decoration: none;
  opacity: .95;
}

.nav a:hover,
.nav a:focus {
  color: var(--bianco);
  opacity: 1;
  text-decoration: none;
  background: rgba(0, 0, 0, .08);
}

.nav a[aria-current="page"] {
  color: var(--bianco);
  opacity: 1;
  box-shadow: inset 0 -2px 0 rgba(255, 255, 255, .7);
}

/* --- Tipografia --------------------------------------------------------- */

h1, h2, h3, h4 {
  margin: 0 0 14px;
  color: var(--testo-alt);
  font-weight: 400;
  line-height: 1.35;
}

h1 { font-size: 27px; margin-bottom: 26px; }
h2 { font-size: 25px; margin-top: 34px; }
h3 { font-size: 21px; margin-top: 26px; }
h4 { font-size: 18px; margin-top: 22px; }

p { margin: 0 0 16px; }

.main > .container > h1:first-child { margin-top: 0; }

/* Titolo di pagina presente per SEO/accessibilita ma non visibile
   (come nel tema WordPress originale) */
.sr-title {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --- Home: logo centrato ------------------------------------------------ */

.home-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.home-logo {
  display: block;
  width: 100%;
  max-width: 310px;
  margin: 0 auto;
}

/* --- Pagina Cookie ------------------------------------------------------ */

.cookie-list {
  list-style: disc;
  margin: 20px 0 26px;
  padding-left: 22px;
}

.cookie-list > li { margin-bottom: 22px; }

.cookie-list > li > h3 { margin-top: 0; }

.cookie-list p,
.cookie-service p { margin-bottom: 12px; }

.cookie-service {
  margin: 22px 0 26px;
  padding-left: 22px;
}

/* --- Pagina Contatti ---------------------------------------------------- */

.contatti-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.map-frame {
  position: relative;
  aspect-ratio: 445 / 450;
  width: 100%;
  border: 1px solid #d9d6cf;
  background: #e6e3dc;
  overflow: hidden;
}

.map-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.contatti-dati p { margin-bottom: 16px; }

/* --- Pagina 404 --------------------------------------------------------- */

.error-page {
  padding: 40px 20px 60px;
  text-align: center;
}

.error-page h1 { margin-bottom: 18px; }


/* --- Footer ------------------------------------------------------------- */

.site-footer {
  flex-shrink: 0;
  background: var(--blu);
  color: var(--bianco);
  padding: 22px 20px;
  text-align: center;
  font-size: 14px;
  line-height: 1.7;
}

.site-footer p { margin: 0; color: rgba(255, 255, 255, .88); }

.site-footer strong { font-weight: 700; color: var(--bianco); }

.site-footer a { color: rgba(255, 255, 255, .95); text-decoration: none; }

.site-footer a:hover,
.site-footer a:focus { color: var(--bianco); text-decoration: underline; }

/* --- Responsive --------------------------------------------------------- */

@media (max-width: 720px) {
  .contatti-grid { grid-template-columns: 1fr; gap: 32px; }
  .map-frame { aspect-ratio: 4 / 3; }
  .nav a { padding: 12px 14px; font-size: 17px; }
  .main { padding: 40px 0 50px; }
  h1 { font-size: 24px; }
  h2 { font-size: 22px; }
  h3 { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
