/* =========================================================
   How To Get Rid Of Pests Guide — Main Stylesheet
   howtogetridofpestsguide.co.uk
   ========================================================= */

/* --- Google Fonts import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* --- CSS custom properties --- */
:root {
  --teal:      #0E5A6F;
  --teal-dark: #0a4255;
  --orange:    #E07A1F;
  --orange-dk: #c5681a;
  --grey-dark: #2C2C2C;
  --green:     #5A8F3C;
  --bg:        #F5F5F0;
  --white:     #ffffff;
  --border:    #dcdcd6;
  --shadow:    0 2px 8px rgba(0,0,0,0.10);
  --radius:    6px;
  --font:      'Inter', system-ui, -apple-system, Segoe UI, Helvetica, Arial, sans-serif;
  --max-w:     1100px;
  --content-w: 780px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--grey-dark);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); }
a:hover { color: var(--teal-dark); }

/* --- Focus states (accessibility) --- */
:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- Skip link --- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--orange);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 0.5rem; }

/* =========================================================
   HEADER & NAV
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--teal);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
}
.site-logo {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  line-height: 1.3;
  flex-shrink: 0;
}
.site-logo:hover { color: #ffffffcc; }
.site-logo span { color: var(--orange); }

/* --- Primary nav --- */
.primary-nav { display: flex; align-items: center; gap: 0.25rem; }
.primary-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 0.925rem;
  font-weight: 500;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius);
  transition: background 0.15s;
}
.primary-nav a:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* --- Dropdown --- */
.nav-dropdown { position: relative; }
.nav-dropdown > button {
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  font-family: var(--font);
  font-size: 0.925rem;
  font-weight: 500;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: background 0.15s;
}
.nav-dropdown > button:hover,
.nav-dropdown > button[aria-expanded="true"] { background: rgba(255,255,255,0.15); }
.nav-dropdown > button svg { transition: transform 0.2s; }
.nav-dropdown > button[aria-expanded="true"] svg { transform: rotate(180deg); }

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 220px;
  padding: 0.5rem 0;
  z-index: 200;
}
.dropdown-menu.is-open { display: block; }
.dropdown-group { padding: 0.25rem 0; }
.dropdown-group + .dropdown-group { border-top: 1px solid var(--border); }
.dropdown-label {
  display: block;
  padding: 0.3rem 1rem 0.1rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888;
}
.dropdown-menu a {
  display: block;
  padding: 0.35rem 1rem;
  color: var(--grey-dark);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.12s;
}
.dropdown-menu a:hover { background: var(--bg); color: var(--teal); }

/* --- Hamburger --- */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  color: #fff;
  border-radius: var(--radius);
}
.hamburger:hover { background: rgba(255,255,255,0.15); }
.hamburger svg { display: block; }

/* --- Mobile nav --- */
@media (max-width: 768px) {
  .hamburger { display: flex; align-items: center; }
  .primary-nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--teal-dark);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 0 1rem;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav a { border-radius: 0; padding: 0.7rem 1.25rem; font-size: 1rem; }
  .nav-dropdown { width: 100%; }
  .nav-dropdown > button {
    width: 100%;
    border-radius: 0;
    padding: 0.7rem 1.25rem;
    font-size: 1rem;
    justify-content: space-between;
  }
  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-radius: 0;
    background: rgba(0,0,0,0.15);
    padding: 0.25rem 0;
  }
  .dropdown-label { color: rgba(255,255,255,0.5); }
  .dropdown-menu a { color: rgba(255,255,255,0.9); padding-left: 2rem; }
  .dropdown-menu a:hover { background: rgba(255,255,255,0.1); color: #fff; }
  .dropdown-group + .dropdown-group { border-top: 1px solid rgba(255,255,255,0.1); }
}

/* =========================================================
   LAYOUT HELPERS
   ========================================================= */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.content-container {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.section { padding: 3rem 0; }
.section--alt { background: var(--white); }

/* =========================================================
   HERO / PAGE HEADER
   ========================================================= */
.page-hero {
  background: linear-gradient(135deg, var(--teal) 0%, #0d4e61 100%);
  color: #fff;
  padding: 3rem 1.25rem 3.5rem;
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.75rem;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.page-hero .lead {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 620px;
  margin: 0 auto;
}

/* =========================================================
   BREADCRUMB
   ========================================================= */
.breadcrumb {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 1.25rem;
  font-size: 0.82rem;
  color: #666;
}
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem; max-width: var(--max-w); margin: 0 auto; }
.breadcrumb li + li::before { content: '/'; margin-right: 0.25rem; color: #aaa; }
.breadcrumb a { color: var(--teal); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* =========================================================
   HOME PAGE — PEST GRID
   ========================================================= */
.pest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.pest-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  text-align: center;
  text-decoration: none;
  color: var(--grey-dark);
  transition: box-shadow 0.18s, transform 0.18s, border-color 0.18s;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
}
.pest-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  border-color: var(--teal);
  color: var(--teal);
}
.pest-card__img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}
.pest-card .pest-name {
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 0.5rem;
}
.pest-group h3 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #888;
  margin-bottom: 0.75rem;
  margin-top: 2rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
}
.pest-group:first-child h3 { margin-top: 0; }

