/*
 * RISTORANTE DELLA VILLA — Componenti (navbar, footer, overnav, ecc.)
 */

/* ── Overnav: fascia frasi a rotazione ───────────────────────────────────── */
.overnav {
  background: var(--color-accent-dark);
  color: #fff;
  font-size: 0.85rem;
  text-align: center;
  overflow: hidden;
}
.overnav__track { position: relative; height: 2.2rem; max-width: var(--container-max); margin: 0 auto; padding: 0 1.5rem; }
.overnav__msg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.overnav__msg.is-active { opacity: 1; }

/* ── Header / Navbar ─────────────────────────────────────────────────────── */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 30;
}
.navbar {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.navbar__logo-img { display: block; height: 40px; width: auto; }

.navbar__menu {
  list-style: none;
  display: flex;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
}
.navbar__link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
}
.navbar__link i { color: var(--color-muted); }
.navbar__link--active,
.navbar__link:hover { color: var(--color-accent); }
.navbar__link--active i,
.navbar__link:hover i { color: var(--color-accent); }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--color-accent-dark);
  color: rgba(255,255,255,0.85);
  margin-top: 3rem;
}
.footer__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}
.footer__heading { color: #fff; font-size: 1rem; margin-bottom: 0.75rem; }
.footer__list { list-style: none; padding: 0; margin: 0; }
.footer__list li { margin-bottom: 0.5rem; }
.footer__list a { color: rgba(255,255,255,0.85); text-decoration: none; }
.footer__list a:hover { text-decoration: underline; }
.footer__about { font-size: 0.9rem; opacity: 0.8; margin-top: 0.75rem; }
.footer__social { display: flex; flex-direction: column; gap: 0.5rem; }
.footer__social a { color: rgba(255,255,255,0.85); text-decoration: none; display: flex; align-items: center; gap: 0.4rem; }
.footer__social a:hover { text-decoration: underline; }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  opacity: 0.9;
}
.footer__copy { margin: 0; }

/* ── Language switcher ───────────────────────────────────────────────────── */
.lang-switcher { position: relative; }
.lang-switcher__current {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-pill);
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  font-size: 0.85rem;
}
.lang-switcher__flag { font-size: 1rem; }
.lang-switcher__dropdown {
  list-style: none;
  margin: 0;
  padding: 0.4rem;
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 0;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  min-width: 160px;
  display: none;
  z-index: 40;
}
.lang-switcher.is-open .lang-switcher__dropdown { display: block; }
.lang-switcher__dropdown a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.9rem;
}
.lang-switcher__dropdown a:hover { background: var(--color-bg); }
.lang-switcher__item--active { font-weight: 600; color: var(--color-accent) !important; }

/* ── Cookie banner ───────────────────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  left: 1rem;
  bottom: -140px;
  background: #fff;
  color: var(--color-text);
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0,0,0,0.18);
  padding: 1rem 1.25rem;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: bottom 0.3s ease;
  z-index: 50;
}
.cookie-banner--visible { bottom: 1rem; }
.cookie-banner__text { margin: 0; font-size: 0.9rem; }
.cookie-banner__actions { display: flex; gap: 0.5rem; }
.cookie-btn { border: none; border-radius: 8px; padding: 0.5rem 0.9rem; cursor: pointer; }
.cookie-btn--accept { background: var(--color-accent); color: #fff; }
.cookie-btn--decline { background: #eee; color: var(--color-text); }
.cookie-trigger {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  display: none;
  border: none;
  background: var(--color-accent-dark);
  color: #fff;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  cursor: pointer;
  z-index: 49;
}
.cookie-trigger--visible { display: block; }

/* ── Hero (home) ─────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.55)), var(--color-accent-dark);
  color: #fff;
  text-align: center;
  padding: 5rem 1.5rem;
}
.hero__inner { max-width: 760px; margin: 0 auto; }
.hero__title { color: #fff; }
.hero__subtitle { font-size: 1.1rem; opacity: 0.92; margin-bottom: 2rem; }
.hero__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero .btn--secondary { border-color: #fff; }

.menu-category { margin-bottom: 2rem; }

/* ── 404 ─────────────────────────────────────────────────────────────────── */
.page-404 .container { max-width: 600px; margin: 6rem auto; text-align: center; }
.page-404 h1 { font-size: 4rem; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 780px) {
  .hamburger { display: flex; }

  .navbar__menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
    display: none;
  }
  .navbar.is-open .navbar__menu { display: flex; }
  .navbar__item { border-top: 1px solid var(--color-border); }
  .navbar__link { padding: 0.85rem 1.5rem; }

  .hero { padding: 3.5rem 1.25rem; }
  .hero__title { font-size: 1.9rem; }

  .footer__bottom { justify-content: center; text-align: center; }
}
