/* ========== RESET & BASE ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --crema: #faf6f0;
  --crema-dark: #f0e8da;
  --bordeaux: #6b2737;
  --bordeaux-light: #8a3a4a;
  --verde: #2d5016;
  --verde-scuro: #1a3a0a;
  --noce: #5c3d2e;
  --noce-light: #7a5a48;
  --ottone: #c9a84c;
  --ottone-light: #d4b96a;
  --text: #3a2a1a;
  --text-light: #6b5a48;
  --white: #fffdf8;
  --shadow: 0 2px 12px rgba(60,40,20,0.08);
  --shadow-lg: 0 6px 30px rgba(60,40,20,0.12);
  --radius: 6px;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Source Sans 3', 'Segoe UI', Helvetica, Arial, sans-serif;
  --header-h: 64px;
}

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--crema);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--bordeaux); text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--ottone);
  outline-offset: 2px;
}

.container { max-width: 960px; margin: 0 auto; padding: 0 20px; }

/* ========== HEADER ========== */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(250,246,240,0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(107,39,55,0.1);
  height: var(--header-h);
  transition: box-shadow 0.3s;
}
.header--scrolled { box-shadow: var(--shadow); }
.header__inner {
  max-width: 960px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.header__logo {
  font-family: var(--font-serif);
  font-size: 1.4rem; font-weight: 700;
  color: var(--bordeaux);
  letter-spacing: 0.02em;
}
.header__nav { display: flex; gap: 24px; }
.header__link {
  font-size: 0.9rem; font-weight: 600;
  color: var(--text); letter-spacing: 0.03em;
  text-transform: uppercase; padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.header__link:hover, .header__link--active { color: var(--bordeaux); border-bottom-color: var(--ottone); }
.header__hamburger {
  display: none; background: none; border: none; cursor: pointer;
  width: 32px; height: 24px; position: relative;
}
.header__hamburger span {
  display: block; width: 100%; height: 2px;
  background: var(--text); position: absolute; left: 0;
  transition: all 0.3s;
}
.header__hamburger span:nth-child(1) { top: 0; }
.header__hamburger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.header__hamburger span:nth-child(3) { bottom: 0; }
.header__hamburger.active span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.header__hamburger.active span:nth-child(2) { opacity: 0; }
.header__hamburger.active span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

@media (max-width: 768px) {
  .header__hamburger { display: block; }
  .header__nav {
    display: none; flex-direction: column;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--crema); padding: 20px;
    border-bottom: 1px solid rgba(107,39,55,0.1);
    box-shadow: var(--shadow);
    gap: 16px;
  }
  .header__nav.open { display: flex; }
  .header__link { font-size: 1rem; padding: 8px 0; }
}

/* ========== HERO ========== */
.hero {
  position: relative; min-height: 85vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; overflow: hidden;
  margin-top: var(--header-h);
  background: url('img_hd/img_008.png') center/cover no-repeat #2a180c;
}
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(42,24,12,0.6) 0%, rgba(42,24,12,0.78) 100%);
}
.hero__content { position: relative; z-index: 1; padding: 40px 20px; }
.hero__title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  color: var(--white); font-weight: 700;
  line-height: 1.15; margin-bottom: 16px;
  letter-spacing: 0.02em;
}
.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: rgba(255,253,248,0.85);
  font-weight: 300; margin-bottom: 32px;
  line-height: 1.5;
}
.hero__cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius);
  font-family: var(--font-sans); font-size: 0.95rem; font-weight: 600;
  cursor: pointer; border: 2px solid transparent;
  transition: all 0.25s; text-decoration: none;
}
.btn--primary {
  background: var(--bordeaux); color: var(--white);
  border-color: var(--bordeaux);
}
.btn--primary:hover { background: var(--bordeaux-light); border-color: var(--bordeaux-light); }
.btn--secondary {
  background: transparent; color: var(--white);
  border-color: rgba(255,253,248,0.5);
}
.btn--secondary:hover { border-color: var(--white); background: rgba(255,253,248,0.1); }
.btn--full { width: 100%; justify-content: center; }
.btn--sm { padding: 8px 16px; font-size: 0.85rem; }

/* ========== SECTIONS ========== */
.section { padding: 72px 0; }
.section:nth-child(even) { background: var(--white); }
.section__title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  color: var(--bordeaux); text-align: center;
  margin-bottom: 8px;
}
.section__divider {
  width: 60px; height: 3px; margin: 0 auto 40px;
  background: var(--ottone); border-radius: 2px;
}

