@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,700;1,9..40,400&family=DM+Serif+Display:ital@0;1&display=swap');

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

:root {
  --green:      #2d7a4f;
  --green-dark: #1e5435;
  --green-light:#e8f5ee;
  --teal:       #1a6b72;
  --teal-light: #e4f3f4;
  --amber:      #d97706;
  --text:       #1a1a1a;
  --muted:      #555;
  --border:     #ddd;
  --bg:         #fafaf8;
  --white:      #ffffff;
  --radius:     8px;
  --max:        860px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
}

/* ── HEADER ── */
header {
  background: var(--white);
  border-bottom: 2px solid var(--green);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-wrap img {
  height: 52px;
  width: auto;
}

nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

nav a:hover, nav a.active {
  background: var(--green-light);
  color: var(--green-dark);
}

/* hamburger */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.2s;
}

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--teal) 100%);
  color: var(--white);
  padding: 80px 24px;
  text-align: center;
}

.hero h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.2;
  margin-bottom: 20px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.9;
  max-width: 580px;
  margin: 0 auto 32px;
}

.hero-cta {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
}

.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }

.btn-white {
  background: var(--white);
  color: var(--green-dark);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.6);
}

/* ── MODE CARDS (home page) ── */
.mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  max-width: var(--max);
  margin: 56px auto;
  padding: 0 24px;
}

.mode-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.mode-card:hover {
  border-color: var(--green);
  box-shadow: 0 4px 16px rgba(45,122,79,0.12);
  transform: translateY(-2px);
}

.mode-card .icon {
  font-size: 2.4rem;
  margin-bottom: 12px;
  display: block;
}

.mode-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--green-dark);
}

.mode-card p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ── MAIN CONTENT ── */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* page hero (interior pages) */
.page-hero {
  background: var(--green-light);
  border-bottom: 1px solid #c5e0cf;
  padding: 48px 24px;
  margin-bottom: 48px;
}

.page-hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.page-hero .icon-lg {
  font-size: 3rem;
  flex-shrink: 0;
}

.page-hero h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--green-dark);
  line-height: 1.2;
}

.page-hero p {
  color: var(--teal);
  font-size: 1.05rem;
  margin-top: 6px;
}

/* ── TYPOGRAPHY ── */
h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.7rem;
  color: var(--green-dark);
  margin: 48px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--green-light);
}

h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--teal);
  margin: 28px 0 10px;
}

p { margin-bottom: 18px; color: var(--text); }

a { color: var(--green); }
a:hover { color: var(--green-dark); }

ul, ol {
  margin: 0 0 18px 24px;
}

li { margin-bottom: 6px; }

/* ── INLINE IMAGE STYLES ── */
.content-image {
  width: 100%;
  border-radius: 10px;
  margin: 28px 0;
  display: block;
}

.content-image.float-right {
  float: right;
  width: 45%;
  margin: 0 0 20px 28px;
}

.content-image.float-left {
  float: left;
  width: 45%;
  margin: 0 28px 20px 0;
}

.clearfix::after { content: ''; display: table; clear: both; }

figure {
  margin: 28px 0;
}

figcaption {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 8px;
  font-style: italic;
  text-align: center;
}

/* ── CALLOUT / TIP BOX ── */
.tip-box {
  background: var(--teal-light);
  border-left: 4px solid var(--teal);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  margin: 28px 0;
}

.tip-box p { margin: 0; color: var(--teal); }

.info-box {
  background: #fef3cd;
  border-left: 4px solid var(--amber);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  margin: 28px 0;
}

.info-box p { margin: 0; color: #7c5a00; }

/* ── LINK CARDS (for external resources) ── */
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 20px 0 32px;
}

.link-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.link-card:hover {
  border-color: var(--green);
  box-shadow: 0 2px 8px rgba(45,122,79,0.1);
  color: var(--text);
}

.link-card strong {
  display: block;
  color: var(--green-dark);
  margin-bottom: 4px;
}

.link-card span {
  font-size: 0.875rem;
  color: var(--muted);
}

/* ── FOOTER ── */
footer {
  background: var(--green-dark);
  color: rgba(255,255,255,0.85);
  padding: 40px 24px;
  margin-top: 80px;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}

footer h4 {
  color: white;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

footer a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.9rem; display: block; margin-bottom: 6px; }
footer a:hover { color: white; }

.footer-bottom {
  max-width: var(--max);
  margin: 24px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  text-align: center;
}

/* ── NAV DROPDOWN ── */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.nav-dropdown-btn:hover,
.nav-dropdown-btn.active {
  background: var(--green-light);
  color: var(--green-dark);
}

.nav-caret {
  font-size: 10px;
  opacity: 0.7;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  min-width: 200px;
  padding: 6px;
  z-index: 200;
}

.nav-dropdown.open .nav-dropdown-menu {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 8px 12px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.dropdown-item:hover,
.dropdown-item.active {
  background: var(--green-light);
  color: var(--green-dark);
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .menu-toggle { display: flex; }

  nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0; right: 0;
    background: var(--white);
    border-bottom: 2px solid var(--green);
    padding: 12px 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  }

  nav.open { display: flex; }

  nav a { padding: 10px 12px; font-size: 15px; }

  header { position: relative; }

  .content-image.float-right,
  .content-image.float-left {
    float: none;
    width: 100%;
    margin: 20px 0;
  }

  .page-hero-inner { flex-direction: column; text-align: center; }
}
