/* BrightHills brand font */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

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

/* BrightHills color palette */
:root {
  --primary-color: #6C50F3;        /* BrightHills purple */
  --primary-dark: #5A3FD6;         /* hover state */
  --brand-dark: #110B42;           /* deep navy — headings, footer */
  --brand-light: #F3F1FF;          /* light purple tint — backgrounds */
  --brand-muted: #E8E4FD;          /* medium purple tint — card fills, borders */
  --brand-subtle: #C4B8FF;         /* soft purple — decorative borders */
  --brand-gradient-from: #997EFF;
  --brand-gradient-to: #714FFC;

  --secondary-color: #6B7280;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #D94C4C;
  --background-color: #F8F8FC;
  --card-background: #ffffff;
  --text-primary: #110B42;
  --text-secondary: #6B7280;
  --border-color: #E8E4FD;
  --shadow: 0 2px 16px 0 rgba(108, 80, 243, 0.08);
  --shadow-lg: 0 8px 32px 0 rgba(108, 80, 243, 0.16);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--background-color);
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ─── Header ─────────────────────────────────────── */
header {
  background: linear-gradient(180deg, var(--brand-gradient-from) 0%, var(--brand-gradient-to) 100%);
  color: white;
  padding: 3rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Hexagonal honeycomb texture overlay */
header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='52' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='26,2 50,15 50,45 26,58 2,45 2,15' fill='none' stroke='white' stroke-width='1' stroke-opacity='0.12'/%3E%3C/svg%3E");
  background-size: 52px 60px;
  pointer-events: none;
}

/* Logo in header */
.header-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 1.75rem;
  position: relative;
  z-index: 1;
}

.header-logo img {
  height: 36px;
  width: auto;
}

header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
  letter-spacing: -0.02em;
}

header p {
  font-size: 1.125rem;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

/* ─── Navigation breadcrumb ──────────────────────── */
.breadcrumb {
  padding: 1rem 0;
  background-color: white;
  border-bottom: 1px solid var(--border-color);
}

.breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb span {
  color: var(--text-secondary);
  margin: 0 0.5rem;
}

/* ─── Back button ────────────────────────────────── */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  transition: opacity 0.15s;
}

.back-btn:hover {
  opacity: 0.75;
}

/* ─── Main content ───────────────────────────────── */
main {
  padding: 2rem 0 4rem;
}

/* ─── Cards grid (index page) ────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.card {
  background: var(--card-background);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
  border: 1px solid var(--border-color);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-subtle);
}

.card-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--brand-gradient-from) 0%, var(--brand-gradient-to) 100%);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 2rem;
}

.card h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.card p {
  color: var(--text-secondary);
}

/* ─── Section styling ────────────────────────────── */
section {
  margin-bottom: 4rem;
}

section h2 {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary-color);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  letter-spacing: -0.01em;
}

section h2 .step-number {
  background: linear-gradient(135deg, var(--brand-gradient-from) 0%, var(--brand-gradient-to) 100%);
  color: white;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
}

section h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 1.5rem 0 1rem;
}

/* ─── Text content ───────────────────────────────── */
.content-block {
  background: var(--card-background);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

.content-block p {
  margin-bottom: 1rem;
}

.content-block p:last-child {
  margin-bottom: 0;
}

/* ─── Image container ────────────────────────────── */
.image-container {
  background: var(--card-background);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin: 1.5rem 0;
  border: 1px solid var(--border-color);
}

.image-container img {
  width: 100%;
  height: auto;
  display: block;
}

.image-container figcaption {
  padding: 0.875rem 1rem;
  background: var(--brand-light);
  font-size: 0.875rem;
  color: var(--primary-color);
  font-weight: 500;
  text-align: center;
}

/* ─── Video container ────────────────────────────── */
.video-container {
  background: var(--card-background);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin: 2rem 0;
  border: 1px solid var(--border-color);
}

.video-container video {
  width: 100%;
  height: auto;
  display: block;
}

.video-container figcaption {
  padding: 1rem;
  background: linear-gradient(90deg, var(--brand-gradient-from) 0%, var(--brand-gradient-to) 100%);
  color: white;
  font-weight: 500;
  text-align: center;
  font-size: 0.9375rem;
}

/* ─── Info boxes ─────────────────────────────────── */
.info-box {
  padding: 1.25rem;
  border-radius: 0.625rem;
  margin: 1.5rem 0;
}

.info-box.tip {
  background: #ecfdf5;
  border-left: 4px solid var(--success-color);
}

.info-box.warning {
  background: #fffbeb;
  border-left: 4px solid var(--warning-color);
}

.info-box.danger {
  background: #fef2f2;
  border-left: 4px solid var(--danger-color);
}

.info-box.info {
  background: var(--brand-light);
  border-left: 4px solid var(--primary-color);
}

.info-box-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
}

/* ─── Lists ──────────────────────────────────────── */
ul, ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

/* ─── Table of contents ──────────────────────────── */
.toc {
  background: var(--brand-light);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--brand-muted);
}

.toc h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

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

.toc li {
  margin-bottom: 0.5rem;
}

.toc a {
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.toc a:hover {
  text-decoration: underline;
}

/* ─── Footer ─────────────────────────────────────── */
footer {
  background: var(--brand-dark);
  color: white;
  padding: 2.5rem 0;
  text-align: center;
}

.footer-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.footer-logo img {
  height: 28px;
  width: auto;
  opacity: 0.9;
}

footer p {
  opacity: 0.7;
  font-size: 0.875rem;
  line-height: 1.8;
}

footer p + p {
  margin-top: 0.25rem;
}

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 768px) {
  header {
    padding: 2rem 0;
  }

  header h1 {
    font-size: 1.75rem;
  }

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

  section h2 {
    font-size: 1.5rem;
  }
}

/* ─── Language switcher (hero) ───────────────────── */
.hero-lang-switch {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.hero-lang-switch .lang-btn {
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: background 0.15s, color 0.15s;
}

.hero-lang-switch .lang-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  text-decoration: none;
}

.hero-lang-switch .lang-btn.active {
  background: rgba(255, 255, 255, 0.25);
  color: white;
  border-color: rgba(255, 255, 255, 0.6);
}

/* ─── Language switcher (breadcrumb) ─────────────── */
.breadcrumb-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
}

.lang-switcher {
  display: flex;
  gap: 0.25rem;
}

.lang-switcher a.lang-btn {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s;
}

.lang-switcher span.lang-btn {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  background: var(--primary-color);
  color: white;
}

.lang-switcher a.lang-btn:hover {
  background: var(--brand-light);
  color: var(--primary-color);
  text-decoration: none;
}

/* ─── Legal section ──────────────────────────────── */
.legal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.legal-item {
  background: var(--card-background);
  padding: 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid var(--brand-muted);
  box-shadow: var(--shadow);
}

.legal-item h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
}

.legal-item p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.7;
}

/* ─── Print ──────────────────────────────────────── */
@media print {
  header {
    background: none;
    color: black;
  }

  .video-container {
    display: none;
  }

  .card {
    box-shadow: none;
    border: 1px solid var(--border-color);
  }
}
