/* =============================================
   PlumberArchive - Plumber profile (listing.html)
   Loaded only by listing.html, after css/style.css.
   Every class below is rendered only by the listing code in js/main.js.
   ============================================= */

:root {
  --l-ink: #0a1628;          /* brand deep navy */
  --l-navy: #0f2744;         /* site navy (nav bar, footer) */
  --l-navy-2: #17406b;
  --l-gold: #f59e0b;         /* brand gold */
  --l-gold-hi: #fbbf24;
  --l-gold-deep: #92400e;    /* gold text on light backgrounds (AA contrast) */
  --l-gold-wash: #fff8e7;
  --l-gold-line: #f6d58a;
  --l-text: #2a3a4d;
  --l-muted: #5b6b7f;
  --l-line: #e2e9f2;
  --l-card: #ffffff;
  --l-chip: #eef3fa;
  --l-chip-line: #d6e1ef;
  --l-radius: 16px;
  --l-shadow: 0 1px 2px rgba(10,22,40,.05), 0 6px 20px rgba(10,22,40,.06);
}

/* ---------- Breadcrumb (shared markup, listing-only tweaks) ---------- */
#listing-breadcrumb .breadcrumb-list { min-width: 0; }
#listing-breadcrumb .current { overflow-wrap: anywhere; }

/* ---------- Hero ---------- */
.listing-hero {
  position: relative;
  padding: 40px 0 44px;
  color: #fff;
  background:
    radial-gradient(640px 280px at 92% -10%, rgba(245,158,11,.20), transparent 70%),
    radial-gradient(520px 260px at -5% 120%, rgba(45,125,210,.22), transparent 70%),
    linear-gradient(135deg, var(--l-ink) 0%, var(--l-navy) 55%, var(--l-navy-2) 100%);
  border-bottom: 4px solid var(--l-gold);
}

.listing-hero-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-width: 0;
}

.listing-avatar {
  width: 112px;
  height: 112px;
  border-radius: 24px;
  background: linear-gradient(145deg, var(--l-gold-hi), var(--l-gold));
  color: var(--l-ink);
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  border: 3px solid rgba(255,255,255,.22);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.listing-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.listing-header-info { flex: 1; min-width: 0; }

.listing-header-info h1 {
  color: #fff;
  font-size: clamp(1.55rem, 3.4vw, 2.35rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.015em;
  margin: 0;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.listing-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  padding: 5px 12px 5px 10px;
  border-radius: 999px;
  background: var(--l-gold);
  color: var(--l-ink);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.listing-badge svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }

.listing-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.listing-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.16);
  color: rgba(255,255,255,.85);
  font-size: .88rem;
  line-height: 1.35;
  min-width: 0;
}
.listing-meta-item svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--l-gold-hi); }
.listing-meta-item strong { color: #fff; font-weight: 700; }

.listing-rating-big {
  display: block;
  max-width: 440px;
  margin-top: 18px;
  padding: 12px 18px 14px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
}
.rating-eyebrow {
  display: block;
  margin-bottom: 8px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--l-gold-hi);
}
.rating-main { display: flex; align-items: center; gap: 14px; }
.rating-source { margin: 10px 0 0; font-size: .78rem; line-height: 1.45; color: rgba(255,255,255,.7); }
.rating-score { font-size: 2.1rem; font-weight: 800; line-height: 1; color: #fff; }
.stars-lg { display: flex; gap: 3px; color: var(--l-gold-hi); }
.stars-lg .star { width: 20px; height: 20px; }
.stars-lg .star.empty { color: rgba(255,255,255,.28); }
.rating-count { font-size: .82rem; color: rgba(255,255,255,.72); margin-top: 3px; }

/* ---------- Content layout ---------- */
.listing-content { padding: 36px 0 28px; }

.listing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 344px;
  gap: 28px;
  align-items: start;
}
.listing-main { min-width: 0; }

.listing-sidebar {
  position: sticky;
  top: 90px;               /* clears the 66px sticky nav bar */
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ---------- Content cards ---------- */
.listing-section {
  background: var(--l-card);
  border: 1px solid var(--l-line);
  border-radius: var(--l-radius);
  box-shadow: var(--l-shadow);
  padding: 28px 30px;
  margin-bottom: 22px;
  min-width: 0;
}
.listing-section:last-child { margin-bottom: 0; }

.listing-section h2 {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  line-height: 1.3;
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--l-ink);
  overflow-wrap: anywhere;
}
.listing-section h2::before {
  content: "";
  width: 4px;
  height: 1.3em;
  border-radius: 3px;
  background: var(--l-gold);
  flex-shrink: 0;
}

