/* ================================================================
   Redwood City Bathroom Remodeling — Shared Theme CSS (Direction A)
   Used by: services, single-service, about, gallery, pricing,
            blog, single post, contact, faq pages
   ================================================================ */

:root {
  --navy-900: #061d3a;
  --navy-800: #0b3a6f;
  --navy-700: #15518f;
  --navy-600: #1f6cb0;
  --navy-50:  #eef4fb;
  --navy-100: #d8e6f4;
  --amber:    #e8a33d;
  --amber-d:  #c98a26;
  --amber-50: #fff3dc;
  --gold:     #c8a04a;
  --ink:      #0e1727;
  --muted:    #5a6378;
  --line:     #e5e9f0;
  --line-soft:#f0f3f8;
  --bg:       #ffffff;
  --bg-soft:  #f5f7fa;
  --green:    #2f7a3a;
  --green-50: #e7f3e9;
  --red:      #b53b2f;
  --red-50:   #fdecea;
}

/* RESET / BASE */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: 920px; margin: 0 auto; padding: 0 32px; }

/* TYPE */
h1, h2, h3, h4, h5 { font-family: 'Manrope', sans-serif; color: var(--ink); margin: 0; letter-spacing: -0.02em; }
h1 { font-size: 54px; font-weight: 800; line-height: 1.08; }
h2 { font-size: 38px; font-weight: 700; line-height: 1.15; }
h3 { font-size: 22px; font-weight: 700; }
h4 { font-size: 17px; font-weight: 700; }
p  { margin: 0; color: var(--muted); }
.prose p { margin-bottom: 1.2em; }
.prose p:last-child { margin-bottom: 0; }

