/* ========================================
   Base Styles & Reset
   ======================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #175cb9;
  --primary-foreground: #ffffff;
  --secondary: #5db3e8;
  --secondary-foreground: #ffffff;
  --background: #fafafa;
  --foreground: #1d1d1f;
  --muted: #f5f5f7;
  --muted-foreground: #86868b;
  --border: #d2d2d7;

  /* Elder-Friendly: Higher contrast colors */
  --text-high-contrast: #000000; /* Pure black for maximum contrast */
  --text-medium-contrast: #1a1a1a; /* Very dark gray */
  --background-high-contrast: #ffffff; /* Pure white background */
  --card: #ffffff;
  --nav-bg: #f5f5f7;
  --radius: 12px;

  /* Elder-Friendly Spacing System - More generous spacing */
  --spacing-xs: 0.5rem; /* 8px (increased) */
  --spacing-sm: 0.75rem; /* 12px (increased) */
  --spacing-md: 1.25rem; /* 20px (increased) */
  --spacing-lg: 2rem; /* 32px (increased) */
  --spacing-xl: 2.5rem; /* 40px (increased) */
  --spacing-2xl: 4rem; /* 64px (increased) */
  --spacing-3xl: 5rem; /* 80px (increased) */

  /* Apple-style shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);

  /* Apple-style transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Content max-width for readability */
  --content-max-width: clamp(90%, 72rem, 95%);
  --section-padding-x: clamp(1rem, 2vw, 1.5rem);

  /* Elder-Friendly Typography Scale - Larger sizes for better readability */
  --font-size-large-title: clamp(2.5rem, 5vw, 3.5rem); /* 40-56px (increased) */
  --font-size-title-1: clamp(2rem, 4vw, 2.75rem); /* 32-44px (increased) */
  --font-size-title-2: clamp(1.625rem, 3vw, 2.25rem); /* 26-36px (increased) */
  --font-size-title-3: clamp(1.5rem, 2.5vw, 1.875rem); /* 24-30px (increased) */
  --font-size-headline: clamp(1.25rem, 2vw, 1.5rem); /* 20-24px (increased) */
  --font-size-body: clamp(1.125rem, 1.8vw, 1.375rem); /* 18-22px (increased) */
  --font-size-callout: clamp(
    1.125rem,
    1.6vw,
    1.375rem
  ); /* 18-22px (increased) */
  --font-size-subhead: clamp(
    1.0625rem,
    1.4vw,
    1.25rem
  ); /* 17-20px (increased) */
  --font-size-footnote: clamp(1rem, 1.2vw, 1.125rem); /* 16-18px (increased) */
  --font-size-caption-1: clamp(
    0.9375rem,
    1.1vw,
    1.0625rem
  ); /* 15-17px (increased) */
  --font-size-caption-2: clamp(0.875rem, 1vw, 1rem); /* 14-16px (increased) */

  /* Line Heights - More relaxed for easier reading */
  --line-height-tight: 1.3; /* For headings (increased) */
  --line-height-normal: 1.5; /* For subheadings (increased) */
  --line-height-relaxed: 1.7; /* For body text (increased) */
  --line-height-loose: 1.8; /* For descriptions (increased) */

  /* Letter Spacing - Slightly increased for better readability */
  --letter-spacing-tight: -0.01em; /* Large titles (less tight) */
  --letter-spacing-normal: 0em; /* Body text (neutral) */
  --letter-spacing-loose: 0.02em; /* Small text (more spacing) */

  /* Font Weights */
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-heavy: 900; /* For hero titles only */
}

