/*
 * ================================================================
 *  prc-mobile-fix.css
 *  Mobile-First Fixes for PublicRecordCenter.com
 *  Deployed: 2026-03-12
 *  Fixes: GO TO overflow, nav hamburger drawer, header crowding,
 *         touch targets, search form, grid layouts
 * ================================================================
 */

/* ================================================================
   BASE RESETS — applied to ALL viewports
   ================================================================ */
* { box-sizing: border-box; }
html, body { overflow-x: hidden; max-width: 100vw; }

/* ================================================================
   MOBILE BASE  (< 768px)
   Everything here is the default — overridden upward at 768px+
   ================================================================ */

/* ── 1. HIDE GO TO bar on mobile completely ── */
.prc-nav-inline,
#prc-nav-bar {
  display: none !important;
}

/* ── 2. HEADER single row: logo left, hamburger right ── */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 16px !important;
  height: 58px !important;
  gap: 12px !important;
}

/* ── 3. HAMBURGER — always visible on mobile ── */
.hamburger,
#hamburger-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: none !important;
  border: none !important;
  color: white !important;
  font-size: 22px !important;
  cursor: pointer !important;
  padding: 10px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  border-radius: 8px;
  transition: background 0.2s;
  flex-shrink: 0;
}
#hamburger-btn:hover { background: rgba(255,255,255,0.1) !important; }

/* ── 4. MOBILE NAV DRAWER ── */
.mobile-nav {
  display: none;
  flex-direction: column !important;
  background: #0d1f3c;
  padding: 8px 0 16px;
  border-top: 1px solid rgba(0,180,216,0.18);
  position: relative;
  z-index: 999;
}
.mobile-nav.open {
  display: flex !important;
}

/* Nav drawer links — large touch targets */
.mobile-nav a {
  display: block !important;
  color: #cbd5e1 !important;
  text-decoration: none !important;
  padding: 13px 24px !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  border-bottom: 1px solid rgba(255,255,255,0.05) !important;
  border-left: 3px solid transparent;
  min-height: 48px;
  display: flex !important;
  align-items: center;
  transition: background 0.15s, border-color 0.15s !important;
}
.mobile-nav a:hover {
  background: rgba(0,180,216,0.12) !important;
  border-left-color: #00b4d8;
  color: #fff !important;
}

/* ── 5. GO TO SECTION inside mobile drawer ── */
.mobile-goto-wrap {
  margin: 10px 16px;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  padding: 12px;
  border: 1px solid rgba(0,180,216,0.15);
}
.mobile-goto-wrap .goto-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
  margin-bottom: 8px;
  display: block;
}
.mobile-goto-selects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 6px;
}
.mobile-goto-selects select,
.mobile-goto-wrap .goto-city-sel {
  width: 100%;
  padding: 8px 10px;
  background: #0a1628;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 6px;
  color: #e2e8f0;
  font-size: 13px;
  appearance: none;
  -webkit-appearance: none;
}
.mobile-goto-wrap .goto-city-sel {
  margin-bottom: 6px;
}
.mobile-goto-wrap .goto-go-btn {
  width: 100%;
  padding: 9px;
  background: #00b4d8;
  color: #051525;
  font-weight: 700;
  font-size: 13px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

/* ── BOTTOM DISCLAIMER BAR ── */
.topbar {
  font-size: 10px !important;
  padding: 10px 12px !important;
  line-height: 1.4 !important;
  text-align: center !important;
  border-top: 1px solid rgba(0,180,216,0.18) !important;
  border-bottom: none !important;
}

/* ── 7. HERO SECTION — tight mobile padding ── */
.hero {
  padding: 18px 16px 28px !important;
}
.hero h1 {
  font-size: clamp(24px, 6.5vw, 48px) !important;
  line-height: 1.2 !important;
  margin-bottom: 14px !important;
}
.hero-sub {
  font-size: 14px !important;
  margin-bottom: 24px !important;
}

/* ── 8. SEARCH FORM — full-width stacked on mobile ── */
.search-box {
  margin: 0 !important;
  border-radius: 12px !important;
}
.search-box-inner {
  padding: 18px 16px 16px !important;
}
.search-fields {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}
.sf-col {
  width: 100% !important;
}
.sf-col input,
.sf-col select {
  width: 100% !important;
  min-width: unset !important;
  height: 46px !important;
  font-size: 15px !important;
}
.sf-submit {
  width: 100% !important;
  height: 48px !important;
  font-size: 16px !important;
  margin-top: 4px !important;
}

/* ── 9. TRUST STRIP — 2x2 grid on mobile ── */
.trust-inner {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
}
.trust-item {
  padding: 16px 12px !important;
  border-right: none !important;
  border-bottom: 1px solid var(--border) !important;
  width: 100% !important;
}
.trust-item:nth-child(odd) {
  border-right: 1px solid var(--border) !important;
}
.trust-num { font-size: 26px !important; }

/* ── 10. POPULAR GRID — 2 cols on mobile ── */
.popular-grid {
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 10px !important;
}
.pop-card {
  padding: 16px 10px 14px !important;
}
.pop-icon {
  width: 46px !important;
  height: 46px !important;
  font-size: 20px !important;
}
.pop-card h4 { font-size: 12px !important; }

/* ── 11. SECTION padding on mobile ── */
.section { padding: 32px 16px !important; }
.dir-wrap { padding: 32px 16px !important; }

/* ── 12. VITAL GRID — 1 col mobile ── */
.vital-grid {
  grid-template-columns: 1fr !important;
}

/* ── 13. DIRECTORY LAYOUT — stacked on mobile ── */
.dir-layout {
  grid-template-columns: 1fr !important;
}

/* ── 14. STATE GRID — 2 cols on mobile ── */
.state-browse-grid {
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 8px !important;
}
.state-browse-bg { padding: 32px 0 !important; }

/* ── 15. TOPIC STRIP — horizontal scroll on mobile ── */
#prc-topic-strip {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
}
#prc-topic-strip::-webkit-scrollbar { display: none !important; }
.ts-inner {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
}

