/* 
 * Plumb Otter - Premium stylesheet
 * Curated color palette matching the logo (477.jpg):
 * Primary / Water Blue: #85cfe8
 * Secondary / Otter Brown: #ceac8b
 * Background / Warm Ivory: #f8f5e6
 * Neutral Dark / Charcoal: #2d3748
 * Borders / Muted Slate: #d2dbd1
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  --color-primary: #0284c7;
  --color-primary-dark: #00589f;
  --color-secondary: #f97316;
  --color-secondary-dark: #ea580c;
  --color-accent-gold: #ffe593;
  --color-bg: #f0f7fa; /* Clean light water-blue canvas */
  --color-card-bg: #ffffff;
  --color-text-main: #1e293b;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --color-verified: #16a34a;
  --color-verified-bg: #dcfce7;
  
  --shadow-sm: 0 1px 3px rgba(11, 31, 58, 0.05);
  --shadow-md: 0 4px 12px -2px rgba(11, 31, 58, 0.08), 0 2px 6px -1px rgba(11, 31, 58, 0.04);
  --shadow-lg: 0 12px 24px -4px rgba(11, 31, 58, 0.1);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text-main);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

/* Header & Nav */
header {
  background-color: var(--color-card-bg);
  padding: 0.5rem 2rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(11, 31, 58, 0.04);
  border-bottom: 1px solid var(--color-border);
  box-sizing: border-box;
}

