/* ============================================
   CARING FOR KINSEY - Professional Caregiving Portal
   Modern, Premium, Clean Design
   Color Palette: Soft Sage Green, White, Cream, Beige, Dark Charcoal, Soft Blue
   ============================================ */

:root {
  /* Primary Colors */
  --sage-green: #8FAE8B;
  --sage-green-dark: #6B8F68;
  --sage-green-light: #B5CDB2;
  --sage-green-pale: #E8F0E7;
  
  /* Neutrals */
  --white: #FFFFFF;
  --cream: #F8F5F0;
  --beige: #EDE6DC;
  --soft-beige: #F5F0E8;
  --charcoal: #2C2C2C;
  --charcoal-light: #4A4A4A;
  --gray: #6B6B6B;
  --gray-light: #9A9A9A;
  --border: #E5DFD5;
  
  /* Accent */
  --soft-blue: #A8C5D4;
  --soft-blue-dark: #7BA3B5;
  --soft-blue-light: #D4E4EC;
  
  /* Semantic */
  --success: #6B8F68;
  --warning: #D4A574;
  --error: #C47A7A;
  
  /* Typography */
  --font-primary: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  --font-heading: 'Georgia', 'Times New Roman', serif;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Layout */
  --container-max: 1200px;
  --header-height: 80px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(44, 44, 44, 0.08);
  --shadow-md: 0 4px 12px rgba(44, 44, 44, 0.1);
  --shadow-lg: 0 8px 24px rgba(44, 44, 44, 0.12);
  --shadow-hover: 0 12px 32px rgba(44, 44, 44, 0.15);
  
  /* Transitions */
  --transition: 0.3s ease;
}

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

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

body {
  font-family: var(--font-primary);
  color: var(--charcoal);
  background-color: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--sage-green-dark);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--sage-green);
}

ul, ol {
  list-style: none;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  color: var(--charcoal);
  margin-bottom: var(--space-md);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: var(--space-md);
  color: var(--charcoal-light);
}

.lead {
  font-size: 1.2rem;
  color: var(--gray);
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-wide {
  max-width: 1400px;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-md); }
.mb-2 { margin-bottom: var(--space-xl); }
.mb-3 { margin-bottom: var(--space-2xl); }
.mt-2 { margin-top: var(--space-xl); }
.mt-3 { margin-top: var(--space-2xl); }
.py-2 { padding-top: var(--space-xl); padding-bottom: var(--space-xl); }
.py-3 { padding-top: var(--space-2xl); padding-bottom: var(--space-2xl); }
.py-4 { padding-top: var(--space-3xl); padding-bottom: var(--space-3xl); }
.section-padding { padding: var(--space-3xl) 0; }

.bg-cream { background-color: var(--cream); }
.bg-sage-pale { background-color: var(--sage-green-pale); }
.bg-beige { background-color: var(--beige); }
.bg-white { background-color: var(--white); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1.4;
}

.btn-primary {
  background-color: var(--sage-green);
  color: var(--white);
  border-color: var(--sage-green);
}

.btn-primary:hover {
  background-color: var(--sage-green-dark);
  border-color: var(--sage-green-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: transparent;
  color: var(--sage-green-dark);
  border-color: var(--sage-green);
}

.btn-secondary:hover {
  background-color: var(--sage-green);
  color: var(--white);
}

.btn-outline {
  background-color: transparent;
  color: var(--charcoal);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--sage-green);
  color: var(--sage-green-dark);
}

.btn-white {
  background-color: var(--white);
  color: var(--sage-green-dark);
  border-color: var(--white);
}

.btn-white:hover {
  background-color: var(--cream);
  color: var(--sage-green-dark);
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1.05rem;
}

/* Top Bar */
.top-bar {
  background-color: var(--charcoal);
  color: var(--white);
  font-size: 0.85rem;
  padding: 0.5rem 0;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.top-bar-left, .top-bar-right {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.top-bar a {
  color: var(--beige);
}

.top-bar a:hover {
  color: var(--white);
}

.datetime-display {
  font-variant-numeric: tabular-nums;
}

/* Header */
.site-header {
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow var(--transition);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: var(--space-lg);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.logo img {
  height: 48px;
  width: auto;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--sage-green-dark);
  letter-spacing: -0.02em;
}

.logo-text span {
  color: var(--charcoal);
  font-weight: 400;
}

/* Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.main-nav > ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.main-nav > ul > li {
  position: relative;
}

.main-nav > ul > li > a {
  display: block;
  padding: 0.6rem 0.9rem;
  color: var(--charcoal);
  font-weight: 500;
  font-size: 0.92rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.main-nav > ul > li > a:hover,
.main-nav > ul > li > a.active {
  color: var(--sage-green-dark);
  background-color: var(--sage-green-pale);
}

/* Dropdown */
.has-dropdown > a::after {
  content: '▾';
  margin-left: 0.3rem;
  font-size: 0.7rem;
  opacity: 0.7;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--space-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition);
  z-index: 100;
}

.has-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 0.6rem 1rem;
  color: var(--charcoal-light);
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
}