/* ================================================================
   TABLET — 600px+
   ================================================================ */
@media (min-width: 600px) {
  .popular-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .vital-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .state-browse-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .trust-inner {
    display: flex !important;
    flex-wrap: wrap !important;
  }
  .trust-item {
    width: 50% !important;
    border-bottom: 1px solid var(--border) !important;
  }
  .trust-item:nth-child(odd) {
    border-right: 1px solid var(--border) !important;
  }
}

/* ================================================================
   TABLET / DESKTOP — 768px+
   Show desktop nav, hide hamburger, show GO TO bar
   ================================================================ */
@media (min-width: 768px) {

  /* Show GO TO bar */
  .prc-nav-inline,
  #prc-nav-bar {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 1 !important;
    justify-content: flex-end !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  /* Hide hamburger */
  .hamburger,
  #hamburger-btn {
    display: none !important;
  }

  /* Make sure mobile nav stays closed */
  .mobile-nav { display: none !important; }
  .mobile-nav.open { display: none !important; }

  /* Desktop nav links visible */
  nav { display: flex !important; }

  /* Hero more padding */
  .hero { padding: 56px 24px 68px !important; }

  /* Search form: 2-col grid */
  .search-fields {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    align-items: flex-end !important;
    justify-content: center !important;
  }
  .sf-col {
    width: auto !important;
    flex: 1 1 140px !important;
  }

  /* Trust strip: 4 in a row */
  .trust-inner {
    display: flex !important;
    flex-wrap: nowrap !important;
  }
  .trust-item {
    flex: 1 !important;
    width: auto !important;
    border-right: 1px solid var(--border) !important;
    border-bottom: none !important;
  }
  .trust-item:last-child { border-right: none !important; }
  .trust-item:nth-child(odd) { border-right: 1px solid var(--border) !important; }

  /* Vital grid 2-col on tablet, 3-col on 900px+ */
  .vital-grid { grid-template-columns: repeat(2, 1fr) !important; }

  .section { padding: 48px 24px !important; }
  .dir-wrap { padding: 48px 24px !important; }
}

/* ================================================================
   DESKTOP — 900px+
   ================================================================ */
@media (min-width: 900px) {
  .vital-grid { grid-template-columns: repeat(3, 1fr) !important; }
}

/* ================================================================
   LARGE DESKTOP — 1024px+
   ================================================================ */
@media (min-width: 1024px) {
  .popular-grid {
    grid-template-columns: repeat(6, 1fr) !important;
  }
  .dir-layout {
    grid-template-columns: 1fr 300px !important;
  }
  .state-browse-grid {
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)) !important;
  }
  /* Sticky sidebar */
  .dir-panel {
    position: sticky !important;
    top: 80px !important;
  }
}

/* ================================================================
   LARGE DESKTOP — 1100px+
   ================================================================ */
@media (min-width: 1100px) {
  .popular-grid {
    grid-template-columns: repeat(6, 1fr) !important;
  }
}
