/* ── Reset & base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0f0a05;
  --bg2:       #1c130a;
  --bg3:       #261b0f;
  --gold:      #c9a55a;
  --gold-lt:   #e8c97a;
  --cream:     #f5f0e8;
  --muted:     #a89880;
  --border:    rgba(201,165,90,.25);
  --font-head: 'Playfair Display', Georgia, serif;
  --font-body: 'Lato', system-ui, sans-serif;
  --radius:    6px;
  --max-w:     1160px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

a { color: var(--gold); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold-lt); }

img { max-width: 100%; display: block; }

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 400; line-height: 1.2; }

/* ── Navbar ───────────────────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15,10,5,.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--cream);
  font-family: var(--font-head);
  font-size: 1.15rem;
  letter-spacing: .02em;
}

.nav-logo img { height: 58px; width: auto; filter: drop-shadow(0 0 5px rgba(201,165,90,0.7)); }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  font-size: .875rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: color .2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--gold); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--cream);
  border-radius: 2px;
  transition: .2s;
}

/* ── Flash messages ───────────────────────────────────────────────────────── */
.flash-messages { padding: 1rem 1.5rem; }
.flash {
  background: var(--bg3);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  color: var(--gold-lt);
  padding: .75rem 1.25rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/thumb_2485132002.jpg');
  background-size: cover;
  background-position: center;
  filter: brightness(.35);
}

.hero-content {
  position: relative;
  padding: 3rem 1.5rem;
  max-width: 700px;
}

.hero-eyebrow {
  font-size: .8rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: clamp(2.8rem, 7vw, 5rem);
  color: var(--cream);
  margin-bottom: 1rem;
  font-style: italic;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto 2.5rem;
  font-weight: 300;
}

.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: .75rem 2rem;
  border-radius: var(--radius);
  font-size: .875rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  transition: background .2s, color .2s, transform .15s;
}

.btn:hover { transform: translateY(-1px); }

.btn-gold {
  background: var(--gold);
  color: var(--bg);
  font-weight: 700;
}
.btn-gold:hover { background: var(--gold-lt); color: var(--bg); }

.btn-outline {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
}
.btn-outline:hover { background: var(--gold); color: var(--bg); }

/* ── Section helpers ──────────────────────────────────────────────────────── */
.section { padding: 5rem 1.5rem; }
.section-inner { max-width: var(--max-w); margin: 0 auto; }

.section-label {
  font-size: .75rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .75rem;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--cream);
  margin-bottom: 1.25rem;
}

.divider {
  width: 48px;
  height: 2px;
  background: var(--gold);
  margin: 1.25rem 0 2rem;
}

.divider-center { margin-left: auto; margin-right: auto; }

/* ── Gallery ──────────────────────────────────────────────────────────────── */
.gallery { background: var(--bg2); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform .4s, filter .4s;
  filter: brightness(.85);
}

.gallery-grid img:hover { transform: scale(1.04); filter: brightness(1); }

.gallery-grid .tall { grid-row: span 2; aspect-ratio: unset; height: 100%; }

/* ── About / descrizione ──────────────────────────────────────────────────── */
.about { background: var(--bg); }

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-quote {
  font-family: var(--font-head);
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-style: italic;
  color: var(--cream);
  line-height: 1.6;
  border-left: 3px solid var(--gold);
  padding-left: 1.5rem;
}

.about-text { color: var(--muted); font-weight: 300; }

.about-img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: var(--radius);
}

/* ── Orari ────────────────────────────────────────────────────────────────── */
.orari { background: var(--bg2); text-align: center; }

.orari-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.orari-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
}

.orari-card h4 {
  font-family: var(--font-head);
  font-size: 1.15rem;
  color: var(--gold);
  margin-bottom: 1rem;
}

.orari-card p { color: var(--muted); font-size: .95rem; }
.orari-card .chiuso { color: #e07070; font-style: italic; }

/* ── Contatti strip ───────────────────────────────────────────────────────── */
.contact-strip {
  background: var(--bg3);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 3rem 1.5rem;
}

.contact-strip-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 4rem;
  flex-wrap: wrap;
  text-align: center;
}

.contact-item .label {
  font-size: .75rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .35rem;
}

.contact-item a,
.contact-item p { font-size: 1.1rem; color: var(--cream); }

/* ── Pagina Menù/Dessert ──────────────────────────────────────────────────── */
.page-hero {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 4rem 1.5rem 3rem;
  text-align: center;
}

.page-hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); color: var(--cream); }
.page-hero p { color: var(--muted); margin-top: .75rem; }

.pdf-section { background: var(--bg); padding: 3rem 1.5rem; }

.pdf-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

.pdf-frame {
  width: 100%;
  height: 85vh;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg2);
}

.pdf-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1rem;
}

.pdf-placeholder {
  max-width: 500px;
  margin: 4rem auto;
  text-align: center;
}

.pdf-placeholder .icon {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  opacity: .4;
}

.pdf-placeholder h2 { color: var(--cream); margin-bottom: .75rem; }
.pdf-placeholder p { color: var(--muted); margin-bottom: 2rem; }

/* ── Pagina Contatti ──────────────────────────────────────────────────────── */
.contatti-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  max-width: var(--max-w);
  margin: 4rem auto 0;
  padding: 0 1.5rem 5rem;
}

.contatti-cards { display: flex; flex-direction: column; gap: 1.5rem; }

.info-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.info-card .icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: .15rem;
}

.info-card h4 {
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--gold);
  margin-bottom: .35rem;
}

.info-card p, .info-card a { color: var(--muted); font-size: .95rem; display: block; }

.map-frame {
  width: 100%;
  height: 400px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  filter: grayscale(60%) invert(10%);
}

/* ── Admin ────────────────────────────────────────────────────────────────── */
.admin-wrap {
  max-width: 620px;
  margin: 4rem auto;
  padding: 0 1.5rem 4rem;
}

.admin-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.admin-card h3 {
  font-family: var(--font-head);
  color: var(--gold);
  margin-bottom: 1.25rem;
}

.admin-card .current {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 1rem;
  padding: .5rem .75rem;
  background: var(--bg3);
  border-radius: 4px;
}

.form-group { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }

.form-group label {
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.form-group input[type="password"],
.form-group input[type="file"] {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--cream);
  padding: .6rem .9rem;
  font-family: var(--font-body);
  font-size: 1rem;
  width: 100%;
}

.form-group input[type="password"]:focus { outline: none; border-color: var(--gold); }

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.admin-header h2 { font-family: var(--font-head); color: var(--cream); }

.login-box {
  max-width: 400px;
  margin: 8rem auto;
  padding: 2.5rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.login-box h2 { color: var(--cream); margin-bottom: .5rem; }
.login-box p { color: var(--muted); margin-bottom: 2rem; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.footer-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 2rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}

.footer-col h3 {
  font-family: var(--font-head);
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: .75rem;
}

.footer-col h4 {
  font-size: .8rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .75rem;
}

.footer-col p, .footer-col a {
  color: var(--muted);
  font-size: .9rem;
  display: block;
  margin-bottom: .3rem;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: .8rem;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(15,10,5,.98);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open { display: flex; }

  .nav-links li a {
    display: block;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
  }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid .tall { grid-row: span 1; aspect-ratio: 4/3; height: auto; }

  .about-inner { grid-template-columns: 1fr; }
  .about-img { max-height: 300px; width: 100%; }

  .contatti-grid { grid-template-columns: 1fr; }

  .footer-container { grid-template-columns: 1fr; gap: 2rem; }

  .pdf-frame { height: 60vh; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .hero { min-height: 80vh; }
}