.dropdown-menu a:hover {
  background-color: var(--sage-green-pale);
  color: var(--sage-green-dark);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.search-toggle, .mobile-menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-toggle:hover, .mobile-menu-toggle:hover {
  color: var(--sage-green-dark);
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
}

.mobile-menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--charcoal);
  transition: all var(--transition);
}

/* Search Overlay */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(44, 44, 44, 0.9);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.search-form-large {
  width: 90%;
  max-width: 600px;
  position: relative;
}

.search-form-large input {
  width: 100%;
  padding: 1.25rem 3.5rem 1.25rem 1.5rem;
  font-size: 1.25rem;
  border: none;
  border-radius: var(--radius-lg);
  background: var(--white);
  color: var(--charcoal);
}

.search-form-large input:focus {
  outline: 2px solid var(--sage-green);
}

.search-close {
  position: absolute;
  top: -50px;
  right: 0;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Slider */
.hero-slider {
  position: relative;
  height: 560px;
  overflow: hidden;
  background: var(--sage-green-pale);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  display: flex;
  align-items: center;
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

.hero-slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.hero-slide-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(44, 44, 44, 0.75) 0%, rgba(44, 44, 44, 0.4) 50%, rgba(44, 44, 44, 0.2) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--white);
  max-width: 600px;
}

.hero-content h1 {
  color: var(--white);
  font-size: 2.75rem;
  margin-bottom: var(--space-md);
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.hero-content p {
  color: rgba(255,255,255,0.9);
  font-size: 1.15rem;
  margin-bottom: var(--space-xl);
  max-width: 480px;
}

.hero-nav {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.hero-dot.active {
  background: var(--white);
  transform: scale(1.2);
}

.hero-arrows {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 1.5rem;
  z-index: 10;
  pointer-events: none;
}

.hero-arrow {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: none;
  color: var(--white);
  font-size: 1.25rem;
  cursor: pointer;
  pointer-events: auto;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.hero-arrow:hover {
  background: rgba(255,255,255,0.35);
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.section-header .eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sage-green-dark);
  margin-bottom: var(--space-sm);
}

.section-header h2 {
  margin-bottom: var(--space-md);
}

.section-header p {
  font-size: 1.1rem;
}

/* Category Grid */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.category-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  border: 1px solid var(--border);
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--sage-green-light);
}

.category-card-image {
  height: 180px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.category-card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(44,44,44,0.3), transparent);
}

.category-card-icon {
  position: absolute;
  bottom: -24px;
  left: 1.5rem;
  width: 52px;
  height: 52px;
  background: var(--sage-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.4rem;
  box-shadow: var(--shadow-md);
  z-index: 2;
}

.category-card-body {
  padding: 2rem 1.5rem 1.5rem;
}

.category-card-body h3 {
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}

.category-card-body p {
  font-size: 0.95rem;
  margin-bottom: var(--space-md);
  color: var(--gray);
}

.category-card-link {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--sage-green-dark);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.category-card-link:hover {
  gap: 0.6rem;
}

/* Featured Cards */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.article-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

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

.article-card-image {
  height: 200px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.article-card-category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--sage-green);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.article-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  font-size: 0.8rem;
  color: var(--gray-light);
  margin-bottom: var(--space-sm);
}

.article-card-body h3 {
  font-size: 1.15rem;
  margin-bottom: var(--space-sm);
  line-height: 1.4;
}

.article-card-body h3 a {
  color: var(--charcoal);
}

.article-card-body h3 a:hover {
  color: var(--sage-green-dark);
}

.article-card-body p {
  font-size: 0.925rem;
  flex: 1;
  margin-bottom: var(--space-md);
}

.article-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--gray);
}

.read-more {
  font-weight: 600;
  color: var(--sage-green-dark);
  font-size: 0.9rem;
}

/* Resource Cards */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.resource-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  text-align: center;
  transition: all var(--transition);
}

.resource-card:hover {
  border-color: var(--sage-green-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.resource-card-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-md);
  background: var(--sage-green-pale);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sage-green-dark);
  font-size: 1.5rem;
}

.resource-card h4 {
  font-size: 1.05rem;
  margin-bottom: var(--space-sm);
}

