/* ============================================================
   BROKEN VIEW MARKETING — MOBILE.CSS v3
   Applied after style.css on every page.
   ============================================================ */

/* ── Base: prevent horizontal overflow ── */
html, body { overflow-x: hidden; max-width: 100vw; }
*, *::before, *::after { box-sizing: border-box; }
img, svg, video, iframe { max-width: 100%; }

/* ── Logo: always show both mark and text ── */
.logo-mark { display: block !important; }
.logo-text { display: flex !important; }

/* ── Feature bullets: ensure visible, never clipped ── */
.feature-row-text .feature-bullets { padding-left: 0.25rem !important; overflow: visible !important; }
.feature-row-text .feature-bullets li { overflow: visible !important; }
.feature-row-text .feature-bullets li::before { flex-shrink: 0 !important; }

/* ────────────────────────────────────────────
   TABLET (≤ 900px)
   ─────────────────────────────────────────── */
@media screen and (max-width: 900px) {
  .booking-grid { grid-template-columns: 1fr !important; gap: 2rem !important; }
  .contact-grid { grid-template-columns: 1fr !important; }
  .inline-cta { flex-direction: column !important; align-items: center !important; text-align: center !important; }
  div[style*="grid-template-columns:280px"] {
    display: flex !important; flex-direction: column !important; gap: 1.5rem !important;
  }
  div[style*="grid-template-columns:280px"] > * { width: 100% !important; max-width: 100% !important; }
}

/* ────────────────────────────────────────────
   MOBILE (≤ 768px)
   ─────────────────────────────────────────── */
