/* ══════════════════════════════════════════════════════
   ALL MEDIA QUERIES — single source of truth
   Breakpoints: 1279 / 1023 / 879 / 599
   ══════════════════════════════════════════════════════ */

/* ── Mobile safety net: rotated panels, shadows and long comic titles
   should not create horizontal scroll. ── */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.container,
.hero-main,
.panel,
.event-panel,
.offer-card,
.info-panel,
.combo-strip,
.high-score-combo,
.booking-form-wrap,
.weekly-card,
.locale-activity,
.cabinet-card,
.flipper-card {
  min-width: 0;
}

.hero-title,
.hero-page-title,
.s-title,
.offer-name,
.event-name,
.combo-title,
.cabinet-title,
.flipper-title,
.weekly-title,
.locale-activity-title {
  overflow-wrap: anywhere;
}

.cta-strip-actions {
  flex-wrap: wrap;
}

/* ── 1024–1279: minor tightening ── */
@media (max-width: 1279px) {
  :root { --section-py: 72px; }

  .footer-grid { gap: 24px; }

  .hero-title { font-size: clamp(40px, 5.5vw, 80px); }
}

/* ── 880–1023: hide nav-links, show hamburger ── */
@media (max-width: 1023px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }

  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .menu-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── < 480px: prevent header overflow on smallest phones ── */
@media (max-width: 479px) {
  /* PRENOTA button is inside the mobile drawer — hide it from the header
     so the hamburger always has room to breathe */
  .site-header .nav-cta { display: none; }
}

/* ── < 880px: mobile layout ── */
@media (max-width: 879px) {
  :root {
    --section-py: 60px;
    --container-px: 20px;
  }

  /* Hero collapses to 1 column */
  .hero { margin-top: 0; }

  .hero-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .hero-main { padding: 36px 24px 28px; }
  .hero-stat--purple,
  .hero-stat--teal {
    border-right: none;
  }

  .hero-machine-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .hero-stat--purple .stat-num,
  .hero-stat--teal .stat-num {
    font-size: 56px;
  }

  /* About 1 col */
  .about-section .grid-2 { grid-template-columns: 1fr; gap: 32px; }

  /* Menu preview cards — explicit 2 columns on mobile */
  .menu-preview-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .about-photo-wrap { max-width: 380px; }

  /* Events 2 col */
  .events-grid { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }

  /* Offer / menu 2 col */
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .menu-grid { grid-template-columns: 1fr 1fr; }

  /* Booking 1 col */
  .booking-section-grid { grid-template-columns: 1fr; }
  .booking-form-wrap { padding: 28px 24px; }
  .form-row { grid-template-columns: 1fr; }

  /* Footer 2 col */
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 8px; }

  /* CTA strip stacks */
  .cta-strip .container { flex-direction: column; text-align: center; gap: 16px; }
  .cta-strip-actions { justify-content: center; }

  /* Combo strip stacks */
  .combo-strip { flex-direction: column; text-align: center; padding: 24px; }
  .high-score-combo { flex-direction: column; text-align: center; padding: 28px 24px; }

  /* Inner page hero: tighter padding */
  .hero-page { padding: 40px 0; }

  /* Menu / offer cards: prevent long Luckiest Guy words from blowing out 1fr columns */
  .offer-card { min-width: 0; }

  /* Event filter wraps */
  .event-filter { gap: 6px; }

  /* Header height */
  .site-header .container { height: 60px; }

  .hero-title,
  .hero-page-title,
  .s-title {
    text-shadow: 3px 3px 0 var(--bg);
  }
}

