/* ============================================================
   Roofilio — Angi-style design system
   Tokens live in tokens.css. All shared layout/component
   styles live here. Pages compose with Tailwind utilities
   for spacing/grid plus these .gc-* / .ag-* classes.
   ============================================================ */

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ag-body);
  background: var(--ag-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--ag-ink);
  letter-spacing: -0.02em;
}

a { color: inherit; text-decoration: none; }

/* ---------------- Layout shell ---------------- */
.gc-shell {
  max-width: var(--max-content-width);
  margin: 0 auto;
  /* Horizontal-only so nested components can set their own vertical padding without it being clobbered */
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* ---------------- Top navigation ---------------- */
.gc-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ag-border);
}

.gc-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.gc-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  color: var(--ag-ink);
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}

.gc-brand .dot {
  width: 12px;
  height: 12px;
  border-radius: 9999px;
  background: var(--ag-red);
  display: inline-block;
}

.gc-brand-mark {
  font-weight: 800;
  color: var(--ag-ink);
}

.gc-brand-mark span {
  color: var(--ag-red);
}

.gc-nav-links {
  display: none;
  gap: 0.25rem;
}

.gc-nav-links a {
  color: var(--ag-body);
  padding: 0.45rem 0.85rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.gc-nav-links a:hover {
  color: var(--ag-red);
  background: var(--ag-red-soft);
}

@media (min-width: 900px) {
  .gc-nav-links { display: inline-flex; }
}

/* Hamburger button */
.gc-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.2rem;
  height: 2.2rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
}
.gc-hamburger span {
  display: block;
  height: 2px;
  background: var(--ag-ink);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s, width 0.2s;
  width: 100%;
}
.gc-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.gc-hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.gc-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (min-width: 900px) { .gc-hamburger { display: none; } }

/* Mobile menu dropdown */
.gc-mobile-menu {
  display: none;
  border-top: 1px solid var(--ag-border);
  background: #fff;
  padding: 0.5rem 0 0.75rem;
}
.gc-mobile-menu.open { display: block; }
.gc-mobile-menu nav {
  display: flex;
  flex-direction: column;
  padding: 0 1rem;
}
.gc-mobile-menu nav a {
  padding: 0.75rem 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ag-body);
  border-bottom: 1px solid var(--ag-border);
}
.gc-mobile-menu nav a:last-child { border-bottom: none; }
.gc-mobile-menu nav a:hover { color: var(--ag-red); }
@media (min-width: 900px) { .gc-mobile-menu { display: none !important; } }

.gc-nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.gc-nav-phone {
  display: none;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  color: var(--ag-ink);
  font-size: 0.95rem;
}

.gc-nav-phone svg { color: var(--ag-red); }

@media (min-width: 740px) {
  .gc-nav-phone { display: inline-flex; }
}

/* ---------------- Buttons ---------------- */
.gc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1.4rem;
  min-height: 44px;          /* tap target floor */
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  text-decoration: none;
}

.gc-btn:active { transform: translateY(1px); }

.gc-btn-primary {
  background: var(--ag-red);
  color: #fff;
  border-color: var(--ag-red);
}
.gc-btn-primary:hover {
  background: var(--ag-red-deep);
  border-color: var(--ag-red-deep);
}

.gc-btn-ghost {
  background: #fff;
  color: var(--ag-ink);
  border-color: var(--ag-border-strong);
}
.gc-btn-ghost:hover {
  border-color: var(--ag-ink);
  background: var(--ag-warm);
}

.gc-btn-outline-red {
  background: #fff;
  color: var(--ag-red);
  border-color: var(--ag-red);
}
.gc-btn-outline-red:hover {
  background: var(--ag-red-soft);
}

.gc-btn-dark {
  background: var(--ag-ink);
  color: #fff;
  border-color: var(--ag-ink);
}
.gc-btn-dark:hover {
  background: var(--ag-dark-2);
}

.gc-btn-cta-white {
  background: #fff;
  color: var(--ag-red);
  border-color: #fff;
}
.gc-btn-cta-white:hover {
  background: var(--ag-warm);
}

