/* MCCCIL Portal Styles — Scarlet & Gold */
:root {
  --scarlet: #C41E3A;
  --gold: #CFB53B;
  --gold-text: #9e8a1e;       /* WCAG AA on white backgrounds */
  --dark: #1a1a2e;
  --light: #f5f5f5;
  --white: #ffffff;
  --gray: #5a6370;            /* Improved contrast (4.9:1 on white) */
  --success: #28a745;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
  --shadow-xl: 0 15px 40px rgba(0,0,0,0.25);
  --shadow-focus: 0 0 0 3px rgba(196,30,58,0.25);

  /* Radii */
  --radius-sm: 5px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;
  --radius-pill: 50px;

  /* Spacing */
  --space-section: 4rem;
  --space-section-sm: 2rem;
  --space-card: 2rem;

  /* Sticky header height (for scroll-margin-top) */
  --header-h: 80px;
  --crisis-banner-h: 36px;
}

html { scroll-behavior: smooth; }

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Global focus-visible ring for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--scarlet);
  outline-offset: 2px;
}

/* Anchored sections clear the sticky header */
[id] { scroll-margin-top: var(--header-h); }

body {
  font-family: 'Open Sans', 'Segoe UI', Arial, sans-serif;
  color: var(--dark);
  background: linear-gradient(180deg, #f5f5f5 0%, #ededf0 100%);
  font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
}

h1, h2 { letter-spacing: -0.5px; }
h3 { letter-spacing: -0.3px; }

/* Veterans Crisis Line Banner */
.crisis-banner {
  background: var(--scarlet);
  color: var(--white);
  text-align: center;
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  font-family: 'Open Sans', sans-serif;
  letter-spacing: 0.2px;
  line-height: 1.4;
}

.crisis-banner a {
  color: var(--white);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.crisis-banner a:hover {
  color: var(--gold);
}

@media (max-width: 600px) {
  .crisis-banner {
    font-size: 0.75rem;
    padding: 0.4rem 0.75rem;
  }
}

header {
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--white);
  padding: 0.5rem 1.5rem;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
}

header picture {
  flex-shrink: 0;
  margin-right: 1rem;
}

header picture img {
  width: 48px !important;
  height: 48px !important;
  object-fit: contain;
  border-radius: 50%;
}

header h1 {
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  white-space: nowrap;
  margin-right: auto;
}

header h1 span { color: var(--gold); }

.header-social-link {
  color: var(--white);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  margin-left: 0.25rem;
  margin-right: 0.35rem;
  vertical-align: middle;
  transition: opacity 0.2s, transform 0.2s;
}

.header-social-link svg {
  fill: #ffffff;
  transition: fill 0.2s;
}

.header-social-link:hover {
  transform: scale(1.1);
}

.header-social-link:hover svg {
  fill: var(--gold);
}

.header-social-link:visited,
.header-social-link:active,
.header-social-link:focus {
  color: var(--white);
  text-decoration: none;
}

nav {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

nav a {
  color: var(--white);
  text-decoration: none;
  margin-left: 1rem;
  font-size: 0.9rem;
  transition: color 0.2s;
}

nav a:hover { color: var(--gold); }
nav a.active {
  color: var(--gold);
  position: relative;
}
nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold);
  border-radius: 1px;
}

/* Nav Dropdown */
.nav-dropdown {
  position: relative;
  margin-left: 1rem;
}
.nav-dropdown-toggle {
  color: var(--white);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  padding: 0;
}
.nav-dropdown-toggle:hover,
.nav-dropdown-toggle.active { color: var(--gold); }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--dark);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  min-width: 160px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 100;
  padding: 0.25rem 0;
}
.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}
.nav-dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  margin-left: 0;
  white-space: nowrap;
}
.nav-dropdown-menu a:hover {
  background: rgba(255,255,255,0.1);
}