.resource-card p {
  font-size: 0.875rem;
  margin-bottom: var(--space-md);
}

/* Family Support Section */
.support-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.support-card {
  background: var(--cream);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: all var(--transition);
}

.support-card:hover {
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.support-card-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-md);
  background: var(--sage-green);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

/* AI Assistant Section */
.ai-assistant-section {
  background: linear-gradient(135deg, var(--sage-green-pale) 0%, var(--soft-blue-light) 100%);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  position: relative;
  overflow: hidden;
}

.ai-assistant-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.ai-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

.ai-box-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
}

.ai-avatar {
  width: 48px;
  height: 48px;
  background: var(--sage-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.25rem;
}

.suggested-questions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.suggested-q {
  background: var(--sage-green-pale);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--sage-green-dark);
  cursor: pointer;
  transition: all var(--transition);
}

.suggested-q:hover {
  background: var(--sage-green);
  color: var(--white);
}

.ai-disclaimer {
  font-size: 0.8rem;
  color: var(--gray);
  margin-top: var(--space-md);
  padding: var(--space-sm);
  background: var(--cream);
  border-radius: var(--radius-sm);
}

/* Care Planning Form */
.care-form {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-md);
  max-width: 800px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--charcoal);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--charcoal);
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--sage-green);
  box-shadow: 0 0 0 3px var(--sage-green-pale);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.form-checkboxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.form-checkbox input {
  width: auto;
}

.form-disclaimer {
  background: var(--cream);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  margin-bottom: var(--space-lg);
  border-left: 4px solid var(--sage-green);
}

/* Care Plan Result */
.care-plan-result {
  display: none;
  margin-top: var(--space-2xl);
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-md);
  border: 2px solid var(--sage-green-light);
}

.care-plan-result.active {
  display: block;
}

.care-plan-result h3 {
  color: var(--sage-green-dark);
}

.checklist {
  margin: var(--space-lg) 0;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border);
}

.checklist li::before {
  content: '☐';
  color: var(--sage-green);
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* Sidebar */
.page-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-2xl);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.sidebar-widget {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.sidebar-widget h4 {
  font-size: 1.05rem;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--sage-green-pale);
  color: var(--charcoal);
}

.sidebar-widget ul li {
  margin-bottom: var(--space-sm);
}

.sidebar-widget ul li a {
  color: var(--charcoal-light);
  font-size: 0.95rem;
  display: block;
  padding: 0.3rem 0;
}

.sidebar-widget ul li a:hover {
  color: var(--sage-green-dark);
}

.sidebar-search input {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.newsletter-form input {
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.ad-placeholder {
  background: var(--beige);
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  font-size: 0.85rem;
  text-align: center;
  padding: 1rem;
  min-height: 100px;
}

.ad-placeholder.ad-300x250 {
  height: 250px;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
}

.ad-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-light);
  margin-bottom: 0.5rem;
  text-align: center;
}

/* Article Page */
.article-header {
  margin-bottom: var(--space-xl);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--gray);
  margin-bottom: var(--space-md);
}

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

.breadcrumb a:hover {
  color: var(--sage-green-dark);
}

.breadcrumb span {
  color: var(--gray-light);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  font-size: 0.9rem;
  color: var(--gray);
  margin: var(--space-md) 0;
}

.article-featured-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-xl);
}

.article-content {
  font-size: 1.05rem;
  line-height: 1.8;
}

.article-content h2 {
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--sage-green-pale);
}

.article-content h3 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
}

.article-content ul, .article-content ol {
  margin: var(--space-md) 0;
  padding-left: 1.5rem;
}

.article-content ul li, .article-content ol li {
  margin-bottom: var(--space-sm);
  list-style: disc;
  color: var(--charcoal-light);
}

.article-content ol li {
  list-style: decimal;
}

.toc {
  background: var(--cream);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: var(--space-xl) 0;
}

.toc h4 {
  margin-bottom: var(--space-md);
}

.toc ul li {
  margin-bottom: 0.4rem;
}

.toc a {
  color: var(--charcoal-light);
  font-size: 0.95rem;
}

.share-buttons {
  display: flex;
  gap: var(--space-sm);
  margin: var(--space-xl) 0;
  flex-wrap: wrap;
}

.share-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--charcoal-light);
  cursor: pointer;
  transition: all var(--transition);
}

.share-btn:hover {
  border-color: var(--sage-green);
  color: var(--sage-green-dark);
}

.author-box {
  display: flex;
  gap: var(--space-lg);
  background: var(--cream);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  margin: var(--space-2xl) 0;
}

