/* ============================================
   Mariotto Management — Mobile & Responsive
   MUST be linked AFTER all <style> blocks
   ============================================ */

/* ═══════════════════════════════════════════
   TABLET — max-width: 900px
   ═══════════════════════════════════════════ */
@media (max-width: 900px) {

  /* ── HEADER (all pages) ── */
  header {
    padding: 0 20px;
    grid-template-columns: 1fr auto;
    height: 56px;
  }
  .header-right {
    gap: 16px;
  }

  /* ── HEADER (index.html — with filters) ── */
  header.has-filters {
    grid-template-columns: 1fr auto;
    grid-template-rows: 56px auto;
    height: auto;
  }
  .header-left {
    grid-column: 1;
    grid-row: 1;
  }
  .header-filters {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: center;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    border-top: 1px solid rgba(0,0,0,0.04);
  }
  .header-filters::-webkit-scrollbar { display: none; }
  .filter-btn {
    padding: 14px 24px;
    font-size: 0.68rem;
    white-space: nowrap;
  }

  /* ── CARD GRID (index.html) ── */
  .grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 12px 20px;
    gap: 12px;
  }
  .model-count { right: 20px; }

  /* ── MODEL PAGE — CINEMA HERO ── */
  .cinema { height: 80vh; }
  .cinema-info {
    bottom: 32px;
    gap: 20px;
    padding: 0 24px;
  }
  .cinema-name {
    font-size: clamp(2rem, 10vw, 3.5rem);
  }
  .cinema-stats { gap: 16px; }
  .cinema-stat-key { font-size: 0.7rem; }
  .cinema-stat-val { font-size: 0.8rem; }

  /* ── MODEL PAGE — HERO SPLIT (legacy layout) ── */
  .hero-split {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-photo {
    position: relative;
    top: 0;
    height: 70vw;
  }
  .hero-info {
    padding: 40px 24px;
    border-left: none;
    border-top: 1px solid var(--light);
  }

  /* ── GALLERY ── */
  .gallery-section { padding: 40px 20px; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-nav { margin-bottom: 20px; }

  /* ── LIGHTBOX — fullscreen single-image mode ── */
  .lightbox {
    background: rgba(0,0,0,1);
  }
  .lightbox-slide {
    flex: 0 0 100vw;
  }
  .lightbox-slide.slide-center img,
  .lightbox-slide.slide-center video {
    max-width: 92vw;
    max-height: 85vh;
  }
  .lightbox-slide img,
  .lightbox-slide video {
    max-width: 92vw;
    max-height: 85vh;
    transition: none;
    filter: none;
  }
  .lightbox-prev { left: 4px; padding: 28px; }
  .lightbox-next { right: 4px; padding: 28px; }
  .lightbox-close { top: 16px; right: 16px; padding: 16px; }
  .lightbox-counter { bottom: 24px; }
  .lightbox-prev,
  .lightbox-next { display: none; }
  /* ── NAV OVERLAY ── */
  .nav-overlay-links {
    flex-direction: column;
    align-items: center;
    gap: 24px;
    margin-top: 28px;
  }
  .nav-overlay-close {
    top: 20px;
    right: 20px;
  }

  /* ── CONTACT MODAL ── */
  .contact-modal-box {
    padding: 36px 28px;
    width: 94%;
  }
  .contact-modal-item {
    padding: 18px 0;
    min-height: 48px;
  }
  .contact-modal-logo { height: 40px; margin-bottom: 24px; }
  .contact-modal-label { margin-bottom: 24px; }

  /* ── FOOTER ── */
  footer {
    flex-direction: column;
    gap: 16px;
    text-align: center;
    padding: 24px;
    height: auto !important;
  }
  .footer-brand,
  .footer-copy { flex: none; }
  .footer-right { flex: none; justify-content: center; }

  /* ── ABOUT PAGE ── */
  .about-layout {
    grid-template-columns: 1fr;
    grid-template-areas: "left" "right";
    position: relative;
    min-height: 100vh;
  }
  .about-left {
    overflow-y: visible;
    padding: 100px 28px 48px;
  }
  .about-right {
    padding: 48px 28px;
    border-right: none;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
}


/* ═══════════════════════════════════════════
   PHONE — max-width: 560px
   ═══════════════════════════════════════════ */
@media (max-width: 560px) {

  /* ── HEADER ── */
  header { padding: 0 16px; }
  .site-name { display: none; }
  .header-right { gap: 12px; }
  .header-instagram svg { width: 28px; height: 28px; }
  .theme-toggle { width: 28px; height: 28px; }

  /* ── FILTER BUTTONS ── */
  .filter-btn {
    padding: 12px 18px;
    font-size: 0.62rem;
  }

  /* ── CARD GRID — 2 columns, tighter ── */
  .grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 8px 12px;
    gap: 8px;
  }
  .card-model-name {
    font-size: 0.65rem;
    letter-spacing: 0.18em;
  }
  .card-meta { padding: 10px 12px; }

  /* ── GALLERY — 2 columns ── */
  .gallery-section { padding: 32px 12px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-nav {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  /* ── CINEMA ── */
  .cinema { height: 70vh; }
  .cinema-info { bottom: 24px; gap: 16px; }
  .cinema-name { font-size: clamp(1.6rem, 8vw, 2.5rem); }
  .cinema-stats { gap: 10px 16px; }
  .cinema-stat-key { font-size: 0.58rem; letter-spacing: 0.1rem; }
  .cinema-stat-val { font-size: 0.7rem; }

  /* ── CARD HOVER OVERLAY — smaller stats grid ── */
  .card-stats { gap: 8px 32px; }
  .cs-key { font-size: 0.6rem; }
  .cs-val { font-size: 0.65rem; }

  /* ── ABOUT PAGE ── */
  .about-left { padding: 80px 20px 40px; }
  .about-right { padding: 40px 20px; }
  .about-section p {
    font-size: 0.82rem;
    line-height: 1.9;
  }

  /* ── CONTACT MODAL ── */
  .contact-modal-box { padding: 28px 20px; }

  /* ── FOOTER ── */
  footer { padding: 20px 16px; }
  .footer-brand { font-size: 0.75rem; }
  .footer-copy { font-size: 0.5rem; }
}


/* ═══════════════════════════════════════════
   ABOUT PAGE — unlock scroll on mobile
   (html/body overflow:hidden is set inline)
   ═══════════════════════════════════════════ */
@media (max-width: 900px) {
  html, body {
    overflow-y: auto !important;
    height: auto !important;
  }
}