.hero {
  padding: clamp(2.5rem, 5vw, 4.5rem) 1.5rem;
  background: linear-gradient(135deg, #1a1a2e 0%, #2a2a4a 50%, #1a1a2e 100%);
  color: var(--white);
  text-align: center;
}

/* Hero variants — warm scarlet for "action" pages, gold accent for "info" pages */
.hero--scarlet {
  background: linear-gradient(135deg, #6b0f1a 0%, #C41E3A 50%, #8b1a2b 100%);
}

.hero--warm {
  background: linear-gradient(135deg, #1a1a2e 0%, #2e1a1a 40%, #3a1e28 70%, #1a1a2e 100%);
}

/* Hero with Background Image — must come AFTER .hero to override background shorthand */
.hero-with-image {
  background: linear-gradient(135deg, rgba(196, 30, 58, 0.5), rgba(26, 26, 46, 0.7)), url('../images/MCCCILFBHDR.webp');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  color: var(--white);
}

.hero-overlay {
  display: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  text-align: center;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.hero-with-image h2 {
  color: var(--gold);
  text-shadow: 2px 2px 8px rgba(26,26,46,0.7);
}
.hero-with-image p {
  color: var(--white);
  opacity: 0.98;
  text-shadow: 1px 1px 6px rgba(26,26,46,0.6);
}

.btn-hero {
  font-size: 1.1rem;
  padding: 0.8rem 2rem;
  margin-top: 0.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.hero h2 {
  font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem);
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
}
.hero h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--gold);
  margin: 0.5rem auto 0;
  border-radius: 2px;
}
.hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto;
}

.container {
  max-width: 1080px;
  margin: var(--space-section-sm) auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
}

.container--narrow { max-width: 800px; }
.container--wide { max-width: 1200px; }

/* Event Cards */
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.event-card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  border-top: 3px solid var(--gold);
}

.event-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.event-card .badge {
  display: inline-block;
  background: var(--scarlet);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 3px;
  text-transform: uppercase;
}

.event-card .badge.wellness { background: var(--success); }
.event-card .badge.community { background: var(--gold); color: var(--dark); }
.event-card .badge.youth { background: #6f42c1; }
.event-card .badge.fundraising { background: #fd7e14; }
.event-card .badge.service { background: #17a2b8; }

.event-card-body { padding: 1.25rem; }
.event-card-body h3 { font-size: 1.15rem; margin-bottom: 0.5rem; display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.event-card-body h3 i { color: var(--scarlet); font-size: 1.2em; }

.event-meta {
  font-size: 0.85rem;
  color: var(--gray);
  margin-bottom: 0.75rem;
}

.event-meta span { display: block; margin-bottom: 0.2rem; }

.event-card-body p { font-size: 0.9rem; margin-bottom: 1rem; }

.btn {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  min-height: 44px;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s, border-color 0.2s;
}

.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--scarlet); color: var(--white); }
.btn-primary:hover { background: #a3182f; box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3); transform: translateY(-1px); }
.btn-secondary { background: var(--gold); color: var(--dark); }
.btn-secondary:hover { background: #b89e30; box-shadow: 0 4px 12px rgba(207, 181, 59, 0.3); transform: translateY(-1px); }
.btn-outline { background: transparent; border-color: var(--scarlet); color: var(--scarlet); }
.btn-outline:hover { background: var(--scarlet); color: var(--white); box-shadow: 0 4px 12px rgba(196, 30, 58, 0.2); }

/* Override browser default a:link / a:visited (specificity 0,1,1) which beats single-class .btn-* (0,1,0) */
a.btn-primary, a.btn-primary:link, a.btn-primary:visited { color: var(--white); }
a.btn-secondary, a.btn-secondary:link, a.btn-secondary:visited { color: var(--dark); }
a.btn-outline, a.btn-outline:link, a.btn-outline:visited { color: var(--scarlet); }

/* Forms */
.form-section {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  margin-top: 1.5rem;
}

.form-section h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--dark);
}

fieldset.form-group { border: none; padding: 0; }
fieldset.form-group legend { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.4rem; }

.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid #ccc;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--scarlet);
  box-shadow: var(--shadow-focus);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  font-weight: 400;
  margin-bottom: 0.5rem;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  margin-right: 0.5rem;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 0.75rem; right: 1rem;
  font-size: 1.5rem;
  background: none; border: none;
  cursor: pointer;
  color: var(--gray);
}

/* Success message */
.success-msg {
  display: none;
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-top: 1rem;
  font-weight: 600;
}

.success-msg.show { display: block; }

/* Error message */
.error-message {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-weight: 600;
}

/* Screen reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link - visible on focus */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--scarlet);
  color: var(--white);
  padding: 0.5rem 1rem;
  text-decoration: none;
  z-index: 100;
  font-weight: bold;
}

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

/* Testimonials Carousel */
.testimonials-section {
  margin-top: 2rem;
  text-align: center;
}

.testimonials-section h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--dark);
}

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

.testimonial blockquote {
  font-style: italic;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.testimonial cite {
  font-weight: 600;
  color: var(--scarlet);
}

.carousel-btn {
  background: var(--scarlet);
  color: var(--white);
  border: none;
  padding: 0.5rem 1rem;
  margin: 0 0.5rem;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.carousel-btn:hover { background: #a3182f; transform: scale(1.1); box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3); }

/* Benefits Navigator */
.resource-item {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}

.resource-item h4 {
  margin-bottom: 0.5rem;
}

.resource-item a {
  color: var(--scarlet);
  text-decoration: none;
}

.resource-item a:hover {
  text-decoration: underline;
}

/* ============================================
   Shared Content Card
   ============================================ */
.content-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--space-card);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-card);
  border-top: 3px solid var(--gold);
}

