/* Melissa Tree Service — shared stylesheet
   Mobile-first, no external dependencies. */

:root {
  --green-900: #1e3a24;
  --green-800: #25492d;
  --green-700: #2f5d38;
  --green-600: #3a7047;
  --green-100: #e7f0e7;
  --earth-700: #5b4a32;
  --earth-100: #f4efe6;
  --ink: #22281f;
  --muted: #5c665a;
  --white: #ffffff;
  --accent: #d97b2b; /* warm CTA */
  --accent-dark: #b8661f;
  --radius: 10px;
  --maxw: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  line-height: 1.65;
  background: var(--white);
  -webkit-text-size-adjust: 100%;
}

img, svg { max-width: 100%; height: auto; }
svg.ic { vertical-align: -3px; margin-right: .15em; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.1rem; }

/* ---------- Header ---------- */
.site-header {
  background: var(--green-900);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem; padding: .7rem 1.1rem; max-width: var(--maxw); margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--white); }
.brand svg { flex: 0 0 auto; }
.brand-name { font-weight: 800; font-size: 1.05rem; line-height: 1.2; }
.brand-name small { display: block; font-weight: 500; font-size: .72rem; color: #cfe0cf; letter-spacing: .04em; }

.header-call {
  display: inline-flex; align-items: center; gap: .45rem;
  background: var(--accent); color: #fff; text-decoration: none;
  font-weight: 700; padding: .6rem .95rem; border-radius: 999px;
  font-size: .95rem; white-space: nowrap;
}
.header-call:hover, .header-call:focus { background: var(--accent-dark); }

.main-nav { background: var(--green-800); }
.main-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch;
  max-width: var(--maxw); margin: 0 auto;
}
.main-nav li { flex: 0 0 auto; }
.main-nav a {
  display: block; color: #e6efe6; text-decoration: none;
  padding: .65rem .95rem; font-size: .92rem; font-weight: 600; white-space: nowrap;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { background: var(--green-700); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  background: var(--green-900);
  color: #fff; padding: 2.6rem 0 2.2rem; position: relative; overflow: hidden;
  border-bottom: 4px solid var(--accent);
}
.hero h1 { font-size: 1.9rem; line-height: 1.2; margin: 0 0 .6rem; max-width: 22ch; }
.hero p.lead { font-size: 1.05rem; color: #dce8dc; margin: 0 0 1.2rem; max-width: 46ch; }
.hero-badges { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.4rem; padding: 0; list-style: none; }
.hero-badges li {
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px; padding: .3rem .8rem; font-size: .82rem; font-weight: 600;
}
.cta-row { display: flex; flex-wrap: wrap; gap: .7rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  text-decoration: none; font-weight: 700; border-radius: var(--radius);
  padding: .85rem 1.4rem; font-size: 1rem; border: 2px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover, .btn-primary:focus { background: var(--accent-dark); }
.btn-outline { background: transparent; color: #fff; border-color: #fff; }
.btn-outline:hover, .btn-outline:focus { background: rgba(255,255,255,.12); }
.btn-block { width: 100%; }

/* ---------- Sections ---------- */
.section { padding: 2.4rem 0; }
.section.alt { background: var(--earth-100); }
.section h2 { font-size: 1.5rem; margin: 0 0 .7rem; color: var(--green-900); }
.section h3 { font-size: 1.12rem; margin: 1.4rem 0 .4rem; color: var(--green-800); }
.section p { margin: 0 0 .9rem; }
.section ul.tick, .checklist { list-style: none; padding: 0; margin: 0 0 1rem; }
.section ul.tick li, .checklist li { padding-left: 1.7rem; position: relative; margin-bottom: .55rem; }
.section ul.tick li::before, .checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--green-600); font-weight: 800;
}

.cards { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-top: 1.2rem; }
.card {
  background: #fff; border: 1px solid #e2e6df; border-radius: var(--radius);
  padding: 1.3rem 1.2rem; box-shadow: 0 1px 4px rgba(30,58,36,.06);
}
.card h3 { margin: 0 0 .4rem; font-size: 1.08rem; color: var(--green-800); }
.card p { font-size: .95rem; color: var(--muted); margin: 0 0 .8rem; }
.card a.more { color: var(--green-700); font-weight: 700; text-decoration: none; }
.card a.more:hover { text-decoration: underline; }
.card .icon { display: block; margin-bottom: .6rem; }
.card .icon svg { display: block; }

.callout {
  background: var(--green-100); border-left: 5px solid var(--green-600);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 1rem 1.2rem; margin: 1.4rem 0;
}
.callout strong { color: var(--green-900); }

.faq details { border-bottom: 1px solid #e2e6df; padding: .8rem 0; }
.faq summary { font-weight: 700; cursor: pointer; color: var(--green-800); }
.faq summary:hover { color: var(--green-600); }
.faq details p { margin: .5rem 0 0; color: var(--muted); font-size: .96rem; }

/* ---------- Quote form ---------- */
.quote-box {
  background: #fff; border: 1px solid #e2e6df; border-radius: var(--radius);
  padding: 1.4rem 1.2rem; box-shadow: 0 2px 10px rgba(30,58,36,.08);
}
.quote-box h2, .quote-box h3 { margin-top: 0; }
.form-field { margin-bottom: .9rem; }
.form-field label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: .3rem; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: .75rem .85rem; font-size: 1rem;
  border: 1px solid #c9d2c6; border-radius: 8px; font-family: inherit;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: 2px solid var(--green-600); outline-offset: 1px; border-color: var(--green-600);
}
.form-note { font-size: .85rem; color: var(--muted); margin-top: .7rem; }
.field-hint { font-size: .82rem; color: var(--muted); margin: .3rem 0 0; }
.optional-tag { font-weight: 400; color: var(--muted); font-size: .8em; }
.form-field input[type="file"] { padding: .55rem .6rem; cursor: pointer; }
.form-field input[type="file"]::file-selector-button {
  font: inherit; font-weight: 700; font-size: .85rem; color: #fff;
  background: var(--green-700); border: 0; border-radius: 6px;
  padding: .5rem .9rem; margin-right: .8rem; cursor: pointer;
}
.form-field input[type="file"]::file-selector-button:hover { background: var(--green-800); }

/* ---------- Tree risk quiz ---------- */
.quiz-card {
  background: #fff; border: 1px solid #e2e6df; border-radius: var(--radius);
  padding: 1.6rem 1.4rem; box-shadow: 0 2px 10px rgba(30,58,36,.08);
}
.quiz-progress { height: 8px; background: #e8ede6; border-radius: 99px; overflow: hidden; margin-bottom: 1rem; }
.quiz-progress-bar { height: 100%; width: 0; background: var(--green-600); border-radius: 99px; transition: width .3s ease; }
.quiz-step { font-size: .82rem; color: var(--muted); margin: 0 0 .3rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.quiz-card h2 { margin-top: 0; }
.quiz-answers { display: grid; gap: .7rem; margin: 1.1rem 0; }
.quiz-answer {
  font: inherit; text-align: left; cursor: pointer;
  background: #f7faf6; border: 2px solid #d8e0d4; border-radius: 10px;
  padding: .9rem 1rem; transition: border-color .15s ease, background .15s ease;
}
.quiz-answer:hover { border-color: var(--green-600); background: #eef4ec; }
.quiz-answer:active { transform: scale(.995); }
.form-success {
  display: none; background: var(--green-100); border: 1px solid var(--green-600);
  border-radius: var(--radius); padding: 1rem 1.2rem; margin-top: 1rem; font-weight: 600;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--green-900); color: #cfe0cf; padding: 2rem 0 6.5rem; font-size: .92rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 1.2rem; grid-template-columns: 1fr; }
.site-footer h4 { color: #fff; margin: 0 0 .5rem; font-size: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .35rem; }
.footer-bottom { margin-top: 1.6rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.18); font-size: .82rem; color: #a9bda9; }

/* ---------- Sticky mobile call bar ---------- */
.sticky-call {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: var(--green-900); padding: .6rem .9rem calc(.6rem + env(safe-area-inset-bottom));
  display: flex; gap: .7rem; box-shadow: 0 -2px 10px rgba(0,0,0,.2);
}
.sticky-call a {
  flex: 1; text-align: center; text-decoration: none; font-weight: 800;
  border-radius: 8px; padding: .8rem .5rem; font-size: 1rem;
}
.sticky-call .call-now { background: var(--accent); color: #fff; }
.sticky-call .get-quote { background: #fff; color: var(--green-900); }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: .85rem; color: var(--muted); padding: 1rem 0 0; }
.breadcrumbs a { color: var(--green-700); }

/* ---------- Service hero (inner pages) ---------- */
.page-hero { background: var(--green-800); color: #fff; padding: 2rem 0 1.6rem; }
.page-hero h1 { margin: 0 0 .5rem; font-size: 1.7rem; }
.page-hero p { margin: 0; color: #d5e2d5; max-width: 52ch; }

.two-col { display: grid; gap: 1.6rem; grid-template-columns: 1fr; }

/* ---------- Desktop ---------- */
@media (min-width: 760px) {
  .hero h1 { font-size: 2.6rem; }
  .hero { padding: 3.6rem 0 3rem; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .two-col { grid-template-columns: 1.6fr 1fr; align-items: start; }
  .sticky-call { display: none; }
  .site-footer { padding-bottom: 2rem; }
  .brand-name { font-size: 1.2rem; }
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- Hamburger nav (mobile drawer) ---------- */
.nav-toggle {
  display: none;
  background: transparent; border: 2px solid rgba(255,255,255,.55); border-radius: 8px;
  width: 44px; height: 40px; cursor: pointer; padding: 0;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px; }
.nav-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

@media (max-width: 759px) {
  .nav-toggle { display: inline-flex; }
  .site-header { position: sticky; }
  .main-nav { position: relative; }
  .main-nav ul {
    display: none; flex-direction: column; overflow: visible;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--green-800); border-top: 1px solid rgba(255,255,255,.15);
    box-shadow: 0 10px 24px rgba(0,0,0,.25); z-index: 55;
  }
  .main-nav ul.open { display: flex; }
  .main-nav a { padding: .85rem 1.1rem; border-bottom: 1px solid rgba(255,255,255,.08); }
  .main-nav a:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
}

/* Very small phones: the sticky call bar already covers calling, so drop the
   header call pill to keep brand + hamburger from crowding. */
@media (max-width: 480px) {
  .header-call { display: none; }
  .header-inner { padding: .6rem .9rem; }
}

/* ---------- Two-column hero (desktop) ---------- */
.hero-grid { display: grid; gap: 1.8rem; grid-template-columns: 1fr; align-items: start; }
.hero-form-card {
  background: #fff; color: var(--ink); border-radius: var(--radius);
  padding: 1.4rem 1.3rem; box-shadow: 0 6px 24px rgba(0,0,0,.25);
  border-top: 5px solid var(--accent);
}
.hero-form-card h3 { margin: 0 0 .3rem; color: var(--green-900); font-size: 1.15rem; }
.hero-form-card .card-sub { font-size: .88rem; color: var(--muted); margin: 0 0 1rem; }
.hero-form-card .form-field { margin-bottom: .7rem; }
.hero-form-card .form-field label { font-size: .85rem; }
.hero-form-card .form-field input, .hero-form-card .form-field select { padding: .65rem .8rem; font-size: .95rem; }
.trust-line { font-size: .8rem; color: var(--muted); margin: .6rem 0 0; text-align: center; }
.trust-line strong { color: var(--green-700); }

@media (min-width: 760px) {
  .hero-grid { grid-template-columns: 1.15fr .85fr; }
}

/* ---------- Testimonials ---------- */
.testimonials { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-top: 1.2rem; }
.testimonial {
  background: #fff; border: 1px solid #e2e6df; border-radius: var(--radius);
  padding: 1.3rem 1.2rem; box-shadow: 0 1px 4px rgba(30,58,36,.06);
}
.testimonial .stars { color: #d97b2b; letter-spacing: .15em; font-size: 1rem; }
.testimonial blockquote { margin: .6rem 0 .7rem; font-size: .96rem; color: var(--ink); }
.testimonial cite { font-style: normal; font-size: .85rem; color: var(--muted); font-weight: 600; }
.rating-summary { display: flex; align-items: center; gap: .7rem; margin: .4rem 0 0; }
.rating-summary .score { font-size: 1.6rem; font-weight: 800; color: var(--green-900); }
.rating-summary .stars { color: #d97b2b; letter-spacing: .15em; }
.rating-summary p { margin: 0; font-size: .9rem; color: var(--muted); }

@media (min-width: 760px) {
  .testimonials { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Service areas ---------- */
.area-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .6rem; grid-template-columns: 1fr; }
.area-list a {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; border: 1px solid #e2e6df; border-radius: var(--radius);
  padding: .9rem 1.1rem; text-decoration: none; color: var(--green-800); font-weight: 700;
  box-shadow: 0 1px 4px rgba(30,58,36,.06);
}
.area-list a:hover { border-color: var(--green-600); }
.area-list a span:last-child { color: var(--accent-dark); }
.area-list li[aria-current="page"] {
  display: flex; align-items: center; justify-content: space-between;
  background: #eef3ed; border: 1px dashed #b9c9b7; border-radius: var(--radius);
  padding: .9rem 1.1rem; color: var(--green-800); font-weight: 700;
}
.area-list .you-are-here {
  font-size: .78rem; font-weight: 600; color: var(--green-600);
  background: #fff; border: 1px solid #d8e2d6; border-radius: 999px; padding: .2rem .65rem;
}

/* ---------- Numbered process steps ---------- */.steps { list-style: none; counter-reset: step; padding: 0; margin: 1rem 0 0; display: grid; gap: .9rem; }
.steps li { counter-increment: step; position: relative; padding-left: 3rem; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: .1rem;
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: var(--green-800); color: #fff;
  font-weight: 800; font-size: .95rem;
  display: flex; align-items: center; justify-content: center;
}

@media (min-width: 760px) {
  .area-list { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Placeholder figures ---------- */

/* ---------- Sticky call bar: high-contrast Call Now ---------- */
.sticky-call .call-now {
  background: var(--accent); color: #fff;
  font-size: 1.12rem; padding: 1rem .5rem;
  border: 2px solid #fff; box-shadow: 0 0 0 2px var(--accent-dark);
}
.sticky-call .get-quote { font-size: 1rem; padding: .9rem .5rem; }

/* ---------- Footer: 4 columns on desktop ---------- */
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

/* ---------- Service-area map embed ---------- */
.map-embed { margin-top: 1rem; border-radius: var(--radius); overflow: hidden; border: 1px solid #e2e6df; box-shadow: 0 1px 4px rgba(30,58,36,.06); }
.map-embed iframe { display: block; width: 100%; height: 280px; border: 0; }

/* ---------- Blog ---------- */
.article-meta { color: #5a6b5d; font-size: .95rem; margin-bottom: .5rem; }
.article-body { max-width: 760px; }
.article-body h2 { margin-top: 2rem; }
.article-body p { margin-bottom: 1.1rem; line-height: 1.7; }
.blog-list { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.blog-card { background: #fff; border: 1px solid #e2e6df; border-radius: var(--radius); padding: 1.5rem; box-shadow: 0 1px 4px rgba(30,58,36,.06); }
.blog-card h2 { font-size: 1.25rem; margin: .25rem 0 .75rem; }
.blog-card h2 a { color: inherit; text-decoration: none; }
.blog-card h2 a:hover { text-decoration: underline; }
