/* Harrison's Hope - Registered Canadian Charity - Accessible Stylesheet */
/* Modern design inspired by Shoppers Drug Mart Optimum */
/* WCAG 2.1 AA Compliant - High Contrast for Accessibility */

:root {
  /* Primary colors - white background with red accents */
  --primary-white: #FFFFFF;
  --primary-red: #D32F2F;
  --primary-red-dark: #B71C1C;
  --primary-red-light: #FFCDD2;
  --primary-red-pale: #FFEBEE;

  /* Grey palette */
  --light-gray: #F8F9FA;
  --medium-gray: #E9ECEF;
  --dark-gray: #6C757D;
  --text-dark: #212529;
  --text-medium: #495057;

  /* Accent colors */
  --focus-yellow: #FFDD00;
  --border-color: #DEE2E6;
  --shadow-color: rgba(0, 0, 0, 0.08);
  --shadow-hover: rgba(0, 0, 0, 0.12);
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-dark);
  background-color: var(--primary-white);
  min-height: 100vh;
}

/* Skip Link for Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-red);
  color: var(--primary-white);
  padding: 12px 24px;
  z-index: 10000;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--focus-yellow);
  outline-offset: 2px;
}

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

h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 600;
}

h4 {
  font-size: 1.125rem;
  font-weight: 600;
}

p {
  margin-bottom: 1.25rem;
  max-width: 75ch;
}

.lead {
  font-size: 1.25rem;
  line-height: 1.8;
  font-weight: 400;
  color: var(--text-medium);
  max-width: 800px;
}

@media (max-width: 768px) {
  .lead {
    font-size: 1.1rem;
    line-height: 1.6;
  }
}

/* Links */
a {
  color: var(--primary-red);
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: 600;
}

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

a:focus {
  outline: 3px solid var(--focus-yellow);
  outline-offset: 2px;
  background-color: var(--primary-red);
  color: var(--primary-white);
  text-decoration: none;
}

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

.top-bar-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1.5rem;
}

.top-bar .charity-reg {
  color: var(--primary-white);
  font-size: 0.8rem;
  font-weight: 600;
}

.top-bar a {
  color: var(--primary-white);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.top-bar a:hover {
  color: var(--primary-red-pale);
  text-decoration: underline;
}

.top-bar a:focus {
  outline: 2px solid var(--primary-white);
  outline-offset: 2px;
}

/* Header - White Background with Red Accent */
.site-header {
  background: var(--primary-white);
  border-bottom: 4px solid var(--primary-red);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px var(--shadow-color);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-red);
  text-decoration: none;
  margin: 0;
  line-height: 1;
}

.logo:hover {
  color: var(--primary-red-dark);
}

.logo:focus {
  outline: 3px solid var(--focus-yellow);
  outline-offset: 4px;
  border-radius: 4px;
}

.logo img {
  height: 50px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* Navigation - Top Tabs Style */
.main-nav {
  display: flex;
  align-items: center;
}

.main-nav ul {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}

.main-nav ul li {
  display: flex;
  align-items: center;
}

.main-nav a {
  position: relative;
  display: inline-block;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 1.25rem;
  transition: all 0.2s ease;
  border-radius: 6px 6px 0 0;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  transition: background-color 0.2s ease;
}

.main-nav a:hover {
  color: var(--primary-red);
  background: var(--primary-red-pale);
  text-decoration: none;
}

.main-nav a:hover::after {
  background: var(--primary-red);
}

.main-nav a:focus {
  outline: 3px solid var(--focus-yellow);
  outline-offset: 2px;
  background: var(--primary-red);
  color: var(--primary-white);
}

.main-nav a:focus::after {
  display: none;
}

.main-nav a[aria-current="page"] {
  color: var(--primary-red);
  background: var(--primary-red-pale);
}

.main-nav a[aria-current="page"]::after {
  background: var(--primary-red);
}

/* Donate Button in Navigation */
.main-nav .donate-link {
  background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
  color: var(--primary-white) !important;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px var(--shadow-color);
}

.main-nav .donate-link::after {
  display: none;
}

.main-nav .donate-link:hover {
  background: linear-gradient(135deg, var(--primary-red-dark) 0%, var(--primary-red) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px var(--shadow-hover);
  color: var(--primary-white) !important;
  text-decoration: none;
}

.main-nav .donate-link:focus {
  outline: 3px solid var(--focus-yellow);
  outline-offset: 2px;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: transparent;
  color: var(--primary-red);
  border: 2px solid var(--primary-red);
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 6px;
}

.menu-toggle:hover {
  background: var(--primary-red);
  color: var(--primary-white);
}

.menu-toggle:focus {
  outline: 3px solid var(--focus-yellow);
  outline-offset: 2px;
}

/* Hero Section - Light and Bright */
.hero {
  background: linear-gradient(135deg, var(--primary-red-pale) 0%, var(--primary-white) 50%, var(--medium-gray) 100%);
  color: var(--text-dark);
  padding: 5rem 2rem;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23D32F2F' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero h1 {
  color: var(--primary-red-dark);
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.hero p {
  font-size: 1.35rem;
  margin: 0 auto 2rem 0;
  max-width: 700px;
  color: var(--text-medium);
  position: relative;
  z-index: 1;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
  color: var(--primary-white);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-red-dark) 0%, var(--primary-red) 100%);
  color: var(--primary-white);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}

.btn-primary:focus {
  outline: 3px solid var(--focus-yellow);
  outline-offset: 3px;
}

.btn-secondary {
  background: var(--primary-white);
  color: var(--primary-red);
  border: 2px solid var(--primary-red);
}

.btn-secondary:hover {
  background: var(--primary-red-pale);
  color: var(--primary-red-dark);
  text-decoration: none;
}

.btn-secondary:focus {
  outline: 3px solid var(--focus-yellow);
  outline-offset: 3px;
}

.btn-outline {
  background: transparent;
  color: var(--primary-red);
  border: 2px solid var(--primary-red);
}

.btn-outline:hover {
  background: var(--primary-red);
  color: var(--primary-white);
  text-decoration: none;
}

.btn-large {
  padding: 1.125rem 2.5rem;
  font-size: 1.05rem;
}

/* Main Content */
main {
  min-height: 60vh;
}

.section {
  padding: 3.5rem 2rem;
}

.section-alt {
  background: linear-gradient(180deg, var(--light-gray) 0%, var(--primary-white) 100%);
}

.section-dark {
  background: linear-gradient(135deg, var(--primary-red-dark) 0%, var(--primary-red) 100%);
  color: var(--primary-white);
}

.section-dark h2,
.section-dark h3 {
  color: var(--primary-white);
}

.section-dark p {
  color: rgba(255, 255, 255, 0.95);
}

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

.container-full {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Section Headers */
.section-header {
  margin-bottom: 2.5rem;
  max-width: 800px;
}

.section-intro-text {
  max-width: 800px;
  margin: 0 auto 2rem;
  text-align: center !important;
}

@media (max-width: 768px) {
  .section-intro-text {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
  }
}

.section-header.text-center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-header h2 {
  margin-bottom: 0.75rem;
  color: var(--primary-red-dark);
}

.section-header p {
  font-size: 1.125rem;
  color: var(--text-medium);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
  justify-content: center;
}

.card-grid.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

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

.card-grid.grid-5 {
  grid-template-columns: repeat(5, 1fr);
}

.card-grid .card {
  margin: 0 auto;
  width: 100%;
}

.card {
  background: var(--primary-white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: 0 2px 8px var(--shadow-color);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-red) 0%, var(--primary-red-light) 100%);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  border-radius: 12px 12px 0 0;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--shadow-hover);
  border-color: var(--primary-red);
}

