/* ============================================================
   Pembroke Well Drilling Guide — 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.15rem;
  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.72rem;
  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;
}

/* ── 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: 620px;
  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.5);
  margin-top: 10px;
  letter-spacing: 0.2px;
}

/* ── Main ──────────────────────────────────────── */
main { padding: 52px 0; }

section { margin-bottom: 52px; }

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;
}

/* ── 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);
}

/* ── 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-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;
}

/* ── FAQ Section & Items ───────────────────────── */
.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: '✓';
  position: absolute;
  left: 6px;
  color: var(--accent);
  font-weight: 700;
  font-size: 1rem;
}

/* ── 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(180px, 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 Consent 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); }

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

/* ── 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: 36px 0; }
  section { margin-bottom: 36px; }

  .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; }
}

@media (max-width: 500px) {
  .info-card-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.45rem; }
}

/* ── Content Figure ─────────────────────────────── */
.content-figure {
  margin: 32px 0;
  border-radius: 8px;
  overflow: hidden;
}
.content-figure img {
  width: 100%;
  height: auto;
  display: block;
}
.content-figure figcaption {
  background: #f5f5f5;
  color: #555;
  font-size: 0.82rem;
  padding: 8px 12px;
  border-top: 1px solid #e0e0e0;
}
.content-figure figcaption .fig-link {
  color: var(--primary);
  text-decoration: none;
}
.content-figure figcaption .fig-link:hover { text-decoration: underline; }