/* ========== CHI SIAMO ========== */
.chi-siamo__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.chi-siamo__text p { margin-bottom: 16px; color: var(--text-light); }
.chi-siamo__text strong { color: var(--text); }
.chi-siamo__img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--crema-dark);
}
@media (max-width: 768px) {
  .chi-siamo__grid { grid-template-columns: 1fr; }
  .chi-siamo__images { order: -1; text-align: center; }
  .chi-siamo__img { max-width: 300px; margin: 0 auto; }
}

/* ========== MENU TEASER ========== */
.menu-teaser { background: var(--white); }
.menu-teaser__content { text-align: center; max-width: 600px; margin: 0 auto; }
.menu-teaser__text {
  font-size: 1.1rem; color: var(--text-light);
  line-height: 1.7; margin-bottom: 24px;
}
.menu-teaser__highlights {
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: center; margin-bottom: 32px;
}
.menu-teaser__tag {
  display: inline-block; padding: 6px 16px;
  background: var(--crema-dark); border-radius: 20px;
  font-size: 0.85rem; color: var(--noce); font-weight: 600;
  border: 1px solid rgba(107,39,55,0.08);
}
.btn--menu-cta {
  font-size: 1.05rem; padding: 14px 32px;
}

/* ========== PRESS ========== */
.press { background: var(--crema-dark); }
.press__card { max-width: 640px; margin: 0 auto; }
.press__ritaglio {
  background: var(--white);
  border: 1px solid rgba(107,39,55,0.12);
  border-radius: var(--radius);
  padding: 32px; text-align: center;
  box-shadow: var(--shadow);
  position: relative;
}
.press__ritaglio::before {
  content: '';
  position: absolute; top: -3px; left: 20px; right: 20px; height: 3px;
  background: var(--ottone); border-radius: 2px 2px 0 0;
}
.press__icon { color: var(--bordeaux); margin-bottom: 16px; }
.press__quote {
  font-family: var(--font-serif);
  font-style: italic; font-size: 1.1rem;
  color: var(--text); line-height: 1.6;
  margin-bottom: 16px;
}
.press__source {
  font-size: 0.95rem; color: var(--text-light); font-style: normal;
}
.press__source a {
  color: var(--bordeaux); font-weight: 600;
  border-bottom: 1px solid var(--ottone);
  transition: color 0.2s;
}
.press__source a:hover { color: var(--bordeaux-light); }

/* ========== MENU ========== */
.menu__pricing { text-align: center; margin-bottom: 48px; }
.menu__pricing-title {
  font-family: var(--font-serif);
  font-size: 1.3rem; color: var(--noce);
  margin-bottom: 20px;
}
.menu__pricing-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px; max-width: 700px; margin: 0 auto;
}
.menu__price-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; background: var(--crema-dark);
  border-radius: var(--radius); font-size: 0.9rem;
}
.menu__price-item span:last-child {
  font-weight: 600; color: var(--bordeaux);
  white-space: nowrap;
}

.menu__categories {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}
.menu__category {
  background: var(--white); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
  border: 1px solid rgba(107,39,55,0.06);
}
.menu__category-title {
  font-family: var(--font-serif);
  font-size: 1.15rem; color: var(--bordeaux);
  margin-bottom: 16px; padding-bottom: 8px;
  border-bottom: 2px solid var(--ottone);
}
.menu__category-price {
  font-size: 0.85rem; color: var(--ottone);
  font-weight: 600; float: right;
}
.menu__list { list-style: none; }
.menu__list li {
  padding: 6px 0; font-size: 0.93rem;
  color: var(--text-light);
  border-bottom: 1px dotted rgba(107,39,55,0.1);
}
.menu__list li:last-child { border-bottom: none; }
.menu__insalatona-name {
  font-weight: 600; color: var(--text);
  display: block; margin-bottom: 2px;
}
.menu__insalatona-ingredients { font-size: 0.85rem; color: var(--text-light); }

/* ========== GALLERY ========== */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.gallery__img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  object-fit: cover; width: 100%; height: 220px;
  border: 3px solid var(--white);
  transition: transform 0.3s;
}
.gallery__img:hover { transform: scale(1.02); }
.gallery__img--wide { grid-column: span 2; height: 240px; }
@media (max-width: 600px) {
  .gallery__grid { grid-template-columns: 1fr 1fr; }
  .gallery__img { height: 160px; }
  .gallery__img--wide { grid-column: span 2; height: 180px; }
}

