/* ===== CSS Variables ===== */
:root {
  --color-ocean: #0077b6;
  --color-ocean-dark: #005f8a;
  --color-ocean-light: #90e0ef;
  --color-sand: #f5f0e8;
  --color-sand-dark: #e8dfd2;
  --color-lagoon: #00b4d8;
  --color-coral: #e07a5f;
  --color-palm: #2d6a4f;
  --color-white: #ffffff;
  --color-text: #2c2c2c;
  --color-text-light: #5a5a5a;
  --color-text-muted: #888888;
  --color-border: #e0dcd4;
  --color-bg: #fafaf7;
  --max-width: 900px;
  --max-width-wide: 1100px;
  --header-height: 64px;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.10);
  --transition: 0.2s ease;
}

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

/* ===== Base ===== */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

a:hover {
  color: var(--color-ocean-dark);
  text-decoration: underline;
}

/* ===== Typography ===== */
h1, h2, h3, h4 {
  line-height: 1.3;
  color: var(--color-text);
}

h1 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.2rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.35rem;
}

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container-wide {
  max-width: var(--max-width-wide);
}

main {
  flex: 1;
  padding: 2.5rem 0 3rem;
}

/* Constrain content sections that aren't wrapped in .container */
.content-section,
.categories,
main > .breadcrumb,
main > .related-pages,
main > .article-content,
main > .faq-list,
main > section.card-grid,
main > .card-grid {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* ===== Header ===== */
.site-header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
}

.header-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-ocean);
  text-decoration: none;
  white-space: nowrap;
}

.site-logo:hover {
  color: var(--color-ocean-dark);
  text-decoration: none;
}

/* ===== Navigation ===== */
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 0.25rem;
  padding: 0;
  margin: 0;
}

.main-nav a {
  display: block;
  padding: 0.4rem 0.75rem;
  font-size: 0.92rem;
  color: var(--color-text-light);
  border-radius: var(--radius);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--color-sand);
  color: var(--color-ocean);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-text);
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
  display: block;
}

/* ===== Hero / Page Header ===== */
.page-hero {
  background: linear-gradient(135deg, var(--color-ocean) 0%, var(--color-lagoon) 100%);
  color: var(--color-white);
  padding: 3rem 0;
  margin-bottom: 2.5rem;
  text-align: center;
}

.page-hero h1 {
  color: var(--color-white);
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.page-hero p {
  font-size: 1.1rem;
  opacity: 0.92;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.breadcrumb li::after {
  content: "/";
  margin-left: 0.4rem;
  color: var(--color-border);
}

.breadcrumb li:last-child::after {
  display: none;
}

.breadcrumb a {
  color: var(--color-text-muted);
}

.breadcrumb a:hover {
  color: var(--color-ocean);
}

/* ===== Cards ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: box-shadow var(--transition), transform var(--transition);
}

.card-clickable {
  cursor: pointer;
}

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

.card-clickable:focus-visible {
  outline: 3px solid var(--color-ocean-light);
  outline-offset: 3px;
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.card h3 a {
  color: var(--color-text);
}

.card h3 a:hover {
  color: var(--color-ocean);
  text-decoration: none;
}

.card p {
  font-size: 0.95rem;
  color: var(--color-text-light);
  margin-bottom: 0;
}

/* ===== Section intro on index pages ===== */
.section-intro {
  font-size: 1.08rem;
  color: var(--color-text-light);
  margin-bottom: 2rem;
  max-width: 700px;
}

/* ===== Article content ===== */
.article-content {
  max-width: var(--max-width);
}

.article-content h2 {
  border-bottom: 2px solid var(--color-sand-dark);
  padding-bottom: 0.4rem;
}

/* ===== FAQ blocks ===== */
.faq-list {
  margin: 1.5rem 0;
}

.faq-item {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  padding: 1.25rem 1.5rem;
}

.faq-item h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
  color: var(--color-text);
  line-height: 1.4;
}

.faq-item p {
  color: var(--color-text-light);
  font-size: 0.97rem;
  margin-bottom: 0;
}

.faq-item p a {
  color: var(--color-ocean);
}

/* ===== Related pages ===== */
.related-pages {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--color-sand-dark);
}

.related-pages h2,
.related-pages h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.related-pages ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.related-pages li a {
  display: inline-block;
  padding: 0.45rem 1rem;
  background: var(--color-sand);
  border-radius: var(--radius);
  font-size: 0.93rem;
  color: var(--color-text-light);
  transition: background var(--transition), color var(--transition);
}

.related-pages li a:hover {
  background: var(--color-ocean);
  color: var(--color-white);
  text-decoration: none;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
  padding: 2.5rem 0 2rem;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 1.25rem;
}

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

.footer-col h4 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

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

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

.footer-col a {
  font-size: 0.9rem;
  color: var(--color-text-light);
}

.footer-col a:hover {
  color: var(--color-ocean);
}

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-align: center;
}

/* ===== Home page specifics ===== */
.home-hero {
  background: linear-gradient(135deg, var(--color-ocean) 0%, var(--color-lagoon) 50%, var(--color-ocean-light) 100%);
  color: var(--color-white);
  padding: 4rem 0;
  text-align: center;
}

.home-hero h1 {
  color: var(--color-white);
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.home-hero p {
  font-size: 1.15rem;
  opacity: 0.93;
  max-width: 620px;
  margin: 0 auto;
}

.home-sections {
  padding: 3rem 0;
}

.home-section {
  margin-bottom: 2.5rem;
}

.home-section h2 {
  border: none;
  padding-bottom: 0;
}

.home-section h2 a {
  color: var(--color-text);
}

.home-section h2 a:hover {
  color: var(--color-ocean);
  text-decoration: none;
}

/* ===== Utility ===== */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow);
    padding: 0.75rem 1.25rem;
  }

  .main-nav.open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .main-nav a {
    padding: 0.65rem 0.5rem;
    border-radius: 0;
    border-bottom: 1px solid var(--color-sand);
  }

  h1 {
    font-size: 1.65rem;
  }

  .home-hero h1 {
    font-size: 1.9rem;
  }

  .page-hero {
    padding: 2rem 0;
  }

  .page-hero h1 {
    font-size: 1.7rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  body {
    font-size: 16px;
  }

  .home-hero {
    padding: 2.5rem 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}
