/* ── TSULGI UNIVERSAL MOBILE CSS ───────────────────────────────────────────
   Included on every tsulgi.io page. Handles: overflow, nav, grids, spacing.
   Never edit per-page — edit this file only. Agent-managed.
   ────────────────────────────────────────────────────────────────────────── */

/* Prevent horizontal scroll universally */
html, body { overflow-x: hidden !important; max-width: 100vw; }
img, video, svg, iframe { max-width: 100%; height: auto; }

/* ── HAMBURGER (hidden on desktop, shown via JS injection on mobile) ── */
.tsulgi-hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 22px;
  height: 15px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  z-index: 300;
}
.tsulgi-hamburger span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.tsulgi-hamburger.open span:nth-child(1) { transform: translateY(6.75px) rotate(45deg); }
.tsulgi-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.tsulgi-hamburger.open span:nth-child(3) { transform: translateY(-6.75px) rotate(-45deg); }

/* ── MOBILE MENU OVERLAY ── */
.tsulgi-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: #0a0a0a;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 2.5rem 3rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  overflow-y: auto;
}
.tsulgi-mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}
.tsulgi-mobile-menu nav {
  position: static !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
}
.tsulgi-mobile-menu a {
  font-family: 'Inter', sans-serif;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: rgba(255,255,255,0.85) !important;
  -webkit-text-fill-color: rgba(255,255,255,0.85) !important;
  text-decoration: none;
  display: block;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
}
.tsulgi-mobile-menu a:last-child { border-bottom: none; }
.tsulgi-mobile-menu a.rainbow-link {
  background: linear-gradient(90deg, #ff6b6b, #ff9f43, #ffd23f, #06d6a0, #4361ee, #9b5de5) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}
.tsulgi-menu-footer {
  margin-top: 3rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.02em;
}

@media (max-width: 768px) {

  /* Show hamburger, hide desktop links */
  .tsulgi-hamburger { display: flex !important; }

  nav .nav-links,
  .nav .nav-links,
  #nav .nav-links,
  #main-nav .nav-links,
  nav ul.nav-links {
    display: none !important;
  }

  /* Hide existing mobile toggle buttons that conflict */
  .nav-mobile-toggle,
  .nav-toggle,
  #blogNavToggle,
  #navToggle {
    display: none !important;
  }

  /* Compact nav padding — no gap */
  nav, .nav, #nav, #main-nav {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }

  /* ── GRIDS — stack to single column ── */
  .card-grid,
  .card-grid-2,
  .card-grid-4,
  .contacts-grid,
  .photo-grid,
  .photo-grid-portrait,
  .form-grid,
  .preview-grid,
  .video-grid,
  .avail-stats-row {
    grid-template-columns: 1fr !important;
    columns: 1 !important;
  }

  .photo-grid-portrait {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* ── CONTENT PADDING ── */
  .content,
  .section-wrap,
  .unlock-strip,
  .contacts-grid,
  .page-header,
  .toolbar {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }

  /* ── DELIVERY PORTAL ── */
  .delivery-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 2rem 1.25rem 1.5rem !important;
    gap: 1.25rem !important;
  }
  .delivery-meta {
    gap: 1.25rem !important;
    flex-wrap: wrap !important;
  }
  .meta-item { text-align: left !important; }

  .welcome-inner {
    grid-template-columns: 1fr !important;
    padding: 1.5rem !important;
  }
  .welcome-sig { text-align: left !important; }

  /* ── AVAILABLE BANNER ── */
  .avail-banner { height: 380px !important; }
  .avail-stat-num { font-size: 3.5rem !important; }
  .avail-stats-row { gap: 2.5rem !important; }

  /* ── PROPERTY HERO ── */
  .property-hero { height: 70vh !important; }
  .property-hero-title { font-size: 2.2rem !important; }

  /* ── ARTICLE BANNER ── */
  .article-banner { height: auto !important; min-height: 380px !important; }
  .article-banner-inner { flex-direction: column !important; gap: 1.5rem !important; padding: 5rem 1.5rem 2rem !important; }
  .article-info { display: none !important; }
  .article-card { max-width: 100% !important; }

  /* ── HIGHLIGHT STRIP ── */
  .highlight-strip-inner {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
    padding: 2.5rem 1.25rem !important;
  }
  .strip-stat-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  /* ── PRICING ── */
  .packages-grid,
  .pricing-grid,
  .add-ons-grid {
    grid-template-columns: 1fr !important;
  }

  /* ── HERO TYPOGRAPHY ── */
  .hero-h1,
  .section-title,
  h1 {
    font-size: clamp(1.75rem, 8vw, 2.5rem) !important;
    line-height: 1.15 !important;
  }

  /* ── FOOTER ── */
  footer,
  .footer-bottom-row,
  .footer-columns {
    flex-direction: column !important;
    gap: 1.5rem !important;
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }

  /* ── USAGE PAGE ── */
  .cat-nav { display: none !important; }
  .hero { padding: 100px 1.25rem 60px !important; }

  /* ── CONTACTS ── */
  .page-header {
    flex-wrap: wrap !important;
    gap: 1rem !important;
  }
  .filter-tabs { flex-wrap: wrap !important; }

  /* ── TABLES ── */
  .detail-table,
  table {
    display: block !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    font-size: 0.78rem !important;
  }

  /* ── MODALS ── */
  .modal { padding: 1.5rem !important; }
  .form-grid { grid-template-columns: 1fr !important; }

  /* ── GATE CARDS ── */
  .gate-card { padding: 2.5rem 1.5rem !important; }

  /* ── GENERAL PADDING ── */
  .section,
  [class*="-header"] {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }
}

@media (max-width: 480px) {
  .delivery-meta { gap: 1rem !important; }
  .meta-item strong { font-size: 1.3rem !important; }
  .avail-stat-num { font-size: 2.75rem !important; }
  .strip-stat-grid { grid-template-columns: 1fr 1fr !important; }
}
