/* GreenFix Exterior Care — shared stylesheet
   Used by every generated page (see scripts/build_site.py). */

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

:root {
  --dark-green: #1a5d3a;
  --dark-green-hover: #0f4428;
  --light-green: #2d7a52;
  --white: #ffffff;
  --light-grey: #f5f5f5;
  --charcoal: #333333;
  --grey: #666666;
  --border-grey: #e0e0e0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: var(--charcoal);
  line-height: 1.6;
  background-color: var(--white);
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

/* ---------- Header & primary nav ---------- */

header {
  background-color: var(--white);
  border-bottom: 1px solid var(--border-grey);
  position: sticky;
  top: 0;
  z-index: 200;
}

.header-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
}

.header-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: nowrap;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  height: 52px;
  flex-shrink: 1;
  min-width: 0;
}
.logo img { height: 100%; width: auto; max-width: 190px; }
.phone-link-short { display: none; }

.phone-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border: 2px solid var(--dark-green);
  border-radius: 0.6rem;
  background: var(--white);
  color: var(--dark-green);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}
.phone-link:hover { background: var(--dark-green); color: var(--white); }
.phone-link:focus-visible { outline: 2px solid var(--dark-green); outline-offset: 2px; }
.header-actions { display: flex; gap: 0.5rem; margin-left: auto; }

/* Mega-menu nav */
.primary-nav { display: none; }
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 2px solid var(--dark-green);
  background: var(--white);
  color: var(--dark-green);
  font-weight: 700;
  padding: 0.5rem 0.8rem;
  border-radius: 0.6rem;
  cursor: pointer;
  font-size: 0.92rem;
}

@media (min-width: 1080px) {
  .nav-toggle { display: none; }
  .primary-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    border-top: 1px solid var(--border-grey);
    padding-top: 0.5rem;
    margin-top: 0.5rem;
  }
  .nav-item { position: relative; }
  .nav-item > a, .nav-item > .nav-label {
    display: inline-block;
    padding: 0.55rem 0.75rem;
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    border-radius: 0.4rem;
    color: var(--charcoal);
    cursor: pointer;
  }
  .nav-item > a:hover, .nav-item > .nav-label:hover,
  .nav-item:hover > .nav-label, .nav-item:focus-within > .nav-label {
    background: var(--light-grey);
    color: var(--dark-green);
  }
  .mega-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    border: 1px solid var(--border-grey);
    border-radius: 0.6rem;
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
    padding: 1rem;
    min-width: 260px;
    max-width: 560px;
    display: none;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 0.25rem 1.5rem;
  }
  .nav-item:hover .mega-panel, .nav-item:focus-within .mega-panel { display: grid; }
  .mega-panel a {
    display: block;
    padding: 0.4rem 0.5rem;
    font-size: 0.88rem;
    text-decoration: none;
    color: var(--charcoal);
    border-radius: 0.35rem;
  }
  .mega-panel a:hover { background: var(--light-grey); color: var(--dark-green); }
}

/* Mobile accordion nav */
@media (max-width: 1079px) {
  .primary-nav.is-open {
    display: block;
    border-top: 1px solid var(--border-grey);
    margin-top: 0.5rem;
    padding-top: 0.5rem;
  }
  .nav-item > a, .nav-item > .nav-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0.25rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--charcoal);
    border-bottom: 1px solid var(--border-grey);
    cursor: pointer;
  }
  .mega-panel { display: none; padding-left: 0.75rem; }
  .nav-item.is-open .mega-panel { display: block; }
  .mega-panel a {
    display: block;
    padding: 0.6rem 0.25rem;
    font-size: 0.92rem;
    text-decoration: none;
    color: var(--grey);
    border-bottom: 1px solid var(--border-grey);
  }
}