.card:hover::before {
  transform: scaleX(1);
}

.card:focus-within {
  outline: 3px solid var(--focus-yellow);
  outline-offset: 3px;
}

.card h3 {
  color: var(--primary-red-dark);
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.card-icon {
  width: 60px;
  height: 60px;
  background: var(--primary-red);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
  color: var(--primary-white);
  border-radius: 50%;
  box-shadow: 0 2px 8px var(--shadow-color);
}

.card-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Feature Sections */
.feature-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-section.text-center {
  text-align: center;
}

.feature-section.text-center .feature-content {
  text-align: center;
}

.feature-section.text-center ul {
  text-align: left;
  display: inline-block;
}

.feature-image {
  background: var(--light-gray);
  min-height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 3px solid var(--primary-red-light);
}

.feature-image::after {
  content: '';
  position: absolute;
  top: 15px;
  left: 15px;
  width: 100%;
  height: 100%;
  border: 3px solid var(--primary-red);
  z-index: -1;
  border-radius: 12px;
}

.feature-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.feature-content h2 {
  margin-bottom: 1.25rem;
  color: var(--primary-red-dark);
}

.feature-content h3 {
  color: var(--primary-red);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
}

.feature-content ul {
  margin-bottom: 1.25rem;
  padding-left: 1.25rem;
}

.feature-content li {
  margin-bottom: 0.5rem;
}

/* Stats Section */
.stats-section {
  background: var(--primary-red);
  color: var(--primary-white);
  padding: 4rem 2rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.stat-item {
  padding: 1rem;
}

.stat-item h3 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--primary-white);
  margin-bottom: 0.5rem;
  font-weight: 800;
}

.stat-item p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 auto;
}

/* Partner Logos */
.partner-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  max-width: 1000px;
  margin: 0 auto 2.5rem;
  border: 1px solid var(--border-color);
}

.partner-logos img {
  max-width: 150px;
  height: 80px;
  object-fit: contain;
  border-radius: 4px;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.partner-logos img:hover {
  opacity: 1;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
  font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-family: inherit;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  background: var(--primary-white);
  color: var(--text-dark);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-red);
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.15);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
  border-color: var(--dark-gray);
}

.form-group small {
  display: block;
  margin-top: 0.5rem;
  color: var(--dark-gray);
  font-size: 0.875rem;
}

fieldset.form-group {
  border: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
}

fieldset.form-group legend {
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-dark);
  font-size: 0.9rem;
}

/* Footer - Light Design */
.site-footer {
  background: linear-gradient(180deg, var(--text-dark) 0%, #1a1a1a 100%);
  color: var(--primary-white);
  padding: 2.5rem 2rem 1.5rem;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
  text-align: center;
}

.footer-section nav,
.footer-section address {
  text-align: center;
  font-style: normal;
}

.footer-section h4 {
  text-align: center;
}

.footer-section h4 {
  color: var(--primary-white);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary-red);
}