@media screen and (max-width: 768px) {

  /* Container */
  .container { padding: 0 1rem !important; }
  .nav-container { padding: 0 1rem !important; }

  /* ── Typography scale down ── */
  p { font-size: 0.95rem; }
  .hero-subtitle { font-size: 0.95rem !important; }
  .page-header p { font-size: 0.9rem !important; }
  .section-header p { font-size: 0.92rem !important; }

  /* ── Logo: KEEP logo-text visible on mobile ── */
  .logo-text { display: flex !important; }
  .logo-main { font-size: 1rem !important; }
  .logo-sub { font-size: 0.52rem !important; letter-spacing: 0.2em !important; }
  .logo-mark { height: 28px !important; width: 28px !important; }

  /* ── Hero ── */
  .hero { min-height: auto !important; }
  .hero .container {
    display: flex !important; flex-direction: column !important;
    padding-top: 5rem !important; padding-bottom: 2.5rem !important;
    gap: 1.5rem !important; width: 100% !important;
  }
  .hero-side-cards { display: none !important; }
  .hero h1 { font-size: clamp(1.9rem, 8vw, 2.75rem) !important; line-height: 1.1 !important; }
  .hero .hero-actions { flex-direction: column !important; width: 100% !important; }
  .hero .hero-actions .btn { width: 100% !important; justify-content: center !important; }

  /* ── Hero stats: ONE LINE, smaller numbers, tighter gaps ── */
  .hero-stats {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    margin-top: 1.75rem !important;
  }
  .hero-stats > div[style*="width:1px"] { display: none !important; }
  .hero-stats > div:not([style*="width:1px"]) {
    flex: 1 !important;
    text-align: center !important;
  }
  .hero-stats > div:not([style*="width:1px"]) > div:first-child {
    font-size: 1.35rem !important;
  }
  .hero-stats > div:not([style*="width:1px"]) > div:last-child {
    font-size: 0.65rem !important;
    line-height: 1.3 !important;
  }

  /* ── Page headers ── */
  .page-header .container { padding-top: 4rem !important; padding-bottom: 2.5rem !important; }
  .page-header h1 { font-size: clamp(1.75rem, 7vw, 2.5rem) !important; }

  /* ── Sections ── */
  .section { padding: 2.5rem 0 !important; }
  .section-header { margin-bottom: 1.75rem !important; }
  .section-header h2 { font-size: clamp(1.4rem, 6vw, 2rem) !important; }

  /* ── Feature rows: text ALWAYS before visual on mobile ── */
  .feature-row {
    display: flex !important; flex-direction: column !important;
    gap: 2rem !important; padding: 1.5rem 0 !important;
  }
  /* Kill direction:rtl on reverse rows so flex order follows HTML source */
  .feature-row.reverse { direction: ltr !important; }
  /* Force text first, visual second regardless of HTML order or direction */
  .feature-row > .feature-row-text { order: 1 !important; }
  .feature-row > .feature-row-visual { order: 2 !important; }
  .feature-row-text, .feature-row-visual { width: 100% !important; min-width: 0 !important; direction: ltr !important; }

  /* ── Photography grid on home page: no overlaps ── */
  .feature-row-visual div[style*="grid-template-columns:1fr 1fr"] {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem !important;
  }
  .feature-row-visual div[style*="grid-template-columns:1fr 1fr"] img {
    margin-top: 0 !important;
    height: 150px !important;
    width: 100% !important;
    object-fit: cover !important;
  }

  /* ── Marquee: faster on mobile ── */
  .logo-marquee-section { overflow: hidden !important; }
  .logo-marquee-track-wrap { overflow: hidden !important; width: 100% !important; }
  .logo-marquee-track { animation: marquee-scroll 22s linear infinite !important; }
  .logo-marquee-logo { width: 100px !important; padding: 0 8px !important; height: 52px !important; }
  .logo-marquee-logo img { max-height: 30px !important; max-width: 80px !important; }

  /* ── Portfolio / photography page: stack grid ── */
  .portfolio-grid,
  .portfolio-grid.mosaic {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
  }
  .portfolio-grid.mosaic .portfolio-item,
  .portfolio-item {
    grid-column: unset !important;
    grid-row: unset !important;
    height: 220px !important;
    width: 100% !important;
    overflow: hidden !important;
  }
  .portfolio-item img { width: 100% !important; height: 100% !important; object-fit: cover !important; }

  /* ── Grid collapser ── */
  div[style*="display: grid"][style*="grid-template-columns: 1fr 1fr"],
  div[style*="display:grid"][style*="grid-template-columns:1fr 1fr"] {
    display: flex !important; flex-direction: column !important; width: 100% !important;
  }
  div[style*="grid-template-columns: repeat(2, 1fr)"],
  div[style*="grid-template-columns:repeat(2,1fr)"] {
    display: flex !important; flex-direction: column !important;
  }
  div[style*="grid-template-columns: repeat(3, 1fr)"] {
    display: flex !important; flex-direction: column !important;
  }
  div[style*="grid-template-columns: 1fr 1fr 1fr 1fr"] {
    display: flex !important; flex-direction: column !important;
  }
  div[style*="grid-template-columns: 1fr 24px 1fr 24px 1fr"] {
    display: flex !important; flex-direction: column !important; gap: 0.75rem !important;
  }
  div[style*="grid-template-columns: 1fr 24px 1fr 24px 1fr"] > div[style*="text-align: center"] {
    display: none !important;
  }

  /* CSS class grids */
  .values-grid, .services-grid, .testimonials-grid,
  .ghl-features, .pain-grid {
    display: flex !important; flex-direction: column !important; width: 100% !important;
  }
  .form-row { display: flex !important; flex-direction: column !important; gap: 1rem !important; }

  /* Email flow cards: text column before preview column */
  div[style*="grid-template-columns: 1fr 1fr"][style*="gap: 0"] {
    display: flex !important; flex-direction: column !important;
  }
  /* The preview (right) side has background #f8fafc - push it after text */
  div[style*="grid-template-columns: 1fr 1fr"][style*="gap: 0"] > div[style*="background: #f8fafc"] {
    order: 2 !important;
  }
  div[style*="grid-template-columns: 1fr 1fr"][style*="gap: 0"] > div:not([style*="background: #f8fafc"]) {
    order: 1 !important;
  }
  /* Ads ecommerce cards */
  div[style*="display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 2rem"] {
    display: flex !important; flex-direction: column !important;
  }
  /* Process steps: 2-col */
  div[style*="grid-template-columns: repeat(4, 1fr)"] {
    display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 1rem !important;
  }
  /* GHL features */
  .ghl-feature { display: flex !important; flex-direction: column !important; }
  .ghl-feature-image { max-height: 240px !important; overflow: hidden !important; }
  /* Social platform cards */
  #platform-grid { grid-template-columns: 1fr !important; }

  /* ── Booking ── */
  .booking-grid { grid-template-columns: 1fr !important; gap: 1.5rem !important; }
  .booking-step { padding: 0.875rem 1.25rem !important; }
  .booking-widget-header { padding: 1rem 1.25rem !important; }
  .booking-slots { grid-template-columns: repeat(3, 1fr) !important; }

  /* ── Industry hero ── */
  .industry-hero.page-header .container {
    padding-top: 6rem !important; padding-bottom: 1.5rem !important;
  }
  .industry-hero .hero-actions {
    flex-direction: column !important; align-items: center !important;
    gap: 0.75rem !important; margin-top: 0.5rem !important;
  }
  .industry-hero .hero-actions .btn {
    width: 100% !important; max-width: 280px !important; justify-content: center !important;
  }

  /* ── Footer ── */
  .footer-grid { grid-template-columns: 1fr !important; gap: 1.5rem !important; }
  .footer-bottom { flex-direction: column !important; text-align: center !important; gap: 0.5rem !important; }

  /* ── Inline CTA: center everything on mobile ── */
  .inline-cta {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    padding: 2rem 1.5rem !important;
    gap: 1.25rem !important;
  }
  .inline-cta .btn {
    width: 100% !important;
    max-width: 280px !important;
    justify-content: center !important;
  }
  .inline-cta-text { text-align: center !important; }

  /* ── Pricing ── */
  .pricing-grid { grid-template-columns: 1fr !important; }

  /* ── About 3-col ── */
  div[style*="grid-template-columns:280px"] {
    display: flex !important; flex-direction: column !important; gap: 1.5rem !important;
  }
  div[style*="grid-template-columns:280px"] > * { width: 100% !important; max-width: 100% !important; }
}

/* ────────────────────────────────────────────
   SMALL MOBILE (≤ 480px)
   ─────────────────────────────────────────── */
@media screen and (max-width: 480px) {
  .container { padding: 0 0.875rem !important; }
  div[style*="grid-template-columns: repeat(4, 1fr)"] {
    grid-template-columns: 1fr !important;
  }
  .booking-slots { grid-template-columns: repeat(2, 1fr) !important; }
  h1 { font-size: clamp(1.6rem, 8vw, 2.5rem) !important; }
}