/* ========== ORARI ========== */
.orari { background: var(--bordeaux); color: var(--white); }
.orari .section__title { color: var(--white); }
.orari .section__divider { background: var(--ottone); }
.orari__card {
  max-width: 420px; margin: 0 auto; text-align: center;
}
.orari__icon { color: var(--ottone); margin-bottom: 24px; }
.orari__row {
  display: flex; justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,253,248,0.15);
  font-size: 1.05rem;
}
.orari__row:last-child { border-bottom: none; }
.orari__day { font-weight: 600; }
.orari__time { color: var(--ottone-light); }
.orari__row--closed .orari__time { color: rgba(255,253,248,0.5); }

/* ========== DOVE SIAMO ========== */
.dove-siamo__content { }
.dove-siamo__info {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 24px; font-size: 1.05rem;
  justify-content: center;
}
.dove-siamo__info svg { color: var(--bordeaux); flex-shrink: 0; }
.dove-siamo__info address { font-style: normal; color: var(--text-light); }
.dove-siamo__map {
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 3px solid var(--crema-dark);
}
.dove-siamo__map iframe { display: block; }

/* ========== CONTATTI ========== */
.contatti__content { text-align: center; }
.contatti__text { color: var(--text-light); margin-bottom: 20px; font-size: 1.05rem; }
.contatti__phone {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 4vw, 2rem);
  color: var(--bordeaux); font-weight: 700;
  border-bottom: 2px solid var(--ottone);
  padding-bottom: 4px;
  transition: color 0.2s;
}
.contatti__phone:hover { color: var(--bordeaux-light); }
.contatti__address { margin-top: 16px; color: var(--text-light); }

/* ========== FOOTER ========== */
.footer {
  background: var(--noce); color: rgba(255,253,248,0.7);
  padding: 40px 0; text-align: center;
  font-size: 0.9rem;
}
.footer__name {
  font-family: var(--font-serif);
  color: var(--white); font-size: 1.1rem;
  margin-bottom: 8px;
}
.footer__address { margin-bottom: 8px; }
.footer__address a { color: rgba(255,253,248,0.7); }
.footer__address a:hover { color: var(--white); }
.footer__copy { font-size: 0.8rem; margin-bottom: 12px; color: rgba(255,253,248,0.4); }
.footer__admin-link {
  font-size: 0.8rem; color: rgba(255,253,248,0.3);
  border-bottom: 1px solid rgba(255,253,248,0.1);
  transition: color 0.2s;
}
.footer__admin-link:hover { color: rgba(255,253,248,0.6); }

/* ========== MOBILE CALL BUTTON ========== */
.mobile-call {
  display: none; position: fixed; bottom: 20px; right: 20px;
  z-index: 90; width: 56px; height: 56px;
  background: var(--bordeaux); color: var(--white);
  border-radius: 50%; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: background 0.2s, transform 0.2s;
}
.mobile-call:hover { background: var(--bordeaux-light); transform: scale(1.05); }
@media (max-width: 768px) { .mobile-call { display: flex; } }

/* ========== ADMIN ========== */
.admin-overlay {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(42,24,12,0.7);
  backdrop-filter: blur(4px);
}
.admin-overlay.open { display: block; }

.admin-login {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 20px;
}
.admin-login.hidden { display: none; }