.listing-section p {
  margin: 0;
  color: var(--l-text);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 70ch;
}
.listing-about-text p + p { margin-top: 14px; }

/* Services */
.services-list { display: flex; flex-wrap: wrap; gap: 10px; }
.service-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 12px;
  border-radius: 10px;
  background: var(--l-chip);
  border: 1px solid var(--l-chip-line);
  color: var(--l-navy);
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.3;
}
.service-tag::before {
  content: "";
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b45309' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

/* ---------- Sidebar cards ---------- */
.sidebar-card {
  background: var(--l-card);
  border: 1px solid var(--l-line);
  border-radius: var(--l-radius);
  box-shadow: var(--l-shadow);
  padding: 24px;
  margin: 0;
  min-width: 0;
}
.sidebar-card h3 {
  margin: 0 0 16px;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--l-ink);
}

/* Contact card: the page's one dark card, so the call button is the focal point */
.sidebar-card--contact {
  background: linear-gradient(160deg, var(--l-ink), var(--l-navy) 70%, var(--l-navy-2));
  border-color: transparent;
  box-shadow: 0 14px 34px rgba(10,22,40,.28);
}
.sidebar-card--contact h3 { color: #fff; }

.listing-sidebar .phone-reveal-wrap { display: block; width: 100%; margin-bottom: 12px; }
.listing-sidebar .phone-reveal-wrap:last-child { margin-bottom: 0; }

.contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 13px 18px;
  border: 2px solid var(--l-gold);
  border-radius: 12px;
  background: var(--l-gold);
  color: var(--l-ink);
  font: inherit;
  font-size: 1.02rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.contact-btn:hover { background: var(--l-gold-hi); border-color: var(--l-gold-hi); color: var(--l-ink); transform: translateY(-1px); }
.contact-btn.outline {
  background: transparent;
  border-color: rgba(255,255,255,.45);
  color: #fff;
  font-weight: 700;
}
.contact-btn.outline:hover { background: rgba(255,255,255,.12); border-color: #fff; color: #fff; }
.contact-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* Business details */
.info-list { display: flex; flex-direction: column; }
.info-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 0;
  border-top: 1px solid var(--l-line);
  font-size: .94rem;
}
.info-row:first-child { border-top: 0; padding-top: 0; }
.info-row:last-child { padding-bottom: 0; }
.info-label {
  width: auto;
  color: var(--l-muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.info-value { color: var(--l-ink); font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.info-link { color: var(--blue); font-weight: 600; word-break: break-all; }
.info-link:hover { text-decoration: underline; }
.info-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--l-gold-wash);
  border: 1px solid var(--l-gold-line);
  color: var(--l-gold-deep);
  font-size: .78rem;
  font-weight: 800;
}

/* ---------- Reviews ---------- */
.listing-section p.reviews-note {
  margin: -6px 0 18px;
  font-size: .88rem;
  line-height: 1.5;
  color: var(--l-muted);
}

.reviews-average-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px 20px;
  border-radius: 14px;
  background: var(--l-gold-wash);
  border: 1px solid var(--l-gold-line);
}
.reviews-avg-num { font-size: 2.6rem; font-weight: 800; line-height: 1; color: var(--l-ink); }
.reviews-avg-stars { font-size: 1.15rem; letter-spacing: 1px; }
.reviews-avg-count { margin-top: 3px; font-size: .86rem; color: var(--l-muted); }

.rs { color: #d3dce8; }
.rs.on { color: var(--l-gold); }

.review-item {
  padding: 18px 20px;
  margin-bottom: 12px;
  border: 1px solid var(--l-line);
  border-radius: 14px;
  background: #fbfcfe;
}
.review-item:last-child { margin-bottom: 0; padding-bottom: 18px; border-bottom: 1px solid var(--l-line); }
.review-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 10px;
}
.review-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.reviewer-avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--l-navy);
  color: #fff;
  font-weight: 800;
  font-size: .95rem;
}
.reviewer-name { font-size: .95rem; font-weight: 700; color: var(--l-ink); overflow-wrap: anywhere; }
.review-date { font-size: .82rem; color: var(--l-muted); }
.review-text { font-size: .96rem; line-height: 1.7; color: var(--l-text); }
.review-item .stars { color: var(--l-gold); }
.review-item .stars .star { width: 16px; height: 16px; }
.review-item .stars .star.empty { color: #d3dce8; }

.reviews-empty {
  margin: 0 0 8px;
  padding: 22px 18px;
  text-align: center;
  border: 1.5px dashed var(--l-chip-line);
  border-radius: 14px;
  background: #fbfcfe;
  color: var(--l-muted);
  font-size: .95rem;
  font-style: normal;
}
.reviews-empty::before { content: "☆"; display: block; margin-bottom: 4px; font-size: 1.6rem; line-height: 1; color: var(--l-gold); }
.reviews-loading { color: var(--l-muted); font-size: .92rem; }

/* Review form */
.review-form-wrap {
  margin-top: 26px;
  padding: 24px;
  border-radius: 14px;
  background: var(--l-chip);
  border: 1px solid var(--l-chip-line);
}
.review-form-title { margin: 0 0 18px; padding: 0; font-size: 1.05rem; font-weight: 800; color: var(--l-ink); }
.review-field { margin-bottom: 16px; }
.review-label {
  display: block;
  margin-bottom: 7px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--l-muted);
}
.review-input, .review-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #c9d6e6;
  border-radius: 10px;
  background: #fff;
  color: var(--l-ink);
  font: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.review-input:focus, .review-textarea:focus {
  border-color: var(--l-navy);
  box-shadow: 0 0 0 4px rgba(245,158,11,.28);
}
.review-textarea { min-height: 112px; resize: vertical; }
.star-input-wrap { display: flex; gap: 6px; margin: 2px 0; cursor: pointer; }
.star-pick { font-size: 2.2rem; line-height: 1; color: #cbd6e4; user-select: none; transition: color .1s ease, transform .1s ease; }
.star-pick.hovered, .star-pick.selected { color: var(--l-gold); }
.star-pick:hover { transform: scale(1.08); }

#review-submit-btn {
  min-height: 48px;
  padding: 12px 26px;
  border: 0;
  border-radius: 12px;
  background: var(--l-navy);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: background .18s ease;
}
#review-submit-btn:hover:not(:disabled) { background: var(--l-navy-2); }
#review-submit-btn:disabled { opacity: .65; cursor: default; }
#review-submit-btn:focus-visible { outline: 3px solid var(--l-gold); outline-offset: 2px; }