.footer-charity-reg {
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

.footer-section p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  line-height: 1.7;
  text-align: center;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.85);
  display: block;
  margin-bottom: 0.625rem;
  font-weight: 500;
  font-size: 0.95rem;
  text-align: center;
}

.footer-section a:hover {
  color: var(--primary-red-light);
  text-decoration: underline;
  padding-left: 5px;
}

.footer-section a:focus {
  outline: 2px solid var(--focus-yellow);
  outline-offset: 2px;
  padding-left: 0;
}

.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.footer-bottom p {
  margin: 0.5rem 0;
  text-align: center;
  width: 100%;
}

.footer-credit {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}

/* Page Header */
.page-header {
  background: linear-gradient(135deg, var(--primary-red-pale) 0%, var(--primary-white) 100%);
  color: var(--text-dark);
  padding: 2.5rem 2rem;
  border-bottom: 3px solid var(--primary-red);
}

.page-header h1 {
  max-width: 1200px;
  margin: 0 auto;
  color: var(--primary-red-dark);
}

/* Breadcrumbs */
.breadcrumbs {
  padding: 1rem 2rem;
  background: var(--primary-white);
  border-bottom: 1px solid var(--border-color);
}

.breadcrumbs ol {
  max-width: 1200px;
  margin: 0 auto;
  list-style: none;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
}

.breadcrumbs li::after {
  content: "/";
  color: var(--dark-gray);
  margin-left: 0.5rem;
}

.breadcrumbs li:last-child::after {
  content: "";
}

.breadcrumbs a {
  color: var(--primary-red);
  font-weight: 500;
}

.breadcrumbs a:hover {
  color: var(--primary-red-dark);
}

/* Alert Boxes */
.alert {
  padding: 1.25rem 1.5rem;
  border-left: 4px solid;
  margin-bottom: 1.5rem;
  background: var(--light-gray);
  border-radius: 0 6px 6px 0;
}

.alert-info {
  border-color: #1976D2;
  background: #E3F2FD;
}

.alert-success {
  border-color: #2E7D32;
  background: #E8F5E9;
}

.alert-warning {
  border-color: #F57C00;
  background: #FFF3E0;
}

.alert strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text-dark);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

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

th {
  background: var(--primary-red);
  color: var(--primary-white);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

tr:nth-child(even) {
  background: var(--light-gray);
}

tr:hover {
  background: var(--primary-red-pale);
}

/* Lists */
ul, ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Blockquotes */
blockquote {
  padding: 2rem 2.5rem;
  margin: 2rem 0;
  border-left: 4px solid var(--primary-red);
  background: var(--light-gray);
  font-style: italic;
  border-radius: 0 8px 8px 0;
}

blockquote p {
  margin-bottom: 1rem;
  font-size: 1.125rem;
  color: var(--text-dark);
}

blockquote footer {
  font-style: normal;
  font-weight: 600;
  color: var(--text-dark);
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
  color: var(--primary-white);
  border: none;
  font-size: 1.35rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px var(--shadow-hover);
  transition: all 0.2s ease;
  border-radius: 50%;
  z-index: 9998;
  min-width: 44px;
  min-height: 44px;
}

.back-to-top:hover {
  background: linear-gradient(135deg, var(--primary-red-dark) 0%, var(--primary-red) 100%);
  transform: translateY(-4px);
}

.back-to-top:focus {
  outline: 3px solid var(--focus-yellow);
  outline-offset: 3px;
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .back-to-top {
    bottom: 0.75rem;
    right: 0.75rem;
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}

/* Visually Hidden */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .card {
    border-width: 2px;
    border-color: var(--text-dark);
  }

  .btn {
    border: 2px solid currentColor;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    border-width: 3px;
  }
}

/* Impact page specific mobile improvements */
@media (max-width: 768px) {
  /* Improve text readability on small screens */
  #intro-heading {
    font-size: 1.5rem;
    line-height: 1.3;
  }

  /* Better list spacing in cards */
  .card ul {
    padding-left: 1.25rem;
  }

  .card li {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
  }

  /* Family stories cards */
  .card h3 i {
    margin-right: 0.5rem;
  }

  /* Testimonial carousel improvements */
  .testimonial-carousel-wrapper {
    margin: 0 -0.5rem;
  }

  /* Better spacing for nested lists */
  .community-list ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
  }

  /* Social media cards better sizing */
  .card-grid.grid-3 .card h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  .card-grid.grid-3 .card p {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
  }
}

