/* 8 Arredamenti - foglio di stile unico (mobile-first, nessun font o risorsa esterna) */
:root {
  --color-primary: #e25303;
  --color-primary-dark: #b84200;
  --color-danger: #d32f2f;
  --color-success: #388e3c;
  --color-bg: #fafafa;
  --color-surface: #ffffff;
  --color-text: #212121;
  --color-text-secondary: #5f5f5f;
  --color-border: #e0e0e0;
  --color-dark: #101010;
  --color-grey: #4b4e53;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary-dark); }
a:hover { color: var(--color-primary); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; font-weight: 400; }
p { margin: 0 0 1em; }
strong, .strong { font-weight: 700; }
:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 2px; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.container-narrow { max-width: 860px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--color-dark); color: #fff; padding: 8px 16px; z-index: 1000; }
.skip-link:focus { left: 0; }
.mt { margin-top: 2rem; }

/* Bottoni */
.btn {
  display: inline-block; font: inherit; font-weight: 600; text-decoration: none; text-align: center;
  padding: .65em 1.4em; border-radius: var(--radius); border: 2px solid var(--color-primary);
  cursor: pointer; transition: background .15s, color .15s;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); color: #fff; }
.btn-secondary { background: transparent; color: var(--color-primary-dark); }
.btn-secondary:hover { background: var(--color-primary); color: #fff; }
.btn[disabled] { opacity: .6; cursor: wait; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.link-button:hover { color: var(--color-primary); }

/* Header e menu */
.site-header { background: var(--color-surface); border-bottom: 1px solid var(--color-border); position: sticky; top: 0; z-index: 100; }
.header-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 8px; padding-bottom: 8px; }
.logo img { width: 180px; height: auto; }
.menu-toggle { background: none; border: 1px solid var(--color-border); border-radius: var(--radius); width: 44px; height: 44px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.menu-toggle .material-icon, .menu-toggle .material-icon::before, .menu-toggle .material-icon::after {
  display: block; width: 22px; height: 2px; background: var(--color-dark); content: ""; position: relative;
}
.menu-toggle .material-icon::before { position: absolute; top: -7px; }
.menu-toggle .material-icon::after { position: absolute; top: 7px; }
.main-nav { width: 100%; display: none; }
.main-nav.open { display: block; }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav a, .sub-toggle {
  display: block; width: 100%; text-align: left; padding: .7em 0; font: inherit; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; font-size: .9rem; color: var(--color-dark); text-decoration: none; background: none; border: 0; cursor: pointer;
}
.main-nav a:hover, .sub-toggle:hover, .main-nav .current > a, .main-nav .current > .sub-toggle, .main-nav a[aria-current="page"] { color: var(--color-primary); }
.sub { display: none; padding-left: 1rem; }
.has-sub.open > .sub { display: block; }
.sub-toggle::after { content: " \25BE"; }

@media (min-width: 900px) {
  .menu-toggle { display: none; }
  .main-nav { display: block; width: auto; }
  .main-nav > ul { display: flex; gap: 1.5rem; }
  .main-nav a, .sub-toggle { padding: 1.2em 0; width: auto; }
  .has-sub { position: relative; }
  .sub {
    position: absolute; top: 100%; left: -1rem; min-width: 190px; padding: .5rem 1rem; background: var(--color-surface);
    box-shadow: var(--shadow); border-top: 3px solid var(--color-primary);
  }
  .has-sub:hover > .sub, .has-sub:focus-within > .sub, .has-sub.open > .sub { display: block; }
  .sub a { padding: .6em 0; }
}

/* Titolo pagina */
.page-title { background: var(--color-dark); color: #fff; padding: 2.5rem 0 2rem; }
.page-title h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .2em; }
.sub-title { color: #d0d0d0; margin-bottom: .8rem; }
.breadcrumbs { font-size: .9rem; color: #bdbdbd; }
.breadcrumbs a { color: #fff; }

/* Hero */
.hero { position: relative; aspect-ratio: 16 / 9; max-height: 80vh; min-height: 260px; background: #fff; overflow: hidden; }
.hero-slide {
  position: absolute; inset: 0; background-size: cover; background-position: center top; opacity: 0; transition: opacity 1s ease;
}
.hero-slide.active { opacity: 1; }
.hero-caption {
  position: absolute; left: 4%; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, .88);
  padding: clamp(.8rem, 3vw, 2rem) clamp(1rem, 4vw, 3rem);
  font-size: clamp(1rem, 3.5vw, 2.6rem); text-transform: uppercase; line-height: 1.2;
}
.hero-caption p { margin: 0; font-weight: 300; }
.hero-caption .strong { font-weight: 800; color: var(--color-primary); }
.hero-dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 10px; }
.hero-dots button { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--color-dark); background: #fff; padding: 0; cursor: pointer; }
.hero-dots button.active { background: var(--color-primary); border-color: var(--color-primary); }
@media (prefers-reduced-motion: reduce) { .hero-slide { transition: none; } html { scroll-behavior: auto; } }

/* Blocchi immagine + testo */
.feature { display: grid; grid-template-columns: 1fr; }
.feature-text { padding: 2.5rem 1.5rem; display: flex; flex-direction: column; justify-content: center; background: var(--color-surface); }
.feature-text h2 { font-size: clamp(1.6rem, 4vw, 2.6rem); text-transform: uppercase; position: relative; padding-bottom: .5em; }
.feature-text h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 70px; height: 3px; background: var(--color-primary); }
.feature-text .lead { font-weight: 600; text-transform: uppercase; color: var(--color-grey); }
.feature-img { min-height: 260px; background-size: cover; background-position: center; }
@media (min-width: 800px) {
  .feature { grid-template-columns: 1fr 1fr; }
  .feature-text { padding: 4rem 3rem; }
  .feature-img { min-height: 380px; }
  .feature.reverse .feature-text { order: 2; }
}

/* Servizi */
.servizi { padding: 3.5rem 0; background: var(--color-bg); }
.section-title { font-size: clamp(1.6rem, 3.5vw, 2.2rem); text-transform: uppercase; margin-bottom: 1.5rem; }
.servizi-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.servizio { background: var(--color-surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; border-top: 3px solid var(--color-primary); }
.servizio h3 { text-transform: uppercase; font-size: 1.1rem; }
.servizio p { font-size: .95rem; color: var(--color-text-secondary); margin: 0; }
@media (min-width: 700px) { .servizi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .servizi-grid { grid-template-columns: repeat(3, 1fr); } }

/* Galleria */
.contenuto { padding: 2.5rem 0 3.5rem; background: var(--color-surface); }
.lead { font-size: 1.15rem; color: var(--color-grey); }
.meta { color: var(--color-text-secondary); }
.galleria { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.galleria-3 { gap: 0; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.galleria li[hidden] { display: none; }
.galleria a { position: relative; display: block; overflow: hidden; border-radius: var(--radius); background: #eee; aspect-ratio: 4 / 3; }
.galleria-3 a { border-radius: 0; }
.galleria img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.galleria a:hover img, .galleria a:focus-visible img { transform: scale(1.05); }
.didascalia {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 1.2rem 1rem .8rem; color: #fff; display: flex; flex-direction: column;
  background: linear-gradient(transparent, rgba(0, 0, 0, .75)); font-size: .9rem; text-transform: uppercase; letter-spacing: .03em;
}
.filtri { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 1.5rem; }
.filtro { font: inherit; padding: .4em 1.2em; border: 2px solid var(--color-border); border-radius: 999px; background: #fff; cursor: pointer; text-transform: uppercase; font-size: .85rem; }
.filtro.active, .filtro:hover { border-color: var(--color-primary); color: var(--color-primary-dark); }

/* Lightbox */
.lightbox-dialog { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; color: #fff; }
.lightbox-dialog::backdrop { background: rgba(0, 0, 0, .9); }
.lightbox-dialog[open] { display: flex; align-items: center; justify-content: center; }
.lightbox-dialog figure { margin: 0; max-width: 90vw; text-align: center; }
.lightbox-dialog img { max-width: 90vw; max-height: 80vh; margin: 0 auto; }
.lightbox-dialog figcaption { margin-top: .6rem; text-transform: uppercase; letter-spacing: .04em; }
.lightbox-dialog button { position: absolute; background: rgba(0, 0, 0, .5); color: #fff; border: 0; font-size: 2.2rem; line-height: 1; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; }
.lightbox-dialog button:hover { background: var(--color-primary); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }

/* Eventi */
.evento { display: grid; gap: 1.5rem; grid-template-columns: 1fr; margin-bottom: 2rem; }
.evento img { border-radius: var(--radius); width: 100%; }
@media (min-width: 700px) { .evento { grid-template-columns: 360px 1fr; align-items: start; } }

/* Contatti */
.contatti { display: grid; grid-template-columns: 1fr; background: var(--color-surface); }
.contatti-mappa { min-height: 320px; background: #e8e8e8; }
.contatti-mappa iframe { width: 100%; height: 100%; min-height: 420px; border: 0; }
.mappa-placeholder { padding: 2rem 1.5rem; max-width: 460px; margin: 0 auto; text-align: center; }
.contatti-form { padding: 2.5rem 1.5rem; max-width: 640px; width: 100%; margin: 0 auto; }
@media (min-width: 900px) {
  .contatti { grid-template-columns: 1fr 1fr; }
  .contatti-mappa { display: flex; align-items: center; }
  .contatti-mappa > div { width: 100%; height: 100%; display: flex; align-items: center; }
  .contatti-form { padding: 3.5rem 3rem; }
}
.campo { margin-bottom: 1.2rem; }
.campo label { display: block; font-weight: 600; margin-bottom: .3rem; }
.campo input[type="text"], .campo input[type="email"], .campo textarea {
  width: 100%; font: inherit; padding: .7em .8em; border: 1px solid #bdbdbd; border-radius: var(--radius); background: #fff;
}
.campo input:focus, .campo textarea:focus { border-color: var(--color-primary); }
.ha-errore input[type="text"], .ha-errore input[type="email"], .ha-errore textarea { border-color: var(--color-danger); border-width: 2px; }
.errore { color: var(--color-danger); font-size: .9rem; margin: .3rem 0 0; font-weight: 600; }
.errore::before { content: "\26A0\FE0E  "; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400 !important; }
.check input { margin-top: .35em; width: 1.1rem; height: 1.1rem; flex: none; accent-color: var(--color-primary); }
.nota-campi { font-size: .85rem; color: var(--color-text-secondary); }
.trappola { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 1rem 1.2rem; border-radius: var(--radius); margin-bottom: 1.5rem; border-left: 5px solid; }
.alert-success { background: #e8f5e9; border-color: var(--color-success); color: #1b5e20; }
.alert-error { background: #ffebee; border-color: var(--color-danger); color: #b71c1c; }
.info-contatti { background: var(--color-bg); padding: 3rem 0; border-top: 1px solid var(--color-border); }
.info-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; text-align: center; }
.info-grid h3 { text-transform: uppercase; font-weight: 700; }
@media (min-width: 700px) { .info-grid { grid-template-columns: repeat(3, 1fr); } }

/* Pagine legali */
.testo-legale h2 { font-size: 1.6rem; margin-bottom: 1rem; }
.testo-legale h3 { font-size: 1.2rem; margin-top: 2rem; font-weight: 700; }
.testo-legale h4 { font-size: 1.05rem; margin-top: 1.5rem; font-weight: 700; }
.testo-legale ul { padding-left: 1.3rem; margin: 0 0 1em; }
.testo-legale li { margin-bottom: .4em; }
.aggiornamento { margin-top: 2.5rem; color: var(--color-text-secondary); font-style: italic; }
.tabella-scroll { overflow-x: auto; margin-bottom: 1rem; }
table { border-collapse: collapse; width: 100%; min-width: 520px; }
th, td { border: 1px solid var(--color-border); padding: .6em .8em; text-align: left; vertical-align: top; }
thead th { background: var(--color-dark); color: #fff; }
tbody tr:nth-child(even) { background: var(--color-bg); }
code { background: #eee; padding: .1em .35em; border-radius: 4px; font-size: .9em; }

/* Footer */
.site-footer { background: var(--color-dark); color: #d6d6d6; padding: 3rem 0 1.5rem; }
.site-footer h2 { color: #fff; font-size: 1.05rem; text-transform: uppercase; font-weight: 700; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--color-primary); }
.site-footer address { font-style: normal; margin-bottom: .8rem; }
.footer-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; border-top: 1px solid #333; margin-top: 1.5rem; padding-top: 1.2rem; font-size: .9rem; }
.footer-bottom p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.site-footer .link-button { color: #fff; }

/* Banner cookie */
.cookie-dialog { border: 0; padding: 0; margin: 0; position: fixed; inset: auto 0 0 0; width: 100%; max-width: none; background: var(--color-surface); color: var(--color-text); box-shadow: 0 -4px 20px rgba(0, 0, 0, .25); border-top: 4px solid var(--color-primary); max-height: 92vh; overflow-y: auto; }
.cookie-dialog::backdrop { background: rgba(0, 0, 0, .35); }
.cookie-box { max-width: 1000px; margin: 0 auto; padding: 1.2rem 1rem 1.4rem; }
.cookie-box h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: .4rem; }
.cookie-box p { font-size: .92rem; margin-bottom: .8rem; }
.cookie-options { border: 1px solid var(--color-border); border-radius: var(--radius); padding: .8rem 1rem; margin: 0 0 1rem; }
.cookie-options label { display: flex; gap: .6rem; align-items: flex-start; margin-bottom: .6rem; font-size: .92rem; }
.cookie-options label:last-child { margin-bottom: 0; }
.cookie-options input { margin-top: .3em; width: 1.1rem; height: 1.1rem; accent-color: var(--color-primary); flex: none; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: flex-end; }
.cookie-actions .btn { flex: 1 1 140px; }
@media (min-width: 700px) { .cookie-actions .btn { flex: 0 0 auto; } }