.gc-btn-cta-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}
.gc-btn-cta-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
}

/* ---------------- Pills & tags ---------------- */
.gc-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.85rem;
  border-radius: 9999px;
  background: var(--ag-red-soft);
  color: var(--ag-red);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.7rem;
}

.gc-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 9999px;
  background: var(--ag-warm);
  color: var(--ag-body);
  border: 1px solid var(--ag-border);
  font-weight: 600;
  font-size: 0.82rem;
}

.gc-tag-red { background: var(--ag-red-soft); color: var(--ag-red); border-color: transparent; }

/* ---------------- Cards ---------------- */
.gc-card {
  background: #fff;
  border: 1px solid var(--ag-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.gc-grid-card {
  display: block;
  background: #fff;
  border: 1px solid var(--ag-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.gc-grid-card:hover {
  transform: translateY(-2px);
  border-color: var(--ag-border-strong);
  box-shadow: var(--shadow-md);
}

/* ---------------- Hero ---------------- */
.ag-hero {
  position: relative;
  background:
    radial-gradient(120% 80% at 90% 10%, var(--ag-red-soft) 0%, transparent 55%),
    linear-gradient(180deg, #fffbf5 0%, #ffffff 75%);
  border-bottom: 1px solid var(--ag-border);
  overflow: hidden;
}

/* Photo-hero variant — background image with dark overlay */
.ag-hero.ag-hero-photo {
  background:
    url('/assets/roofing-hero-desktop.jpg') center center / cover no-repeat;
  border-bottom: none;
}

.ag-hero-overlay {
  display: none;
}

.ag-hero.ag-hero-photo .ag-hero-overlay {
  display: block;
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(15, 10, 5, 0.72) 0%,
    rgba(15, 10, 5, 0.55) 55%,
    rgba(15, 10, 5, 0.28) 100%
  );
  z-index: 0;
}

.ag-hero.ag-hero-photo .ag-hero-shell {
  position: relative;
  z-index: 1;
}

/* Light text on photo background */
.ag-hero.ag-hero-photo h1 { color: #fff; }
.ag-hero.ag-hero-photo p.lead { color: rgba(255, 255, 255, 0.88); }
.ag-hero.ag-hero-photo .ag-hero-meta { color: rgba(255, 255, 255, 0.78); }
.ag-hero.ag-hero-photo .ag-hero-meta svg { color: var(--ag-orange); }
.ag-hero.ag-hero-photo .gc-pill {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
}

/* CTA row: Call + Browse Cities buttons */
.ag-hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

/* Ghost button readable on dark backgrounds */
.ag-hero.ag-hero-photo .gc-btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(4px);
}
.ag-hero.ag-hero-photo .gc-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: #fff;
}

@media (max-width: 959px) {
  .ag-hero-photo {
    background-image: url('/assets/roofing-hero-mobile.jpg');
  }
  /* Hide the right-side card on mobile — content is enough */
  .ag-hero-shell > .ag-hero-card { display: none; }
}

.ag-hero-shell {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 3rem 1.25rem 3.25rem;
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 960px) {
  .ag-hero-shell {
    grid-template-columns: 1.15fr 0.85fr;
    padding: 4.5rem 1.25rem 5rem;
  }
}

.ag-hero h1 {
  font-size: clamp(2.25rem, 4.6vw, 3.5rem);
  font-weight: 800;
  line-height: 1.05;
  margin: 0 0 1rem;
  color: var(--ag-ink);
}

.ag-hero p.lead {
  font-size: 1.1rem;
  color: var(--ag-body);
  margin: 0 0 1.75rem;
  max-width: 36rem;
}

.ag-hero-form {
  background: #fff;
  border: 1px solid var(--ag-border);
  border-radius: var(--radius-lg);
  padding: 0;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
}

@media (min-width: 540px) {
  .ag-hero-form { grid-template-columns: 1.3fr 1.2fr auto; }
}

.ag-input,
.ag-select {
  appearance: none;
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--ag-border);
  border-radius: 0;
  padding: 1rem 1.15rem;
  font-size: 0.95rem;
  color: var(--ag-ink);
  font-weight: 600;
  transition: background 0.15s ease;
}
.ag-input::placeholder { color: var(--ag-muted); font-weight: 500; }
.ag-input:focus,
.ag-select:focus {
  outline: none;
  background: var(--ag-warm);
  box-shadow: inset 0 0 0 2px var(--ag-red-soft);
}

@media (min-width: 540px) {
  .ag-input,
  .ag-select {
    border-bottom: none;
    border-right: 1px solid var(--ag-border);
  }
  .ag-hero-form > :last-child { border-right: none; }
}

.ag-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2371717a' 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 1rem center;
  padding-right: 2.5rem;
}

.ag-hero-form > .gc-btn,
.ag-hero-form > button.gc-btn {
  border-radius: 0;
  height: 100%;
  padding: 1rem 1.6rem;
  min-height: 56px;
}

.ag-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-top: 1.1rem;
  color: var(--ag-muted);
  font-size: 0.85rem;
}