/* =========================================================
   HOW-TO INTRO PANEL (homepage)
   ========================================================= */
.intro-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin-top: 1.5rem;
}
.intro-panel h2 { font-size: 1.2rem; margin-bottom: 0.75rem; }
.intro-panel ul { padding-left: 1.25rem; }
.intro-panel li { margin-bottom: 0.4rem; }

/* =========================================================
   ARTICLE / PEST PAGE CONTENT
   ========================================================= */
.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
}
@media (min-width: 900px) {
  .article-layout { grid-template-columns: 1fr 280px; }
}
.article-body { min-width: 0; }
.article-body h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--teal);
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--border);
}
.article-body h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
}
.article-body p { margin-bottom: 0.9rem; }
.article-body ul, .article-body ol {
  padding-left: 1.4rem;
  margin-bottom: 0.9rem;
}
.article-body li { margin-bottom: 0.35rem; }
.article-body strong { color: #1a1a1a; }

/* Opening summary box */
.answer-box {
  background: #e8f4f8;
  border: 1px solid #b3d7e4;
  border-left: 4px solid var(--teal);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  margin-bottom: 1.75rem;
  font-size: 1.02rem;
}
.answer-box p:last-child { margin-bottom: 0; }

/* Warning callout box */
.warning-box {
  background: #fef7ee;
  border: 1px solid #f5d6a8;
  border-left: 4px solid var(--orange);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  margin-bottom: 1.75rem;
  font-size: 1.02rem;
}
.warning-box p:last-child { margin-bottom: 0; }

/* --- Affiliate button area --- */
.affiliate-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.25rem 0;
}
.affiliate-disclosure {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 0.6rem;
  font-style: italic;
}
.btn-amazon {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--orange);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  transition: background 0.15s, transform 0.12s;
  border: none;
  cursor: pointer;
}
.btn-amazon:hover { background: var(--orange-dk); color: #fff; transform: translateY(-1px); }
.btn-amazon svg { flex-shrink: 0; }
.product-desc {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: #555;
}

/* --- Warning / avoid box --- */
.avoid-box {
  background: #fff8f0;
  border: 1px solid #f0c89a;
  border-left: 4px solid var(--orange);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}
.avoid-box strong { display: block; margin-bottom: 0.3rem; color: var(--orange-dk); }

/* --- Pro tip box --- */
.tip-box {
  background: #f2f8ee;
  border: 1px solid #b8d9a4;
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}
.tip-box strong { color: var(--green); }

/* --- When to call pro box --- */
.pro-box {
  background: #f5f0f8;
  border: 1px solid #c4aad9;
  border-left: 4px solid #7a4fa8;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}

/* =========================================================
   FAQ
   ========================================================= */
.faq-list { margin-top: 0.75rem; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.6rem;
  background: var(--white);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.97rem;
  font-weight: 600;
  text-align: left;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  color: var(--grey-dark);
}
.faq-question:hover { background: var(--bg); }
.faq-question svg { flex-shrink: 0; transition: transform 0.22s; color: var(--teal); }
.faq-question[aria-expanded="true"] svg { transform: rotate(180deg); }
.faq-answer {
  display: none;
  padding: 0 1.25rem 1rem;
  font-size: 0.93rem;
  color: #444;
}
.faq-answer p { margin-bottom: 0.5rem; }
.faq-answer p:last-child { margin-bottom: 0; }
.faq-item.is-open .faq-answer { display: block; }

/* =========================================================
   INTERNAL LINKS / RELATED PESTS
   ========================================================= */
.related-pests {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--border);
}
.related-pests h2 { font-size: 1.1rem; margin-bottom: 0.75rem; border: none; padding: 0; }
.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.related-links a {
  background: var(--white);
  border: 1px solid var(--teal);
  color: var(--teal);
  text-decoration: none;
  padding: 0.4rem 0.9rem;
  border-radius: 99px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.14s, color 0.14s;
}
.related-links a:hover { background: var(--teal); color: #fff; }

/* =========================================================
   SIDEBAR
   ========================================================= */
.article-sidebar { display: flex; flex-direction: column; gap: 1.25rem; }
.sidebar-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}
.sidebar-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sidebar-card ul { list-style: none; padding: 0; }
.sidebar-card li { margin-bottom: 0.35rem; }
.sidebar-card a { font-size: 0.88rem; text-decoration: none; color: var(--grey-dark); }
.sidebar-card a:hover { color: var(--teal); text-decoration: underline; }
.sidebar-card .label {
  display: inline-block;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  padding: 0.1rem 0.45rem;
  border-radius: 99px;
  margin-left: 0.3rem;
  color: #888;
  font-weight: 600;
  text-transform: uppercase;
}

/* =========================================================
   MOUSE COMPARISON COLUMNS
   ========================================================= */
.mouse-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
}
.mouse-comparison__col img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
  margin-bottom: 0.75rem;
}
.mouse-comparison__col strong {
  display: block;
  margin-bottom: 0.4rem;
}
@media (max-width: 600px) {
  .mouse-comparison { grid-template-columns: 1fr; }
}