html {
  background-color: var(--background);
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(
    135deg,
    #f5f5f7 0%,
    #e8e8ed 20%,
    #f0f0f3 40%,
    #fafafa 60%,
    #e8e8ed 80%,
    #f5f5f7 100%
  );
  font-family:
    Arial,
    "Segoe UI",
    "PingFang TC",
    "Microsoft JhengHei",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  font-size: var(--font-size-body);
  line-height: var(--line-height-relaxed);
  font-weight: var(--font-weight-regular);
  padding-top: 60px; /* Space for fixed navigation header */
  letter-spacing: var(--letter-spacing-normal);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

/* ========================================
   Typography - Apple Human Interface Guidelines
   ======================================== */

/* Large Title - Hero titles, major page headings */
h1,
.hero-title {
  font-size: var(--font-size-large-title);
  font-weight: var(--font-weight-heavy);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
  text-align: center;
}

h1 {
  margin-bottom: var(--spacing-md);
}

h1 img {
  max-width: 100%;
  height: auto;
}

/* Title 1 - Section headings */
h2,
.app-section h3,
.contact-section h3 {
  font-size: var(--font-size-title-1);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
  color: var(--foreground);
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

h2 {
  margin-bottom: var(--spacing-md);
}

/* Title 2 - Subsection headings */
h3 {
  font-size: var(--font-size-title-2);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
  color: var(--foreground);
  width: 100%;
  max-width: 65ch;
  margin: 0 auto;
  margin-bottom: var(--spacing-xl);
  text-align: center;
}

/* Title 3 - Card titles, small headings */
h4,
.newsletter-box h4 {
  font-size: var(--font-size-title-3);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-normal);
  letter-spacing: var(--letter-spacing-normal);
  color: var(--foreground);
  margin-bottom: var(--spacing-md);
}

/* Body - Main content */
p,
.qa-answer {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-relaxed);
  letter-spacing: var(--letter-spacing-normal);
  width: 100%;
  max-width: 65ch;
  margin: 0 auto;
  margin-bottom: var(--spacing-md);
  orphans: 2;
  widows: 2;
  text-align-last: left; /* Keep last line left-aligned */
  word-break: break-word; /* Allow breaking words if needed */
  overflow-wrap: break-word; /* Allow breaking long words */
}

p {
  font-size: inherit;
  /* Elder-friendly: Better readability */
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--spacing-md);
  color: var(--text-medium-contrast);
  text-align-last: left; /* Keep last line left-aligned */
  word-break: break-word; /* Allow breaking words if needed */
  overflow-wrap: break-word; /* Allow breaking long words */
}

/* ========================================
   Layout Containers
   ======================================== */
.wrapper {
  width: 100%;
  max-width: var(--content-max-width);
  height: auto;
  margin: 0 auto;
  margin-bottom: var(--spacing-3xl);
  padding: 0 var(--section-padding-x);
  box-sizing: border-box;
  position: relative;
}

.wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    180deg,
    rgba(245, 245, 247, 0.3) 0%,
    rgba(232, 232, 237, 0.2) 50%,
    rgba(245, 245, 247, 0.3) 100%
  );
  pointer-events: none;
  z-index: -1;
}

.wrapper1 {
  margin-bottom: 0;
}

.fullscreen {
  width: 100%;
  margin-bottom: 80px;
}

/* ========================================
   Navigation Header
   ======================================== */
.nav-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  z-index: 1000;
  padding: var(--spacing-sm) 0;
}

.nav-container {
  width: 1280px;
  position: relative;
  margin: 0 auto;
  clear: both;
  zoom: 1;
  padding: 0 var(--section-padding-x);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: opacity var(--transition-fast);
  font-size: 26px;
}

.nav-logo:visited {
  color: #004e98;
}

.nav-logo:hover {
  opacity: 0.8;
}

.nav-logo svg {
  fill: #004e98;
  vertical-align: middle;
}

.logo-img {
  height: 32px;
  width: auto;
  display: block;
  fill: #004e98;
}

.logo-img path {
  fill: #004e98;
}

.nav-right {
  float: right;
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.nav-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  background-color: transparent;
  color: var(--foreground);
  border-radius: var(--radius);
  text-decoration: none;
  transition:
    background-color var(--transition-base),
    transform var(--transition-fast);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-social-btn:hover {
  background-color: var(--muted);
  transform: translateY(-2px);
  border-color: rgba(0, 0, 0, 0.15);
}

.nav-social-btn:active {
  transform: translateY(0);
}

.nav-social-btn svg {
  width: 20px;
  height: 20px;
}

.nav-social-btn-threads .threads-icon-nav {
  width: 20px;
  height: 20px;
  filter: brightness(0);
}

/* ========================================
   Header (Legacy - kept for compatibility)
   ======================================== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md) 0;
  min-height: 44px; /* Apple minimum touch target */
}

header .left,
header .right {
  display: flex;
  align-items: center;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  position: relative;
  width: 100%;
  height: clamp(400px, 20vh, 700px);
  overflow: visible;
  border-radius: 0;
  z-index: 1;
  margin-bottom: var(--spacing-2xl);
}