.ag-hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
}

.ag-hero-meta svg { color: var(--ag-red); }

/* Hero illustration card */
.ag-hero-card {
  background: #fff;
  border: 1px solid var(--ag-border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
}

/* When the card contains only a full-bleed visual, collapse padding so
   the dark visual fills edge-to-edge (home hero usage) */
.ag-hero-card:has(> .ag-hero-card-visual:only-child) {
  padding: 0;
  overflow: hidden;
}

.ag-hero-card-visual {
  border-radius: 0;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(249, 115, 22, 0.32) 0%, transparent 55%),
    linear-gradient(135deg, #1f1b18 0%, #2a221b 55%, #18120e 100%);
  color: #fff;
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
  min-height: 220px;
  height: 100%;
}

.ag-hero-card-visual::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(closest-side, rgba(249, 115, 22, 0.55), transparent 70%);
  filter: blur(8px);
}

.ag-hero-card-eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 700;
}

.ag-hero-card-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0.5rem 0 0.4rem;
  color: #fff;
  letter-spacing: -0.01em;
}

.ag-hero-card-list {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.65rem;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.92);
}

.ag-hero-card-list li {
  position: relative;
  padding-left: 1.6rem;
}

.ag-hero-card-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3rem;
  width: 18px;
  height: 18px;
  border-radius: 9999px;
  background: var(--ag-orange);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 10px;
  background-repeat: no-repeat;
  background-position: center;
}

/* ---------------- Trust band ---------------- */
.ag-trust {
  background: var(--ag-warm);
  border-bottom: 1px solid var(--ag-border);
}

.ag-trust-shell {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 1.75rem 1.25rem;
  display: grid;
  gap: 1.25rem 1.5rem;
  grid-template-columns: repeat(2, 1fr);
  text-align: left;
}

@media (min-width: 700px) {
  .ag-trust-shell { grid-template-columns: repeat(4, 1fr); }
}

.ag-trust-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  justify-content: flex-start;
}

.ag-trust-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--ag-red-soft);
  color: var(--ag-red);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ag-trust-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ag-muted);
  font-weight: 700;
}

.ag-trust-value {
  font-size: 1.15rem;
  color: var(--ag-ink);
  font-weight: 800;
  margin-top: 0.1rem;
}

/* ---------------- Section ---------------- */
.ag-section {
  padding: 4rem 0;
}

.ag-section.tight { padding: 2.5rem 0; }
.ag-section.alt   { background: var(--ag-warm); }
.ag-section.dark  { background: var(--ag-dark); color: #fff; }

.ag-section-shell {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.ag-section-head {
  text-align: center;
  margin-bottom: 2.5rem;
}

.ag-section-head .eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ag-red);
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.ag-section-head h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.4rem);
  font-weight: 800;
  margin: 0 0 0.75rem;
  color: var(--ag-ink);
}

.ag-section-head p {
  margin: 0 auto;
  max-width: 38rem;
  color: var(--ag-body);
  font-size: 1.05rem;
}

