:root {
  --primary-color: #c62828;
  --secondary-color: #006837;
  --accent-color: #c9a227;
  --background-color: #faf7f1;
  --text-color: #333333;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  background-color: var(--background-color);
  color: var(--text-color);
}
a { color: var(--secondary-color); text-decoration: none; }
a:hover { color: var(--primary-color); }
header {
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  position: relative;
}
.site-title { margin: 0; font-size: 1.8rem; font-weight: bold; color: #ffffff; padding: 0; }
.site-title:hover { color: var(--accent-color); }

/* Breadcrumbs */
.breadcrumb {
  font-size: 0.9rem;
  margin: 0 0 18px;
  color: #666;
}
.breadcrumb a { color: var(--secondary-color); }
.breadcrumb a:hover { color: var(--primary-color); }
.breadcrumb span[aria-current] { color: #666; }

/* Mobile menu toggle button */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  z-index: 1000;
}
.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: #ffffff;
  transition: all 0.3s ease;
}
.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
nav ul li {
  position: relative;
}
nav ul li a {
  display: block;
  padding: 10px 15px;
  color: #ffffff;
  font-weight: bold;
  cursor: pointer;
}
nav ul li a:hover { background-color: var(--secondary-color); }

/* Dropdown arrow */
.dropdown-arrow {
  font-size: 0.7em;
  margin-left: 3px;
  transition: transform 0.3s ease;
}
.has-dropdown.active .dropdown-arrow,
.has-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

/* Dropdown menu */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--primary-color);
  min-width: 220px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  border-top: 2px solid var(--secondary-color);
}
.has-dropdown:hover .dropdown-menu,
.has-dropdown.active .dropdown-menu {
  display: block;
}
@media (min-width: 769px) {
  .has-dropdown:focus-within .dropdown-menu { display: block; }
}
.dropdown-menu li {
  display: block;
  width: 100%;
}
.dropdown-menu li a {
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}
.dropdown-menu li:last-child a {
  border-bottom: none;
}
.dropdown-menu li a:hover {
  background-color: var(--secondary-color);
  padding-left: 25px;
  transition: padding-left 0.2s ease;
}
.hero {
  background-size: cover;
  background-position: center;
  color: #ffffff;
  text-align: center;
  padding: 0;
  position: relative;
}
.hero-overlay {
  background: rgba(0, 0, 0, 0.5);
  padding: 100px 20px;
}
.hero h1 { color: #ffffff; font-size: 3rem; margin: 0 0 10px; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
.hero p { font-size: 1.2rem; margin: 10px auto 20px; max-width: 700px; text-shadow: 1px 1px 3px rgba(0,0,0,0.5); }
.container { max-width: 1200px; margin: 0 auto; padding: 20px; }
.responsive {
  display: block; width: 100%; max-width: 100%; height: auto; max-height: 380px;
  object-fit: cover; border-radius: 8px; margin: 20px 0;
}
h1 { color: var(--primary-color); margin-top: 20px; }
h2 { color: var(--secondary-color); margin-top: 20px; }
h3 { color: var(--text-color); margin-top: 18px; }

/* Article meta line */
.page-meta { color: #888; font-size: 0.85rem; margin-top: -6px; }

/* Content tables (guide pages) */
.container table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 0.95rem;
}
.container th, .container td {
  border: 1px solid #e0dccf;
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
}
.container th { background: #f3efe6; color: var(--secondary-color); }
.container tr:nth-child(even) td { background: #faf7f1; }
.container .table-wrap { overflow-x: auto; }

/* Related guides block */
.related-links {
  list-style: none;
  padding: 0;
  margin: 14px 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.related-links li a {
  display: block;
  background: #f3efe6;
  border-left: 3px solid var(--accent-color);
  padding: 10px 14px;
  border-radius: 4px;
  font-weight: bold;
}
.related-links li a:hover { background: #ece6d8; }
footer {
  background-color: var(--primary-color);
  color: #ffffff;
  margin-top: 40px;
}
.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}
.footer-section h3, .footer-section h4 {
  margin-top: 0;
  color: #ffffff;
}
.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 10px 0;
}
.footer-section ul li {
  margin: 8px 0;
}
.footer-section a {
  color: #ffffff;
  text-decoration: none;
}
.footer-section a:hover {
  color: var(--accent-color);
}
.footer-bottom {
  text-align: center;
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.9rem;
}
.footer-bottom p {
  margin: 0;
}
form input, form textarea {
  width: 100%; padding: 10px; margin-bottom: 10px;
  border: 1px solid #ccc; border-radius: 4px;
}
form button {
  background-color: var(--secondary-color);
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
}
form button:hover { background-color: var(--accent-color); }
/* Accessibility */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 2000;
  background: #ffffff; color: var(--primary-color); padding: 10px 16px; font-weight: bold;
}
.skip-link:focus { left: 10px; top: 10px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent-color); outline-offset: 2px; }

/* Homepage / hub components */
.stats-grid, .card-grid {
  display: grid; gap: 20px; margin: 30px 0;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.card-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.stat-card, .card {
  background: #ffffff; border: 1px solid #ece6d8; padding: 20px; border-radius: 8px;
}
.stat-card { text-align: center; }
.stat-card h3, .card h3 { margin-top: 0; }
.stat-value { font-size: 1.6rem; font-weight: bold; margin: 10px 0; color: var(--secondary-color); }
.stat-note, .source-note { color: #666; font-size: 0.9rem; }
.cta-row { display: flex; gap: 15px; flex-wrap: wrap; margin: 30px 0; }
.btn {
  background: var(--secondary-color); color: #ffffff; padding: 12px 24px;
  border-radius: 5px; display: inline-block; font-weight: bold;
}
.btn:hover { background: var(--primary-color); color: #ffffff; }
.lead { font-size: 1.1rem; }
.answer-box {
  background: #f3efe6; border-left: 4px solid var(--secondary-color);
  padding: 14px 18px; border-radius: 4px; margin: 18px 0;
}
.faq h3 { margin-bottom: 4px; }
.faq p { margin-top: 4px; }
.related { margin-top: 30px; }

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }
  nav {
    width: 100%;
    order: 3;
  }
  nav ul {
    flex-direction: column;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  nav ul.active {
    max-height: 3000px;
  }
  nav ul li {
    width: 100%;
  }
  nav ul li a {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  /* Mobile dropdown menu */
  .dropdown-menu {
    position: static;
    box-shadow: none;
    border-top: none;
    background-color: rgba(0, 0, 0, 0.2);
    min-width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .has-dropdown.active .dropdown-menu {
    max-height: 800px;
  }
  .has-dropdown:hover .dropdown-menu {
    display: none;
  }
  .has-dropdown.active:hover .dropdown-menu {
    display: block;
  }
  .dropdown-menu li a {
    padding-left: 40px !important;
    font-size: 0.95em;
  }
  .dropdown-arrow {
    float: right;
  }

  h1 { font-size: 1.75rem; line-height: 1.25; }
  .hero-overlay { padding: 60px 20px; }
  .hero h1 { font-size: 2.2rem; }
  .hero p { font-size: 1rem; }
  .footer-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
