/* =========================================================
   RESPONSIVE – alle @media-Queries
   =========================================================

   TEST-CHECKLIST
   ── Breakpoints: 1024 / 760 / 480 / 380 px
   ── Hero-Split: 1 Spalte ab 760 px, Bild oben (order:-1)
   ── Header: Logo 54 px → 44 px ab 760 px
   ── Footer-Grid: 4 Sp. → 2 Sp. (760) → 1 Sp. (480)
   ── Galerie-Karussell: scroll-padding-inline:1.5rem ab 760 px
   ── Buttons: 100 % Breite in .cta-band + .order-online ab 480 px
   ── Cards: einheitliches Padding + min-height ab 480 px
   ── Lieferservice-Grids: grid-auto-rows:1fr (Karten gleich hoch)
   ── iOS Safari: -webkit-tap-highlight-color transparent,
                  input/button font-family inherit
   ── Manuelle Tests: iPhone SE (375 px), iPhone 14 (390 px),
                      iPad Mini (768 px), Desktop 1280 px
   ========================================================= */

/* ----- iOS Safari – globale Fixes (kein @media) --------- */
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

input,
button,
select,
textarea {
  font-family: inherit;
}

/* ----- Karten gleiche Höhe in ihren Grids --------------- */
.delivery-info,
.bestell-grid {
  grid-auto-rows: 1fr;
}

/* =========================================================
   1024 px – Tablets / kleine Laptops
   ========================================================= */
@media (max-width: 1024px) {
  .split {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .split-image {
    aspect-ratio: 4 / 5;
    max-width: 600px;
    margin: 0 auto;
  }

  .owner-image {
    aspect-ratio: 733 / 1010;
    max-width: 520px;
  }

  .split-image picture,
  .split-image img { aspect-ratio: 4 / 5; }

  .owner-image picture,
  .owner-image img { aspect-ratio: 733 / 1010; }

  .split-image img {
    width: 100%;
    height: 100%;
    margin: 0;
  }

  .owner-image img {
    object-fit: contain;
    object-position: center;
  }

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

  .bestell-grid-5,
  .page-lieferservice .bestell-grid-5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-bottom: 0;
  }
  .bestell-grid-5 > :nth-child(even) { transform: none; }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem;
  }

  .footer-brand { grid-column: 1 / -1; }

  .delivery-zones { grid-template-columns: 1fr; gap: 2rem; }
  .zone-map { max-width: 200px; margin: 0 auto; }
}

/* =========================================================
   760 px – Mobile Navigation + Hero-Collapse
   ========================================================= */
@media (max-width: 760px) {
  :root { --header-height: var(--header-height-mobile); }

  section { padding-block: clamp(2rem, 6vw, 3rem); }

  .section-alt { padding: 2.75rem 0 3.5rem; }

  .cta-band { padding: 3rem 1.5rem; margin-top: 1rem; }

  .call-cta { padding: 3rem 1.5rem; }

  .bestell-grid-5,
  .page-lieferservice .bestell-grid-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .delivery-zones { padding: 1.75rem; }
  .zone-lists { grid-template-columns: 1fr; }
  .zone-lists::before { display: none; }
  .delivery-zone { padding: 0; border-bottom: 1px solid var(--border); padding-bottom: 1.25rem; margin-bottom: 1.25rem; }
  .delivery-zone:last-child { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }

  .site-footer { padding-top: 2.5rem; }

  /* --- Mobile Nav --- */
  .menu-toggle { display: block; }

  .nav-list {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 105;
    width: min(84vw, 340px);
    max-width: 100%;
    height: 100dvh;
    min-height: 100vh;
    background: var(--accent);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.35rem;
    padding: calc(var(--header-height) + 1.25rem) 1.25rem 1.5rem;
    transform: translateX(100%);
    transition: transform var(--transition);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.4);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .nav-list.is-open { transform: translateX(0); }
  .nav-list li { width: 100%; }

  .nav-list a {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 0.85rem 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    width: 100%;
    font-size: 1.05rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .nav-list a::after { display: none; }
  .nav-list a:hover,
  .nav-list a:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
  }

  .nav-list a.active {
    border-bottom-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.13);
    padding-bottom: 0.85rem;
  }

  .nav-cta {
    margin-top: 1rem;
    text-align: center;
    border-bottom: 0 !important;
  }

  .brand picture,
  .brand img {
    height: 47px;
    max-height: calc(var(--header-height) - 9px);
  }

  .nowrap {
    white-space: normal;
  }

  .section-head p.lead-wide {
    white-space: normal;
  }

  .page-hero p,
  .section-head p,
  .hero p,
  .cta-band p,
  .contact-list .value,
  .opening-hours li {
    overflow-wrap: anywhere;
  }

  /* --- Hero-Split: Bild oben, Text unten --- */
  .hero { min-height: auto; }

  .hero-split {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1.5rem;
    width: 100%;
    max-width: var(--container-max);
    min-width: 0;
  }

  .hero-split > *,
  .hero-content {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  .hero-image {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0.55rem;
  }

  .hero-image picture { aspect-ratio: 4 / 3; }

  /* --- Galerie --- */
  .gallery-arrow { display: none; }

  .gallery-scroll {
    scroll-padding-inline: 1.5rem;
    padding-inline: 0;
  }

  /* --- Footer --- */
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
  .footer-brand { grid-column: 1 / -1; }

  .footer-bottom { justify-content: center; text-align: center; }

  /* --- PDF --- */
  .pdf-viewer iframe,
  .pdf-viewer object { height: 75vh; }

  .pdf-actions { flex-direction: column; }
  .pdf-actions .btn { width: 100%; justify-content: center; }
}

