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

:root {
  /* Unique Theme: Deep Sapphire & Oceanic Emerald */
  --primary: #0f4c81;        /* Deep Classic Sapphire */
  --primary-hover: #0a365c;
  --primary-light: #e6f0fa;
  --secondary: #0d9488;      /* Clean Teal/Emerald accent */
  --secondary-light: #f0fdfa;
  --accent: #d97706;         /* Warm amber for focus/badges */
  --text-main: #0f172a;      /* Slate 900 - strict WCAG AAA contrast */
  --text-muted: #334155;     /* Slate 700 - high readability */
  --bg-main: #ffffff;
  --bg-alt: #f8fafc;         /* Slate 50 */
  --bg-card: #ffffff;
  --border-color: #cbd5e1;   /* Slate 300 */
  --border-light: #e2e8f0;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 12px 28px -4px rgba(15, 23, 42, 0.12);
  --font-stack: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-stack);
  color: var(--text-main);
  background-color: var(--bg-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Accessibility Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 10px;
  background: var(--primary);
  color: #ffffff;
  padding: 8px 16px;
  z-index: 10000;
  text-decoration: none;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 10px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  line-height: 1.25;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover, a:focus {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Layout Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Top Notification Banner */
.top-notice {
  background: #f1f5f9;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.825rem;
  color: var(--text-muted);
  padding: 0.4rem 0;
  text-align: center;
}
.top-notice-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Header & Navigation */
.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
}
.brand-logo:hover {
  text-decoration: none;
}
.brand-text {
  display: flex;
  flex-direction: column;
}
.brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.brand-tagline {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.site-nav a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
  padding: 0.4rem 0.2rem;
  position: relative;
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a.active {
  color: var(--primary);
}
.site-nav a.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1.2;
}
.btn-primary {
  background-color: var(--primary);
  color: #ffffff !important;
}
.btn-primary:hover, .btn-primary:focus {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 10px rgba(15, 76, 129, 0.25);
  text-decoration: none;
}
.btn-secondary {
  background-color: #ffffff;
  color: var(--primary) !important;
  border-color: var(--primary);
}
.btn-secondary:hover, .btn-secondary:focus {
  background-color: var(--primary-light);
  text-decoration: none;
}
.btn-accent {
  background-color: var(--secondary);
  color: #ffffff !important;
}
.btn-accent:hover {
  background-color: #0f766e;
  text-decoration: none;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #f0f7ff 0%, #e6f4f1 100%);
  padding: 3.5rem 0 3rem;
  border-bottom: 1px solid var(--border-light);
}
.hero-content {
  max-width: 780px;
}
.badge {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  background-color: #dbeafe;
  color: #1e40af;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}
.hero h1 {
  font-size: 2.6rem;
  line-height: 1.18;
  margin-bottom: 1.25rem;
}
.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
}
.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Sections */
.section {
  padding: 4rem 0;
}
.section-alt {
  background-color: var(--bg-alt);
}
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3rem;
}
.section-title {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}
.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
}

/* Cards Grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.card {
  background-color: #ffffff;
  border-radius: var(--radius-md);
  padding: 2rem 1.75rem;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #93c5fd;
}
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}
.card p {
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

/* Interactive Assessment / Quiz / Tools */
.interactive-box {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  margin: 2rem 0;
}

.form-group {
  margin-bottom: 1.5rem;
}
.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: #ffffff;
  font-family: inherit;
  color: var(--text-main);
}
.form-control:focus {
  outline: 2px solid var(--primary);
  border-color: transparent;
}

.radio-group, .checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.radio-item, .checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background-color: var(--bg-alt);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.radio-item:hover, .checkbox-item:hover {
  background-color: var(--primary-light);
}
.radio-item input, .checkbox-item input {
  margin-top: 0.25rem;
  cursor: pointer;
}

/* Result Box */
.result-card {
  display: none;
  background-color: var(--secondary-light);
  border: 1px solid #99f6e4;
  padding: 2rem;
  border-radius: var(--radius-md);
  margin-top: 2rem;
}
.result-card.active {
  display: block;
}

/* Callout Box */
.callout {
  padding: 1.5rem 1.75rem;
  background-color: #eff6ff;
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 2rem 0;
}
.callout p:last-child {
  margin-bottom: 0;
}

/* Legal & Content Document Styling */
.content-wrapper {
  max-width: 860px;
  margin: 3rem auto;
  padding: 0 1.25rem;
}
.content-wrapper h1 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}
.content-wrapper h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.4rem;
}
.content-wrapper ul, .content-wrapper ol {
  margin-left: 1.5rem;
  margin-bottom: 1.25rem;
  color: var(--text-muted);
}
.content-wrapper li {
  margin-bottom: 0.5rem;
}
.meta-date {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 1.5rem;
}

/* Table styles */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}
.data-table th, .data-table td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  text-align: left;
}
.data-table th {
  background-color: #f1f5f9;
  font-weight: 700;
  color: var(--text-main);
}
.data-table td {
  font-size: 0.95rem;
}

/* Footer */
.site-footer {
  background-color: #0b1329;
  color: #cbd5e1;
  padding: 4rem 0 2rem;
  margin-top: auto;
  border-top: 4px solid var(--primary);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
.footer-col h4 {
  color: #ffffff;
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}
.footer-col p {
  color: #94a3b8;
  font-size: 0.9rem;
}
.footer-col ul {
  list-style: none;
}
.footer-col ul li {
  margin-bottom: 0.65rem;
}
.footer-col ul li a {
  color: #cbd5e1;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-col ul li a:hover {
  color: #38bdf8;
  text-decoration: underline;
}

.footer-disclaimer {
  padding: 1.25rem;
  background-color: #172033;
  border-radius: var(--radius-sm);
  border: 1px solid #334155;
  font-size: 0.825rem;
  color: #94a3b8;
  line-height: 1.5;
  margin-bottom: 2rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid #1e293b;
  font-size: 0.85rem;
  color: #64748b;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Cookie Banner / Consent Modal */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #ffffff;
  border-top: 2px solid var(--primary);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  padding: 1.25rem 0;
  z-index: 9999;
  display: none;
}
.cookie-banner.active {
  display: block;
}
.cookie-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.cookie-text {
  flex: 1;
  min-width: 280px;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.cookie-text strong {
  color: var(--text-main);
}
.cookie-actions {
  display: flex;
  gap: 0.75rem;
}

/* Mobile responsive */
@media (max-width: 900px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .grid-4 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .header-inner {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  .site-nav {
    flex-wrap: wrap;
    gap: 1rem;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .grid-4 {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .hero-cta {
    flex-direction: column;
  }
  .cookie-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