.ag-section.dark .ag-section-head .eyebrow { color: var(--ag-orange); }
.ag-section.dark .ag-section-head h2 { color: #fff; }
.ag-section.dark .ag-section-head p { color: rgba(255, 255, 255, 0.78); }

/* ---------------- Service category grid ---------------- */
.ag-services-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 540px) {
  .ag-services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .ag-services-grid { grid-template-columns: repeat(4, 1fr); }
}

.ag-service-card {
  background: #fff;
  border: 1px solid var(--ag-border);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
}
.ag-service-card:hover {
  transform: translateY(-3px);
  border-color: var(--ag-red);
  box-shadow: var(--shadow-md);
}

.ag-service-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--ag-red-soft);
  color: var(--ag-red);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ag-service-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ag-ink);
  margin: 0;
}

.ag-service-desc {
  font-size: 0.92rem;
  color: var(--ag-body);
  margin: 0;
  line-height: 1.55;
  flex: 1;
}

.ag-service-link {
  margin-top: 0.25rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ag-red);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* ---------------- How it works ---------------- */
.ag-steps {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  counter-reset: ag-step;
}

.ag-step {
  background: #fff;
  border: 1px solid var(--ag-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  counter-increment: ag-step;
}

.ag-step::before {
  content: counter(ag-step, decimal-leading-zero);
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-size: 2rem;
  font-weight: 800;
  color: var(--ag-red-soft);
  line-height: 1;
}

.ag-step-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--ag-red);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.ag-step h3 {
  font-size: 1.1rem;
  margin: 0 0 0.4rem;
  font-weight: 800;
  color: var(--ag-ink);
}

.ag-step p {
  margin: 0;
  color: var(--ag-body);
  font-size: 0.95rem;
}

