/*
Theme Name: Milano Kallstadt
Theme URI: https://example.com/milano-kallstadt
Author: Milano
Description: One-page restaurant theme with animated hero, synchronized PDF menu tiles, gallery, bilingual controls and responsive navigation.
Version: 1.5.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: milano-kallstadt
*/

:root {
  --paper: #f0eae4;
  --paper-deep: #e2d8ce;
  --ink: #4a4a4a;
  --charcoal: #2d2b2a;
  --red: #d20a24;
  --red-dark: #a8051a;
  --gold: #c79a3b;
  --white: #fff;
  --header-h: 80px;
  --shadow: 0 18px 50px rgba(25, 18, 13, .22);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { max-width: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: museo-slab, Rockwell, Georgia, serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.65;
  overflow-x: hidden;
}
body.modal-open { overflow: hidden; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.wrap { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.section { position: relative; padding: 100px 0; scroll-margin-top: var(--header-h); }
.section-kicker {
  margin: 0 0 6px;
  color: var(--red);
  font-size: .86rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.section-title {
  margin: 0 0 28px;
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.12;
  text-transform: uppercase;
}
.script-title {
  margin: 0;
  color: var(--red);
  font-family: "Mr Dafoe", "Brush Script MT", cursive;
  font-size: clamp(3.2rem, 7vw, 6rem);
  font-weight: 400;
  line-height: .9;
}

/* Header */
.site-header {
  position: fixed;
  z-index: 1000;
  inset: 0 0 auto;
  height: var(--header-h);
  background: rgba(44, 42, 41, .92);
  box-shadow: 0 2px 14px rgba(0,0,0,.14);
  backdrop-filter: blur(8px);
  transition: background .3s ease, box-shadow .3s ease;
}
.site-header.is-scrolled { background: rgba(35, 33, 32, .98); box-shadow: 0 8px 28px rgba(0,0,0,.22); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand {
  align-self: flex-start;
  width: 230px;
  height: 108px;
  padding: 9px 14px 13px;
  background: #fff;
  border-radius: 0 0 26px 26px;
  box-shadow: 0 8px 26px rgba(0,0,0,.25);
  overflow: hidden;
  flex: 0 0 auto;
}
.brand img { width: 100%; height: 100%; object-fit: contain; }
.header-contact { color: #fff; font-size: .8rem; line-height: 1.4; margin-right: auto; }
.header-contact a { text-decoration: none; }
.primary-nav ul { display: flex; align-items: center; gap: 26px; list-style: none; padding: 0; margin: 0; }
.primary-nav a {
  color: #fff;
  text-decoration: none;
  font-size: .93rem;
  font-weight: 700;
  letter-spacing: .055em;
  text-transform: uppercase;
  transition: color .2s ease;
}
.primary-nav a:hover, .primary-nav a.is-active { color: #ef5265; }
.primary-nav a:focus-visible, .language-switch button:focus-visible, .nav-toggle:focus-visible, .button:focus-visible, .modal button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.language-switch { display: flex; border: 1px solid rgba(255,255,255,.55); border-radius: 8px; overflow: hidden; }
.language-switch button { border: 0; padding: 5px 8px; color: #fff; background: transparent; cursor: pointer; }
.language-switch button.is-active { color: #fff; background: var(--red); }
.nav-toggle { display: none; width: 46px; height: 42px; border: 0; background: transparent; cursor: pointer; }
.nav-toggle span { display: block; height: 3px; margin: 7px 0; background: #fff; transition: transform .25s, opacity .25s; }

/* Hero */
.hero { position: relative; height: max(660px, 88vh); min-height: 620px; overflow: hidden; background: #211c18; }
.hero-slides, .hero-slide { position: absolute; inset: 0; }
.hero-slide {
  opacity: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.08);
  transition: opacity 1.2s ease, transform 8s ease;
}
.hero-slide.is-active { opacity: 1; transform: scale(1); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.62), rgba(0,0,0,.18) 55%, rgba(0,0,0,.38)); }
.hero-content { position: relative; z-index: 2; display: grid; align-content: center; height: 100%; padding-top: var(--header-h); color: #fff; }
.hero-copy { width: min(690px, 75%); animation: heroIn 1s .2s both; }
.hero-eyebrow { margin: 0 0 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.hero h1 { margin: 0 0 20px; font-size: clamp(3rem, 7vw, 6.7rem); line-height: .91; text-shadow: 0 8px 30px rgba(0,0,0,.4); }
.hero h1 em { display: block; color: #fff; font-family: "Mr Dafoe", "Brush Script MT", cursive; font-weight: 400; }
.hero p { max-width: 610px; margin: 0 0 28px; font-size: clamp(1rem, 2vw, 1.25rem); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid var(--red);
  border-radius: 3px;
  background: var(--red);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .035em;
  cursor: pointer;
  transition: transform .2s, background .2s, border-color .2s;
}
.button:hover { transform: translateY(-2px); background: var(--red-dark); border-color: var(--red-dark); }
.button-outline { background: transparent; border-color: rgba(255,255,255,.75); }
.scroll-cue { position: absolute; z-index: 3; left: 50%; bottom: 26px; width: 40px; height: 40px; transform: translateX(-50%) rotate(45deg); border-right: 4px solid #fff; border-bottom: 4px solid #fff; animation: bounce 1.6s infinite; }
.floating-phone { position: fixed; z-index: 990; right: 0; top: 108px; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px 0 0 18px; background: var(--red); color: #fff; text-decoration: none; font-size: 1.9rem; box-shadow: 0 10px 30px rgba(0,0,0,.25); }

/* Restaurant */
.restaurant { overflow: clip; background: var(--paper); text-align: center; }
.restaurant::before { content: ""; position: absolute; right: -50px; top: 90px; width: 210px; height: 330px; opacity: .08; background: url('assets/images/menu-cover-red.jpg') center/cover no-repeat; transform: rotate(8deg); }
.lead { max-width: 920px; margin: 0 auto 34px; font-size: 1.16rem; }
.restaurant-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; max-width: 980px; margin: 42px auto 0; text-align: left; }
.restaurant-columns p { margin-top: 0; }
.feature-strip { display: grid; grid-template-columns: repeat(3, 1fr); background: #111; }
.feature-strip figure { position: relative; height: 310px; margin: 0; overflow: hidden; }
.feature-strip img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease, filter .7s ease; }
.feature-strip figure:hover img { transform: scale(1.07); filter: saturate(1.15); }

/* Menu */
.menu-section { color: #fff; background: #171514 url('assets/images/fire.jpg') center/cover fixed; }
.menu-section::before { content: ""; position: absolute; inset: 0; background: rgba(26,22,20,.86); }
.menu-section .wrap { position: relative; z-index: 1; }
.menu-heading { text-align: center; }
.menu-heading .section-kicker { color: #ff6878; }
.menu-heading p { max-width: 700px; margin: 0 auto 46px; color: rgba(255,255,255,.76); }
.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.menu-card { position: relative; min-height: 260px; padding: 0; border: 0; overflow: hidden; color: #fff; background: #292321; cursor: pointer; text-align: left; box-shadow: 0 12px 32px rgba(0,0,0,.3); }
.menu-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .55s ease, filter .55s ease; }
.menu-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.06), rgba(0,0,0,.78)); }
.menu-card span { position: absolute; z-index: 2; left: 22px; right: 22px; bottom: 18px; display: flex; justify-content: space-between; align-items: end; gap: 12px; font-size: 1.35rem; font-weight: 700; text-transform: uppercase; }
.menu-card small { color: #ffd5da; font-size: .72rem; font-weight: 400; letter-spacing: .06em; }
.menu-card:hover img, .menu-card:focus-visible img { transform: scale(1.08); filter: saturate(1.2); }
.menu-card:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.menu-download { margin-top: 34px; text-align: center; }

/* News */
.news { background: var(--paper); }
.news-card { display: grid; grid-template-columns: minmax(280px, .8fr) 1.2fr; align-items: stretch; max-width: 1000px; margin: 0 auto; background: #fff; box-shadow: var(--shadow); }
.news-image { min-height: 390px; background: #ebe7dc url('assets/images/menu-cover-red.jpg') center/contain no-repeat; }
.news-copy { padding: 54px; align-self: center; }
.news-copy time { color: var(--red); font-weight: 700; }
.news-copy h3 { margin: 8px 0 18px; font-size: 2rem; line-height: 1.15; }

/* Gallery */
.gallery-section { color: #fff; background: #4a4a4a; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 190px; gap: 7px; }
.gallery-item { position: relative; padding: 0; border: 0; overflow: hidden; background: #222; cursor: zoom-in; }
.gallery-item:nth-child(1), .gallery-item:nth-child(4) { grid-column: span 2; grid-row: span 2; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, opacity .5s ease; }
.gallery-item:hover img { transform: scale(1.07); opacity: .78; }

/* Directions */
.directions { padding: 0; background: #222; }
.map-frame { display: block; width: 100%; height: 500px; border: 0; filter: grayscale(.15) contrast(1.03); }
.contact-panel { position: relative; z-index: 2; width: min(1120px, calc(100% - 40px)); margin: -105px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--red); color: #fff; box-shadow: var(--shadow); }
.contact-panel > div { padding: 34px 42px; background: rgba(45,43,42,.97); }
.contact-panel h3 { margin: 0 0 8px; font-size: 1.35rem; text-transform: uppercase; }
.contact-panel p { margin: 0; }
.contact-panel a { color: #fff; text-decoration: none; }
.site-footer { padding: 38px 20px; color: rgba(255,255,255,.72); background: #242221; text-align: center; }
.site-footer a { color: #fff; }
.privacy-settings-link { padding: 0; border: 0; color: #fff; background: transparent; text-decoration: underline; cursor: pointer; }
.map-consent { display: grid; place-items: center; min-height: 500px; padding: 40px 20px; color: #fff; background: linear-gradient(rgba(30,28,27,.84), rgba(30,28,27,.84)), url('assets/images/venue-5.jpg') center/cover; text-align: center; }
.map-consent[hidden] { display: none; }
.map-consent > div { width: min(560px, 100%); padding: 38px; background: rgba(36,34,33,.94); box-shadow: var(--shadow); }
.map-consent h3 { margin: 0 0 10px; font-size: 1.7rem; text-transform: uppercase; }

/* Legal pages and privacy consent */
.legal-page { min-height: 70vh; padding: calc(var(--header-h) + 76px) 0 90px; background: var(--paper); }
.legal-content { width: min(860px, calc(100% - 40px)); margin: 0 auto; }
.legal-content h1 { margin: 0 0 34px; color: var(--charcoal); font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1; text-transform: uppercase; }
.legal-content h2 { margin: 42px 0 12px; color: var(--charcoal); font-size: 1.45rem; }
.legal-content h3 { margin: 28px 0 8px; color: var(--charcoal); font-size: 1.12rem; }
.legal-content p, .legal-content li { max-width: 76ch; }
.legal-content a { color: var(--red-dark); }
.consent-banner { position: fixed; z-index: 3000; inset: 0; display: grid; place-items: end center; padding: 22px; background: rgba(18,15,13,.62); }
.consent-banner[hidden] { display: none; }
.consent-card { width: min(760px, 100%); padding: 30px; border-top: 4px solid var(--red); background: #fff; color: var(--ink); box-shadow: 0 25px 80px rgba(0,0,0,.42); }
.consent-card h2 { margin: 0 0 8px; color: var(--charcoal); }
.consent-card p { margin: 8px 0; }
.consent-card a { color: var(--red-dark); }
.consent-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 22px; }
.button-outline-dark { color: var(--charcoal); border-color: #777; background: transparent; }
.button-outline-dark:hover { color: #fff; }

/* Modals */
.modal { position: fixed; z-index: 2000; inset: 0; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(18,15,13,.93); }
.modal.is-open { display: flex; animation: fadeIn .25s ease both; }
.modal-dialog { position: relative; width: min(1180px, 96vw); height: min(860px, 92vh); background: #fff; box-shadow: 0 30px 90px rgba(0,0,0,.5); }
.modal iframe { width: 100%; height: 100%; border: 0; background: #ddd; }
.modal-close { position: absolute; z-index: 2; right: 12px; top: 12px; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; color: #fff; background: var(--red); font-size: 1.8rem; line-height: 1; cursor: pointer; box-shadow: 0 5px 18px rgba(0,0,0,.3); }
.lightbox-image { width: 100%; height: 100%; object-fit: contain; background: #111; }
.menu-viewer { display: grid; grid-template-rows: minmax(0, 1fr) auto; background: #262321; }
.menu-page-scroll { min-height: 0; overflow: auto; display: grid; place-items: center; overscroll-behavior: contain; background: #262321; }
.menu-page-zoom { position: relative; display: grid; place-items: center; width: 100%; height: 100%; min-height: 0; padding: 0; border: 0; color: #fff; background: #262321; cursor: zoom-in; }
.menu-page-zoom::after { content: '+'; position: absolute; right: 14px; bottom: 14px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(20,17,16,.82); font: 700 1.6rem/1 sans-serif; }
.menu-page-image { display: block; width: 100%; height: 100%; object-fit: contain; min-height: 0; background: #262321; }
.menu-page-scroll.is-zoomed { display: flex; justify-content: flex-start; align-items: flex-start; }
.menu-page-scroll.is-zoomed .menu-page-zoom { display: block; flex: 0 0 180%; width: 180%; height: auto; cursor: zoom-out; }
.menu-page-scroll.is-zoomed .menu-page-image { width: 100%; height: auto; max-width: none; object-fit: initial; }
.menu-page-scroll.is-zoomed .menu-page-zoom::after { content: '−'; }
.menu-viewer-controls { display: flex; align-items: center; justify-content: center; gap: 16px; min-height: 58px; padding: 8px 72px 8px 16px; color: #fff; background: #191716; }
.menu-viewer-controls button { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; color: #fff; background: transparent; font-size: 1.8rem; cursor: pointer; }
.menu-viewer-controls button:disabled { opacity: .3; cursor: default; }
.menu-viewer-controls a { margin-left: 12px; color: #fff; font-weight: 700; }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@keyframes heroIn { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes bounce { 0%,100% { transform: translateX(-50%) rotate(45deg) translate(0,0); opacity: .7; } 50% { transform: translateX(-50%) rotate(45deg) translate(8px,8px); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 1050px) {
  .brand { width: 190px; }
  .header-contact { display: none; }
  .menu-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 820px) {
  :root { --header-h: 70px; }
  .wrap { width: min(1120px, calc(100% - 32px)); }
  .site-header { height: var(--header-h); }
  .header-inner { gap: 10px; justify-content: space-between; }
  .brand { position: static; align-self: center; width: 148px; height: 58px; margin-right: auto; padding: 4px 7px; border-radius: 8px; }
  .language-switch { flex: 0 0 auto; }
  .language-switch button { min-width: 40px; min-height: 40px; }
  .nav-toggle { display: block; flex: 0 0 44px; width: 44px; height: 44px; padding: 8px; }
  .nav-toggle span:not(.screen-reader-text) { margin: 5px 0; }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(8px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .primary-nav { position: absolute; left: 0; right: 0; top: var(--header-h); max-height: 0; overflow: hidden; background: rgba(38,36,35,.98); box-shadow: 0 12px 24px rgba(0,0,0,.25); transition: max-height .35s ease; }
  .primary-nav.is-open { max-height: calc(100dvh - var(--header-h)); overflow-y: auto; }
  .primary-nav ul { display: block; padding: 12px 22px 22px; }
  .primary-nav li { border-bottom: 1px solid rgba(255,255,255,.12); }
  .primary-nav a { display: block; padding: 13px 0; }
  .hero { height: auto; min-height: max(580px, 100svh); }
  .hero-content { height: auto; min-height: max(580px, 100svh); padding-top: calc(var(--header-h) + 54px); padding-bottom: 76px; }
  .hero-copy { width: min(100%, 650px); }
  .hero h1 { font-size: clamp(3rem, 11vw, 5rem); }
  .restaurant-columns { grid-template-columns: 1fr; gap: 8px; }
  .feature-strip { grid-template-columns: 1fr; }
  .feature-strip figure { height: 240px; }
  .news-card { grid-template-columns: 1fr; }
  .news-image { min-height: 0; aspect-ratio: 1.5; }
  .news-copy { padding: 38px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-panel { grid-template-columns: 1fr; margin-top: -45px; }
  .menu-section { background-attachment: scroll; }
}

@media (max-width: 560px) {
  :root { --header-h: 64px; }
  .wrap { width: calc(100% - 28px); }
  .section { padding: 68px 0; }
  .section-title { font-size: clamp(1.8rem, 8vw, 2.3rem); overflow-wrap: anywhere; }
  .brand { width: clamp(110px, 35vw, 140px); height: 52px; }
  .language-switch button { min-width: 36px; min-height: 40px; padding: 5px; }
  .hero { min-height: max(560px, 100svh); }
  .hero-content { min-height: max(560px, 100svh); padding-top: calc(var(--header-h) + 54px); padding-bottom: 66px; }
  .hero-slide { background-position: center; }
  .hero::after { background: rgba(0,0,0,.48); }
  .hero h1 { font-size: clamp(2.8rem, 13vw, 4.4rem); overflow-wrap: anywhere; }
  .hero-eyebrow { font-size: .76rem; letter-spacing: .12em; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .button { width: 100%; }
  .floating-phone { display: none; }
  .feature-strip figure { height: 190px; }
  .menu-grid { grid-template-columns: 1fr; }
  .menu-card { min-height: 220px; }
  .menu-card span { left: 16px; right: 16px; bottom: 16px; font-size: clamp(1.05rem, 5vw, 1.3rem); }
  .menu-card strong { overflow-wrap: anywhere; }
  .menu-card small { flex: 0 0 auto; white-space: nowrap; }
  .gallery-grid { grid-auto-rows: 130px; }
  .gallery-item:nth-child(1), .gallery-item:nth-child(4) { grid-column: span 2; }
  .news-image { aspect-ratio: 1.15; }
  .news-copy { padding: 30px 22px; }
  .news-copy h3 { font-size: 1.7rem; }
  .contact-panel { width: calc(100% - 24px); }
  .contact-panel > div { padding: 24px 18px; min-width: 0; overflow-wrap: anywhere; }
  .contact-panel h3 { font-size: 1.1rem; }
  .map-consent, .map-frame { min-height: 390px; height: 390px; }
  .map-consent > div { padding: 24px 18px; }
  .modal { padding: 0; }
  .modal-dialog { width: 100%; height: 100dvh; max-height: 100dvh; }
  .modal-close { top: calc(10px + env(safe-area-inset-top)); right: 10px; }
  .menu-viewer { grid-template-rows: minmax(0, 1fr) auto; }
  .menu-page-scroll { padding-top: env(safe-area-inset-top); }
  .menu-viewer-controls { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; justify-items: center; gap: 8px 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); font-size: .92rem; }
  .menu-viewer-controls a { grid-column: 1 / -1; margin: 0; padding: 5px 12px; text-align: center; }
  .menu-viewer-controls button { width: 44px; height: 44px; }
  .legal-page { padding-top: calc(var(--header-h) + 42px); }
  .legal-content { width: calc(100% - 32px); overflow-wrap: anywhere; }
  .consent-actions { flex-direction: column-reverse; }
  .consent-banner { padding: 12px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .consent-card { max-height: calc(100dvh - 24px); overflow-y: auto; padding: 22px 18px; }
  .site-footer { padding: 30px 16px 82px; }
}

@media (max-width: 360px) {
  .header-inner { gap: 4px; }
  .brand { width: 104px; }
  .language-switch button { min-width: 33px; }
  .menu-card span { align-items: start; flex-direction: column; gap: 2px; }
  .gallery-grid { grid-auto-rows: 110px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