.hero-images {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  overflow: hidden;
  border-radius: 0;
}

/* Hero Video Styles */
.hero-video {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  top: 0;
  left: 0;
  border-radius: 0;
  transform: scaleY(-1);
  z-index: 0;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  will-change: opacity;
  pointer-events: none;
}

.hero-video.loaded {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.45),
    rgba(0, 0, 0, 0.18),
    transparent
  );
  z-index: 1;
  border-radius: 0;
}

.hero-content {
  position: absolute;
  bottom: clamp(2rem, 4vw, 3rem);
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  color: white;
  z-index: 10;
  display: flex;
  justify-content: center;
}

.hero-content-inner {
  text-align: center;
  width: 100%;
  max-width: 800px; /* Same width as qa-content */
  margin: 0 auto;
  padding: 0 var(--section-padding-x);
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(24px);
  animation: heroFadeIn 1.1s ease-out 0.2s forwards;
}

.hero-title {
  margin-bottom: clamp(0.25rem, 1vw, 0.5rem) !important;
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem); /* Responsive font size */
  font-weight: var(--font-weight-regular);
  line-height: 1.6; /* Balanced line height */
  letter-spacing: var(--letter-spacing-normal);
  text-align: center;
  opacity: 0.95;
  color: white;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  max-width: 800px; /* Same width as qa-content */
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  word-break: break-word; /* Allow breaking words if needed */
  overflow-wrap: break-word; /* Allow breaking long words */
}