/* =========================================================
   480 px – Kleine Smartphones
   ========================================================= */
@media (max-width: 480px) {
  .container { padding: 0 1rem; }

  .hero h1 { font-size: 1.85rem; }

  .hero h1 .nowrap {
    white-space: normal;
  }

  .hero p {
    font-size: 1rem;
    line-height: 1.55;
  }

  .hero-points {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .hero-points li {
    min-width: 0;
    text-align: center;
  }

  /* Alle CTA-Aktionen: Buttons full-width */
  .hero-actions,
  .cta-band .hero-actions,
  .order-online-actions,
  .pdf-actions,
  .flyer-cta {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn,
  .cta-band .hero-actions .btn,
  .order-online-actions .btn,
  .pdf-actions .btn,
  .flyer-cta .btn,
  .map-action .btn {
    width: 100%;
    max-width: 100%;
    justify-content: center;
  }

  /* --- Footer: 1 Spalte --- */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-brand img { margin-left: auto; margin-right: auto; }

  /* --- Cards: einheitliches Padding --- */
  .feature-card,
  .story-card,
  .info-card,
  .bestell-card {
    padding: 1.5rem;
    min-height: auto;
  }

  .bestell-grid-5,
  .page-lieferservice .bestell-grid-5 {
    grid-template-columns: 1fr;
  }
  .bestell-card-5 { padding: 1.25rem; }

  /* --- Bestell-Actions in Telefonisch-Karte --- */
  .bestell-actions { gap: 0.55rem; }
  .bestell-card-5 .bestell-actions {
    grid-template-columns: 1fr;
  }

  .opening-hours li {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.1rem;
  }

  .speisekarte-cta .btn-primary,
  body.page-speisekarte .speisekarte-cta .btn-primary {
    width: 100%;
    max-width: 100%;
    justify-content: center;
    padding-inline: 1rem;
  }

}

/* =========================================================
   380 px – iPhone SE und ähnliche
   ========================================================= */
@media (max-width: 380px) {
  .container { padding: 0 0.75rem; }

  .hero-split {
    padding: 0 0.75rem;
  }

  .hero h1 { font-size: 1.68rem; }

  .gallery-scroll figure {
    width: clamp(220px, 80vw, 300px);
  }

  .btn,
  .btn-lg,
  .btn-large {
    width: 100%;
    max-width: 100%;
    justify-content: center;
    padding-inline: 1rem;
  }

  .hero-actions,
  .cta-band .hero-actions,
  .order-online-actions,
  .pdf-actions,
  .flyer-cta,
  .map-action {
    width: 100%;
  }

  .call-cta > .container {
    padding-inline: 0;
  }
}

@media (max-width: 760px) {
  body.page-speisekarte {
    isolation: isolate;
    min-height: 100%;
    height: auto;
    -webkit-overflow-scrolling: touch;
  }
  body.page-speisekarte.nav-open {
    overflow-x: hidden;
    overflow-y: auto;
  }
  body.page-speisekarte main,
  body.page-speisekarte #site-footer {
    flex: 0 0 auto;
    min-height: 0;
  }
  body.page-speisekarte .site-footer {
    position: static;
  }
  body.page-speisekarte::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
      linear-gradient(rgba(216, 209, 196, .25), rgba(216, 209, 196, .25)),
      url('../assets/images/ueberblick-speisen-peperoni-bg-portrait.webp') center center / cover no-repeat #d8d1c4;
  }
  body.page-speisekarte .cta-band { backdrop-filter: none; -webkit-backdrop-filter: none; }
}

@media (max-width: 760px) {
  [data-hero-variant="2"] {
    background-attachment: scroll;
    background-position: center center;
    background-size: cover;
    min-height: auto;
  }
}