.header-accent-strip {
  height: 3px;
  background: linear-gradient(90deg, #00589f 0%, #ea580c 50%, #0284c7 100%);
  width: calc(100% + 4rem);
  margin-left: -2rem;
  margin-top: 0.5rem;
}

/* Menu bar top sized to button size plus buffer */
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  height: auto;
  min-height: 42px;
  box-sizing: border-box;
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.brand-logo {
  height: 42px;
  width: auto;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.brand-text {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: -0.5px;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  transition: opacity 0.15s ease;
}

.brand-text:hover {
  opacity: 0.92;
}

.brand-text span {
  color: #fb923c;
}

/* Dedicated Banner Ad Container below Menu Bar with buffer */
.site-banner-ad-container {
  max-width: 1200px;
  width: 100%;
  margin: 1.25rem auto 0;
  padding: 0 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

.header-ad-wrapper {
  width: 100%;
  max-width: 728px;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

.nav-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.nav-link {
  font-weight: 600;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.nav-link:hover {
  color: var(--color-primary-dark);
}

.btn-nav {
  background-color: var(--color-secondary);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.btn-nav:hover {
  background-color: var(--color-secondary-dark);
  transform: translateY(-1px);
}

.btn-join-signup {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, #4a9ebc 100%);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  padding: 0.5rem 1.15rem;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(74, 158, 188, 0.35);
  border: 1px solid rgba(255,255,255,0.15);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.btn-join-signup:hover {
  background: linear-gradient(135deg, #4a9ebc 0%, #3d88a4 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(74, 158, 188, 0.45);
  color: #ffffff !important;
}

.nav-login-link {
  color: var(--color-text-main);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  transition: color 0.15s ease;
}

.nav-login-link:hover {
  color: var(--color-primary-dark) !important;
}

/* Container */
main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--color-text-main);
}

/* Landing Page (Root Index) */
.hero-section {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
  background-color: transparent;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
}

.referral-directory {
  background-color: #f0f7fa;
  border: 1px solid var(--color-border);
}

body.admin-page {
  background-color: #f0f7fa !important;
}

.hero-title {
  font-size: 3rem;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.cz-selector-container {
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  max-width: 500px;
  margin: 0 auto;
  box-shadow: var(--shadow-md);
}

.cz-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.cz-button {
  background-color: var(--color-bg);
  border: 2px solid var(--color-border);
  padding: 1rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1.1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cz-button:hover {
  background-color: var(--color-primary);
  border-color: var(--color-primary-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* City Page layout */
.city-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 1rem;
}

.city-info h1 {
  font-size: 2.5rem;
}

.city-info p {
  color: var(--color-text-muted);
  font-size: 1.1rem;
}

.controls-bar {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.sort-label {
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text-muted);
}

.sort-select {
  padding: 0.45rem 2.25rem 0.45rem 0.95rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  border: 1.5px solid var(--color-border);
  border-radius: 6px;
  background-color: #ffffff;
  color: var(--color-text-main);
  cursor: pointer;
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 0.9rem;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.sort-select:hover {
  border-color: #94a3b8;
}

.sort-select:focus {
  border-color: var(--color-primary-dark);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* City Refinement Pills Bar */
.city-pills-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0.75rem 0 1.25rem 0;
}

.city-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1.5px solid var(--color-border);
  background: #ffffff;
  color: var(--color-text-main);
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.city-pill:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
  background: #f0f9ff;
}

.city-pill.active {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.25);
}

.badge-serves-city {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  white-space: nowrap;
}

.badge-county-wide {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  white-space: nowrap;
}

.badge-location {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  white-space: nowrap;
}

/* Constrained Standard Header Banner Layout (728px x 90px) */
.sponsored-ad {
  max-width: 728px;
  width: 100%;
  height: 90px;
  max-height: 90px;
  margin: 0 auto;
  background: linear-gradient(90deg, #ffe593 0%, #ffdeb1 100%);
  border: 1px solid var(--color-secondary);
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.25rem;
  box-shadow: var(--shadow-sm);
  box-sizing: border-box;
  overflow: hidden;
}

.sponsored-ad.placeholder-compact {
  background: linear-gradient(90deg, #edf2f7 0%, #cbd5e0 100%);
  border: 1px solid var(--color-border);
}

.sponsored-ad.adsense-compact {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  justify-content: center;
  overflow: hidden;
}

.sponsored-ad.graphic-ad {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  justify-content: center;
  overflow: hidden;
}

.ad-graphic-link {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 90px;
  max-height: 90px;
  width: 100%;
  max-width: 728px;
  overflow: hidden;
}

.ad-graphic-img {
  max-height: 90px;
  max-width: 728px;
  width: auto;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}

.ad-details-compact {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.95rem;
}

.ad-badge {
  background-color: var(--color-secondary-dark);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.ad-badge.placeholder {
  background-color: var(--color-text-muted);
}

.ad-badge.adsense {
  background-color: #4285f4;
}

.ad-plumber-name {
  font-family: var(--font-heading);
  color: var(--color-text-main);
  font-weight: 700;
  font-size: 1.1rem;
}

.ad-phone-link {
  font-weight: 800;
  color: var(--color-text-main);
  font-size: 1.05rem;
}

.ad-phone-link:hover {
  color: #000;
}

.ad-placeholder-text {
  font-size: 0.95rem;
  color: var(--color-text-main);
}

.ad-website-btn {
  background-color: var(--color-text-main);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.4rem 1rem;
  border-radius: 4px;
  transition: all 0.2s;
}

.ad-website-btn:hover {
  background-color: #000;
}

.ad-website-btn.rent {
  background-color: var(--color-primary-dark);
}

.ad-website-btn.rent:hover {
  background-color: var(--color-primary);
}

/* Adjust header to sit sticky naturally */
header {
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Plumber Directory Listing Cards */
.plumbers-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.plumber-card {
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.plumber-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.plumber-card.verified-listing {
  border-left: 5px solid var(--color-verified);
}

.plumber-main {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
}

.plumber-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.plumber-name {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--color-text-main);
  margin: 0;
  line-height: 1.25;
}

.plumber-title-phone {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  background-color: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 6px;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.plumber-title-phone:hover {
  background-color: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

.badge-verified {
  background-color: var(--color-verified-bg);
  color: #27ae60;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: 1px solid rgba(46, 204, 113, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.plumber-services-list {
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.5;
  margin-top: 0.25rem;
  font-weight: 500;
}

.plumber-meta {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  text-align: right;
  gap: 0.65rem;
  min-width: 195px;
}

.plumber-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--color-text-main);
  white-space: nowrap;
}

.plumber-rating .rating-val {
  color: var(--color-text-main);
  font-weight: 800;
}

.plumber-rating .reviews-count {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 500;
  margin-left: 0.15rem;
}

.star-icon {
  color: #f59e0b;
  font-size: 1.25rem;
  line-height: 1;
}

.plumber-phone {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-text-main);
}

.plumber-website {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-primary-dark);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.15s ease;
}

.plumber-website:hover {
  text-decoration: underline;
  color: var(--color-primary);
}

.plumber-email-link {
  color: var(--color-primary-dark);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.15s ease;
}

.plumber-email-link:hover {
  text-decoration: underline;
  color: var(--color-primary);
}

.plumber-read-reviews-btn {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0284c7;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  font-size: 0.82rem;
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.plumber-read-reviews-btn:hover {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0369a1;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.15);
}

.last-updated-row {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: auto;
  padding-top: 0.65rem;
}

.last-updated-date {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

/* ========================================================
   Desktop-Inspired Mobile Layout (Option 2)
   Preserves computer layout rhythm, side-by-side elements,
   and multi-column structure without requiring horizontal scroll
   ======================================================== */
@media (max-width: 768px) {
  main {
    margin: 1.25rem auto;
    padding: 0 0.85rem;
  }

  header {
    padding: 0.4rem 0.85rem 0;
  }

  .header-accent-strip {
    width: calc(100% + 1.7rem);
    margin-left: -0.85rem;
    margin-top: 0.35rem;
  }

  /* Keep brand & login on a sleek single row (button size + buffer) */
  .nav-container {
    height: auto;
    min-height: 38px;
    max-height: none;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0 0.35rem;
  }

  .brand {
    order: 1;
    flex-shrink: 0;
  }

  .brand-logo {
    height: 34px !important;
    width: auto !important;
  }

  .brand-text {
    font-size: 1.25rem;
  }

  .nav-right {
    order: 2;
    gap: 0.35rem !important;
    flex-shrink: 0;
  }

  .nav-login-link {
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
  }

  .btn-join-signup {
    font-size: 0.8rem;
    padding: 0.35rem 0.65rem;
    gap: 0.25rem;
  }

  .login-nav-btn {
    font-size: 0.78rem !important;
    padding: 0.35rem 0.6rem !important;
  }

  /* Dedicated Banner Ad Container below Menu Bar with clean vertical buffer */
  .site-banner-ad-container {
    margin: 0.75rem auto 0.25rem;
    padding: 0 0.85rem;
    width: 100%;
    box-sizing: border-box;
  }

  .header-ad-wrapper {
    width: 100%;
    height: auto;
    max-height: none;
    margin: 0;
  }

  .sponsored-ad {
    height: auto;
    min-height: 38px;
    max-height: none;
    padding: 0.35rem 0.75rem;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.35rem 0.75rem;
    text-align: left;
    border-radius: 6px;
  }

  .sponsored-ad.placeholder-compact {
    justify-content: center;
    text-align: center;
  }

  .ad-details-compact {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    font-size: 0.82rem;
  }

  .ad-badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.45rem;
  }

  .ad-plumber-name {
    font-size: 0.88rem;
  }

  .ad-phone-link {
    font-size: 0.85rem;
  }

  .ad-website-btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    white-space: nowrap;
  }

  /* Plumber Directory Cards: Maintain 2-column side-by-side desktop feel */
  .plumber-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.65rem 0.85rem;
    padding: 1.15rem 1rem;
    border-radius: 10px;
    align-items: stretch;
  }

  .plumber-main {
    min-width: 0;
    gap: 0.45rem;
  }

  .plumber-title-row {
    gap: 0.35rem 0.5rem;
  }

  .plumber-name {
    font-size: 1.15rem;
    line-height: 1.25;
  }

  .plumber-title-phone {
    font-size: 0.8rem;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
  }

  .badge-verified, .badge-location, .badge-serves-city, .badge-county-wide {
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
  }

  .plumber-website {
    font-size: 0.82rem;
  }

  .plumber-services-list {
    font-size: 0.76rem;
    line-height: 1.4;
    margin-top: 0.15rem;
  }

  /* Right column: rating at top-right, button at bottom-right */
  .plumber-meta {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    text-align: right;
    min-width: 120px;
    max-width: 145px;
    border-top: none;
    padding-top: 0;
    gap: 0.65rem;
  }

  .plumber-rating {
    font-size: 1.05rem;
    gap: 0.2rem;
  }

  .star-icon {
    font-size: 1.15rem;
  }

  .plumber-rating .reviews-count {
    font-size: 0.72rem;
  }

  .plumber-read-reviews-btn {
    font-size: 0.72rem;
    padding: 0.35rem 0.55rem;
    border-radius: 6px;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
    max-width: 135px;
  }

  .last-updated-row {
    font-size: 0.72rem;
    padding-top: 0.35rem;
    gap: 0.4rem;
  }

  /* Directory Sorting & Refinement Toolbar */
  .directory-toolbar {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem !important;
  }

  .directory-toolbar .toolbar-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.2rem !important;
  }

  .directory-toolbar .toolbar-label {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    color: var(--color-text-muted) !important;
    letter-spacing: 0.5px !important;
  }

  .directory-toolbar .sort-select {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    font-size: 0.8rem !important;
    padding: 0.4rem 0.55rem !important;
    border-radius: 6px !important;
    height: 36px !important;
  }

  .directory-toolbar .toolbar-full {
    grid-column: 1 / -1 !important;
  }

  /* Home / State Hero Section */
  .hero-section {
    padding: 1.25rem 0.5rem 1rem !important;
  }

  .hero-top-row {
    flex-wrap: nowrap !important;
    gap: 1rem !important;
    justify-content: flex-start !important;
    margin-bottom: 1.25rem !important;
  }

  .hero-mascot-img {
    width: 72px !important;
    height: 72px !important;
    border-width: 3px !important;
  }

  .hero-title {
    font-size: 1.55rem !important;
    line-height: 1.2 !important;
  }

  #county-quick-filter {
    font-size: 0.88rem !important;
    padding: 0.65rem 1.1rem !important;
  }

  .referral-directory {
    padding: 1.15rem 0.85rem !important;
    margin-top: 0.25rem !important;
  }

  /* 2-column County Grid on mobile */
  #county-grid-container {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.6rem !important;
  }

  .county-card-item {
    padding: 0.85rem 0.75rem !important;
  }

  .county-card-item h3 {
    font-size: 0.95rem !important;
    margin-bottom: 0.35rem !important;
  }

  .county-card-item div {
    font-size: 0.75rem !important;
  }

  /* Plumber Portal Dashboard */
  .dashboard-container {
    gap: 1rem;
    margin-top: 0.5rem;
  }

  .dashboard-header {
    padding-bottom: 1rem !important;
    margin-bottom: 0.5rem !important;
  }

  .dashboard-header h1 {
    font-size: 1.4rem !important;
  }

  .dashboard-card {
    padding: 1.25rem 1rem;
    gap: 1rem;
  }

  .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }

  .form-group {
    gap: 0.35rem;
  }

  .form-input, .form-textarea {
    font-size: 0.88rem;
    padding: 0.55rem 0.75rem;
  }

  /* Client Member Area */
  .member-dashboard-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .change-password-form {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  /* Plumber Profile & Community Reviews (reviews.php) */
  .profile-header-card {
    padding: 1.15rem 1rem !important;
    border-radius: 10px !important;
    margin-bottom: 1.25rem !important;
  }

  .profile-header-inner {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
  }

  .profile-header-info {
    min-width: 0 !important;
  }

  .profile-header-info h1 {
    font-size: 1.45rem !important;
    line-height: 1.25 !important;
  }

  .profile-rating-box {
    width: 100% !important;
    min-width: 0 !important;
    padding: 0.75rem 1rem !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: space-around !important;
    align-items: center !important;
    gap: 0.5rem 1rem !important;
    border-radius: 8px !important;
  }

  .profile-details-grid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
    margin-top: 1rem !important;
    padding-top: 1rem !important;
  }

  .services-checklist-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.45rem 0.65rem !important;
    font-size: 0.8rem !important;
  }

  /* Contact & Support (contact.php) */
  .contact-card-container {
    margin: 1.25rem auto 2.5rem !important;
    padding: 1.35rem 1rem !important;
    border-radius: 10px !important;
  }

  .contact-card-container h1 {
    font-size: 1.45rem !important;
  }

  .form-row-2col {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.65rem !important;
  }

  /* FAQs Page (faqs.php) */
  .faqs-container {
    margin: 1.25rem auto 2.5rem auto !important;
    padding: 0 0.5rem !important;
  }

  .faqs-container h1 {
    font-size: 1.55rem !important;
  }

  .faqs-search-form {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.65rem !important;
    padding: 0.85rem !important;
  }

  .faqs-search-form > div:first-child {
    grid-column: 1 / -1 !important;
    min-width: 0 !important;
  }

  .faqs-search-form > div:nth-child(2) {
    min-width: 0 !important;
  }

  .faqs-search-form > div:nth-child(3) {
    min-width: 0 !important;
  }

  .faqs-search-form > div:last-child {
    grid-column: 1 / -1 !important;
    display: flex !important;
    gap: 0.5rem !important;
  }

  .faqs-search-form > div:last-child button,
  .faqs-search-form > div:last-child a {
    flex: 1 !important;
    text-align: center !important;
  }

  /* Auth Pages (login.php, signup.php, forgot.php, reset.php) */
  .auth-card {
    margin: 1.25rem auto 2.5rem !important;
    padding: 1.35rem 1rem !important;
    border-radius: 10px !important;
  }

  .auth-card h1 {
    font-size: 1.45rem !important;
  }

  .auth-mascot-img {
    width: 76px !important;
    height: 76px !important;
    margin-bottom: 0.65rem !important;
  }

  /* Checkout (dashboard/checkout.php) */
  .checkout-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }
}

/* Dashboard Styles */
.dashboard-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 2rem;
}

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.dashboard-card {
  background-color: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-text-main);
}