@keyframes heroFadeIn {
  0% {
    opacity: 0;
    transform: translateY(24px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   Q&A Section
   ======================================== */
.qa-section {
  margin: 0;
  padding-top: var(--spacing-md);
  display: flex;
  flex-direction: column;
  align-items: center; /* center the QA cards horizontally */
}

.qa-item {
  width: 100%;
  max-width: 900px; /* limit overall card width */
  margin: 0 auto var(--spacing-2xl);
  background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
  border-radius: var(--radius);
  padding: 0;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition:
    box-shadow var(--transition-base),
    transform var(--transition-base);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.qa-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: rgba(0, 0, 0, 0.08);
}

.qa-content {
  padding: var(--spacing-xl);
  max-width: 800px;
  margin: 0 auto;
}

.qa-question {
  font-size: var(--font-size-title-2);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
  color: var(--primary);
  margin-bottom: var(--spacing-lg);
  width: 100%;
  text-align: left;
}

.qa-answer {
  color: var(--foreground);
}

.qa-answer p {
  margin-bottom: var(--spacing-md);
  width: 100%;
  max-width: 65ch;
  text-align-last: left; /* Keep last line left-aligned */
  word-break: break-word; /* Allow breaking words if needed */
  overflow-wrap: break-word; /* Allow breaking long words */
}

.qa-answer p:last-child {
  margin-bottom: 0;
}

.qa-answer strong {
  font-weight: var(--font-weight-semibold);
  color: #000000; /* Black color */
}

.qa-answer ul.qa-bullet-list {
  list-style: none;
  padding-left: 0;
  margin: var(--spacing-lg) 0;
}

.qa-answer ul.qa-bullet-list li {
  position: relative;
  padding-left: var(--spacing-xl);
  margin-bottom: var(--spacing-md);
  line-height: var(--line-height-relaxed);
  color: var(--foreground);
  text-align-last: left; /* Keep last line left-aligned */
  word-break: break-word; /* Allow breaking words if needed */
  overflow-wrap: break-word; /* Allow breaking long words */
}

.qa-answer ul.qa-bullet-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-size: 1.5em;
  line-height: 1;
  font-weight: var(--font-weight-bold);
}

.qa-answer ul.qa-bullet-list li:last-child {
  margin-bottom: 0;
}

.qa-answer ul.qa-bullet-list li strong {
  font-weight: var(--font-weight-semibold);
  color: #000000; /* Black color */
  display: inline;
}

/* ========================================
   Donate Hero Card
   ======================================== */
.donate-hero-card {
  margin: var(--spacing-3xl) 0;
  display: flex;
  justify-content: center;
}

.donate-hero-link {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: var(--spacing-lg);
  width: 100%;
  max-width: 900px; /* Match QA card width */
  background-color: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  overflow: hidden;
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base);
}

.donate-hero-image {
  flex: 0 0 40%;
  min-height: 180px;
  overflow: hidden;
}

.donate-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.donate-hero-text {
  flex: 1;
  padding: var(--spacing-xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.donate-hero-text h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: var(--spacing-sm);
  color: var(--foreground);
}

.donate-hero-text p {
  margin: 0;
  font-size: clamp(1rem, 1.2vw, 1.1rem);
  line-height: 1.6;
  color: var(--muted-foreground);
}

.donate-hero-link:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

@media screen and (max-width: 767px) {
  .donate-hero-link {
    flex-direction: column;
  }

  .donate-hero-image {
    flex-basis: auto;
    min-height: 160px;
  }

  .donate-hero-text {
    padding: var(--spacing-lg);
    text-align: center;
  }

  .qa-answer ul.qa-bullet-list li {
    padding-left: var(--spacing-md);
  }
}

/* ========================================
   Donation Section
   ======================================== */
.donation-section {
  text-align: center;
  margin: var(--spacing-3xl) 0;
}

.donation-button {
  display: inline-block;
  text-decoration: none;
  transition:
    transform var(--transition-base),
    opacity var(--transition-base);
  border-radius: var(--radius);
  overflow: hidden;
}

.donation-button:hover {
  transform: scale(1.02);
  opacity: 0.9;
}

.donation-button:active {
  transform: scale(0.98);
}

.donation-button-img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ========================================
   App Links Section
   ======================================== */
.app-section {
  margin: var(--spacing-2xl) 0;
  padding-top: var(--spacing-md);
  text-align: center;
}

.app-section h3 {
  font-size: clamp(
    2rem,
    4vw,
    2.75rem
  ); /* Elder-friendly: Larger section titles */
  font-weight: 600;
  letter-spacing: -0.01em; /* Elder-friendly: Less tight spacing */
  color: var(--text-medium-contrast); /* Elder-friendly: Better contrast */
  margin-bottom: var(--spacing-2xl);
  width: 100%;
}

.contact-section {
  margin: var(--spacing-2xl) 0;
  padding-top: var(--spacing-md);
}

.contact-list {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Section Divider */
.section-divider {
  width: 100%;
  max-width: 800px;
  margin: var(--spacing-2xl) auto;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Newsletter Boxes */
.newsletter-boxes {
  display: flex;
  justify-content: center;
  gap: 50px;
  flex-wrap: wrap;
  margin-top: var(--spacing-2xl);
}

.newsletter-box {
  width: 280px;
  display: inline-block;
  vertical-align: top;
  text-align: center;
  background-color: transparent;
  padding: 0;
  position: relative;
}

.newsletter-box h4 {
  font-size: clamp(1.125rem, 1.5vw, 1.25rem);
  font-weight: 600;
  color: var(--primary);
  margin-bottom: var(--spacing-md);
  text-align: center;
}

.newsletter-hero-link {
  display: block;
  text-decoration: none;
}

.newsletter-hero-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: var(--spacing-md);
  display: block; /* Show image */
}

.newsletter-time {
  font-size: var(
    --font-size-body
  ); /* Elder-friendly: Larger text (increased from subhead) */
  font-weight: var(
    --font-weight-medium
  ); /* Elder-friendly: Medium weight for visibility */
  line-height: var(--line-height-loose);
  letter-spacing: var(--letter-spacing-normal);
  color: var(--text-medium-contrast); /* Elder-friendly: Higher contrast */
  margin-bottom: var(--spacing-sm); /* Elder-friendly: More spacing */
  text-align: center;
}

.newsletter-desc {
  font-size: var(
    --font-size-body
  ); /* Elder-friendly: Larger text (increased from subhead) */
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-loose);
  letter-spacing: var(--letter-spacing-normal);
  color: var(--text-medium-contrast); /* Elder-friendly: Higher contrast */
  margin-bottom: var(--spacing-lg); /* Elder-friendly: More spacing */
  text-align: center;
}

@media screen and (max-width: 1040px) {
  .newsletter-box {
    width: calc(49.5% - 25px);
  }
}

@media screen and (max-width: 767px) {
  .newsletter-boxes {
    gap: var(--spacing-lg);
    flex-direction: column;
    align-items: center;
  }

  .newsletter-box {
    width: 100%;
    max-width: 400px;
  }

  .newsletter-input,
  .newsletter-subscribe-btn {
    min-height: 56px; /* Elder-friendly: Large touch target on mobile (increased from 48px) */
    font-size: var(--font-size-body); /* Ensure readable font size */
  }

  .app-button {
    min-height: 56px; /* Elder-friendly: Large touch target on mobile */
    font-size: var(--font-size-body);
  }

  .line-follow-btn {
    min-height: 56px; /* Elder-friendly: Large touch target on mobile */
    font-size: var(--font-size-body);
  }

  .footer-social-btn {
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
  }
}

/* ========================================
   Footer
   ======================================== */
footer.footer {
  background-color: var(--primary);
  color: var(--primary-foreground);
  padding: var(--spacing-3xl) 0;
  text-align: center;
}

footer.footer .container {
  width: 100%;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 var(--section-padding-x);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* center content vertically within footer */
}

.footer-row {
  text-align: center;
  margin-bottom: var(--spacing-md);
  font-size: var(--font-size-footnote);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-relaxed);
  letter-spacing: var(--letter-spacing-normal);
  opacity: 0.9;
}

.footer-row:last-child {
  margin-bottom: 0;
}

.footer-row p {
  color: #fff;
  width: auto;
  margin: 0;
  text-align: center; /* Override global justified paragraphs for footer */
  text-align-last: center;
}

.footer-row a {
  color: #fff;
  text-decoration: none;
  transition: opacity 0.3s;
}

.footer-row a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.footer-social-buttons {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
  margin-top: 0.5rem;
}

.footer-social-btn {
  width: 56px; /* Elder-friendly: Larger touch target (increased from 44px) */
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  border: 2px solid rgba(255, 255, 255, 0.2); /* Elder-friendly: Visible border */
  background: rgba(
    255,
    255,
    255,
    0.15
  ); /* Elder-friendly: More visible background */
  color: #ffffff;
  cursor: pointer;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  text-decoration: none;
}

.footer-social-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.05) translateY(-2px);
  box-shadow: var(--shadow-md);
  opacity: 1;
  text-decoration: none;
}