@media (max-width: 480px) {
  /* Even smaller text for very small screens */
  .card p,
  .card li {
    font-size: 0.9rem;
  }

  /* Smaller heading sizes */
  .section h2 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
  }

  /* More compact cards */
  .card {
    padding: 1rem;
  }

  .card h3 {
    font-size: 1rem;
  }

  /* Smaller stat numbers */
  .stat-item h3 {
    font-size: 1.5rem;
  }

  /* Quote block */
  .impact-quote-block {
    padding: 1.25rem;
  }

  .impact-quote-text {
    font-size: 0.95rem;
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .header-container,
  .top-bar-content,
  .container-full {
    padding: 0 1.5rem;
  }

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

  .feature-section {
    gap: 2.5rem;
  }

  /* Prevent horizontal scroll */
  body {
    overflow-x: hidden;
  }

  /* Ensure cards don't overflow */
  .card-grid,
  .stats-grid,
  .feature-section {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 85%;
  }

  /* Prevent horizontal scroll on entire page */
  body, .container, main {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  /* Force profile sections to stack vertically - Mary Byrnes & Lisa Cohen */
  .profile-section {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100vw !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .profile-section .feature-content {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .profile-section .feature-image {
    width: 280px !important;
    max-width: 100% !important;
    margin: 0 auto 1.5rem auto !important;
  }

  .header-container,
  .top-bar-content {
    padding: 0 1rem;
    height: auto;
    min-height: auto;
  }

  .top-bar {
    display: none;
  }

  .menu-toggle {
    display: block;
    padding: 0.5rem 1rem;
    min-height: 44px;
  }

  /* Full-screen dropdown menu */
  .main-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    max-width: 100vw;
    background: var(--primary-white);
    z-index: 9998;
    padding: 5rem 1.25rem 2rem;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .main-nav.active {
    display: flex;
    flex-direction: column;
    animation: slideDown 0.3s ease-out;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    max-width: 100%;
  }

  .main-nav ul li {
    width: 100%;
    border-bottom: 1px solid var(--border-color);
    max-width: 100%;
  }

  .main-nav a {
    padding: 1rem;
    border-bottom: none;
    text-align: left;
    width: 100%;
    font-size: 1.05rem;
    border-radius: 0;
    min-height: 52px;
    display: flex;
    align-items: center;
    touch-action: manipulation;
  }

  .main-nav a::after {
    display: none;
  }

  .main-nav a:hover {
    background: var(--primary-red-pale);
    color: var(--primary-red);
  }

  .main-nav .donate-link {
    margin: 1.5rem 0 0 0;
    text-align: center;
    justify-content: center;
    border-bottom: none;
    border-radius: 8px;
    padding: 1rem;
    width: 100%;
    max-width: 100%;
  }

  /* Close button for mobile menu */
  .menu-close {
    display: none;
  }

  .main-nav.active .menu-close {
    display: flex;
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--primary-red);
    font-size: 1.5rem;
    cursor: pointer;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    z-index: 9999;
  }

  .menu-close:focus {
    outline: 2px solid var(--focus-yellow);
    outline-offset: 2px;
  }

  /* Prevent body scroll when menu is open */
  body:has(.main-nav.active) {
    overflow: hidden;
  }

  /* Menu header styling */
  .main-nav::before {
    content: 'Menu';
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-red);
  }

  .hero {
    padding: 3rem 1rem;
    text-align: center;
  }

  .hero::before {
    display: none;
  }

  .hero p {
    margin: 0 auto 1.5rem;
  }

  .hero-cta {
    justify-content: center;
  }

  .section {
    padding: 2rem 1rem;
  }

  .feature-section {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .feature-image {
    min-height: 200px;
    order: -1;
  }

  .feature-image::after {
    display: none;
  }

  .profile-section {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
  }

  .profile-section .feature-image {
    width: 280px !important;
    max-width: 100% !important;
    margin: 0 auto 1.5rem auto !important;
    order: -1 !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    min-height: 280px !important;
    flex-shrink: 0 !important;
  }

  .profile-section .feature-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  .profile-section .feature-content {
    text-align: center !important;
    width: 100% !important;
  }

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

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .stats-grid .stat-item h3 {
    font-size: 1.5rem;
  }

  .stats-grid .stat-item p {
    font-size: 0.75rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .page-header {
    padding: 2rem 1rem;
  }

  .breadcrumbs {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }

  .partner-logos {
    padding: 1rem;
    gap: 1rem;
  }

  .partner-logos img {
    max-width: 100px;
    height: 50px;
  }

  /* Container fixes */
  .container,
  .container-full {
    padding-left: 1rem;
    padding-right: 1rem;
    max-width: 100%;
  }

  /* Card fixes */
  .card {
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Section header fixes */
  .section-header,
  .section-intro-text {
    max-width: 100%;
  }

  /* Feature section fixes */
  .feature-section {
    max-width: 100%;
  }

  /* Fundraise section mobile optimization */
  .fundraise-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
  }

  .fundraise-layout .feature-image {
    width: 100% !important;
    height: auto !important;
    min-height: 250px !important;
    order: -1 !important;
  }

  .fundraise-layout .feature-content {
    padding: 2rem 1rem !important;
    text-align: center !important;
  }

  .fundraise-layout .feature-content ul {
    display: inline-block !important;
    text-align: left !important;
  }

  .fundraise-layout .quote-box {
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Bottom banner fixes */
  .bottom-banner-content {
    padding: 2rem 1rem;
  }

  /* Testimonial carousel wrapper */
  .testimonial-carousel-wrapper {
    max-width: 100%;
    overflow: hidden;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 80%;
  }

  body {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .hero {
    padding: 2rem 0.75rem;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
  }

  .btn-large {
    padding: 1rem 1.25rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .stat-item {
    padding: 0.5rem;
  }

  .stat-item h3 {
    font-size: 1.25rem;
  }

  .stat-item p {
    font-size: 0.65rem;
  }

  .card {
    padding: 1rem;
  }

  .card-grid {
    gap: 0.75rem;
  }

  .header-container {
    padding: 0.75rem 1rem;
  }

  .logo {
    font-size: 1.1rem;
    gap: 0.5rem;
  }

  .logo img {
    width: 40px;
    height: 40px;
  }

  /* Smaller text for cards */
  .card h3 {
    font-size: 1rem;
  }

  .card p,
  .card li {
    font-size: 0.85rem;
  }

  /* Section headings */
  .section h2 {
    font-size: 1.35rem;
  }

  /* Bottom banner */
  .bottom-banner {
    padding: 2rem 0.5rem;
  }

  .bottom-banner-content {
    padding: 1.5rem 0.75rem;
  }

  .bottom-banner-content h2 {
    font-size: 1.5rem;
  }

  .bottom-banner-content .tagline {
    font-size: 0.9rem;
  }

  .bottom-banner-content .description {
    font-size: 0.85rem;
  }

  /* Footer */
  .site-footer {
    padding: 2rem 1rem 1rem;
  }

  .footer-content {
    gap: 1.5rem;
  }

  /* Breadcrumbs */
  .breadcrumbs {
    padding: 0.5rem 0.75rem;
  }

  /* Container adjustments */
  .container,
  .container-full {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

/* Testimonials Carousel */
.testimonials-carousel {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  overflow: hidden;
}

.testimonials-track {
  display: flex;
  transition: transform 0.5s ease;
}

.testimonial-card {
  min-width: 100%;
  padding: 2rem;
  box-sizing: border-box;
}

.testimonial-card .card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.testimonial-card .card p {
  flex-grow: 1;
}

.testimonial-card .card footer {
  margin-top: 1rem;
  font-weight: 600;
  color: var(--primary-red-dark);
}

.testimonial-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.testimonial-nav button {
  background: var(--primary-red);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem;
}

.testimonial-nav button:hover {
  background: var(--primary-red-dark);
  transform: scale(1.1);
}

.testimonial-nav button:focus {
  outline: 3px solid var(--focus-yellow);
  outline-offset: 2px;
}

.testimonial-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.testimonial-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--medium-gray);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.testimonial-dot.active {
  background: var(--primary-red);
}

.testimonial-dot:focus {
  outline: 3px solid var(--focus-yellow);
  outline-offset: 2px;
}

/* Bottom Banner - Hero Style */
.bottom-banner {
  background: linear-gradient(135deg, var(--primary-red-pale) 0%, var(--primary-white) 50%, var(--medium-gray) 100%);
  color: var(--text-dark);
  padding: 5rem 2rem;
  position: relative;
  overflow: hidden;
}

.bottom-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23D32F2F' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.bottom-banner-content {
  max-width: 850px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  padding: 3rem;
  border-radius: 24px;
  border: 2px solid #FFCDD2;
  box-shadow: 0 4px 16px rgba(211, 47, 47, 0.1);
  text-align: center;
}

.bottom-banner-content h2 {
  color: #B71C1C;
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 0.5rem;
  text-align: center;
}

.bottom-banner-content .tagline {
  color: #495057;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  font-style: italic;
  text-align: center;
}

.bottom-banner-content .description {
  color: #495057;
  margin-bottom: 1.5rem;
  font-size: 1rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.bottom-banner-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1rem;
}

.bottom-banner-donate {
  clear: both;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 2.5rem;
  text-align: center;
}

.bottom-banner-donate p {
  color: #6C757D;
  font-size: 0.95rem;
  margin: 0 0 0.5rem 0;
  width: 100%;
  text-align: center;
  display: block;
}

.bottom-banner-donate-link-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
}

.bottom-banner-donate a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #D32F2F;
  text-decoration: underline;
  font-weight: 500;
  font-size: 1rem;
}

/* Accordion for Core Values */
.accordion {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.accordion-header {
  background: var(--light-gray);
  padding: 1rem 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s ease;
  border: none;
  width: 100%;
  text-align: left;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-dark);
}

.accordion-header:hover {
  background: var(--primary-red-pale);
}

.accordion-header:focus {
  outline: 3px solid var(--focus-yellow);
  outline-offset: -2px;
}

.accordion-header[aria-expanded="true"] {
  background: var(--primary-red);
  color: var(--primary-white);
}

.accordion-icon {
  transition: transform 0.3s ease;
}

.accordion-header[aria-expanded="true"] .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: var(--primary-white);
  display: none;
}

.accordion-content.active {
  max-height: 1000px;
  display: block;
}

.accordion-body {
  padding: 1.5rem;
  text-align: center;
}

.accordion-body p {
  margin-left: auto;
  margin-right: auto;
}

/* AI Chat Widget */
.ai-chat-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
}

.ai-chat-button {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(211, 47, 47, 0.4);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.ai-chat-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(211, 47, 47, 0.5);
}

.ai-chat-button:focus {
  outline: 3px solid var(--focus-yellow);
  outline-offset: 3px;
}

.ai-chat-container {
  position: absolute;
  bottom: 66px;
  right: 0;
  width: 400px;
  max-width: calc(100vw - 3rem);
  height: 550px;
  max-height: 80vh;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.ai-chat-container.active {
  display: flex;
}

.ai-chat-header {
  background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
  color: white;
  padding: 0.875rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.ai-chat-header h3 {
  margin: 0;
  font-size: 0.95rem;
  color: white;
  font-weight: 600;
}

.ai-chat-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ai-chat-clear,
.ai-chat-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.ai-chat-clear:hover,
.ai-chat-close:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.ai-chat-clear:focus,
.ai-chat-close:focus {
  outline: 2px solid var(--focus-yellow);
  outline-offset: 2px;
}

.ai-chat-clear {
  font-size: 0.9rem;
}

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  background: var(--light-gray);
  scroll-behavior: smooth;
}

.ai-chat-input-area {
  padding: 0.875rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.ai-chat-input {
  flex: 1;
  padding: 0.625rem 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.9rem;
  min-width: 0;
}

.ai-chat-input:focus {
  outline: none;
  border-color: var(--primary-red);
}

.ai-chat-send {
  background: var(--primary-red);
  color: white;
  border: none;
  padding: 0.625rem 0.875rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
  min-width: 44px;
  min-height: 36px;
}

.ai-chat-send:hover {
  background: var(--primary-red-dark);
}

.ai-message {
  margin-bottom: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: 8px;
  max-width: 90%;
  line-height: 1.6;
  font-size: 0.9rem;
}

.ai-message p {
  margin: 0;
}

.ai-message p + p {
  margin-top: 0.5rem;
}

.ai-message.bot {
  background: white;
  border: 1px solid var(--border-color);
  margin-right: auto;
}

.ai-message.user {
  background: var(--primary-red);
  color: white;
  margin-left: auto;
}

@media (max-width: 768px) {
  .ai-chat-widget {
    bottom: 1rem;
    right: 1rem;
  }

  .ai-chat-button {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }

  .ai-chat-container {
    width: calc(100vw - 2rem);
    right: -0.5rem;
    bottom: 60px;
    height: 500px;
    max-height: 70vh;
  }

  .ai-chat-header h3 {
    font-size: 0.85rem;
  }

  .ai-message {
    font-size: 0.85rem;
    max-width: 95%;
  }
}

@media (max-width: 480px) {
  .ai-chat-widget {
    bottom: 0.75rem;
    right: 0.75rem;
  }

  .ai-chat-button {
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
  }

  .ai-chat-container {
    width: calc(100vw - 1.5rem);
    right: -0.25rem;
    bottom: 58px;
    height: 450px;
    max-height: 65vh;
  }

  .ai-chat-header {
    padding: 0.75rem;
  }

  .ai-chat-header h3 {
    font-size: 0.8rem;
  }

  .ai-chat-input {
    font-size: 0.85rem;
  }

  .ai-chat-send {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  .ai-message {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
  }
}

/* Partnership Logo Grid */
.partnership-category {
  margin-bottom: 2rem;
}

.partnership-category h3 {
  color: var(--primary-red-dark);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-red-light);
  font-size: 1.15rem;
}

.partnership-logos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--light-gray);
  border-radius: 12px;
  max-width: 100%;
}

.partnership-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  background: white;
  border-radius: 8px;
  padding: 0.75rem;
  box-shadow: 0 2px 8px var(--shadow-color);
  transition: all 0.2s ease;
}

.partnership-logo:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--shadow-hover);
}