.content-card h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--dark);
}

.content-card p {
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

.content-card a:not(.btn) {
  color: var(--scarlet);
  text-decoration: none;
  font-weight: 600;
}

.content-card a:not(.btn):hover { text-decoration: underline; }

/* Content card variants */
.content-card--compact {
  padding: 1.5rem;
}

.content-card--centered {
  text-align: center;
}

/* Page-specific card extensions */
.contact-card {
  text-align: center;
}

.contact-card h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.contact-card p {
  font-size: 0.9rem;
  color: var(--gray);
  margin-bottom: 0.75rem;
}

.contact-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--scarlet);
}

/* Objective cards (mission page) */
.objective-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.objective-card .objective-icon {
  font-size: 2.5rem;
  color: var(--scarlet);
  margin-bottom: 0.75rem;
}

.objective-card h4 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: var(--dark);
}

.objective-card p {
  font-size: 0.9rem;
  color: var(--gray);
  line-height: 1.6;
}

/* CTA sections (mission, businesses) */
.cta-section {
  text-align: center;
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-card);
}

.cta-section h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  color: var(--dark);
}

.cta-section p {
  margin-bottom: 1.5rem;
  color: var(--gray);
  line-height: 1.7;
}

.cta-section .btn {
  margin: 0 0.5rem;
}

/* Tagline (mission page) */
.tagline {
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--scarlet);
  margin: 2rem 0;
  font-family: 'Montserrat', sans-serif;
}

/* Peer cards (about-network) */
.peer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.peer-card {
  background: var(--light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  border-left: 4px solid var(--scarlet);
}

.peer-card h4 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
  color: var(--dark);
}

.peer-card .peer-meta {
  font-size: 0.82rem;
  color: var(--gray);
  margin-bottom: 0.5rem;
}

.peer-card p {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.peer-card a {
  color: var(--scarlet);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
}

.peer-card a:hover { text-decoration: underline; }

/* Org list (about-network) */
.org-list {
  columns: 2;
  column-gap: 2rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.org-list li {
  padding: 0.4rem 0;
  font-size: 0.92rem;
  line-height: 1.5;
  break-inside: avoid;
}

.org-list li::before {
  content: '\f005';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: var(--gold);
  margin-right: 0.5rem;
  font-size: 0.7rem;
}

/* Explainer box (about-network) */
.explainer-box {
  background: #fffbe6;
  border-left: 4px solid var(--gold);
  border-radius: 0 6px 6px 0;
  padding: 1.25rem 1.5rem;
  margin: 1rem 0;
}

.explainer-box strong {
  color: var(--scarlet);
}

/* Timeline (about-history) */
.timeline {
  position: relative;
  padding-left: 2rem;
  margin: 1.5rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gold);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
  padding-left: 1rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.75rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  background: var(--scarlet);
  border-radius: 50%;
  border: 2px solid var(--gold);
}

.timeline-year {
  font-weight: 800;
  color: var(--scarlet);
  font-family: 'Montserrat', sans-serif;
  font-size: 1.05rem;
}

.timeline-item p {
  margin: 0.25rem 0 0;
  line-height: 1.6;
}

/* Detail grid (about-history) */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.detail-item {
  background: var(--light);
  border-radius: 6px;
  padding: 1rem;
}

.detail-item strong {
  display: block;
  color: var(--scarlet);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

/* Objectives grid (mission) */
.objectives-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Scholarship list extensions */
.content-card li {
  line-height: 1.7;
}

.content-card ul {
  margin: 0.75rem 0 0.75rem 1.5rem;
}

/* Scholarship form */
.scholarship-form .form-group { margin-bottom: 1.25rem; }
.scholarship-form textarea { min-height: 100px; resize: vertical; }

.ref-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* License plates extensions */
.apply-cta {
  text-align: center;
  padding: 2rem;
}

.apply-cta .btn {
  font-size: 1.1rem;
  padding: 0.85rem 2.5rem;
}

.trademark-notice {
  font-size: 0.85rem;
  color: var(--gray);
  margin-top: 1rem;
  line-height: 1.6;
  border-top: 1px solid #e0e0e0;
  padding-top: 1rem;
}

/* ============================================
   Business Directory Cards
   ============================================ */
.biz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.biz-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 0;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Gradient top accent — uses ::before to avoid border-image/border-radius conflict */
.biz-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--scarlet), var(--gold));
  z-index: 1;
}