.footer-social-btn:active {
  transform: scale(1) translateY(0);
}

.footer-social-btn:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

.footer-social-btn svg {
  width: 24px; /* Elder-friendly: Larger icons (increased from 20px) */
  height: 24px;
}

.footer-social-btn-threads .threads-icon {
  width: 24px; /* Elder-friendly: Larger icons (increased from 20px) */
  height: 24px;
  filter: brightness(0) invert(1);
  -webkit-filter: brightness(0) invert(1);
}

/* ========================================
   Go-to-Top Button
   ======================================== */
#goTopBtn {
  display: none;
  position: fixed;
  bottom: var(--spacing-xl);
  right: var(--spacing-xl);
  z-index: 5;
  font-size: 1.125rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
  cursor: pointer;
  padding: var(--spacing-md);
  min-width: 44px; /* Apple minimum touch target */
  min-height: 44px;
  border-radius: 50%;
  border: none;
  box-shadow: var(--shadow-lg);
  transition:
    background-color var(--transition-base),
    transform var(--transition-fast),
    box-shadow var(--transition-base);
}

#goTopBtn:hover {
  background-color: #0d4a8a;
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

#goTopBtn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-lg);
}

#goTopBtn:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

/* ========================================
   Responsive Design - Tablet
   ======================================== */
@media screen and (min-width: 768px) and (max-width: 1024px) {
  .wrapper {
    width: 100%;
    padding: 0 15px;
  }

  .hero {
    height: clamp(200px, 20vh, 600px);
    border-radius: 0;
  }

  .hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: clamp(0.25rem, 1vw, 0.5rem) !important;
    line-height: 1.25;
  }

  .hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.125rem); /* Responsive and balanced */
    line-height: 1.6;
    padding: 0 var(--spacing-lg);
  }

  .qa-content {
    padding: 30px;
  }

  .qa-question {
    font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  }

  footer.footer .container {
    width: 100%;
    padding: 0 15px;
  }

  .flexlist .item {
    flex: 0 0 45%;
  }

  h3 {
    width: 100%;
    padding: 0 15px;
  }

  .qa-question {
    font-size: 22px;
  }

  .app-buttons {
    flex-direction: column;
    align-items: center;
  }

  .app-button {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }
}