.partnership-logo img {
  max-width: 100%;
  max-height: 50px;
  object-fit: contain;
}

@media (max-width: 768px) {
  .partnership-logos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1rem;
  }

  .partnership-logo {
    height: 70px;
    padding: 0.5rem;
  }

  .partnership-logo img {
    max-height: 40px;
  }
}

@media (max-width: 480px) {
  .partnership-logos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    padding: 0.75rem;
  }

  .partnership-logo {
    height: 60px;
    padding: 0.5rem;
  }

  .partnership-logo img {
    max-height: 35px;
  }
}

/* Membership Card Logos */
.membership-logo {
  width: 100%;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  background: var(--light-gray);
  border-radius: 8px;
  padding: 0.75rem;
}

.membership-logo img {
  max-width: 100%;
  max-height: 60px;
  object-fit: contain;
}

/* Resource Book Cards */
.book-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.book-cover {
  width: 100%;
  height: 180px;
  background: var(--light-gray);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.book-cover img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.book-info h4 {
  color: var(--primary-red-dark);
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.book-author {
  color: var(--dark-gray);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.amazon-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-red);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
}

.amazon-link:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .book-cover {
    height: 150px;
  }

  .book-info h4 {
    font-size: 0.95rem;
  }

  .book-author {
    font-size: 0.8rem;
  }

  .amazon-link {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .book-cover {
    height: 120px;
  }

  .book-info h4 {
    font-size: 0.9rem;
  }
}

/* Research Article Links */
.research-link {
  display: block;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-dark);
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.research-link:hover {
  color: #1a1a1a;
  background: #f8f9fa;
  padding-left: 0.5rem;
  border-radius: 4px;
}

.research-link:last-child {
  border-bottom: none;
}

/* Event Registration Links */
.event-registration {
  background: var(--primary-red-pale);
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
}

.event-registration p {
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
}

/* Read More Link */
.read-more-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-red);
  font-weight: 600;
  margin-top: 1rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  text-decoration: underline;
  min-height: 44px;
  align-items: center;
}