/* ---------------- City grid (homepage + cities directory) ---------------- */
.ag-city-card {
  background: #fff;
  border: 1px solid var(--ag-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.ag-city-card:hover {
  border-color: var(--ag-red);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.ag-city-name {
  font-weight: 700;
  color: var(--ag-ink);
}

.ag-city-meta {
  font-size: 0.78rem;
  color: var(--ag-muted);
  margin-top: 0.1rem;
}

.ag-city-count {
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--ag-warm);
  color: var(--ag-body);
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  flex-shrink: 0;
}

/* ---------------- Testimonials ---------------- */
.ag-reviews {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.ag-review {
  background: #fff;
  border: 1px solid var(--ag-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.ag-stars { color: var(--ag-amber); font-size: 1rem; letter-spacing: 0.08em; }

.ag-review-quote {
  font-size: 0.95rem;
  color: var(--ag-ink);
  line-height: 1.6;
  margin: 0;
  flex: 1;
}

.ag-review-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--ag-border);
}

.ag-review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  background: var(--ag-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.ag-review-name {
  font-weight: 700;
  color: var(--ag-ink);
  font-size: 0.92rem;
  margin: 0;
}

.ag-review-role {
  color: var(--ag-muted);
  font-size: 0.8rem;
  margin: 0.1rem 0 0;
}

/* ---------------- FAQ ---------------- */
.ag-faq {
  max-width: 56rem;
  margin: 0 auto;
  display: grid;
  gap: 0.75rem;
}

.ag-faq details {
  background: #fff;
  border: 1px solid var(--ag-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  transition: border-color 0.15s ease;
}

.ag-faq details[open] { border-color: var(--ag-red); }

.ag-faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ag-ink);
  list-style: none;
  position: relative;
  padding-right: 2rem;
}
.ag-faq summary::-webkit-details-marker { display: none; }
.ag-faq summary::after {
  content: "+";
  position: absolute;
  top: -2px;
  right: 0;
  width: 22px;
  height: 22px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ag-red-soft);
  color: var(--ag-red);
  font-weight: 800;
  font-size: 1.05rem;
}
.ag-faq details[open] summary::after { content: "–"; }

.ag-faq p {
  margin: 0.75rem 0 0;
  color: var(--ag-body);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* ---------------- CTA band ---------------- */
.ag-cta {
  background:
    radial-gradient(80% 100% at 100% 0%, rgba(249, 115, 22, 0.45) 0%, transparent 60%),
    linear-gradient(135deg, #18181b 0%, #27272a 100%);
  color: #fff;
  border-radius: var(--radius-xl);
}

.ag-cta-inner {
  padding: 3rem 2rem;
  display: grid;
  gap: 1.5rem;
  text-align: center;
}

@media (min-width: 800px) {
  .ag-cta-inner {
    grid-template-columns: 1.4fr auto;
    align-items: center;
    padding: 3.25rem 3rem;
    text-align: left;
  }
}

.ag-cta h2 {
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  margin: 0 0 0.5rem;
}
.ag-cta p { color: rgba(255, 255, 255, 0.82); margin: 0; }

.ag-cta-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

@media (min-width: 800px) { .ag-cta-actions { justify-content: flex-end; } }

/* ---------------- Footer ---------------- */
.gc-footer {
  background: var(--ag-dark);
  color: rgba(255, 255, 255, 0.78);
  margin-top: 0;
}

.gc-footer a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}
.gc-footer a:hover { color: #fff; }

.ag-footer-top {
  display: grid;
  gap: 2.5rem;
  padding: 3.5rem 0 2.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 800px) {
  .ag-footer-top { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
}

.ag-footer-brand { color: #fff; font-weight: 800; font-size: 1.15rem; }
.ag-footer-brand .dot { background: var(--ag-red); }

.ag-footer-col-title {
  color: #fff;
  font-weight: 700;
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.ag-footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
  font-size: 0.92rem;
}

.ag-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.25rem 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.ag-footer-bottom a:hover { color: #fff; }

/* ---------------- Legal / generic article ---------------- */
.ag-article {
  background: #fff;
  border: 1px solid var(--ag-border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
}

.ag-article h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.4rem);
  margin: 0 0 0.5rem;
  font-weight: 800;
}

.ag-article .meta {
  color: var(--ag-muted);
  font-size: 0.85rem;
  margin-bottom: 1.75rem;
}

.ag-article h2 {
  font-size: 1.2rem;
  margin-top: 2rem;
  margin-bottom: 0.6rem;
  color: var(--ag-ink);
  font-weight: 800;
}

.ag-article p, .ag-article ul, .ag-article ol {
  color: var(--ag-body);
  font-size: 0.98rem;
  line-height: 1.7;
  margin: 0 0 1rem;
}

.ag-article a { color: var(--ag-red); text-decoration: underline; text-underline-offset: 3px; }
.ag-article a:hover { color: var(--ag-red-deep); }

/* ---------------- Breadcrumbs ---------------- */
.mk-breadcrumbs {
  font-size: 0.85rem;
  color: var(--ag-muted);
}
.mk-breadcrumbs a { color: var(--ag-muted); }
.mk-breadcrumbs a:hover { color: var(--ag-red); }

/* ---------------- Misc category page helpers ---------------- */
.mk-shell { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }
.mk-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ag-border);
}
.mk-form-field {
  width: 100%;
  border: 1px solid var(--ag-border);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  background: var(--ag-warm);
  color: var(--ag-ink);
  font-weight: 600;
  font-size: 0.95rem;
}
.mk-form-field:focus {
  outline: none;
  background: #fff;
  border-color: var(--ag-red);
  box-shadow: 0 0 0 3px var(--ag-red-soft);
}
.mk-stat {
  border: 1px solid var(--ag-border);
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 1rem 1.1rem;
}
.mk-card {
  border: 1px solid var(--ag-border);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.mk-logo {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  color: var(--ag-red);
  background: var(--ag-red-soft);
  flex-shrink: 0;
}
.mk-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 9999px;
  background: var(--ag-red-soft);
  color: var(--ag-red);
  font-size: 0.8rem;
  font-weight: 700;
}
.mk-neutral-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: 9999px;
  background: var(--ag-warm);
  color: var(--ag-body);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--ag-border);
}
.mk-divider { border-top: 1px solid var(--ag-border); }

/* ---------------- Contractor (pro) cards — used by /{state}/{city}/{category} pages ---------------- */
.ag-pro-list { display: grid; gap: 1rem; }

.ag-pro-card {
  background: #fff;
  border: 1px solid var(--ag-border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
@media (min-width: 720px) {
  .ag-pro-card { padding: 1.4rem 1.5rem; }
}
.ag-pro-card:hover { border-color: var(--ag-border-strong); box-shadow: var(--shadow-md); transform: translateY(-1px); }

.ag-pro-card-body { min-width: 0; }
.ag-pro-photos { margin-top: 1.1rem; position: relative; }

/* Desktop two-column layout: content left, compact photo panel right */
@media (min-width: 720px) {
  .ag-pro-card {
    display: flex;
    flex-direction: row;
    gap: 1.25rem;
    align-items: flex-start;
  }
  .ag-pro-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .ag-pro-photos {
    width: 220px;
    flex-shrink: 0;
    margin-top: 0;
  }
  /* Compact 4:3 photo on desktop instead of full-width 16:9 */
  .ag-pro-card .ag-pro-photo-slide { aspect-ratio: 4 / 3; }
}

.ag-pro-top {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 720px) {
  .ag-pro-top { grid-template-columns: 1fr auto; gap: 1.25rem; }
}

.ag-pro-identity { display: flex; gap: 1rem; align-items: flex-start; min-width: 0; }

.ag-pro-rank {
  flex-shrink: 0;
  min-width: 36px;
  height: 36px;
  padding: 0 0.55rem;
  border-radius: 9999px;
  background: var(--ag-ink);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.01em;
}

.ag-pro-logo,
.ag-pro-logo-img {
  display: none;
}
@media (min-width: 720px) {
  .ag-pro-logo, .ag-pro-logo-img {
    display: inline-flex;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }
  .ag-pro-logo-img { display: block; }
}
.ag-pro-logo {
  background: var(--ag-red-soft);
  color: var(--ag-red);
  font-weight: 800;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ag-pro-logo-img { object-fit: cover; border: 1px solid var(--ag-border); }

.ag-pro-headings { min-width: 0; flex: 1; display: grid; gap: 0.35rem; }
.ag-pro-name-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.ag-pro-name { margin: 0; font-size: 1rem; font-weight: 800; color: var(--ag-ink); line-height: 1.25; letter-spacing: -0.01em; }
@media (min-width: 720px) { .ag-pro-name { font-size: 1.2rem; } }

.ag-pro-availability {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #166534;
  background: #dcfce7;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
}
.ag-pro-dot {
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
}

.ag-pro-rating { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
.ag-pro-stars { color: var(--ag-amber); font-size: 1rem; letter-spacing: 0.05em; font-weight: 700; }
.ag-pro-rating-num { font-weight: 800; color: var(--ag-ink); font-size: 0.95rem; }
.ag-pro-rating-meta { font-size: 0.85rem; color: var(--ag-muted); font-weight: 600; }

.ag-pro-meta-row { display: flex; flex-wrap: wrap; gap: 0.5rem 1.1rem; font-size: 0.82rem; color: var(--ag-muted); font-weight: 600; }
.ag-pro-meta-item { display: inline-flex; align-items: center; gap: 0.35rem; }
.ag-pro-meta-item svg { color: var(--ag-red); }
.ag-meta-highlight { color: var(--ag-amber, #f59e0b); }
.ag-meta-highlight svg { color: var(--ag-amber, #f59e0b); }

.ag-pro-cta { display: flex; flex-direction: row; gap: 0.5rem; }
.ag-pro-call, .ag-pro-quote { flex: 1; justify-content: center; padding: 0.75rem 1rem; white-space: nowrap; }
@media (min-width: 720px) {
  .ag-pro-call, .ag-pro-quote { padding: 0.85rem 1.25rem; }
}

.ag-pro-blurb {
  margin: 0.9rem 0 0;
  font-size: 0.88rem;
  color: var(--ag-body);
  line-height: 1.6;
}

.ag-pro-footer {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}
.ag-pro-verified { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.ag-pro-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.7rem;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: #dcfce7;
  color: #166534;
}
.ag-pro-badge svg { color: #16a34a; }
.ag-pro-badge-neutral { background: var(--ag-red-soft); color: var(--ag-red); }
.ag-pro-badge-neutral svg { color: var(--ag-red); }

.ag-pro-area { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; font-size: 0.8rem; color: var(--ag-muted); }
.ag-pro-area-item { display: inline-flex; align-items: center; gap: 0.35rem; }
.ag-pro-area-item svg { color: var(--ag-red); flex-shrink: 0; }

/* ---------------- Pro card photo slideshow ---------------- */

.ag-pro-photos-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-radius: var(--radius-md);
  background: var(--ag-warm);
}
.ag-pro-photos-track::-webkit-scrollbar { display: none; }

.ag-pro-photo-slide {
  flex: 0 0 100%;
  margin: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  aspect-ratio: 16 / 9;
  background: var(--ag-warm);
  position: relative;
  overflow: hidden;
}

.ag-pro-photo-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: var(--ag-warm);
}

/* Prev / next arrow buttons */
.ag-pro-photos-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-60%);
  z-index: 2;
  background: rgba(0,0,0,0.38);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  padding: 0;
}
.ag-pro-photos-arrow:hover { background: rgba(0,0,0,0.6); }
.ag-pro-photos-prev { left: 0.4rem; }
.ag-pro-photos-next { right: 0.4rem; }

/* Arrows only on mobile — desktop uses drag-to-swipe */
@media (min-width: 720px) {
  .ag-pro-photos-arrow { display: none; }
  .ag-pro-photos-track { cursor: grab; }
  .ag-pro-photos-track.dragging { cursor: grabbing; user-select: none; }
}

/* Dot indicators */
.ag-pro-photos-dots {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
}
.ag-pro-photos-dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: var(--ag-border-strong);
  transition: background 0.2s, transform 0.2s;
}
.ag-pro-photos-dot.active {
  background: var(--ag-accent, #e67e22);
  transform: scale(1.3);
}

/* ---------------- Photo loading states ---------------- */
@keyframes ag-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes ag-spin {
  to { transform: rotate(360deg); }
}

/* Card slide shimmer — shown while lazy image is in flight */
.ag-pro-photo-slide.ag-slide-loading {
  background: linear-gradient(90deg, #e8e3dd 25%, #f0ede9 50%, #e8e3dd 75%);
  background-size: 200% 100%;
  animation: ag-shimmer 1.3s ease-in-out infinite;
}
.ag-pro-photo-slide.ag-slide-loading img { opacity: 0; }

/* Lightbox image + loader wrapper */
.ag-lightbox-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 1;
}

/* Spinner overlaid on the frame while the next image preloads */
.ag-lightbox-loader {
  display: none;
  position: absolute;
  width: 2.2rem;
  height: 2.2rem;
  border: 3px solid rgba(255,255,255,0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ag-spin 0.7s linear infinite;
}

/* ---------------- Photo lightbox overlay ---------------- */
.ag-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,0.93);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3rem 0 1.5rem;
}
.ag-lightbox.open { display: flex; }

.ag-lightbox-img {
  max-width: 92vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  user-select: none;
  transition: opacity 0.2s ease;
}

.ag-lightbox-close {
  position: fixed;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 2.4rem;
  height: 2.4rem;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.ag-lightbox-close:hover { background: rgba(255,255,255,0.3); }

.ag-lightbox-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 2.8rem;
  height: 2.8rem;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  padding: 0;
}
.ag-lightbox-arrow:hover { background: rgba(255,255,255,0.28); }
.ag-lightbox-prev { left: 0.75rem; }
.ag-lightbox-next { right: 0.75rem; }

.ag-lightbox-dots {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}
.ag-lightbox-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  transition: background 0.2s, transform 0.2s;
}
.ag-lightbox-dot.active {
  background: #fff;
  transform: scale(1.35);
}

/* ---------------- Pro card review quote ---------------- */
.ag-pro-review {
  margin: 0.9rem 0 0;
  padding: 0.7rem 0.9rem;
  border-left: 3px solid var(--ag-accent, #e67e22);
  background: var(--ag-warm);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.ag-pro-review-text {
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--ag-body);
  font-style: italic;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ag-pro-review-author {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--ag-muted);
  font-style: normal;
  font-weight: 600;
}
.ag-pro-review-stars {
  color: #f5a623;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

/* ---------------- Pro card business hours ---------------- */
.ag-pro-hours {
  margin-top: 0.9rem;
}
.ag-pro-hours-toggle {
  font-size: 0.8rem;
  color: var(--ag-muted);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
}
.ag-pro-hours-list {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.78rem;
  color: var(--ag-text-muted);
  line-height: 1.9;
}

/* ---------------- Old/legacy helpers kept for compatibility ---------------- */
.section { padding: var(--space-xl) 0; }
.section.light { background: var(--ag-warm); }
.section .content { max-width: var(--max-content-width); margin: 0 auto; }
.grid { display: grid; gap: var(--space-lg); }
@media (min-width: 768px) {
  .grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.cta-button {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 1.4rem;
  border-radius: 9999px;
  background: var(--ag-red);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.cta-button:hover { background: var(--ag-red-deep); }

main { min-height: 60vh; }

@media (max-width: 767px) {
  /* Tighter gutters but never zero — longhand keeps vertical padding intact */
  .gc-shell { padding-left: 1rem; padding-right: 1rem; }

  /* Tighter vertical rhythm — desktop's 4rem stack is too tall on phones */
  .ag-section { padding: 2.75rem 0; }
  .ag-section.tight { padding: 1.5rem 0; }
  .ag-section-head { margin-bottom: 1.75rem; }
  .ag-section-head p { font-size: 0.98rem; }

  /* Hero compresses */
  .ag-hero-shell { padding: 2.5rem 1rem 2.75rem; gap: 1.75rem; }
  .ag-hero.ag-hero-photo { min-height: 420px; }
  .ag-hero h1 { font-size: clamp(1.85rem, 7.5vw, 2.4rem); }
  .ag-hero p.lead { font-size: 1rem; margin-bottom: 1.25rem; }
  .ag-hero-cta-row { gap: 0.6rem; }
  .ag-hero-cta-row .gc-btn { flex: 1 1 auto; justify-content: center; }
  .ag-hero-card-visual { padding: 1.35rem; min-height: 180px; }

  /* Trust band */
  .ag-trust-shell { padding: 1.25rem 1rem; gap: 1rem 1.25rem; }
  .ag-trust-icon { width: 38px; height: 38px; flex-shrink: 0; }
  .ag-trust-value { font-size: 1rem; }
  .ag-trust-label { font-size: 0.72rem; }

  /* Steps + service grid spacing */
  .ag-step { padding: 1.25rem; }
  .ag-step::before { font-size: 1.5rem; }
  .ag-service-card { padding: 1.15rem; }
  .ag-review { padding: 1.25rem; }

  /* CTA band */
  .ag-cta-inner { padding: 2.25rem 1.25rem; }
  .ag-cta h2 { font-size: 1.3rem; }

  /* Footer */
  .ag-footer-top { padding: 2.5rem 0 1.75rem; gap: 1.75rem; }
  .ag-footer-bottom { padding: 1rem 0 1.25rem; }

  /* FAQ tighter */
  .ag-faq details { padding: 0.9rem 1rem; }

  /* Contractor cards — keep identity row from cramping on 320–375px */
  .ag-pro-card { padding: 1.15rem 1.15rem 1.25rem; }
  .ag-pro-top { gap: 1rem; }
  .ag-pro-identity { gap: 0.75rem; }
  .ag-pro-rank {
    min-width: 28px;
    height: 28px;
    padding: 0 0.5rem;
    font-size: 0.75rem;
  }
  .ag-pro-logo, .ag-pro-logo-img { width: 48px; height: 48px; }
  .ag-pro-name { font-size: 1.05rem; }
  .ag-pro-meta-row { gap: 0.35rem 0.85rem; font-size: 0.78rem; }
  .ag-pro-footer { gap: 0.75rem; }
  .ag-pro-area { justify-content: flex-start; }
}

/* Prevent horizontal overflow from long unbreakable strings (URLs, place names) */
.ag-pro-name, .ag-pro-blurb, .ag-review-quote, .ag-section-head h2, .ag-hero h1 {
  overflow-wrap: anywhere;
}