/* Q6 buttons in a row inside QA answers (override column layout on smaller screens) */
.qa-answer .app-buttons {
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: flex-start;
  gap: var(--spacing-md);
}

.qa-answer .app-buttons .app-button {
  width: 100%;
  max-width: none;
  justify-content: center;
  padding: var(--spacing-md) var(--spacing-md);
  min-height: 64px; /* Same height for all Q6 buttons */
  min-width: 0; /* allow text to shrink/wrap inside flex item */
  flex-wrap: wrap; /* allow label to wrap instead of overflowing */
}

.qa-answer .app-buttons .app-button svg {
  width: 32px; /* Larger icons specifically for Q6 */
  height: 32px;
}

.qa-answer .app-buttons .app-button span {
  min-width: 0;
  text-align: center;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.2;
}

/* Q6 subsection titles */
.qa-subsection-title {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 600;
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-md);
  color: var(--text-high-contrast);
}

/* Q6 button wrapper (button + caption) */
.app-button-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
  flex: 1 1 0;
}

.app-button-caption {
  font-size: var(--font-size-small);
  color: var(--text-medium-contrast);
  margin: 0;
  text-align: center;
}

@media screen and (max-width: 480px) {
  .qa-answer .app-buttons {
    flex-wrap: wrap; /* allow wrap only on very small screens */
  }

  .qa-answer .app-buttons .app-button {
    flex: 1 1 100%;
  }
}

/* Q6: mobile should be one button per line */
@media screen and (max-width: 767px) {
  .qa-answer .app-buttons {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
  }

  .qa-answer .app-buttons .app-button-wrapper {
    width: 100%;
  }

  /* Mobile: icon on top, text on second line for Q6 buttons */
  .qa-answer .app-buttons .app-button {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* ========================================
   Responsive Design - Mobile
   ======================================== */
@media screen and (max-width: 767px) {
  p {
    width: 100%;
    padding: 0 15px;
    margin-bottom: var(--spacing-md);
  }

  h2 {
    font-size: 20px;
    padding: 0 15px;
  }

  h3 {
    width: 100%;
    padding: 0 15px;
    font-size: 24px;
  }

  .wrapper {
    width: 100%;
    padding: 0 15px;
  }

  .hero {
    height: clamp(250px, 20vh, 500px);
    border-radius: 0;
    margin-bottom: var(--spacing-lg);
  }

  .hero-title {
    font-size: clamp(2.25rem, 5vw, 3rem);
    margin-bottom: clamp(0.25rem, 1vw, 0.5rem) !important;
    line-height: 1.3;
  }

  .hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.125rem); /* Responsive and balanced */
    line-height: 1.6;
    padding: 0 var(--spacing-md);
  }

  .qa-section {
    padding-top: var(--spacing-sm);
  }

  .qa-item {
    margin-bottom: var(--spacing-lg);
  }

  .qa-content {
    padding: var(--spacing-lg);
  }

  .qa-question {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    margin-bottom: var(--spacing-md);
  }

  .qa-closing {
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-lg);
  }

  .donate-hero-card {
    margin: var(--spacing-xl) 0;
  }

  .app-section {
    margin: var(--spacing-xl) 0;
    padding-top: var(--spacing-sm);
  }

  .app-section h3 {
    margin-bottom: var(--spacing-lg);
  }

  #goTopBtn {
    bottom: 20px;
    right: 20px;
    padding: 12px;
    font-size: 16px;
  }

  footer.footer .container {
    width: 100%;
    padding: 0 15px;
  }

  .qa-question {
    font-size: 22px; /* Elder-friendly: Larger question text (increased from 20px) */
    margin-bottom: var(--spacing-md);
  }

  .qa-answer {
    font-size: 18px; /* Elder-friendly: Larger answer text (increased from 16px) */
    line-height: 1.8; /* Elder-friendly: More relaxed line height */
  }

  .app-section h3 {
    font-size: 26px; /* Elder-friendly: Larger section titles (increased from 24px) */
  }

  .footer-social-btn {
    width: 2.5rem;
    height: 2.5rem;
  }

  .footer-social-btn svg {
    width: 18px;
    height: 18px;
  }

  .footer-social-btn-threads .threads-icon {
    width: 18px;
    height: 18px;
  }
}