.read-more-link:hover {
  color: var(--primary-red-dark);
}

.read-more-link:focus {
  outline: 3px solid var(--focus-yellow);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .research-link {
    font-size: 0.9rem;
    padding: 0.625rem 0;
  }

  .event-registration {
    padding: 0.875rem;
  }

  .event-registration p {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .research-link {
    font-size: 0.85rem;
  }

  .event-registration {
    padding: 0.75rem;
  }
}

/* Focus styles for WCAG 2.2 */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus-yellow);
  outline-offset: 2px;
}

/* Skip to content link */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-red);
  color: white;
  padding: 0.5rem 1rem;
  z-index: 10001;
  transition: top 0.3s;
}

.skip-to-content:focus {
  top: 0;
}

/* Impact Page Mobile Optimizations - specific additions */
@media (max-width: 768px) {
  /* Partnership logos */
  .partnership-logos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1rem;
  }

  .impact-quote-block {
    padding: 1.5rem;
    margin-top: 1.5rem;
  }

  .impact-quote-text {
    font-size: 1rem;
  }

  .community-section-heading {
    font-size: 1.15rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
  }

  .social-btn {
    margin-top: 0.75rem;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .impact-quote-block {
    padding: 1.25rem;
  }

  .impact-quote-text {
    font-size: 0.9rem;
  }
}