/* =========================================================
   PRODUCT PHOTOS (affiliate blocks)
   ========================================================= */
.product-photo {
  width: 320px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: var(--radius);
  display: block;
  margin: 0 auto 1rem;
}

/* =========================================================
   PEST PHOTOS
   ========================================================= */
.pest-photo {
  margin: 1.5rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.pest-photo img {
  width: 100%;
  height: auto;
  display: block;
}
.pest-photo--banner {
  margin-top: 0;
  margin-bottom: 2rem;
  max-width: 100%;
}

/* =========================================================
   PEST ICON PLACEHOLDER
   ========================================================= */
.pest-icon-wrap {
  width: 100%;
  max-width: 560px;
  margin: 0 0 1.5rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: var(--teal);
}

/* =========================================================
   AUTHOR META
   ========================================================= */
.author-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  color: #666;
}
.author-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.author-meta strong { color: var(--grey-dark); }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--grey-dark);
  color: rgba(255,255,255,0.75);
  padding: 2.5rem 1.25rem 1.5rem;
  margin-top: 3rem;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.75rem;
  margin-bottom: 2rem;
}
.footer-col h3 {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.4rem; }
.footer-col a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.875rem;
}
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-col p { font-size: 0.875rem; line-height: 1.6; }
.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
}
.footer-disclosure {
  background: rgba(255,255,255,0.07);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 1.5rem;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
}

/* =========================================================
   ABOUT / STATIC PAGES
   ========================================================= */
.static-content {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
}
.static-content h2 {
  font-size: 1.3rem;
  color: var(--teal);
  margin: 2rem 0 0.6rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--border);
}
.static-content h3 { font-size: 1.05rem; margin: 1.25rem 0 0.4rem; }
.static-content p { margin-bottom: 0.9rem; }
.static-content ul { padding-left: 1.4rem; margin-bottom: 0.9rem; }
.static-content li { margin-bottom: 0.35rem; }

/* trust signals */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.trust-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.trust-item svg { color: var(--green); flex-shrink: 0; margin-top: 2px; }
.trust-item p { font-size: 0.88rem; margin: 0; }
.trust-item strong { display: block; font-size: 0.95rem; margin-bottom: 0.15rem; }

/* =========================================================
   404 PAGE
   ========================================================= */
.error-page {
  text-align: center;
  padding: 5rem 1.25rem;
}
.error-page h1 { font-size: 5rem; color: var(--teal); line-height: 1; margin-bottom: 0.5rem; }
.error-page h2 { font-size: 1.4rem; margin-bottom: 1rem; }
.error-page p { color: #666; margin-bottom: 1.5rem; }
.btn-home {
  display: inline-block;
  background: var(--teal);
  color: #fff;
  padding: 0.7rem 1.75rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  transition: background 0.15s;
}
.btn-home:hover { background: var(--teal-dark); color: #fff; }

/* =========================================================
   UTILITIES
   ========================================================= */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}
.text-muted { color: #666; font-size: 0.9rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

/* =========================================================
   RESPONSIVE TWEAKS
   ========================================================= */
@media (max-width: 600px) {
  .page-hero { padding: 2rem 1rem 2.5rem; }
  .article-layout { padding: 1.5rem 1rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 400px) {
  .footer-inner { grid-template-columns: 1fr; }
}