.biz-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* Card header: badge + name grouped together */
.biz-card-header {
  padding: 1.75rem 1.75rem 0;
}

.biz-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.biz-badge-realestate { background: rgba(13, 110, 253, 0.1); color: #0d6efd; }
.biz-badge-insurance  { background: rgba(111, 66, 193, 0.1); color: #6f42c1; }
.biz-badge-printing   { background: rgba(253, 126, 20, 0.1); color: #b35900; }
.biz-badge-garage     { background: rgba(25, 135, 84, 0.1); color: #198754; }
.biz-badge-home       { background: rgba(23, 162, 184, 0.1); color: #117a8b; }

.biz-card h4 {
  font-size: 1.15rem;
  margin-bottom: 0;
  line-height: 1.35;
}

.biz-card h4 a {
  color: var(--dark);
  text-decoration: none;
  font-weight: 700;
}

.biz-card h4 a:hover { color: var(--scarlet); }

/* Card body: description */
.biz-card-body {
  padding: 0.75rem 1.75rem 0;
  flex-grow: 1;
}

.biz-card .biz-desc {
  font-size: 0.88rem;
  color: var(--gray);
  line-height: 1.65;
  margin: 0;
}

/* Card footer: contact + CTA combined */
.biz-card-footer {
  padding: 1.25rem 1.75rem 1.5rem;
  margin-top: auto;
  background: #fafafa;
  border-top: 1px solid #f0f0f0;
}

.biz-contact {
  font-size: 0.85rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.biz-contact-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.2rem;
}

.biz-contact-row:last-child {
  margin-bottom: 0;
}

.biz-contact-name {
  font-weight: 700;
  color: var(--dark);
}

.biz-contact a {
  color: var(--scarlet);
  text-decoration: none;
  font-weight: 600;
}

.biz-contact a:hover { text-decoration: underline; }

.biz-contact i {
  width: 1rem;
  text-align: center;
  color: var(--scarlet);
  font-size: 0.8rem;
  flex-shrink: 0;
}

.biz-cta {
  display: block;
  text-align: center;
  font-size: 0.85rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
}

/* Veteran badge — subtle inline tag in footer */
.biz-veteran-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--scarlet);
  margin-top: 0.75rem;
}

.biz-veteran-badge i {
  color: var(--gold);
  font-size: 0.8rem;
}

@media (max-width: 600px) {
  .biz-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .biz-card-header {
    padding: 1.25rem 1.25rem 0;
  }
  .biz-card-body {
    padding: 0.75rem 1.25rem 0;
  }
  .biz-card-footer {
    padding: 1rem 1.25rem 1.25rem;
  }
  .biz-card h4 {
    font-size: 1.05rem;
  }
}

/* Org cards (participants page) */
.org-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.org-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.org-card:has(.org-logo) {
  flex-direction: row;
  align-items: flex-start;
  gap: 1rem;
}

.org-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.org-logo {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.org-logo img {
  max-width: 60px;
  max-height: 60px;
  object-fit: contain;
  border-radius: 4px;
}

.org-card-content {
  flex: 1;
  min-width: 0;
}

.org-card h4 { font-size: 1.05rem; margin-bottom: 0.4rem; }

.org-card h4 a {
  color: var(--dark);
  text-decoration: none;
}

.org-card h4 a:hover { color: var(--scarlet); }

.org-card .org-desc {
  font-size: 0.88rem;
  color: var(--gray);
  flex-grow: 1;
}

.org-card .org-badges {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.org-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  text-transform: uppercase;
}

.org-badge.nmcc { background: var(--gold); color: var(--dark); }
.org-badge.confirmed { background: var(--success); color: var(--white); }
.org-badge.pending { background: #fd7e14; color: var(--white); }

.legend {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
}

.legend-item { display: flex; align-items: center; gap: 0.4rem; }

/* Participants section headings */
.participants-section { margin-bottom: 2.5rem; }

.participants-section h3 {
  font-size: 1.4rem;
  color: var(--scarlet);
  border-bottom: 2px solid var(--gold);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.participants-section p.section-desc {
  font-size: 0.95rem;
  color: var(--gray);
  margin-bottom: 1.25rem;
}

/* Contact form extensions */
.inquiry-fields { display: none; }
.inquiry-fields.active { display: block; }

.inquiry-hint {
  background: rgba(207, 181, 59, 0.1);
  border-left: 3px solid var(--gold);
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.6;
  border-radius: 0 4px 4px 0;
}

.inquiry-hint a {
  color: var(--scarlet);
  font-weight: 600;
}

/* Contact grid */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* ============================================
   Scroll Fade-In Animations
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays for grid children */
.fade-in-stagger > *:nth-child(1) { transition-delay: 0s; }
.fade-in-stagger > *:nth-child(2) { transition-delay: 0.1s; }
.fade-in-stagger > *:nth-child(3) { transition-delay: 0.2s; }
.fade-in-stagger > *:nth-child(4) { transition-delay: 0.3s; }
.fade-in-stagger > *:nth-child(5) { transition-delay: 0.4s; }
.fade-in-stagger > *:nth-child(6) { transition-delay: 0.5s; }

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================
   Testimonial Crossfade + Auto-advance
   ============================================ */
.testimonial-carousel {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  min-height: 160px;
}

.testimonial {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}

.testimonial.active {
  position: relative;
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

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

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--scarlet);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.3s;
}

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

/* ============================================
   Responsive: Page-specific
   ============================================ */
@media (max-width: 600px) {
  .detail-grid { grid-template-columns: 1fr; }
  .org-list { columns: 1; }
  .ref-row { grid-template-columns: 1fr; }
}

/* ============================================
   Footer — 4-column navigation footer
   ============================================ */
footer {
  background: linear-gradient(to bottom, #22223a, var(--dark));
  border-top: 3px solid var(--gold);
  color: var(--white);
  padding: 3.5rem 2rem 1.5rem;
  margin-top: var(--space-section);
  font-size: 0.88rem;
  line-height: 1.8;
}

footer a { color: rgba(255,255,255,0.8); text-decoration: none; transition: color 0.2s; }
footer a:hover { color: var(--gold); }

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2.5rem;
  max-width: 1080px;
  margin: 0 auto 2rem;
}

.footer-brand img {
  height: 48px;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  color: rgba(255,255,255,0.65);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  transition: background 0.2s, transform 0.2s;
}

.footer-social a:hover {
  background: var(--scarlet);
  transform: scale(1.1);
}

.footer-social svg { fill: #ffffff; width: 16px; height: 16px; }

.footer-col h4 {
  color: var(--gold);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

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

.footer-col li { margin-bottom: 0.35rem; }

.footer-col a {
  font-size: 0.85rem;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  color: rgba(255,255,255,0.5);
  font-size: 0.8rem;
}

.footer-bottom a { color: var(--gold); }

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }
  .footer-social { justify-content: center; }
}

/* Photo Sections */
.photo-section {
  background: linear-gradient(to bottom, var(--light) 0%, var(--white) 50%, var(--light) 100%);
  padding: var(--space-section) 0;
  margin: var(--space-section) 0;
}


.photo-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 3rem;
}

.photo-section-reverse .photo-content {
  flex-direction: row-reverse;
}

.photo-text h3 {
  font-size: 2rem;
  color: var(--scarlet);
  margin-bottom: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.photo-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--dark);
  margin-bottom: 1rem;
}

.photo-text strong {
  color: var(--scarlet);
  display: block;
  margin-top: 1.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.photo-image {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 3px solid var(--white);
}


/* Distinct sizing for logo vs. banner */

.photo-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.photo-image img {
  display: block;
  max-width: 320px;
  width: 100%;
  height: auto;
  margin: 0 auto;
  transition: transform 0.4s ease;
  box-sizing: border-box;
}

.photo-section .photo-image img[alt~="Banner"],
.photo-section .photo-image img[alt~="Memorial"] {
  max-width: 500px;
}

/* Center image and text vertically */
.photo-content {
  align-items: center;
}

/* Gold accent bar for section headers */
.photo-text h3 {
  font-size: 2rem;
  color: var(--scarlet);
  margin-bottom: 0.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  position: relative;
  text-transform: uppercase;
}
.photo-text h3::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--gold);
  margin: 0.5rem 0 1.2rem 0;
  border-radius: 2px;
}

/* Tagline styling */
.marine-tagline {
  color: var(--gold);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Responsive improvements */
@media (max-width: 900px) {
  .photo-content {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }
  .photo-image img {
    max-width: 80vw;
  }
}

.photo-image:hover img {
  transform: scale(1.04);
}

/* Responsive */
@media (max-width: 600px) {
  .hero h2 { font-size: 1.5rem; }
  .hero-with-image { 
    min-height: 400px;
    background-attachment: scroll;
    padding: 3rem 1.5rem;
  }
  .form-row { grid-template-columns: 1fr; }
  
  .photo-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0 1.5rem;
  }
  
  .photo-section-reverse .photo-content {
    direction: ltr;
  }
  
  .photo-text h3 {
    font-size: 1.4rem;
  }
  
  .photo-text p {
    font-size: 1rem;
  }
}

/* Donate Page Styles */
.donate-hero {
  text-align: center;
  padding: 4rem 1.5rem;
  margin-bottom: 3rem;
  background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/MCCCILFBHDR.webp');
  background-size: cover;
  background-position: center;
  color: #fff;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.donate-hero h2 {
  font-size: 2.8rem;
  color: #fff;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  font-weight: 800;
}

.donate-hero .lead {
  font-size: 1.3rem;
  color: #f8f9fa;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.donate-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2.5rem;
  margin-bottom: 4rem;
}

.donate-form-section {
  background: var(--white);
  padding: 2.5rem;
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.05);
}

.donate-form-section h3 {
  font-size: 1.8rem;
  margin-bottom: 2rem;
  color: var(--dark);
  border-bottom: 2px solid var(--gold);
  padding-bottom: 0.5rem;
  display: inline-block;
}

/* Frequency Toggle */
.frequency-toggle {
  display: flex;
  gap: 0;
  margin-bottom: 2.5rem;
  background: #f1f3f5;
  padding: 0.5rem;
  border-radius: var(--radius-pill);
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.frequency-btn {
  flex: 1;
  padding: 0.75rem 1.5rem;
  border: none;
  background: transparent;
  color: var(--dark);
  font-weight: 700;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.frequency-btn.active {
  background: var(--scarlet);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(196, 30, 58, 0.3);
}

.frequency-btn:hover:not(.active) {
  background: rgba(0,0,0,0.05);
}

/* Giving Levels */
.giving-levels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.amount-btn {
  padding: 1.5rem 1rem;
  border: 2px solid #e9ecef;
  background: var(--white);
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.amount-btn:hover {
  border-color: var(--gold);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.amount-btn.selected {
  background: var(--white);
  border-color: var(--scarlet);
  box-shadow: 0 4px 12px rgba(196, 30, 58, 0.15);
}

.amount-btn .amount {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--scarlet);
}

.amount-btn .impact {
  display: block;
  font-size: 0.85rem;
  color: var(--gray);
  line-height: 1.4;
  font-weight: 500;
}

/* Custom Amount */
.custom-amount {
  margin-bottom: 2.5rem;
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid #e0e0e0;
}

.custom-amount label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.75rem;
  font-size: 1rem;
  color: #495057;
}

.amount-input-wrapper {
  position: relative;
  max-width: 100%;
}

.currency-symbol {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--dark);
}

.amount-input-wrapper input {
  width: 100%;
  padding: 1rem 1rem 1rem 2.5rem;
  border: 2px solid #ced4da;
  border-radius: var(--radius-md);
  font-size: 1.2rem;
  font-weight: 700;
  transition: border-color 0.2s;
}

.amount-input-wrapper input:focus {
  outline: none;
  border-color: var(--scarlet);
  box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.15);
}

/* Payment Methods */
.payment-methods {
  margin-top: 3rem;
  border-top: 1px solid #e9ecef;
  padding-top: 2rem;
}

.payment-methods h4 {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.payment-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid #e9ecef;
  padding-bottom: 1px;
}

.payment-tab {
  flex: 1;
  padding: 1rem;
  border: none;
  background: transparent;
  color: #6c757d;
  font-weight: 600;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1rem;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  margin-bottom: -3px;
}

.payment-tab.active {
  color: var(--scarlet);
  border-bottom-color: var(--scarlet);
  background: rgba(196, 30, 58, 0.05);
}

.payment-tab:hover:not(.active) {
  color: var(--dark);
  background: #f8f9fa;
}

.payment-panel {
  display: none;
}

.payment-panel.active {
  display: block;
}

/* Stripe Element Styling */
.stripe-element {
  padding: 1rem;
  border: 2px solid #ccc;
  border-radius: var(--radius-sm);
  background: var(--white);
}

.stripe-placeholder {
  text-align: center;
  padding: 2rem;
  color: var(--gray);
}

.stripe-placeholder .note {
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

#card-errors {
  color: var(--scarlet);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Donation Form */
.donation-form {
  margin-top: 1.5rem;
}

.btn-donate {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
  margin-top: 1rem;
}

/* PayPal Container */
.paypal-container {
  text-align: center;
  padding: 2rem;
}

.paypal-buttons {
  margin-top: 1.5rem;
  padding: 2rem;
  background: var(--light);
  border-radius: var(--radius-sm);
}

/* Alternative Methods */
.alternative-methods {
  padding: 1rem;
}

.alt-method {
  padding: 1.5rem;
  background: var(--light);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.alt-method h5 {
  color: var(--scarlet);
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.alt-method address {
  font-style: normal;
  line-height: 1.6;
  margin: 0.75rem 0;
}

.alt-method .note {
  font-size: 0.85rem;
  color: var(--gray);
  margin-top: 0.5rem;
}

/* Donate Sidebar */
.donate-sidebar .card {
  background: var(--white);
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  margin-bottom: 1.5rem;
  border-top: 3px solid var(--gold);
}

.donate-sidebar h4 {
  font-size: 1.3rem;
  color: var(--scarlet);
  margin-bottom: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.donate-sidebar p {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1rem;
  color: #495057;
}

.donate-sidebar .note {
  font-size: 0.9rem;
  color: #6c757d;
  background: #f8f9fa;
  padding: 0.75rem;
  border-radius: 6px;
  margin-top: 0.5rem;
  display: block;
}

/* Tax Info */
.tax-info strong {
  color: var(--dark);
  font-weight: 700;
}

/* Impact List */
.impact-list {
  list-style: none;
  padding: 0;
}

.impact-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.impact-list li:last-child {
  border-bottom: none;
}

.impact-list i {
  color: var(--white);
  background: var(--scarlet);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(196, 30, 58, 0.3);
}

/* Donate Questions */
.donate-questions {
  text-align: center;
  padding: 2.5rem;
  background: #f8f9fa;
  border-radius: var(--radius-lg);
  margin-top: 3rem;
}

.donate-questions h3 {
  font-size: 1.8rem;
  color: var(--scarlet);
  margin-bottom: 1rem;
  font-weight: 700;
}

/* Responsive Donate Page */
@media (max-width: 900px) {
  .donate-grid {
    grid-template-columns: 1fr;
  }
  
  .giving-levels {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .donate-hero h2 {
    font-size: 1.6rem;
  }
  
  .donate-hero .lead {
    font-size: 1rem;
  }
  
  .giving-levels {
    grid-template-columns: 1fr;
  }
  
  .payment-tabs {
    flex-direction: column;
  }
  
  .frequency-toggle {
    flex-direction: column;
  }
}

.dedicate-donation {
  margin: 1.5rem 0 2rem 0;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
}
.dedicate-donation label {
  font-weight: 600;
  color: var(--scarlet);
  font-size: 1.05rem;
}
#dedicationFields .form-group {
  margin-bottom: 1rem;
}

.donate-quote {
  font-size: 1.2rem;
  color: #495057;
  background: #fffbe6;
  border-left: 5px solid var(--gold);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  margin: 0 auto 1.5rem auto;
  max-width: 600px;
  font-style: italic;
  box-shadow: 0 2px 8px rgba(207,181,59,0.07);
}
.donor-name {
  display: block;
  margin-top: 0.75rem;
  font-size: 1rem;
  color: var(--scarlet);
  font-weight: 700;
}

/* Resource Directory */
.rd-filters {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
}

.rd-search-row {
  display: flex;
  margin-bottom: 1rem;
}

.rd-filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.rd-category-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.75rem;
}

.rd-cat-label {
  display: inline-flex;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 400;
  cursor: pointer;
  white-space: nowrap;
}

.rd-cat-label input {
  width: auto;
  margin-right: 0.3rem;
}

/* Resource Cards */
.resource-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}

.resource-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.resource-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.resource-card-title {
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
  color: var(--dark);
}

.resource-subcategory {
  font-size: 0.85rem;
  color: var(--gray);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.resource-detail {
  font-size: 0.88rem;
  color: #555;
  margin-bottom: 0.25rem;
}

.resource-detail i {
  width: 1.2em;
  color: var(--scarlet);
  margin-right: 0.25rem;
}

.resource-desc {
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0.5rem 0 0.75rem;
}

.resource-region {
  font-size: 0.78rem;
  color: var(--gray);
}

.resource-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 0.35rem 0.9rem;
  font-size: 0.82rem;
}

/* Category badge colors */
.badge-benefits { background: #0d6efd; color: #fff; }
.badge-health { background: var(--success); color: #fff; }
.badge-career { background: #fd7e14; color: #fff; }
.badge-emergency { background: var(--scarlet); color: #fff; }
.badge-legal { background: #6f42c1; color: #fff; }
.badge-youth { background: #20c997; color: #fff; }
.badge-community { background: var(--gold); color: var(--dark); }

.badge-benefits,
.badge-health,
.badge-career,
.badge-emergency,
.badge-legal,
.badge-youth,
.badge-community {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

@media (max-width: 600px) {
  .rd-filter-row { grid-template-columns: 1fr; }
  .rd-category-row { gap: 0.25rem 0.5rem; }
}

/* ============================================
   Mobile Hamburger Navigation (<=768px)
   ============================================ */

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  margin-left: auto;
  line-height: 1;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  header {
    flex-wrap: wrap;
  }

  header h1 {
    font-size: 0.95rem;
    flex: 1;
    min-width: 0;
  }

  nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin-top: 0;
    padding: 0.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }

  nav.nav-open {
    display: flex;
  }

  nav a {
    margin-left: 0;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 1rem;
  }

  nav a:last-child {
    border-bottom: none;
  }

  .header-social-link {
    padding: 0.5rem 0.75rem;
    margin: 0;
  }

  .nav-dropdown {
    margin-left: 0;
    width: 100%;
  }

  .nav-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.75rem 1.25rem;
    margin-left: 0;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-dropdown:hover .nav-dropdown-menu {
    display: none;
  }

  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    border-radius: 0;
    min-width: 0;
    background: rgba(255, 255, 255, 0.05);
    padding: 0;
  }

  .nav-dropdown-menu.dropdown-open {
    display: block !important;
  }

  .nav-dropdown-menu a {
    padding: 0.6rem 1.25rem 0.6rem 2.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.92rem;
  }

  .nav-dropdown.open .nav-dropdown-toggle i {
    transform: rotate(180deg);
  }

  .nav-dropdown-toggle i {
    transition: transform 0.25s ease;
  }

  .nav-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99;
  }

  .nav-backdrop.active {
    display: block;
  }
}

/* ============================================
   Polish — Micro-interactions & Hover Richness
   ============================================ */

/* Button hover gradient sweep */
.btn-primary {
  position: relative;
  overflow: hidden;
  z-index: 0;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%; right: 100%; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.4s ease, right 0.4s ease;
  z-index: -1;
}

.btn-primary:hover::before {
  left: 100%;
  right: -100%;
}

/* Active press feedback for all buttons */
.btn:active {
  transform: scale(0.97);
  transition-duration: 0.05s;
}

/* Fade-in variants */
.fade-in-left {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in-scale.visible {
  opacity: 1;
  transform: scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .fade-in-left,
  .fade-in-scale {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn-primary::before { display: none; }
}

/* Card hover lift — universal for all card types */
.content-card,
.event-card,
.org-card,
.objective-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.content-card:hover,
.objective-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Links — subtle underline animation */
.content-card a:not(.btn):hover,
.peer-card a:hover,
.biz-contact a:hover {
  text-decoration-color: var(--scarlet);
  text-underline-offset: 3px;
}

/* ===== Chat Widget ===== */
#chat-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9998;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--scarlet);
  color: var(--white);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}
#chat-toggle:hover {
  background: #a3182f;
  transform: scale(1.05);
}
#chat-toggle.open { display: none; }

#chat-panel {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  width: 380px;
  max-height: 520px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
#chat-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.chat-header {
  background: var(--scarlet);
  color: var(--white);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.chat-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
}
.chat-close {
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 0.25rem;
  opacity: 0.8;
  transition: opacity 0.15s;
}
.chat-close:hover { opacity: 1; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 280px;
  max-height: 360px;
}

.chat-msg {
  max-width: 85%;
  padding: 0.6rem 0.85rem;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.5;
  word-wrap: break-word;
}
.chat-msg a {
  color: var(--scarlet);
  text-decoration: underline;
}
.chat-msg-user {
  align-self: flex-end;
  background: var(--scarlet);
  color: var(--white);
  border-bottom-right-radius: 4px;
}
.chat-msg-user a { color: var(--gold); }
.chat-msg-assistant {
  align-self: flex-start;
  background: #f0f0f0;
  color: var(--dark);
  border-bottom-left-radius: 4px;
}

.chat-input-area {
  display: flex;
  padding: 0.75rem;
  gap: 0.5rem;
  border-top: 1px solid #e0e0e0;
  flex-shrink: 0;
}
.chat-input-area input {
  flex: 1;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-family: 'Open Sans', sans-serif;
  outline: none;
  transition: border-color 0.15s;
}
.chat-input-area input:focus {
  border-color: var(--scarlet);
  box-shadow: var(--shadow-focus);
}
#chat-send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--scarlet);
  color: var(--white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}
#chat-send:hover { background: #a3182f; }
#chat-send:disabled { background: #ccc; cursor: not-allowed; }

/* Typing indicator */
.chat-typing {
  display: flex;
  gap: 4px;
  padding: 0.6rem 0.85rem;
  align-items: center;
}
.chat-typing .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #999;
  animation: chatBounce 1.2s infinite;
}
.chat-typing .dot:nth-child(2) { animation-delay: 0.2s; }
.chat-typing .dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes chatBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

/* Mobile responsive */
@media (max-width: 480px) {
  #chat-panel {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-height: 100vh;
    border-radius: 12px 12px 0 0;
  }
  #chat-toggle {
    bottom: 1rem;
    right: 1rem;
  }
}