/* Digital reach heading */
.digital-reach-heading {
  margin-bottom: 1rem;
  color: #B71C1C;
}

/* Impact quote block */
.impact-quote-block {
  margin-top: 2rem;
  padding: 2rem;
  background: linear-gradient(135deg, #B71C1C 0%, #D32F2F 100%);
  border-radius: 12px;
  color: white;
  text-align: center;
}

.impact-quote-text {
  margin: 0 auto;
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.6;
  text-align: center;
  max-width: 800px;
}

/* Social media buttons in cards */
.social-btn {
  margin-top: 0.5rem;
}

@media (max-width: 768px) {
  .social-btn {
    margin-top: 0.75rem;
    width: 100%;
  }
}

/* Quick donate link */
.quick-donate-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #D32F2F;
  text-decoration: underline;
  font-weight: 500;
  font-size: 1rem;
}

.quick-donate-link:hover {
  color: #B71C1C;
}

@media (max-width: 768px) {
  .impact-quote-block {
    padding: 1.5rem;
    margin-top: 1.5rem;
  }

  .impact-quote-text {
    font-size: 1rem;
  }

  .community-section-heading {
    font-size: 1.15rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
  }
}

/* Social media cards in grid-3 */
.card-grid.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1024px) {
  .card-grid.grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .card-grid.grid-3 {
    grid-template-columns: 1fr;
  }

  .card-grid.grid-3 .card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Larger touch targets for mobile */
  .carousel-nav,
  .carousel-dot,
  .testimonial-nav,
  .btn,
  .menu-toggle {
    min-width: 44px;
    min-height: 44px;
  }

  /* Remove hover effects that don't work well on touch */
  .card:hover {
    transform: none;
  }

  .btn:hover,
  .carousel-nav:hover {
    transform: none;
  }

  /* Add active states for touch feedback */
  .card:active,
  .btn:active,
  .carousel-nav:active {
    transform: scale(0.98);
  }
}

/* Landscape mode optimizations */
@media (max-width: 768px) and (orientation: landscape) {
  .testimonial-carousel {
    min-height: 240px;
  }

  .testimonial-slides {
    padding: 0.75rem 2.5rem;
  }

  .testimonial-slide-card p {
    font-size: 0.85rem;
    line-height: 1.5;
  }

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

  .stat-item h3 {
    font-size: 1.25rem;
  }

  .hero {
    padding: 2rem 1rem;
  }

  .bottom-banner {
    padding: 2rem 1rem;
  }
}

/* Testimonial Carousel Styles */
.testimonial-carousel-wrapper {
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  width: 100%;
  overflow: hidden;
}

.testimonial-carousel {
  position: relative;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  min-height: 320px;
  max-width: 100%;
  overflow: hidden;
}

.testimonial-slides {
  position: relative;
  padding: 1.5rem 3rem;
  max-width: 100%;
  overflow: hidden;
  text-align: center !important;
}

.testimonial-slide-card {
  display: none;
  text-align: center !important;
  padding: 1rem;
  animation: fadeIn 0.5s ease-in-out;
  max-width: 100%;
}

.testimonial-slide-card.active {
  display: block;
}

.testimonial-slide-card .card-icon {
  font-size: 1.75rem;
  color: white;
  margin-bottom: 0.75rem;
}

.testimonial-slide-card p {
  font-size: 1.35rem;
  line-height: 1.8;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  text-align: center !important;
}

.testimonial-slide-card footer {
  font-weight: 600;
  color: var(--dark-gray);
  font-style: normal;
  font-size: 0.9rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary-red);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: background 0.3s ease, transform 0.3s ease;
  z-index: 100;
  pointer-events: auto;
  flex-shrink: 0;
}

.carousel-nav:hover {
  background: var(--primary-red-dark);
  transform: translateY(-50%) scale(1.05);
}

.carousel-nav:active {
  transform: translateY(-50%) scale(0.95);
}

.carousel-nav:focus {
  outline: 3px solid var(--focus-yellow);
  outline-offset: 2px;
}

.carousel-prev {
  left: 0.5rem;
}

.carousel-next {
  right: 0.5rem;
}

/* Ensure carousel structure allows button clicks */
.testimonial-carousel {
  position: relative;
  user-select: none;
  touch-action: pan-y pinch-zoom;
  -webkit-user-select: none;
}

.testimonial-slides {
  position: relative;
  padding: 1.5rem 3rem;
  touch-action: pan-y pinch-zoom;
}

.testimonial-slide-card {
  display: none;
  text-align: center;
  padding: 1rem;
  animation: fadeIn 0.5s ease-in-out;
  touch-action: pan-y pinch-zoom;
}

