:root {
  --ink: #1d1d1f;
  --muted: #6b6b70;
  --line: #e4e4e7;
  --bg: #ffffff;
  --soft: #f6f6f7;
  --accent: #FF0000;
  --accent-dark: #cc0000;
  --radius: 0;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font: 18px/1.7 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 32px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ---------- Header ---------- */
.site-header {
  position: relative; color: #fff;
  min-height: 300px; display: flex; flex-direction: column;
  background: url('bg-porta-rossa.jpg') center / cover no-repeat;
  background-color: #8a0a0a;
}
.topbar { position: relative; z-index: 20; width: 100%; background: rgba(0,0,0,.5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); border-bottom: 1px solid rgba(255,255,255,.18); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 88px; }

.hero { flex: 1; display: flex; align-items: center; padding: 24px 0; }
.hero .wrap { width: 100%; }
.hero h1 { margin: 0; font-size: 2.8rem; line-height: 1.12; font-weight: 700; letter-spacing: -.01em; color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,.55); }

.brand { display: flex; flex-direction: column; line-height: 1.1; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.35); }
.brand:hover { text-decoration: none; }
.brand-name { font-weight: 700; letter-spacing: .12em; font-size: 1.25rem; }
.brand-sub { font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: rgba(255,255,255,.88); margin-top: 3px; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.main-nav a { display: block; padding: 8px 12px; color: #fff; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; border-radius: var(--radius); text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.main-nav a:hover { background: #990000; color: #fff; text-shadow: none; text-decoration: none; }
.main-nav a[aria-current="page"], .main-nav .has-sub.active > a { background: #fff; color: var(--accent); text-shadow: none; font-weight: 600; }

.has-sub { position: relative; }
.has-sub .sub { display: none; position: absolute; top: 100%; left: 0; min-width: 240px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; flex-direction: column; align-items: stretch; box-shadow: 0 8px 24px rgba(0,0,0,.06); }
.has-sub:hover .sub, .has-sub:focus-within .sub, .has-sub.open .sub { display: flex; }
.has-sub .sub a { text-transform: none; letter-spacing: 0; font-size: .95rem; color: var(--ink); text-shadow: none; }
.has-sub .sub a:hover { background: var(--soft); color: var(--ink); }
.has-sub .sub a[aria-current="page"] { background: none; color: var(--accent); }

.nav-toggle { display: none; background: #990000; border: 1px solid #990000; border-radius: var(--radius); padding: 8px 14px; font: inherit; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; cursor: pointer; color: #fff; }

/* ---------- Page ---------- */
main.wrap { padding-top: 104px; padding-bottom: 130px; min-height: 60vh; }

.page h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 24px; font-weight: 700; letter-spacing: -.01em; }
.page h2 { font-size: 1.3rem; margin: 2em 0 .5em; }
.page h3 { font-size: 1.05rem; margin: 0 0 .4em; }
.page p, .page ul { margin: 0 0 1.1em; }
.page ul { padding-left: 1.2em; }
.page li { margin-bottom: .35em; }

.page-image { display: block; width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius); margin: 0 0 28px; }

.lead { font-size: 1.15rem; }

blockquote { margin: 0 0 1.4em; padding: .2em 0 .2em 1.1em; border-left: 3px solid var(--line); color: var(--muted); font-style: italic; }

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 32px; }
.features > div { background: var(--soft); border-radius: var(--radius); padding: 22px 24px; }
.features p { margin: 0; font-size: .96rem; }
.ico { display: block; width: 38px; height: 38px; color: var(--accent); margin-bottom: 14px; }
.ico svg { display: block; width: 100%; height: 100%; }
.page h2.has-ico { display: flex; align-items: center; gap: 16px; }
.page h2.has-ico .ico { width: 34px; height: 34px; margin: 0; flex: none; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; margin: 28px 0; }
table.boxes { width: 100%; border-collapse: collapse; }
table.boxes th, table.boxes td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); }
table.boxes th { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }

/* ---------- Button ---------- */
.button { display: inline-block; background: var(--accent); color: #fff; border: 0; padding: 12px 24px; border-radius: var(--radius); font: inherit; font-size: .95rem; cursor: pointer; }
.button:hover { background: var(--accent-dark); text-decoration: none; }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.gallery a { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--soft); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.gallery a:hover img { transform: scale(1.04); }

.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.88); display: none; align-items: center; justify-content: center; flex-direction: column; z-index: 100; padding: 24px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: 0; }
.lightbox .cap { color: #ddd; margin-top: 12px; font-size: .9rem; min-height: 1.4em; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; font-size: 2rem; cursor: pointer; padding: 12px 16px; line-height: 1; }
.lightbox .lb-close { top: 8px; right: 8px; }
.lightbox .lb-prev { left: 8px; top: 50%; }
.lightbox .lb-next { right: 8px; top: 50%; }

/* ---------- FAQ ---------- */
.faq { margin-top: 8px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 48px 22px 0; font-weight: 600; font-size: 1.1rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 1.6rem; font-weight: 400; color: var(--accent); line-height: 1; }
.faq details[open] summary { color: var(--accent); }
.faq details[open] summary::after { content: '\2212'; }
.faq summary:hover { color: var(--accent); }
.faq-a { padding: 0 0 22px; max-width: 80ch; }
.faq-a > :last-child { margin-bottom: 0; }

/* ---------- Form / contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 72px; margin-top: 28px; }
.form label { display: block; margin-bottom: 16px; font-size: .9rem; font-weight: 600; }
.form input, .form textarea { display: block; width: 100%; margin-top: 6px; padding: 11px 12px; font: inherit; font-weight: 400; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink); }
.form input:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.hint { color: var(--muted); font-size: .85rem; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.contact-info h2 { margin-top: 0; font-size: 1.1rem; }
.contact-info h3 { margin-top: 1.4em; }
.map { width: 100%; height: 260px; border: 0; border-radius: var(--radius); margin-top: 8px; }

.flash { padding: 12px 16px; border-radius: var(--radius); margin: 0 0 24px; font-size: .95rem; }
.flash-ok { background: #e8f6ee; color: #14532d; }
.flash-err { background: #fdecec; color: #7f1d1d; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--soft); color: var(--muted); font-size: .9rem; padding: 56px 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer a { color: inherit; }
.small { font-size: .8rem; }

/* ---------- Mobile ---------- */
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 20px 16px; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; }
  .main-nav a { color: var(--ink); text-shadow: none; }
  .main-nav a:hover { background: var(--soft); }
  .main-nav a[aria-current="page"], .main-nav .has-sub.active > a { background: none; color: var(--accent); }
  .has-sub .sub { display: flex; position: static; border: 0; box-shadow: none; padding: 0 0 0 14px; }
  .features, .contact-grid { grid-template-columns: 1fr; }
  .contact-grid { gap: 32px; }
  .wrap { padding: 0 20px; }
  .site-header { min-height: 240px; }
  .hero { padding: 20px 0; }
  .hero h1 { font-size: 1.9rem; }
  main.wrap { padding-top: 64px; padding-bottom: 90px; }
}