/* ── < 600px: small mobile ── */
@media (max-width: 599px) {
  .hero-grid { grid-template-rows: auto; }

  .hero-main { min-height: 280px; }
  .hero-main { padding: 30px 18px 24px; }

  .hero-title {
    font-size: 48px;
    text-shadow: 3px 3px 0 var(--bg);
  }

  .hero-page-title,
  .s-title {
    font-size: 44px;
    text-shadow: 3px 3px 0 var(--bg);
  }

  .s-title .marker {
    font-size: 34px;
  }

  .s-eyebrow {
    font-size: 15px;
    letter-spacing: 0.16em;
  }

  .hero-stat--purple,
  .hero-stat--teal {
    min-height: 140px;
  }

  .hero-machine-stats {
    gap: 16px;
  }

  .s-title { font-size: clamp(36px, 10vw, 64px); }

  .events-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }

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

  .arcade-grid { grid-template-columns: repeat(2, 1fr); }

  .cabinet-info,
  .flipper-info {
    padding: 56px 12px 12px;
  }

  .cabinet-title,
  .flipper-title {
    font-size: 18px;
  }

  .flipper-meta {
    flex-wrap: wrap;
    gap: 3px 8px;
  }

  .booking-form-wrap { padding: 24px 20px; }

  .stat-num { font-size: 64px; }
  .hero-stat--purple .stat-num,
  .hero-stat--teal .stat-num { font-size: 52px; }

  /* Menu offer cards — single column on small phones for readability */
  .menu-preview-grid { grid-template-columns: 1fr !important; }
  .menu-grid { grid-template-columns: 1fr !important; }
  .offer-card { padding: 20px 18px; }
  .offer-name { font-size: 28px; }

  .mobile-drawer {
    width: min(300px, calc(100vw - 24px));
    padding: 72px 24px 32px;
  }

  .mobile-nav-links li a,
  .mobile-nav-links a {
    font-size: 28px;
  }

  .cta-strip-title,
  .combo-title {
    font-size: 30px;
  }

  .cta-strip-actions,
  .footer-links {
    justify-content: center;
  }

  .lightbox-inner {
    max-width: calc(100vw - 28px);
  }

  .lightbox-inner--detail {
    width: calc(100vw - 28px);
    max-height: calc(100vh - 28px);
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .lightbox-media {
    min-height: 0;
    height: min(54vh, 360px);
    border-right: 0;
    border-bottom: 0;
  }

  .lightbox-inner--detail .lightbox-media img {
    max-height: min(54vh, 360px);
  }

  .lightbox-detail {
    padding: 24px 20px;
  }

  .lightbox-title {
    font-size: 34px;
    text-shadow: 3px 3px 0 var(--bg);
  }

  .game-included-banner {
    padding: 24px 20px;
    box-shadow: 5px 5px 0 var(--hot);
  }

  .game-included-title {
    font-size: 34px;
    text-shadow: 3px 3px 0 var(--bg);
  }

  .menu-challenge {
    padding: 24px 20px;
    box-shadow: 5px 5px 0 var(--hot);
  }

  .menu-challenge-title {
    font-size: 42px;
    text-shadow: 3px 3px 0 var(--ink);
  }

  .menu-challenge-text,
  .menu-challenge-rule {
    font-size: 16px;
  }

  .lightbox-close {
    top: -8px;
    right: -8px;
  }

  .lightbox-inner--detail .lightbox-close {
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
    font-size: 36px;
  }

  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

/* ── < 420px: narrow phones ── */
@media (max-width: 419px) {
  :root { --container-px: 16px; }

  .logo-wrap { gap: 8px; }
  .logo-img,
  .logo-mark {
    width: 40px;
    height: 40px;
  }
  .logo-name { font-size: 24px; }
  .logo-sub { display: none; }

  .hero-title { font-size: 42px; }
  .hero-stat--purple .stat-num,
  .hero-stat--teal .stat-num { font-size: 44px; }

  .arcade-grid,
  .flipper-grid {
    grid-template-columns: 1fr;
  }

  .cabinet-info,
  .flipper-info {
    padding: 72px 18px 18px;
  }

  .cabinet-title,
  .flipper-title {
    font-size: 22px;
  }

  .filter-btn {
    padding: 8px 14px;
    letter-spacing: 0.1em;
  }
}

/* ── Map section ── */
@media (max-width: 879px) {
  .map-section [style*="grid-template-columns:1fr 320px"] {
    grid-template-columns: 1fr !important;
  }
}

/* ── Reduced motion (global) ── */
@media (prefers-reduced-motion: reduce) {
  .mobile-drawer,
  .mobile-overlay,
  .lightbox-overlay,
  .hamburger span,
  .cabinet-card,
  .footer-social-item {
    transition: none !important;
  }

  /* Disable rotations on decorative elements */
  .tape,
  .burst,
  .hero-issue {
    transform: none !important;
  }
}