.author-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--sage-green);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.75rem;
  flex-shrink: 0;
}

/* Blogroll Table */
.blogroll-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.blogroll-table th,
.blogroll-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.blogroll-table th {
  background: var(--sage-green-pale);
  font-weight: 600;
  color: var(--charcoal);
  font-size: 0.9rem;
}

.blogroll-table tr:last-child td {
  border-bottom: none;
}

.blogroll-table tr:hover td {
  background: var(--cream);
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-active {
  background: var(--sage-green-pale);
  color: var(--sage-green-dark);
}

.status-pending {
  background: #FEF3E2;
  color: #B pen;
}

/* Footer */
.site-footer {
  background: var(--charcoal);
  color: var(--beige);
  padding-top: var(--space-3xl);
}

.footer-main {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  padding-bottom: var(--space-2xl);
}

.footer-brand .logo-text {
  color: var(--white);
  margin-bottom: var(--space-md);
}

.footer-brand p {
  color: var(--gray-light);
  font-size: 0.95rem;
  margin-bottom: var(--space-lg);
}

.footer-social {
  display: flex;
  gap: var(--space-md);
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--beige);
  transition: all var(--transition);
}

.footer-social a:hover {
  background: var(--sage-green);
  color: var(--white);
}

.footer-col h4 {
  color: var(--white);
  font-size: 1.05rem;
  margin-bottom: var(--space-lg);
  font-family: var(--font-primary);
}

.footer-col ul li {
  margin-bottom: var(--space-sm);
}

.footer-col ul li a {
  color: var(--gray-light);
  font-size: 0.925rem;
}

.footer-col ul li a:hover {
  color: var(--sage-green-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: var(--space-lg) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
  font-size: 0.875rem;
  color: var(--gray-light);
}

.footer-bottom-links {
  display: flex;
  gap: var(--space-lg);
}

.footer-bottom-links a {
  color: var(--gray-light);
}

.footer-bottom-links a:hover {
  color: var(--sage-green-light);
}

/* Page Hero (inner pages) */
.page-hero {
  background: linear-gradient(135deg, var(--sage-green-pale) 0%, var(--cream) 100%);
  padding: var(--space-3xl) 0;
  text-align: center;
}

.page-hero h1 {
  margin-bottom: var(--space-md);
}

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

/* CTA Section */
.cta-section {
  background: var(--sage-green);
  color: var(--white);
  text-align: center;
  padding: var(--space-3xl) 0;
}

.cta-section h2 {
  color: var(--white);
  margin-bottom: var(--space-md);
}

.cta-section p {
  color: rgba(255,255,255,0.9);
  max-width: 550px;
  margin: 0 auto var(--space-xl);
}

/* Mobile Nav */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 85%;
  max-width: 360px;
  height: 100vh;
  background: var(--white);
  z-index: 1500;
  padding: var(--space-xl);
  overflow-y: auto;
  transition: right var(--transition);
  box-shadow: var(--shadow-lg);
}

.mobile-nav.active {
  right: 0;
}

.mobile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
}

.mobile-nav-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--charcoal);
}

.mobile-nav ul li {
  margin-bottom: 0.25rem;
}

.mobile-nav ul li a {
  display: block;
  padding: 0.85rem 0;
  color: var(--charcoal);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1400;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Responsive */
@media (max-width: 1024px) {
  .categories-grid,
  .featured-grid,
  .support-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .resources-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-main {
    grid-template-columns: 1fr 1fr;
  }
  
  .page-layout {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    order: -1;
  }
  
  .main-nav {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .ai-assistant-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.65rem; }
  
  .hero-slider {
    height: 480px;
  }
  
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .categories-grid,
  .featured-grid,
  .support-grid,
  .resources-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-main {
    grid-template-columns: 1fr;
  }
  
  .form-row,
  .form-checkboxes {
    grid-template-columns: 1fr;
  }
  
  .header-actions .btn {
    display: none;
  }
  
  .top-bar-left, .top-bar-right {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }
  
  .hero-slider {
    height: 420px;
  }
  
  .hero-content h1 {
    font-size: 1.65rem;
  }
  
  .hero-content p {
    font-size: 1rem;
  }
}

/* Print styles for care plan */
@media print {
  .site-header, .site-footer, .top-bar, .btn, .no-print {
    display: none !important;
  }
  
  .care-plan-result {
    box-shadow: none;
    border: none;
  }
}

/* Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--sage-green);
  color: white;
  padding: 8px 16px;
  z-index: 3000;
  transition: top 0.3s;
}

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

:focus-visible {
  outline: 2px solid var(--sage-green);
  outline-offset: 2px;
}