@media (max-width: 480px) {
  .header-content { padding: 0.6rem 0.85rem; }
  .header-row { gap: 0.5rem; }
  .logo { height: 38px; }
  .header-actions { gap: 0.4rem; }
  .phone-link { padding: 0.45rem 0.6rem; font-size: 0.85rem; }
  .phone-link-full { display: none; }
  .phone-link-short { display: inline; }
  .nav-toggle { padding: 0.45rem 0.6rem; font-size: 0.85rem; }
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  background: var(--light-grey);
  padding: 0.6rem 1.25rem;
  font-size: 0.85rem;
}
.breadcrumb ol {
  max-width: 1280px;
  margin: 0 auto;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  color: var(--grey);
}
.breadcrumb a { text-decoration: none; color: var(--grey); }
.breadcrumb a:hover { color: var(--dark-green); text-decoration: underline; }
.breadcrumb li:not(:last-child)::after { content: "\203A"; margin-left: 0.35rem; color: #aaa; }
.breadcrumb li[aria-current] { color: var(--charcoal); font-weight: 600; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--dark-green) 0%, var(--light-green) 100%);
  color: var(--white);
  padding: 2.75rem 1.25rem;
  text-align: center;
}
.hero-content { max-width: 820px; margin: 0 auto; }
.hero-image {
  width: 100%;
  max-width: 900px;
  height: auto;
  border-radius: 0.6rem;
  margin: 0 auto 1.5rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.hero h1 { color: var(--white); font-size: 2.1rem; font-weight: 800; margin-bottom: 0.6rem; }
.hero p { color: var(--white); }
.hero .tagline { font-size: 1.05rem; opacity: 0.95; margin-bottom: 1.1rem; }
.hero .hero-desc { font-size: 1rem; opacity: 0.92; margin-bottom: 1.5rem; }
.price-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 2rem;
  padding: 0.45rem 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}
.price-note { display: block; font-size: 0.78rem; font-weight: 400; opacity: 0.85; margin-top: 0.15rem; }
.button-group { display: flex; flex-direction: column; gap: 0.85rem; justify-content: center; align-items: center; }
@media (min-width: 620px) { .button-group { flex-direction: row; } }

.btn {
  display: inline-block;
  padding: 0.9rem 1.75rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
  text-align: center;
}
.btn-primary { background: var(--white); color: var(--dark-green); }
.btn-primary:hover { background: var(--light-grey); transform: translateY(-2px); }
.btn-secondary { background: var(--light-green); color: var(--white); border: 2px solid var(--white); }
.btn-secondary:hover { background: var(--dark-green-hover); transform: translateY(-2px); }
.btn-dark { background: var(--dark-green); color: var(--white); }
.btn-dark:hover { background: var(--dark-green-hover); transform: translateY(-2px); }
.btn:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }

/* ---------- Generic sections ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }
section { padding: 2.75rem 1.25rem; }
h2 { font-size: 1.7rem; color: var(--dark-green); margin-bottom: 1.5rem; }
h2.center { text-align: center; }
h3 { color: var(--dark-green); margin-bottom: 0.5rem; font-size: 1.1rem; }
p { color: var(--grey); }
.section-white { background: var(--white); }
.section-grey { background: var(--light-grey); }
.lede { max-width: 820px; color: var(--grey); line-height: 1.75; }
.lede.center { margin: 0 auto; text-align: center; }

.grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 700px) { .grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); } }

.card {
  background: var(--light-grey);
  border-left: 4px solid var(--dark-green);
  border-radius: 0.5rem;
  padding: 1.25rem;
}
.section-white .card { background: var(--light-grey); }
.section-grey .card { background: var(--white); }
.card p { color: var(--grey); font-size: 0.95rem; }

.related-links { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.related-links a {
  display: inline-block;
  background: var(--white);
  border: 1px solid var(--border-grey);
  border-radius: 2rem;
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
  text-decoration: none;
  color: var(--dark-green);
  font-weight: 600;
}
.related-links a:hover { background: var(--dark-green); color: var(--white); border-color: var(--dark-green); }

/* FAQ */
.faq-item { background: var(--white); padding: 1.25rem; border-radius: 0.5rem; border-left: 4px solid var(--dark-green); }
.section-grey .faq-item { background: var(--white); }
.faq-item h3 { font-size: 1rem; }
.faq-item p { font-size: 0.93rem; }