.review-thankyou {
  margin: 0;
  padding: 28px 20px;
  text-align: center;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--l-line);
}
.review-thankyou svg { display: block; margin: 0 auto 12px; color: #15803d; }
.review-thankyou h3 { margin: 0 0 6px; font-size: 1.08rem; color: var(--l-ink); }
.review-thankyou p { font-size: .94rem; color: var(--l-muted); margin: 0 auto; }

/* ---------- Claim / upgrade banner ---------- */
.claim-listing-section { padding: 8px 0 56px; }
.claim-listing-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
  padding: 22px 26px;
  border-radius: var(--l-radius);
  background: linear-gradient(135deg, var(--l-gold-wash), #fff2cf);
  border: 1px solid var(--l-gold-line);
  border-left: 5px solid var(--l-gold);
}
.claim-listing-banner p { margin: 0; flex: 1 1 320px; min-width: 0; font-size: .96rem; line-height: 1.6; color: var(--l-ink); }
.claim-listing-banner p strong { font-weight: 800; }
.claim-listing-banner a {
  flex-shrink: 0;
  padding: 12px 22px;
  border: 0;
  border-radius: 12px;
  background: var(--l-navy);
  color: #fff;
  font-size: .95rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: background .18s ease;
}
.claim-listing-banner a:hover { background: var(--l-navy-2); color: #fff; }
.claim-listing-banner a:focus-visible { outline: 3px solid var(--l-gold); outline-offset: 2px; }

/* ---------- Tablet and phone ---------- */
@media (max-width: 900px) {
  .listing-content { padding-top: 24px; }
  .listing-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  /* Contact card first, then the story, then details */
  .listing-sidebar { display: contents; position: static; }
  .sidebar-card--contact { order: -1; }
  .listing-main { order: 0; }
  .sidebar-card--details { order: 1; }
}

@media (max-width: 600px) {
  .listing-hero { padding: 28px 0 32px; }
  .listing-hero-inner { flex-direction: column; align-items: flex-start; gap: 18px; }
  .listing-avatar { width: 80px; height: 80px; border-radius: 20px; font-size: 1.9rem; }
  .listing-meta-row { gap: 8px; margin-top: 14px; }
  .listing-meta-item { font-size: .84rem; padding: 6px 12px; }
  .listing-section { padding: 22px 18px; border-radius: 14px; }
  .sidebar-card { padding: 20px 18px; border-radius: 14px; }
  .review-form-wrap { padding: 18px 16px; }
  .review-item { padding: 16px; }
  .claim-listing-banner { padding: 18px; }
  .claim-listing-banner a { width: 100%; text-align: center; }
  .claim-listing-section { padding-bottom: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .contact-btn, .star-pick, .claim-listing-banner a, #review-submit-btn { transition: none; }
  .contact-btn:hover, .star-pick:hover { transform: none; }
}