/* Sliding Window Pagination */
.dots-container {
  width: 92px;
  margin: 1rem auto 0;
  overflow: hidden;
  position: relative;
  max-width: 100%;
}

.dots-track {
  display: flex;
  gap: 8px;
  transition: transform 0.4s ease-in-out;
  will-change: transform;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--primary-red);
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  transition: background-color 0.3s ease;
  min-width: 12px;
  min-height: 12px;
}

.carousel-dot.active {
  background: var(--primary-red);
}

.carousel-dot:hover:not(.active) {
  background: var(--primary-red-light);
}

.carousel-dot:focus {
  outline: 3px solid var(--focus-yellow);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .testimonial-carousel {
    min-height: 300px;
  }

  .testimonial-slides {
    padding: 1rem 2.25rem;
  }

  .testimonial-slide-card {
    padding: 0.75rem;
  }

  .testimonial-slide-card p {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .testimonial-slide-card footer {
    font-size: 0.8rem;
  }

  .testimonial-slide-card .card-icon {
    font-size: 1.5rem;
  }

  .carousel-nav {
    width: 36px;
    height: 36px;
    font-size: 0.8rem;
  }

  .carousel-prev {
    left: 0.25rem;
  }

  .carousel-next {
    right: 0.25rem;
  }

  /* Sliding window pagination for mobile */
  .dots-container {
    width: 92px;
  }
}

@media (max-width: 480px) {
  .testimonial-carousel {
    min-height: 280px;
  }

  .testimonial-slides {
    padding: 1rem 2rem;
  }

  .testimonial-slide-card {
    padding: 0.5rem;
  }

  .testimonial-slide-card p {
    font-size: 0.85rem;
    line-height: 1.5;
  }

  .testimonial-slide-card footer {
    font-size: 0.75rem;
  }

  .testimonial-slide-card .card-icon {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
  }

  .carousel-nav {
    width: 32px;
    height: 32px;
    font-size: 0.7rem;
  }

  .carousel-prev {
    left: 0.125rem;
  }

  .carousel-next {
    right: 0.125rem;
  }
}

/* What Families Say Carousel - Home Page */
.testimonials-section {
  background: var(--light-gray);
  color: var(--text-dark);
  padding: 3rem 1rem;
}

.testimonials-section h2 {
  color: var(--primary-red);
}

.testimonials-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  max-width: 100%;
  margin: 0 auto;
  width: 100%;
}

.testimonials-carousel-container {
  flex: 1;
  overflow: hidden;
  min-height: 280px;
  max-width: 100%;
  position: relative;
}

.testimonials-track {
  position: relative;
  height: 100%;
  max-width: 100%;
}

.testimonial-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transform: translateX(30px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out, visibility 0.4s;
  padding: 1rem;
  text-align: center;
  pointer-events: none;
  z-index: 0;
}

.testimonial-card.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
  z-index: 10;
}

.testimonial-card.prev {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-30px);
  z-index: 0;
}

.testimonial-icon {
  font-size: 1.75rem;
  color: var(--primary-red);
  margin-bottom: 0.75rem;
  display: block;
}

.testimonial-text {
  font-size: 1.5rem;
  line-height: 1.8;
  margin-bottom: 1rem;
  font-style: italic;
  color: var(--text-dark);
  max-width: 100%;
}

@media (max-width: 768px) {
  .testimonial-slide-card p {
    font-size: 1.2rem;
    line-height: 1.7;
  }

  .testimonial-text {
    font-size: 1.3rem;
    line-height: 1.7;
  }
}

@media (max-width: 480px) {
  .testimonial-slide-card p {
    font-size: 1.1rem;
    line-height: 1.6;
  }

  .testimonial-text {
    font-size: 1.15rem;
    line-height: 1.6;
  }
}

.testimonial-author {
  font-weight: 600;
  color: var(--dark-gray);
  font-style: normal;
  font-size: 0.9rem;
}

.testimonial-nav {
  background: var(--primary-red);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
  transition: background 0.3s ease, transform 0.3s ease;
  flex-shrink: 0;
  min-width: 40px;
  min-height: 40px;
}

.testimonial-nav:hover {
  background: var(--primary-red-dark);
  transform: scale(1.05);
}

.testimonial-nav:active {
  transform: scale(0.95);
}

.testimonial-nav:focus {
  outline: 3px solid var(--focus-yellow);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .testimonials-section {
    padding: 2rem 0.5rem;
  }

  .testimonials-wrapper {
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .testimonials-carousel-container {
    min-height: 260px;
    width: 100%;
  }

  .testimonial-text {
    font-size: 1.25rem;
    line-height: 1.6;
  }

  .testimonial-author {
    font-size: 0.8rem;
  }

  .testimonial-icon {
    font-size: 1.5rem;
  }

  .testimonial-nav {
    width: 36px;
    height: 36px;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .testimonials-section {
    padding: 1.5rem 0.25rem;
  }

  .testimonials-wrapper {
    gap: 0.25rem;
  }

  .testimonials-carousel-container {
    min-height: 240px;
  }

  .testimonial-card {
    padding: 0.5rem;
  }

  .testimonial-text {
    font-size: 1.1rem;
    line-height: 1.5;
  }

  .testimonial-author {
    font-size: 0.75rem;
  }

  .testimonial-icon {
    font-size: 1.25rem;
  }

  .testimonial-nav {
    width: 32px;
    height: 32px;
    font-size: 0.7rem;
  }
}
