/* CSS Variables & Theming */
:root {
  --primary-color: #0056b3;
  --primary-hover: #004494;
  --accent-color: #e6f0fa;
  --text-main: #333333;
  --text-muted: #666666;
  --bg-color: #ffffff;
  --bg-secondary: #f8f9fa;
  --border-radius: 8px;
  --transition: all 0.3s ease;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-main);
  scroll-behavior: smooth;
  background-color: var(--bg-color);
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover, a:focus {
  color: var(--primary-hover);
}

img, svg {
  max-width: 100%;
  display: block;
}

/* Accessibility: Skip Link & Focus */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: #fff;
  padding: 8px;
  z-index: 1000;
}

.skip-link:focus {
  top: 0;
}

:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

/* Typography */
h1, h2, h3 {
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #111;
}

h2 {
  font-size: 2.2rem;
  text-align: center;
  margin-bottom: 2rem;
}

section {
  padding: 5rem 2rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Header & Navigation */
header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(5px);
  border-bottom: 1px solid #eaeaea;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text-main);
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--primary-color);
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 8rem 2rem;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--accent-color) 100%);
}

.hero h1 {
  font-size: 3rem;
  max-width: 800px;
  margin: 0 auto 1.5rem auto;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 2rem auto;
}

.btn {
  display: inline-block;
  background: var(--primary-color);
  color: #fff;
  padding: 0.8rem 2rem;
  border-radius: var(--border-radius);
  font-weight: bold;
  font-size: 1.1rem;
  border: 2px solid var(--primary-color);
}

.btn:hover {
  background: var(--primary-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* Featured Subsites Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.card {
  background: #fff;
  border: 1px solid #eaeaea;
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.card h3 {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.card p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.card .btn {
  text-align: center;
  font-size: 1rem;
  padding: 0.6rem 1rem;
}

/* Categories & Features Sections */
.bg-light {
  background-color: var(--bg-secondary);
}

.category-card, .feature-card {
  background: #fff;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.category-card svg {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem auto;
  fill: var(--primary-color);
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  list-style: none;
}

.feature-list li {
  background: #fff;
  padding: 1rem;
  border-radius: var(--border-radius);
  border-left: 4px solid var(--primary-color);
  box-shadow: var(--shadow);
  font-weight: 500;
}

/* FAQ Section (Zero JS Accordion) */
details {
  background: #fff;
  border: 1px solid #eaeaea;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  padding: 1rem;
  box-shadow: var(--shadow);
}

summary {
  font-weight: bold;
  font-size: 1.1rem;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 2rem;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  font-size: 1.5rem;
  color: var(--primary-color);
  line-height: 1;
}

details[open] summary::after {
  content: "−";
}

details p {
  margin-top: 1rem;
  color: var(--text-muted);
}

/* Footer */
footer {
  background: #111;
  color: #fff;
  padding: 4rem 2rem 2rem 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h3 {
  color: #fff;
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: #aaa;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #333;
  color: #777;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none; /* For simplicity in this demo, usually requires a toggle */
  }
  .hero h1 {
    font-size: 2rem;
  }
  .hero {
    padding: 4rem 1rem;
  }
}