/* ============================================================
   Renfrew County Home Services — style.css
   Green scheme: #1b5e20 primary
   ============================================================ */

:root {
  --primary: #1b5e20;
  --primary-light: #2e7d32;
  --primary-dark: #145217;
  --accent: #4caf50;
  --accent-light: #81c784;
  --text: #1a1a1a;
  --text-muted: #5a5a5a;
  --bg: #f5f7f5;
  --bg-card: #ffffff;
  --border: #dde6dd;
  --warn-bg: #fff8e1;
  --warn-border: #f9a825;
  --header-height: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Segoe UI', Arial, Helvetica, sans-serif; color: var(--text); background: var(--bg); line-height: 1.75; font-size: 16px; }
a { color: var(--primary-light); }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ── Sticky Header ─────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 200; background: var(--primary); height: var(--header-height); display: flex; align-items: center; box-shadow: 0 2px 10px rgba(0,0,0,0.25); }
.header-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 16px; }
.brand-link { color: #fff; text-decoration: none; font-size: 1.1rem; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.brand-link:hover { color: #e8f5e9; text-decoration: none; }
.brand-tagline { display: block; color: var(--accent-light); font-size: 0.7rem; font-weight: 400; margin-top: 2px; }
.site-nav { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; }
.site-nav a { color: #e8f5e9; text-decoration: none; padding: 6px 9px; border-radius: 4px; font-size: 0.82rem; transition: background 0.15s, color 0.15s; white-space: nowrap; }
.site-nav a:hover, .site-nav a.active { background: var(--primary-light); color: #fff; }
.nav-toggle { display: none; background: none; border: 2px solid rgba(255,255,255,0.4); color: #fff; padding: 5px 10px; border-radius: 4px; font-size: 1.3rem; cursor: pointer; line-height: 1; }

/* ── Breadcrumb ────────────────────────────────── */
.breadcrumb { background: #edf3ed; border-bottom: 1px solid var(--border); padding: 10px 0; font-size: 0.82rem; color: var(--text-muted); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0; padding: 0; margin: 0; }
.breadcrumb li { display: flex; align-items: center; }
.breadcrumb li + li::before { content: '›'; margin: 0 7px; color: #999; }
.breadcrumb a { color: var(--primary-light); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--text-muted); font-weight: 500; }

/* ── Hero ──────────────────────────────────────── */
.hero { background: linear-gradient(140deg, #0d3b10 0%, #1b5e20 50%, #2e7d32 100%); color: #fff; padding: 72px 0 56px; text-align: center; }
.hero h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 18px; line-height: 1.2; }
.hero p { font-size: 1.12rem; color: #c8e6c9; max-width: 640px; margin: 0 auto 28px; }
.hero-badges { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.hero-badge { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.25); color: #e8f5e9; padding: 6px 16px; border-radius: 20px; font-size: 0.85rem; }

/* ── Page Header ───────────────────────────────── */
.page-header { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); color: #fff; padding: 52px 0 40px; }
.page-header h1 { font-size: 2rem; font-weight: 800; margin-bottom: 10px; line-height: 1.25; }
.page-subtitle { color: #c8e6c9; font-size: 1.05rem; margin-top: 6px; }
.page-meta { font-size: 0.78rem; color: rgba(255,255,255,0.75); margin-top: 10px; letter-spacing: 0.2px; }
.page-meta a { color: #c8e6c9; }
.page-meta a:hover { color: #fff; }

/* ── Main ──────────────────────────────────────── */
main { padding: 40px 0; }
main section { margin-bottom: 48px; }
h2 { font-size: 1.6rem; color: var(--primary); margin-bottom: 16px; border-left: 4px solid var(--accent); padding-left: 14px; line-height: 1.3; }
h3 { font-size: 1.18rem; color: var(--primary-dark); margin-bottom: 10px; line-height: 1.3; }
h4 { font-size: 1rem; color: var(--primary-dark); margin-bottom: 8px; }
p { margin-bottom: 14px; }
p:last-child { margin-bottom: 0; }
ul, ol { padding-left: 26px; margin-bottom: 14px; }
li { margin-bottom: 7px; }
strong { color: var(--primary-dark); }

/* ── Info Box ──────────────────────────────────── */
.info-box { background: #e8f5e9; border: 1px solid #a5d6a7; border-left: 5px solid var(--primary); border-radius: 0 8px 8px 0; padding: 20px 24px; margin: 28px 0; }
.info-box h3 { color: var(--primary); margin-bottom: 10px; }
.info-box p, .info-box li { color: #2e4d2e; font-size: 0.95rem; }

/* ── Info Card Grid ────────────────────────────── */
.info-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; margin: 28px 0; }
.info-card { background: var(--bg-card); border: 1px solid var(--border); border-top: 4px solid var(--primary); border-radius: 8px; padding: 24px 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); display: flex; flex-direction: column; gap: 8px; transition: transform 0.18s, box-shadow 0.18s; }
.info-card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); }
.info-card-icon { font-size: 2rem; line-height: 1; }
.info-card h3 { color: var(--primary); font-size: 1.05rem; margin-bottom: 4px; }
.info-card p { font-size: 0.9rem; color: var(--text-muted); flex: 1; margin-bottom: 12px; }

/* ── Pillar Card Grid (for index pages) ────────── */
.pillar-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin: 32px 0; }
.pillar-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 28px 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); transition: transform 0.18s, box-shadow 0.18s; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 10px; }
.pillar-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); color: inherit; }
.pillar-card-icon { font-size: 2.2rem; line-height: 1; }
.pillar-card h3 { color: var(--primary); font-size: 1.1rem; margin-bottom: 4px; }
.pillar-card p { font-size: 0.9rem; color: var(--text-muted); flex: 1; margin-bottom: 0; }
.pillar-card .card-meta { font-size: 0.78rem; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }

/* ── Grant Verified Badge ──────────────────────── */
.grant-verified { background: #e8f5e9; border: 1px solid #a5d6a7; border-left: 5px solid var(--primary); border-radius: 0 8px 8px 0; padding: 14px 18px; margin-bottom: 28px; font-size: 0.88rem; color: #2e4d2e; display: flex; align-items: center; gap: 10px; }
.grant-verified strong { color: var(--primary-dark); }
.grant-amount { background: var(--primary); color: #fff; border-radius: 8px; padding: 20px 24px; margin: 24px 0; text-align: center; }
.grant-amount strong { color: #fff; }
.grant-amount .amount-value { font-size: 2rem; font-weight: 800; display: block; margin-bottom: 4px; }
.grant-amount .amount-label { font-size: 0.9rem; color: #c8e6c9; }

/* ── Button Link ───────────────────────────────── */
.btn-link { display: inline-block; background: var(--primary); color: #fff !important; text-decoration: none; padding: 9px 20px; border-radius: 5px; font-size: 0.88rem; font-weight: 600; transition: background 0.15s, transform 0.1s; align-self: flex-start; letter-spacing: 0.2px; }
.btn-link:hover { background: var(--primary-light); transform: translateY(-1px); }
.btn-link-outline { display: inline-block; border: 2px solid var(--primary); color: var(--primary) !important; text-decoration: none; padding: 8px 18px; border-radius: 5px; font-size: 0.88rem; font-weight: 600; transition: all 0.15s; }
.btn-link-outline:hover { background: var(--primary); color: #fff !important; }

/* ── Disclaimer Box ────────────────────────────── */
.disclaimer-box { background: var(--warn-bg); border: 1px solid var(--warn-border); border-left: 5px solid #e65100; border-radius: 0 8px 8px 0; padding: 16px 20px; margin: 24px 0; font-size: 0.9rem; color: #4e342e; line-height: 1.6; }
.disclaimer-box strong { color: #bf360c; }

/* ── Table Wrapper ─────────────────────────────── */
.table-wrapper { overflow-x: auto; margin: 24px 0; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.07); }
table { width: 100%; border-collapse: collapse; margin: 24px 0; background: var(--bg-card); box-shadow: 0 2px 8px rgba(0,0,0,0.07); }
td, th { padding: 11px 16px; border-bottom: 1px solid var(--border); font-size: 0.92rem; vertical-align: top; text-align: left; }
thead { background: var(--primary); }
thead th { background: var(--primary) !important; color: #fff !important; padding: 13px 16px; text-align: left; font-weight: 600; font-size: 0.9rem; letter-spacing: 0.3px; border-bottom: none; }
tbody tr:nth-child(even) td { background: #f0f7f0; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #e8f5e9; }
.table-wrapper table { width: 100%; border-collapse: collapse; background: var(--bg-card); min-width: 480px; }
.table-wrapper thead th { background: var(--primary); color: #fff; padding: 13px 16px; text-align: left; font-weight: 600; font-size: 0.9rem; letter-spacing: 0.3px; }
.table-wrapper td { padding: 11px 16px; border-bottom: 1px solid var(--border); font-size: 0.92rem; vertical-align: top; }
.table-wrapper tbody tr:nth-child(even) td { background: #f0f7f0; }
.table-wrapper tbody tr:last-child td { border-bottom: none; }
.table-wrapper tbody tr:hover td { background: #e8f5e9; }

/* ── Area Tags ─────────────────────────────────── */
.area-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.area-tag { background: #e8f5e9; color: var(--primary-dark); border: 1px solid #a5d6a7; border-radius: 20px; padding: 4px 14px; font-size: 0.84rem; font-weight: 500; white-space: nowrap; text-decoration: none; display: inline-block; transition: background 0.15s; }
.area-tag:hover { background: #c8e6c9; color: var(--primary-dark); }

/* ── FAQ ───────────────────────────────────────── */
.faq-section { margin: 32px 0; }
.faq-item { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 10px; overflow: hidden; background: var(--bg-card); }
.faq-item summary { padding: 16px 20px; cursor: pointer; font-weight: 600; color: var(--primary-dark); font-size: 0.97rem; list-style: none; display: flex; justify-content: space-between; align-items: center; user-select: none; transition: background 0.15s; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.5rem; color: var(--primary); font-weight: 400; flex-shrink: 0; margin-left: 12px; transition: transform 0.2s; }
.faq-item[open] > summary { background: #f1f8f1; border-bottom: 1px solid var(--border); }
.faq-item[open] > summary::after { content: '−'; }
.faq-answer { padding: 18px 20px; color: var(--text-muted); font-size: 0.93rem; line-height: 1.75; }
.faq-answer p { margin-bottom: 10px; }
.faq-answer ul { margin: 8px 0 10px; }

/* ── Checklist ─────────────────────────────────── */
.checklist { list-style: none; padding: 0; }
.checklist li { padding: 8px 0 8px 32px; position: relative; border-bottom: 1px solid var(--border); font-size: 0.94rem; }
.checklist li:last-child { border-bottom: none; }
.checklist li::before { content: '\2713'; position: absolute; left: 6px; color: var(--accent); font-weight: 700; font-size: 1rem; }

/* ── Two-col layout ────────────────────────────── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin: 24px 0; }

/* ── Related Links Box ─────────────────────────── */
.related-links { background: #f0f7f0; border: 1px solid #c8e6c9; border-radius: 8px; padding: 20px 24px; margin: 32px 0; }
.related-links h3 { color: var(--primary); font-size: 1rem; margin-bottom: 12px; }
.related-links ul { list-style: none; padding: 0; margin: 0; }
.related-links li { margin-bottom: 8px; }
.related-links a { color: var(--primary-light); font-size: 0.92rem; text-decoration: none; }
.related-links a:hover { text-decoration: underline; }

/* ── Footer ────────────────────────────────────── */
.site-footer { background: #161c16; color: #bbb; padding: 44px 0 24px; margin-top: 56px; }
.footer-disclaimer { background: #1e281e; border-left: 4px solid var(--accent); padding: 14px 18px; margin-bottom: 28px; font-size: 0.86rem; color: #c8e6c9; border-radius: 0 4px 4px 0; line-height: 1.6; }
.footer-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 32px; margin-bottom: 32px; }
.footer-col h4 { color: var(--accent-light); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 12px; font-weight: 600; }
.footer-col a { display: block; color: #999; text-decoration: none; font-size: 0.87rem; margin-bottom: 7px; transition: color 0.15s; }
.footer-col a:hover { color: #e8f5e9; }
.footer-bottom { border-top: 1px solid #2a332a; padding-top: 20px; font-size: 0.8rem; color: #666; text-align: center; }
.footer-bottom a { color: #888; }
.footer-bottom a:hover { color: #bbb; }

/* ── Cookie Banner ─────────────────────────────── */
#cookie-banner { position: fixed; bottom: 0; left: 0; right: 0; background: #1a1a1a; color: #ddd; padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; z-index: 9999; box-shadow: 0 -4px 16px rgba(0,0,0,0.4); font-size: 0.87rem; }
#cookie-banner p { margin: 0; flex: 1; }
#cookie-banner a { color: var(--accent-light); }
.cookie-btn { background: var(--primary); color: #fff; border: none; padding: 9px 22px; border-radius: 4px; cursor: pointer; font-size: 0.87rem; font-weight: 600; white-space: nowrap; transition: background 0.15s; flex-shrink: 0; }
.cookie-btn:hover { background: var(--primary-light); }

/* ── Sidebar Layout ────────────────────────────── */
.layout-with-sidebar { display: grid; grid-template-columns: 1fr 280px; gap: 48px; align-items: start; }
.main-content { min-width: 0; }
.main-content section { margin-bottom: 48px; }
.sidebar { position: sticky; top: calc(var(--header-height) + 20px); }
.sidebar-widget { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 20px; margin-bottom: 20px; }
.sidebar-widget h3 { color: var(--primary); font-size: 1rem; margin-bottom: 12px; border-bottom: 2px solid var(--accent); padding-bottom: 8px; border-left: none; padding-left: 0; }
.sidebar-widget ul { list-style: none; padding: 0; margin: 0; }
.sidebar-widget li { margin-bottom: 8px; }
.sidebar-widget a { color: var(--primary-light); font-size: 0.9rem; text-decoration: none; }
.sidebar-widget a:hover { text-decoration: underline; color: var(--primary); }
.sidebar-widget p { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 10px; }
@media (max-width: 900px) { .layout-with-sidebar { grid-template-columns: 1fr; } .sidebar { position: static; } }

/* ── Responsive ────────────────────────────────── */
@media (max-width: 900px) { .hero h1 { font-size: 2rem; } }
@media (max-width: 768px) {
  :root { --header-height: 56px; }
  .hero h1 { font-size: 1.65rem; } .hero p { font-size: 0.97rem; }
  .page-header h1 { font-size: 1.5rem; }
  h2 { font-size: 1.3rem; }
  main { padding: 28px 0; } main section { margin-bottom: 32px; }
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: var(--header-height); left: 0; right: 0; background: var(--primary-dark); flex-direction: column; padding: 10px; gap: 4px; box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
  .site-nav.open { display: flex; }
  .site-nav a { font-size: 0.92rem; padding: 10px 14px; }
  .header-inner { position: relative; }
  .two-col { grid-template-columns: 1fr; }
  #cookie-banner { flex-direction: column; text-align: center; gap: 12px; }
  .info-card-grid { grid-template-columns: 1fr 1fr; }
  .pillar-grid { grid-template-columns: 1fr; }
}
@media (max-width: 500px) {
  .info-card-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.45rem; }
}