.form-input, .form-textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  outline: none;
  background-color: #fff;
  transition: border-color 0.2s;
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--color-primary-dark);
}

.btn-primary {
  background-color: var(--color-primary-dark);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  text-align: center;
}

.btn-primary:hover {
  background-color: #559db8;
}

.btn-secondary {
  background-color: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  transition: all 0.15s ease;
}

.btn-secondary:hover {
  background-color: #e2e8f0;
  color: #0f172a;
}

/* Upsell OtterCall Mockup Simulation Styles */
.upsell-pitch {
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
  color: #fff;
  border: none;
}

.upsell-pitch h2 {
  color: var(--color-primary);
}

.upsell-pitch p {
  color: #cbd5e0;
}

.simulation-device {
  border: 12px solid #2d3748;
  border-radius: 30px;
  background-color: #0f172a;
  padding: 1.5rem;
  margin-top: 1rem;
  position: relative;
  font-family: var(--font-body);
}

.sim-screen {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 250px;
}

.sim-status {
  text-align: center;
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid #1e293b;
  padding-bottom: 0.5rem;
}

.sim-message {
  max-width: 80%;
  padding: 0.75rem 1rem;
  border-radius: 15px;
  font-size: 0.85rem;
  line-height: 1.4;
  animation: popIn 0.3s ease forwards;
}