.h-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--navy-700);
  background: var(--navy-50); padding: 6px 12px; border-radius: 999px;
}
.h-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.h-eyebrow.dark { background: rgba(232,163,61,0.15); color: var(--amber); }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px;
  font-weight: 700; font-size: 15px; cursor: pointer; border: none;
  transition: all .15s; white-space: nowrap;
}
.btn-primary { background: var(--amber); color: #1c1100; }
.btn-primary:hover { background: var(--amber-d); }
.btn-ghost { background: transparent; color: var(--navy-800); border: 1.5px solid var(--navy-100); }
.btn-ghost:hover { background: var(--navy-50); }
.btn-dark { background: var(--navy-800); color: #fff; }
.btn-dark:hover { background: var(--navy-900); }
.btn-lg { padding: 16px 28px; font-size: 16px; border-radius: 12px; }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; justify-content: center; }

/* TOP BAR */
.topbar { background: var(--navy-900); color: #cfe0f3; font-size: 13px; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; height: 40px; }
.topbar a { color: #cfe0f3; }
.topbar .left { display: flex; gap: 22px; align-items: center; }
.topbar .left span { display: inline-flex; align-items: center; gap: 6px; }
.topbar .right { display: flex; gap: 18px; align-items: center; }
.topbar i { font-size: 14px; color: var(--amber); }

/* HEADER */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
header.site .container { display: flex; align-items: center; justify-content: space-between; height: 88px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 44px; height: 44px; border-radius: 10px; background: var(--navy-800); color: #fff; display: grid; place-items: center; }
.brand-mark i { font-size: 22px; }
.brand-name strong { font-weight: 800; font-size: 17px; color: var(--ink); letter-spacing: -0.01em; display: block; line-height: 1.1; }
.brand-name small { display: block; font-size: 11px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
nav.main { display: flex; gap: 32px; }
nav.main a {
  font-weight: 600; font-size: 15px; color: var(--ink);
  padding: 8px 0; border-bottom: 2px solid transparent; transition: all .15s;
}
nav.main a:hover, nav.main a.active { color: var(--navy-700); border-color: var(--amber); }
.head-cta { display: flex; gap: 12px; align-items: center; }

/* BREADCRUMB */
.breadcrumb { background: var(--bg-soft); padding: 16px 0; border-bottom: 1px solid var(--line); }
.breadcrumb .container { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.breadcrumb a { color: var(--navy-700); font-weight: 500; }
.breadcrumb a:hover { color: var(--navy-800); text-decoration: underline; }
.breadcrumb i { font-size: 13px; opacity: 0.5; }
.breadcrumb .current { color: var(--ink); font-weight: 600; }

/* SECTIONS */
section.s { padding: 84px 0; }
section.s.alt { background: var(--bg-soft); }
section.s.dark { background: var(--navy-900); color: #fff; }
section.s.dark h1, section.s.dark h2, section.s.dark h3 { color: #fff; }
section.s.dark p { color: #c4d4e8; }

.section-head { max-width: 760px; margin: 0 0 48px; }
.section-head.center { text-align: center; margin: 0 auto 48px; }
.section-head h2 { margin: 14px 0 12px; }
.section-head p { font-size: 17px; line-height: 1.65; }

/* PAGE HERO (smaller than homepage hero) */
.page-hero {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  padding: 56px 0 72px;
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; right: -120px; top: -120px;
  width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(circle, var(--navy-50) 0%, transparent 70%); z-index: 0;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { font-size: 48px; line-height: 1.1; max-width: 760px; margin-top: 18px; }
.page-hero h1 em { font-style: normal; color: var(--amber-d); }
.page-hero h1 strong { color: var(--navy-800); }
.page-hero .lead { font-size: 18px; line-height: 1.65; margin-top: 18px; max-width: 700px; color: var(--ink); }
.page-hero .cta-row { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; align-items: center; }

/* CARD */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 28px; transition: all .2s;
}
.card:hover { box-shadow: 0 14px 30px rgba(11,58,111,0.06); }
.card-link:hover { transform: translateY(-3px); border-color: var(--navy-100); cursor: pointer; }

/* FOOTER */
footer.site { background: var(--navy-900); color: #b9cce4; padding: 60px 0 20px; }
footer.site .container { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
footer.site h4 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 18px; font-weight: 700; }
footer.site ul { list-style: none; padding: 0; margin: 0; }
footer.site li { padding: 4px 0; font-size: 14px; }
footer.site a:hover { color: var(--amber); }
footer.site .brand-foot p { color: #b9cce4; font-size: 14px; margin-top: 14px; line-height: 1.6; }
.copy { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 22px; margin-top: 38px; font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.nap-foot { margin-top: 10px; font-size: 13px; line-height: 1.7; }
.nap-foot i { color: var(--amber); margin-right: 4px; }
.social { display: flex; gap: 10px; margin-top: 18px; }
.social a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.08); display: grid; place-items: center; font-size: 16px; transition: all .15s; color: #b9cce4; }
.social a:hover { background: var(--amber); color: #1c1100; }

/* STICKY QUOTE BAR */
.sticky-quote {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  background: rgba(6,29,58,0.96); backdrop-filter: blur(10px);
  color: #fff; padding: 14px 0; border-top: 1px solid rgba(255,255,255,0.1);
}
.sticky-quote .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.sticky-quote .msg { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 14.5px; }
.sticky-quote .msg i { font-size: 22px; color: var(--amber); }
.sticky-quote .actions { display: flex; gap: 10px; }
.sticky-quote .actions .btn { padding: 10px 18px; font-size: 14px; }

/* WHATSAPP FAB */
.whatsapp-fab {
  position: fixed; bottom: 90px; right: 24px; z-index: 41;
  width: 60px; height: 60px; border-radius: 50%;
  background: #25D366; color: #fff; display: grid; place-items: center;
  font-size: 30px; box-shadow: 0 8px 24px rgba(37,211,102,0.4);
  cursor: pointer; transition: transform .2s;
}
.whatsapp-fab:hover { transform: scale(1.1); }
.whatsapp-fab::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid #25D366; opacity: 0.5; animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* FORM */
.field { margin-bottom: 14px; }
.field label { font-size: 12px; font-weight: 600; color: var(--ink); text-transform: uppercase; letter-spacing: 0.06em; display: block; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; background: #fff; color: var(--ink); outline: none;
  transition: all .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--navy-700); box-shadow: 0 0 0 3px var(--navy-50);
}
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* FAQ */
.faq-wrap { max-width: 880px; margin: 0 auto; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; }
.faq-q { padding: 22px 24px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; gap: 16px; }
.faq-q strong, .faq-q h3 { font-size: 16px; font-weight: 600; color: var(--ink); margin: 0; line-height: 1.45; }
.faq-q h3 { letter-spacing: -0.01em; }
.faq-q .plus { width: 28px; height: 28px; border-radius: 50%; background: var(--navy-50); color: var(--navy-800); display: grid; place-items: center; font-weight: 700; flex-shrink: 0; transition: all .2s; }
.faq-a { padding: 0 24px 22px; font-size: 14.5px; line-height: 1.7; color: var(--muted); display: none; }
.faq-a p { margin: 0 0 0.8em; }
.faq-a p:last-child { margin-bottom: 0; }
.faq-a a { color: var(--navy-700); font-weight: 600; }
.faq-a a:hover { text-decoration: underline; }
.faq-item.open .faq-a { display: block; }
.faq-item.open .plus { background: var(--navy-800); color: #fff; transform: rotate(45deg); }

/* TAG */
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 4px; letter-spacing: 0.06em; text-transform: uppercase; }
.tag-navy { background: var(--navy-50); color: var(--navy-700); }
.tag-amber { background: var(--amber-50); color: #5a4818; }
.tag-green { background: var(--green-50); color: var(--green); }
.tag-red { background: var(--red-50); color: var(--red); }

/* UTIL */
.text-center { text-align: center; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-24 { margin-bottom: 24px; }

/* ============================================================
   MOBILE NAV TOGGLE
   ============================================================ */
.nav-toggle {
  display: none; background: transparent; border: 1.5px solid var(--navy-100);
  border-radius: 10px; width: 44px; height: 44px; cursor: pointer;
  align-items: center; justify-content: center; color: var(--navy-800); font-size: 24px;
}
.mobile-menu {
  display: none; position: fixed; top: 0; right: 0; bottom: 0; z-index: 60;
  width: min(320px, 84vw); background: #fff; box-shadow: -8px 0 40px rgba(6,29,58,0.18);
  padding: 88px 24px 24px; flex-direction: column; gap: 4px;
  transform: translateX(100%); transition: transform .28s ease;
}
.mobile-menu.open { display: flex; transform: translateX(0); }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu nav a {
  padding: 15px 8px; font-size: 17px; font-weight: 600; color: var(--ink);
  border-bottom: 1px solid var(--line); display: block;
}
.mobile-menu nav a:hover, .mobile-menu nav a.active { color: var(--navy-700); }
.mobile-menu-cta { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.mobile-menu-backdrop {
  display: none; position: fixed; inset: 0; z-index: 59;
  background: rgba(6,29,58,0.45); opacity: 0; transition: opacity .28s;
}
.mobile-menu-backdrop.open { display: block; opacity: 1; }
.mobile-menu .nav-close {
  position: absolute; top: 22px; right: 22px; width: 40px; height: 40px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  display: grid; place-items: center; font-size: 22px; color: var(--ink); cursor: pointer;
}

/* ============================================================
   RESPONSIVE — tablet
   Uses !important on attribute selectors so inline grid styles
   (style="grid-template-columns:...") collapse correctly.
   ============================================================ */
@media (max-width: 1024px) {
  h1 { font-size: 38px !important; }
  h2 { font-size: 28px !important; }
  h3 { font-size: 20px; }
  .page-hero h1, .hero h1 { font-size: 34px !important; line-height: 1.12 !important; }

  /* Collapse 3+ column grids to 2 on tablet */
  [style*="grid-template-columns:repeat(3"],
  [style*="grid-template-columns: repeat(3"],
  [style*="grid-template-columns:repeat(4"],
  [style*="grid-template-columns: repeat(4"],
  [style*="grid-template-columns:repeat(5"],
  [style*="grid-template-columns: repeat(5"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  /* Two-column hero / split layouts stack */
  .hero > .container, .service-hero, .ba-feat, .areas-wrap,
  [style*="grid-template-columns:1.05fr"], [style*="grid-template-columns: 1.05fr"],
  [style*="grid-template-columns:1.1fr"],  [style*="grid-template-columns: 1.1fr"],
  [style*="grid-template-columns:1.2fr"],  [style*="grid-template-columns: 1.2fr"],
  [style*="grid-template-columns:1.3fr"],  [style*="grid-template-columns: 1.3fr"],
  [style*="grid-template-columns:1.4fr"],  [style*="grid-template-columns: 1.4fr"],
  [style*="grid-template-columns:0.9fr"],  [style*="grid-template-columns: 0.9fr"],
  [style*="grid-template-columns:1fr 1fr"],[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  footer.site .container { grid-template-columns: 1fr 1fr !important; gap: 28px !important; }

  /* Hero heights become auto so stacked content isn't clipped */
  .hero { padding: 48px 0 56px !important; }
  .hero > .container > div:last-child,
  .service-hero-img { height: auto !important; min-height: 320px; }

  /* Hide desktop nav, show toggle */
  nav.main { display: none; }
  .nav-toggle { display: flex; }
  header.site .container { height: 76px; gap: 12px; }
  /* Header: keep only logo + hamburger on tablet/mobile (buttons live in the slide-in menu) */
  .head-cta .btn { display: none; }
  .head-cta { gap: 8px; }
  .brand-name small { display: none; }
}

/* ============================================================
   RESPONSIVE — phone
   ============================================================ */
@media (max-width: 680px) {
  .container, .container-narrow, .wide { padding-left: 20px !important; padding-right: 20px !important; }
  h1 { font-size: 30px !important; }
  h2 { font-size: 24px !important; }
  .page-hero h1, .hero h1 { font-size: 28px !important; }
  section.s { padding: 52px 0 !important; }
  .page-hero, .hero { padding: 36px 0 44px !important; }

  /* EVERYTHING single-column on phone */
  [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  .svc-grid, .usp-grid, .price-grid, .tier-grid, .types-grid, .test-grid,
  .process-grid, .gallery-grid, .gallery-masonry, .post-grid, .related-grid,
  .incl-grid, .blog-layout, .area-list, .areas-list-grid, .method-grid,
  .val-grid, .team-grid, .prc-grid, .cmp-row, .row2 { grid-template-columns: 1fr !important; }
  footer.site .container { grid-template-columns: 1fr !important; }

  /* Top bar: hide secondary items, keep phone tappable */
  .topbar .left span:not(:first-child), .topbar .right span, .topbar .right a { display: none !important; }
  .topbar .container { justify-content: flex-start; }

  /* Gallery tiles: uniform height, no row-spanning */
  .g-item, .gal-item { grid-column: span 1 !important; grid-row: span 1 !important; height: 240px !important; }

  /* Process: remove connecting line */
  .process-grid::before { display: none !important; }

  /* Before/after slider: cap height */
  .ba-stage { aspect-ratio: 4/3 !important; }

  /* Sticky bar: hide message, keep buttons */
  .sticky-quote .msg { display: none !important; }
  .sticky-quote .container { justify-content: center; }
  .sticky-quote .actions { width: 100%; }
  .sticky-quote .actions .btn { flex: 1; justify-content: center; }

  /* Pricing popular card: no scale transform that overflows */
  .tier-card.popular, .price-card.popular { transform: none !important; }

  /* Tables / comparison: allow horizontal scroll */
  .cmp-table, .price-table, .pricing-table { display: block; overflow-x: auto; }

  /* Buttons full-width-friendly in CTA rows */
  .cta-row { flex-direction: column; align-items: stretch !important; }
  .cta-row .btn { width: 100%; justify-content: center; }

  /* Floating cards in hero: hide on phone (they overflow) */
  .float-card { display: none !important; }

  /* Calculator + dark panels padding */
  [style*="padding:48px 56px"], [style*="padding: 48px 56px"] { padding: 28px 22px !important; }

  /* Bottom padding so sticky bar doesn't cover footer */
  body { padding-bottom: 70px; }
  .whatsapp-fab { bottom: 84px !important; right: 16px !important; }
}

/* Smooth horizontal-overflow guard */
html, body { overflow-x: hidden; max-width: 100%; }
img, iframe { max-width: 100%; }