.admin-panel.hidden { display: none; }
.admin-login__card {
  background: var(--white); border-radius: var(--radius);
  padding: 40px; max-width: 380px; width: 100%;
  box-shadow: var(--shadow-lg); position: relative;
}
.admin-login__card h2 {
  font-family: var(--font-serif);
  color: var(--bordeaux); margin-bottom: 24px; text-align: center;
}
.admin-login__card label {
  display: block; font-size: 0.85rem; font-weight: 600;
  color: var(--text-light); margin-bottom: 4px; margin-top: 16px;
}
.admin-login__card input {
  width: 100%; padding: 10px 14px;
  border: 1px solid rgba(107,39,55,0.2); border-radius: var(--radius);
  font-size: 1rem; font-family: var(--font-sans);
  background: var(--crema);
  transition: border-color 0.2s;
}
.admin-login__card input:focus { border-color: var(--bordeaux); outline: none; }
.admin-login__card .btn { margin-top: 24px; }
.admin-error { color: #c0392b; font-size: 0.85rem; margin-top: 12px; min-height: 1.2em; }
.admin-close {
  background: none; border: none; font-size: 1.8rem;
  color: var(--text-light); cursor: pointer;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
}
.admin-close:hover { color: var(--text); background: rgba(107,39,55,0.08); }
.admin-login .admin-close { position: absolute; top: 12px; right: 12px; }

.admin-panel {
  display: flex; flex-direction: column;
  height: 100vh; width: 100%;
}
.admin-panel__header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 24px;
  background: var(--white);
  border-bottom: 2px solid rgba(107,39,55,0.1);
  flex-shrink: 0;
}
.admin-panel__header h2 {
  font-family: var(--font-serif); color: var(--bordeaux); font-size: 1.3rem;
}
.admin-panel__actions { display: flex; gap: 12px; align-items: center; }
.admin-save-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 24px; border-radius: var(--radius);
  font-family: var(--font-sans); font-size: 0.95rem; font-weight: 700;
  cursor: pointer; border: none;
  background: var(--bordeaux); color: var(--white);
  box-shadow: 0 2px 8px rgba(107,39,55,0.3);
  transition: background 0.2s, transform 0.1s;
}
.admin-save-btn:hover { background: var(--bordeaux-light); transform: translateY(-1px); }
.admin-save-btn:active { transform: translateY(0); }
.admin-save-btn svg { flex-shrink: 0; }
.admin-saved {
  padding: 8px 24px; font-size: 0.9rem; font-weight: 600;
  min-height: 1.5em; line-height: 1.5em;
  background: var(--crema); flex-shrink: 0;
}
.admin-panel__scroll {
  flex: 1; overflow-y: auto; background: var(--crema);
}
.admin-panel__content {
  max-width: 800px; margin: 0 auto; padding: 24px;
}

.admin-section { margin-bottom: 32px; background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.admin-section__title {
  font-family: var(--font-serif); font-size: 1.1rem;
  color: var(--bordeaux); margin-bottom: 16px;
  padding-bottom: 8px; border-bottom: 2px solid var(--ottone);
}
.admin-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid rgba(107,39,55,0.06);
  flex-wrap: wrap;
}
.admin-item input[type="text"] {
  flex: 1; min-width: 150px; padding: 8px 10px;
  border: 1px solid rgba(107,39,55,0.15); border-radius: var(--radius);
  font-size: 0.9rem; font-family: var(--font-sans); background: var(--crema);
}
.admin-item input[type="text"]:focus { border-color: var(--bordeaux); outline: none; }
.admin-item input[type="number"] {
  width: 80px; padding: 8px 10px;
  border: 1px solid rgba(107,39,55,0.15); border-radius: var(--radius);
  font-size: 0.9rem; font-family: var(--font-sans); background: var(--crema);
  text-align: right;
}
.admin-item input[type="number"]:focus { border-color: var(--bordeaux); outline: none; }
.admin-item-remove {
  background: none; border: none; color: #c0392b; cursor: pointer;
  font-size: 1.2rem; padding: 4px 8px; border-radius: var(--radius);
}
.admin-item-remove:hover { background: rgba(192,57,43,0.1); }
.admin-add-btn {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 8px; padding: 6px 14px;
  background: var(--crema); border: 1px dashed rgba(107,39,55,0.2);
  border-radius: var(--radius); font-size: 0.85rem;
  color: var(--text-light); cursor: pointer;
  transition: background 0.2s;
}
.admin-add-btn:hover { background: var(--crema-dark); color: var(--text); }

.admin-insalatona { margin-bottom: 12px; padding: 12px; background: var(--crema); border-radius: var(--radius); }
.admin-insalatona__header { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.admin-insalatona__header input { font-weight: 600; }

@media (max-width: 600px) {
  .admin-panel__header { flex-direction: column; gap: 12px; align-items: stretch; }
  .admin-panel__header h2 { font-size: 1.1rem; }
  .admin-save-btn { justify-content: center; width: 100%; }
  .admin-panel__content { padding: 16px; }
  .admin-item { gap: 6px; }
}

/* ========== ANIMATIONS ========== */
.fade-in {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .gallery__img { transition: none; }
}
