/* Madison Fence Pros — Mobile-first stylesheet */
:root {
  --brand: #1a5c2e;
  --brand-dark: #134520;
  --accent: #e8a020;
  --text: #1a1a1a;
  --text-muted: #555;
  --bg: #fff;
  --bg-alt: #f7f8f6;
  --border: #ddd;
  --radius: 4px;
  --max: 1100px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html { font-size: 16px; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ── Layout ──────────────────────────────────────── */
.container { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 3rem 0; border-top: 1px solid var(--border); }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--brand-dark); color: #fff; }
.section--dark a { color: #a8d5b5; }

.section-label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: .5rem;
}
.section--dark .section-label { color: #7ecf9a; }

h1 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); font-weight: 800; line-height: 1.15; }
h2 { font-size: clamp(1.4rem, 3.5vw, 2rem); font-weight: 700; line-height: 1.2; margin-bottom: 1.25rem; }
h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: .5rem; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ── Buttons / CTAs ───────────────────────────────── */
.btn {
  display: inline-block;
  padding: .75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  text-decoration: none;
  white-space: nowrap;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: #c07810; text-decoration: none; }
.btn--secondary { background: transparent; color: #fff; border: 2px solid #fff; }
.btn--secondary:hover { background: rgba(255,255,255,.1); text-decoration: none; }
.btn--outline { background: transparent; color: var(--brand); border: 2px solid var(--brand); }
.btn--outline:hover { background: var(--brand); color: #fff; text-decoration: none; }
.btn--call { background: var(--brand); color: #fff; font-size: 1.1rem; padding: .85rem 1.75rem; }
.btn--call:hover { background: var(--brand-dark); text-decoration: none; }
.btn-group { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

/* ── Site Header / Nav ────────────────────────────── */
.site-header {
  background: var(--brand-dark);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid #0a2610;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1.25rem;
  max-width: var(--max);
  margin: 0 auto;
  gap: 1rem;
}
.logo {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
}
.logo span { color: var(--accent); }
.logo:hover { text-decoration: none; }

.nav { display: none; }
@media (min-width: 768px) {
  .nav { display: flex; gap: 1.5rem; align-items: center; }
  .nav a { color: rgba(255,255,255,.85); font-size: .95rem; font-weight: 600; }
  .nav a:hover { color: #fff; text-decoration: none; }
  .nav .has-drop { position: relative; }
  .nav .drop {
    display: none;
    position: absolute;
    top: calc(100% + .5rem);
    left: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 200px;
    padding: .5rem 0;
    z-index: 200;
  }
  .nav .has-drop:hover .drop { display: block; }
  .nav .drop a { display: block; padding: .5rem 1rem; color: var(--text); font-size: .9rem; font-weight: 500; }
  .nav .drop a:hover { background: var(--bg-alt); }
}
.header-cta { flex-shrink: 0; }
.header-phone {
  display: block;
  color: var(--accent);
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
}
.header-phone:hover { text-decoration: underline; }

/* ── Hero ─────────────────────────────────────────── */
.hero {
  background: var(--brand-dark);
  color: #fff;
  padding: 4rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('images/hero.webp') center/cover no-repeat;
  opacity: .25;
}
.hero-content { position: relative; z-index: 1; }
.hero-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .3rem .75rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}
.hero h1 { color: #fff; margin-bottom: .75rem; }
.hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,.88);
  max-width: 620px;
  margin-bottom: 0;
}
.hero-locations {
  margin-top: .5rem;
  font-size: .9rem;
  color: rgba(255,255,255,.7);
}

/* ── Trust bar ────────────────────────────────────── */
.trust-bar {
  background: var(--accent);
  padding: .75rem 0;
}
.trust-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem 1.5rem;
}
.trust-item {
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: .35rem;
}
.trust-item::before { content: '✓'; }

/* ── Services grid ───────────────────────────────── */
.services-grid {
  margin-top: 2rem;
}
.service-card {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
}
.service-card:last-child { border-bottom: 1px solid var(--border); }
.service-card img { width: 100%; height: 160px; object-fit: cover; margin-bottom: .75rem; border-radius: var(--radius); }
.service-card-body { }
.service-card h3 { margin-bottom: .4rem; }
.service-card p { font-size: .92rem; color: var(--text-muted); margin-bottom: .75rem; }
.service-card a.card-link {
  font-size: .88rem;
  font-weight: 700;
  color: var(--brand);
}
.service-card a.card-link:hover { text-decoration: underline; }

/* ── Why us ───────────────────────────────────────── */
.pillars { margin-top: 2rem; }
.pillar {
  padding: 1rem 0 1rem 1rem;
  border-left: 4px solid var(--brand);
  margin-bottom: 1.25rem;
}
.pillar-icon { font-size: 1.5rem; margin-bottom: .4rem; }
.pillar h3 { margin-bottom: .4rem; }
.pillar p { font-size: .92rem; color: var(--text-muted); }

/* ── Service area chips ──────────────────────────── */
.area-chips { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; }
.area-chip {
  display: inline-block;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--brand);
  padding: .35rem .85rem;
  border-radius: var(--radius);
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
}
.area-chip:hover { background: var(--brand); color: #fff; text-decoration: none; }

/* ── Process steps ───────────────────────────────── */
.process-steps { margin-top: 2rem; }
.step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}
.step:last-child { border-bottom: 1px solid var(--border); }
.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 800;
  flex-shrink: 0;
}
.step h3 { margin-bottom: .25rem; }
.step p { font-size: .92rem; color: var(--text-muted); margin: 0; }

/* ── FAQ ─────────────────────────────────────────── */
.faq-list { margin-top: 1.5rem; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-q {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 1rem 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-family: var(--font);
}
.faq-q::after { content: '+'; font-size: 1.4rem; color: var(--brand); flex-shrink: 0; }
.faq-item.open .faq-q::after { content: '−'; }
.faq-a { display: none; padding-bottom: 1rem; font-size: .95rem; color: var(--text-muted); }
.faq-item.open .faq-a { display: block; }

/* ── Reviews ─────────────────────────────────────── */
.reviews-grid { margin-top: 2rem; }
.review-card {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
}
.review-card:last-child { border-bottom: 1px solid var(--border); }
.stars { color: var(--accent); font-size: 1.1rem; margin-bottom: .6rem; }
.review-text { font-size: .92rem; color: var(--text-muted); margin-bottom: .5rem; font-style: italic; }
.reviewer { font-size: .85rem; font-weight: 700; color: var(--text); }
.review-placeholder-note {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: var(--radius);
  padding: .5rem .85rem;
  font-size: .8rem;
  color: #856404;
  margin-top: .5rem;
}

/* ── Contact / form ──────────────────────────────── */
.contact-grid { display: grid; gap: 2rem; }
@media (min-width: 768px) { .contact-grid { grid-template-columns: 1fr 1fr; } }

.contact-info h3 { margin-bottom: 1rem; }
.contact-row { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: 1rem; }
.contact-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: .1rem; }
.contact-detail strong { display: block; font-size: .85rem; color: var(--text-muted); }
.contact-detail a { font-size: 1.05rem; font-weight: 700; color: var(--text); }

.quote-form { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem; }
.quote-form h3 { margin-bottom: 1.25rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: .3rem; color: var(--text-muted); }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: .65rem .85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .95rem;
  font-family: var(--font);
  background: #fff;
  color: var(--text);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: 2px solid var(--brand);
  outline-offset: 0;
}
.form-group textarea { min-height: 90px; resize: vertical; }
.form-submit {
  width: 100%;
  padding: .85rem;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
}
.form-submit:hover { background: var(--brand-dark); }
.form-success { display: none; background: #d4edda; color: #155724; border-radius: var(--radius); padding: 1rem; text-align: center; }

/* ── Static map ──────────────────────────────────── */
.map-wrap { margin-top: 1rem; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.map-wrap img { width: 100%; height: 200px; object-fit: cover; }
.map-link { display: block; text-align: center; padding: .6rem; background: var(--bg-alt); font-size: .88rem; font-weight: 600; color: var(--brand); }
.map-link:hover { text-decoration: underline; }

/* ── Breadcrumb ──────────────────────────────────── */
.breadcrumb {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: .5rem 0;
}
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem .5rem; font-size: .85rem; }
.breadcrumb li + li::before { content: '›'; color: var(--text-muted); }
.breadcrumb a { color: var(--brand); }

/* ── Internal links grid ──────────────────────────── */
.links-grid { margin-top: 1.5rem; }
.link-card {
  display: block;
  padding: .75rem 0;
  border-top: 1px solid var(--border);
  text-decoration: none;
}
.link-card:last-child { border-bottom: 1px solid var(--border); }
.link-card h3 { font-size: 1rem; margin-bottom: .25rem; color: var(--brand); }
.link-card p { font-size: .85rem; color: var(--text-muted); margin: 0; }
.link-card:hover h3 { text-decoration: underline; }

/* ── Related services ────────────────────────────── */
.related-list { display: flex; flex-direction: column; gap: 0; margin-top: 1.25rem; }
.related-link {
  display: block;
  padding: .75rem 0;
  border-top: 1px solid var(--border);
  text-decoration: none;
}
.related-link:last-child { border-bottom: 1px solid var(--border); }
.related-link:hover { text-decoration: none; }
.related-link strong { color: var(--brand); font-size: .95rem; display: block; margin-bottom: .15rem; }
.related-link strong:hover { text-decoration: underline; }
.related-link span { font-size: .82rem; color: var(--text-muted); }

/* ── CTA section ─────────────────────────────────── */
.cta-section {
  background: var(--brand);
  color: #fff;
  padding: 3rem 0;
  text-align: center;
}
.cta-section h2 { color: #fff; margin-bottom: .75rem; }
.cta-section p { color: rgba(255,255,255,.88); max-width: 560px; margin: 0 auto 1.5rem; }

/* ── Footer ──────────────────────────────────────── */
.site-footer {
  background: #0a1f0d;
  color: rgba(255,255,255,.7);
  padding: 2.5rem 0 1.5rem;
}
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 600px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }

.footer-brand { grid-column: 1 / -1; }
@media (min-width: 900px) { .footer-brand { grid-column: auto; } }

.footer-logo { font-size: 1.2rem; font-weight: 800; color: #fff; margin-bottom: .75rem; }
.footer-logo span { color: var(--accent); }
.footer-col h4 { color: #fff; font-size: .95rem; margin-bottom: .75rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: .4rem; }
.footer-col ul a { font-size: .88rem; color: rgba(255,255,255,.65); }
.footer-col ul a:hover { color: #fff; }
.footer-nap { font-size: .88rem; line-height: 1.8; }
.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: .8rem;
  color: rgba(255,255,255,.45);
}
.footer-disclosure {
  margin-bottom: .75rem;
  font-size: .82rem;
  color: rgba(255,255,255,.55);
  line-height: 1.6;
  max-width: 700px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .5rem; }
.footer-links a { color: rgba(255,255,255,.45); font-size: .8rem; }
.footer-links a:hover { color: rgba(255,255,255,.7); }

/* ── Page-specific hero variants ─────────────────── */
.hero--subpage { padding: 2.5rem 0 2rem; }
.hero--subpage h1 { font-size: clamp(1.4rem, 3.5vw, 2.1rem); }

/* ── Hub intro ───────────────────────────────────── */
.hub-intro { max-width: 700px; }

/* ── Local color box ─────────────────────────────── */
.local-color {
  background: var(--bg-alt);
  border-left: 4px solid var(--brand);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.local-color h3 { margin-bottom: .5rem; }
.local-color p { font-size: .95rem; color: var(--text-muted); }

/* ── About page ──────────────────────────────────── */
.about-grid { display: grid; gap: 2.5rem; }
@media (min-width: 768px) { .about-grid { grid-template-columns: 1.2fr 1fr; align-items: start; } }
.values-list { margin-top: 1rem; }
.value-item { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: 1rem; }
.value-icon { font-size: 1.4rem; flex-shrink: 0; }

/* ── Mobile CTA bar (sticky bottom) ─────────────── */
.mobile-cta {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--brand);
  padding: .75rem 1rem;
  display: flex;
  gap: .75rem;
  z-index: 90;
  border-top: 2px solid #0a2610;
}
@media (min-width: 768px) { .mobile-cta { display: none; } }
.mobile-cta a {
  flex: 1;
  text-align: center;
  padding: .65rem .5rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
}
.mobile-cta .m-call { background: var(--accent); color: #fff; }
.mobile-cta .m-quote { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.4); }

/* ── Body padding for mobile CTA bar ─────────────── */
@media (max-width: 767px) { body { padding-bottom: 64px; } }

/* ── Utility ─────────────────────────────────────── */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