/* Trust strip */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--grey);
}
.trust-strip span { white-space: nowrap; }
.trust-strip strong { color: var(--dark-green); }

/* Map embed */
.map-embed {
  position: relative;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  padding-top: 56.25%;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}
.map-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Final CTA */
.final-cta { background: var(--dark-green); color: var(--white); text-align: center; }
.final-cta h2 { color: var(--white); }
.final-cta p { color: rgba(255,255,255,0.9); font-size: 1.05rem; margin-bottom: 1.5rem; }

/* ---------- Footer ---------- */
footer { background: var(--charcoal); color: var(--white); padding: 2.5rem 1.25rem 1.5rem; }
.footer-grid {
  max-width: 1200px;
  margin: 0 auto 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}
@media (min-width: 780px) { .footer-grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.footer-col h4 { color: var(--white); font-size: 0.95rem; margin-bottom: 0.75rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.45rem; }
.footer-col a { color: #c9d2ce; text-decoration: none; font-size: 0.88rem; }
.footer-col a:hover { color: var(--white); text-decoration: underline; }
.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid #555;
  font-size: 0.82rem;
  color: #aaa;
  text-align: center;
}
.footer-bottom a { color: #ccc; }
footer .phone-link { background: transparent; }

/* Skip link */
.skip-link {
  position: absolute; left: -999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  position: fixed; top: 0; left: 0; width: auto; height: auto;
  padding: 0.75rem 1.5rem; background: var(--dark-green); color: var(--white);
  font-weight: 700; z-index: 9999; text-decoration: none;
}

/* ---------- Quote form ---------- */
.form-container { max-width: 700px; margin: 0 auto; }
form.quote-form { background: var(--light-grey); padding: 1.75rem; border-radius: 0.6rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; margin-bottom: 0.4rem; font-weight: 600; font-size: 0.92rem; }
.required { color: var(--dark-green); font-weight: 700; }
input[type="text"], input[type="email"], input[type="tel"], textarea, select {
  width: 100%; padding: 0.7rem; border: 1px solid var(--border-grey);
  border-radius: 0.4rem; font-family: inherit; font-size: 1rem; background: var(--white); color: var(--charcoal);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--dark-green); box-shadow: 0 0 0 3px rgba(26,93,58,0.12); }
textarea { resize: vertical; min-height: 100px; }
.checkbox-group { display: grid; grid-template-columns: 1fr; gap: 0.65rem 1rem; }
@media (min-width: 700px) { .checkbox-group { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.checkbox-group label { display: flex; align-items: center; gap: 0.5rem; font-weight: 500; font-size: 0.9rem; margin: 0; }
.checkbox-group input { width: auto; }
.consent-checkbox { display: flex; align-items: flex-start; gap: 0.65rem; margin-bottom: 1.25rem; padding: 0.85rem; background: var(--white); border-radius: 0.4rem; }
.consent-checkbox input { width: auto; margin-top: 0.2rem; }
.consent-checkbox p { font-size: 0.87rem; }
.form-note { background: var(--white); padding: 0.85rem; border-radius: 0.4rem; margin-bottom: 1.25rem; border-left: 4px solid var(--light-green); font-size: 0.87rem; }
.bot-field { display: none; }
.btn-submit { background: var(--dark-green); color: var(--white); width: 100%; padding: 0.9rem; font-size: 1.05rem; }
.btn-submit:hover { background: var(--dark-green-hover); }

/* ---------- Chatbot widget ---------- */
.gf-pot-icon { display: inline-flex; width: 40px; height: 40px; flex-shrink: 0; }
.gf-pot-icon svg { width: 100%; height: 100%; }
.gf-pot-icon-sm { width: 30px; height: 30px; }
.gf-pot-icon-xs { width: 22px; height: 22px; margin-top: 0.15rem; }

@keyframes gf-sway {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}
.gf-pot-icon .gf-bloom { transform-origin: center bottom; animation: gf-sway 3.2s ease-in-out infinite; }
.gf-pot-icon .gf-bloom:nth-child(2) { animation-delay: 0.3s; }
.gf-pot-icon .gf-bloom:nth-child(3) { animation-delay: 0.6s; }

.gf-chat-toggle {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 500;
  background: var(--white);
  color: var(--dark-green);
  border: 2px solid var(--dark-green);
  border-radius: 2.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem 0.4rem 0.4rem;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}
.gf-chat-toggle:hover { background: var(--light-grey); }
.gf-chat-toggle:focus-visible { outline: 2px solid var(--dark-green); outline-offset: 2px; }
.gf-chat-toggle-label { white-space: nowrap; }

.gf-chat-teaser {
  position: fixed;
  right: 1.25rem;
  bottom: 5.75rem;
  z-index: 499;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  max-width: min(260px, calc(100vw - 2.5rem));
}
.gf-chat-teaser-bubble {
  background: var(--white);
  border: 1px solid var(--border-grey);
  border-radius: 1rem 1rem 0.25rem 1rem;
  padding: 0.7rem 0.9rem;
  font-size: 0.85rem;
  text-align: left;
  color: var(--charcoal);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  cursor: pointer;
}
.gf-chat-teaser-bubble:hover { background: var(--light-grey); }
.gf-chat-teaser-close {
  background: var(--white);
  border: 1px solid var(--border-grey);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  line-height: 1;
  font-size: 0.9rem;
  color: var(--grey);
  cursor: pointer;
  flex-shrink: 0;
}

.gf-chat-panel {
  position: fixed;
  right: 1.25rem;
  bottom: 5.25rem;
  z-index: 500;
  width: min(340px, calc(100vw - 2.5rem));
  max-height: min(520px, calc(100vh - 8rem));
  background: var(--white);
  border-radius: 0.75rem;
  box-shadow: 0 12px 32px rgba(0,0,0,0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border-grey);
}
.gf-chat-panel[hidden] { display: none; }
.gf-chat-header {
  background: linear-gradient(135deg, var(--dark-green) 0%, var(--light-green) 100%);
  color: var(--white);
  padding: 0.65rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
}
.gf-chat-header-title { display: flex; flex-direction: column; line-height: 1.25; flex: 1; }
.gf-chat-header-sub { font-size: 0.72rem; opacity: 0.9; font-weight: 400; }
.gf-chat-close {
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
}
.gf-chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 120px;
}
.gf-chat-row { display: flex; align-items: flex-end; gap: 0.4rem; }
.gf-chat-row-user { justify-content: flex-end; }
.gf-chat-msg {
  padding: 0.6rem 0.8rem;
  border-radius: 0.6rem;
  font-size: 0.88rem;
  line-height: 1.5;
  max-width: 82%;
}
.gf-chat-bot { background: var(--light-grey); color: var(--charcoal); }
.gf-chat-user { background: var(--dark-green); color: var(--white); }
.gf-chat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 0.85rem 0.6rem;
}
.gf-chat-chip {
  background: var(--white);
  border: 1px solid var(--dark-green);
  color: var(--dark-green);
  border-radius: 1rem;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  cursor: pointer;
}
.gf-chat-chip:hover { background: var(--dark-green); color: var(--white); }
.gf-chat-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--border-grey);
}
.gf-chat-input {
  flex: 1;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border-grey);
  border-radius: 0.4rem;
  font-size: 0.9rem;
}
.gf-chat-send {
  background: var(--dark-green);
  color: var(--white);
  border: none;
  border-radius: 0.4rem;
  padding: 0.55rem 1rem;
  font-weight: 700;
  cursor: pointer;
}
.gf-chat-send:hover { background: var(--dark-green-hover); }

@media print {
  header, .breadcrumb, .button-group, form, .final-cta, .gf-chat-toggle, .gf-chat-panel, .gf-chat-teaser { display: none; }
}