.sim-message.customer {
  background-color: #334155;
  color: #f8fafc;
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.sim-message.auto-reply {
  background-color: #0284c7;
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

.sim-message.plumber-notification {
  background-color: #d97706;
  color: #fff;
  align-self: center;
  text-align: center;
  border-radius: 10px;
  max-width: 90%;
  font-weight: 600;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.sim-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn-sim-trigger {
  flex: 1;
  background-color: var(--color-primary-dark);
  color: #fff;
  padding: 0.6rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
}

.btn-sim-trigger:hover {
  background-color: var(--color-primary);
}

/* Footer & Complementary Styling */
footer.site-footer {
  background-color: #0b1f3a; /* Deep Nautical Navy complementary base */
  color: #94a3b8;
  margin-top: auto;
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-accent-bar {
  height: 3px;
  background: linear-gradient(90deg, #00589f 0%, #ea580c 50%, #0284c7 100%);
  width: 100%;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.75rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-brand-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.footer-logo {
  margin-bottom: 0.35rem;
}

.footer-brand-text {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #38bdf8;
  display: inline-flex;
  align-items: center;
}

.footer-brand-text span {
  color: #fb923c;
}

.footer-copy {
  color: #f1f5f9;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
}

.footer-tagline {
  font-size: 0.85rem;
  color: #94a3b8;
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 1.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.15s ease;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
}

.footer-links a:hover {
  color: #38bdf8;
  background-color: rgba(56, 189, 248, 0.12);
}

#business-hours:target {
  outline: 2px solid #0284c7;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.18);
  transition: all 0.3s ease;
}

