/* PestHelp Guide styling */
:root {
  color-scheme: light;
  --bg: #f6f5ef;
  --surface: #ffffff;
  --text: #16213e;
  --muted: #6b6b6b;
  --border: #d9d7ce;
  --accent: #2d6a4f;
  --accent-strong: #1b4332;
  --link: #1d3557;
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
}

body {
  margin: 0;
}

a {
  color: var(--link);
  text-decoration: none;
}

button,
a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

a.button {
  background: var(--accent);
  color: #ffffff;
}

a.button:hover,
button:hover {
  transform: translateY(-1px);
}

a.button:focus-visible,
button:focus-visible,
nav a:focus-visible {
  outline: 3px solid rgba(45, 106, 79, 0.35);
  outline-offset: 3px;
}

.button-secondary {
  background: transparent;
  color: var(--accent-strong);
  border-color: var(--accent-strong);
}

a.button:hover {
  background: #1b4332;
}

.page-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.site-title {
  margin: 0;
  font-size: 1.35rem;
}

.site-title a {
  color: var(--accent-strong);
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

nav a {
  color: var(--muted);
  font-weight: 600;
}

.hero {
  background: linear-gradient(180deg, #e8f5e9 0%, #ffffff 100%);
  border: 1px solid var(--border);
  padding: 2rem;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero h1 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 1.05;
}

.hero p {
  margin: 0 0 1.5rem;
  max-width: 45rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.search-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow);
}

.search-panel label {
  flex: 1 1 100%;
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.search-panel input {
  flex: 1 1 320px;
  min-width: 0;
  padding: 0.9rem 1rem;
  border: 1px solid #c1c0b9;
  border-radius: 999px;
  outline: none;
}

.search-panel input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(45, 106, 79, 0.12);
}

.search-help {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

section {
  margin-top: 2rem;
}

h2,
h3 {
  margin-top: 0;
  color: #102a43;
}

.info-grid,
.category-grid,
.card-grid {
  display: grid;
  gap: 1.25rem;
}

.info-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.feature-card,
.pest-card,
.expert-card,
.ad-slot,
.detail-aside {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.4rem;
  box-shadow: var(--shadow);
}

.feature-card p,
.pest-card p,
.expert-card p,
.ad-slot p,
.detail-aside p {
  margin: 0.75rem 0 0;
  color: var(--muted);
}

.feature-card h3,
.pest-card h3,
.expert-card h3 {
  margin: 0;
}

.category-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.species-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.species-bubble {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.species-bubble a {
  color: var(--accent-strong);
  text-decoration: none;
  display: block;
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.species-bubble p {
  margin: 0;
  color: var(--muted);
}

.pest-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pest-card a {
  margin-top: 1rem;
}

.ad-slot {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.expert-card {
  display: grid;
  gap: 0.9rem;
}

.expert-card a {
  width: fit-content;
}

footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 1rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent);
}

.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-right: 0.75rem;
}

.section-hero {
  position: relative;
  overflow: hidden;
}

.section-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(61, 152, 117, 0.18), transparent 40%);
  pointer-events: none;
}

img.responsive {
  width: 100%;
  height: auto;
  border-radius: 18px;
}

.page-section {
  display: grid;
  gap: 1.5rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
}

.detail-grid article {
  min-width: 0;
}

.detail-aside {
  position: sticky;
  top: 1rem;
}

@media (max-width: 840px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .page-shell {
    padding: 1rem;
  }

  nav {
    width: 100%;
    justify-content: space-between;
  }

  a.button,
  .button-secondary {
    width: 100%;
  }
}
