:root {
  --color-red: #ec3750;
  --color-orange: #ff8c37;
  --color-yellow: #f1c40f;
  --color-green: #33d6a6;
  --color-cyan: #5bc0de;
  --color-blue: #338eda;

  /* Default = dark mode */
  --bg: #020617;
  --bg-alt: #050816;
  --bg-elevated: #0b1120;
  --text: #e5e7eb;
  --text-muted: #9ca3af;
  --border-subtle: rgba(148, 163, 184, 0.25);
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.6);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-full: 999px;
  --transition-fast: 180ms ease-out;
  --transition-med: 260ms ease;
  --nav-height: 72px;
  --blur-strong: 20px;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", Roboto, sans-serif;
}

html[data-theme="light"] {
  --bg: #f3f4f6;
  --bg-alt: #ffffff;
  --bg-elevated: #ffffff;
  --text: #111827;
  --text-muted: #6b7280;
  --border-subtle: rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 16px 38px rgba(15, 23, 42, 0.08);
}

/* Smooth theme transitions – only for main surfaces */
html,
body {
  transition: background 220ms ease-out, color 220ms ease-out;
}

/* Only animate key interactive elements to avoid layout jank */
.navbar,
.card,
.btn,
.input,
.chip,
.icon-button,
.footer,
.back-to-top,
.card-modal-content {
  transition: background-color 220ms ease-out, background 220ms ease-out,
              color 220ms ease-out, border-color 220ms ease-out,
              box-shadow 220ms ease-out, transform 220ms ease-out;
}

/* Reset & base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  /* Light, static background “effect” – cheap gradient */
  background:
    radial-gradient(circle at top left, rgba(51, 142, 218, 0.25), transparent 55%),
    radial-gradient(circle at top right, rgba(236, 55, 80, 0.22), transparent 55%),
    linear-gradient(to bottom, #020617, var(--bg-alt));
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

.section {
  padding: 5rem 0;
}

.section-alt {
  background: linear-gradient(
    145deg,
    rgba(15, 23, 42, 0.9),
    rgba(15, 23, 42, 0.35)
  );
}

.section-header {
  text-align: left;
  margin-bottom: 2.5rem;
}

.section-header h1,
.section-header h2 {
  margin: 0 0 0.5rem;
}

.section-header p {
  margin: 0;
  color: var(--text-muted);
}

.grid {
  display: grid;
  gap: 1.75rem;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(var(--blur-strong));
  background: linear-gradient(
    to bottom,
    rgba(5, 7, 16, 0.96),
    rgba(5, 7, 16, 0.86),
    transparent
  );
  border-bottom: 1px solid transparent;
}

html[data-theme="light"] .navbar {
  background: linear-gradient(
    to bottom,
    rgba(243, 244, 246, 0.96),
    rgba(243, 244, 246, 0.9),
    transparent
  );
}

.navbar.scrolled {
  background: rgba(5, 7, 16, 0.96);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65);
}

html[data-theme="light"] .navbar.scrolled {
  background: rgba(243, 244, 246, 0.98);
  border-color: rgba(15, 23, 42, 0.06);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

.navbar-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
}

.logo-mark {
  height: 32px;
  width: 32px;
  border-radius: 40%;
  background: radial-gradient(circle at 30% 0, #fff, var(--color-blue));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.logo-text {
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

/* Nav links */
.navbar-nav {
  display: flex;
  align-items: center;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar-links a {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-muted);
}

.navbar-links a:hover,
.navbar-links a:focus-visible {
  color: var(--text);
  background: rgba(148, 163, 184, 0.16);
  transform: translateY(-1px);
}

.navbar-links a.active {
  background: linear-gradient(90deg, var(--color-red), var(--color-orange));
  color: #fff;
}

/* Navbar actions */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-button {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: radial-gradient(circle at 30% 0, #1f2937, #020617);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

html[data-theme="light"] .icon-button {
  background: radial-gradient(circle at 30% 0, #e5e7eb, #ffffff);
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 1px rgba(51, 142, 218, 0.5);
  transform: translateY(-1px) scale(1.02);
}

/* Hamburger */
.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 3px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0.25rem;
  margin-right: 0.5rem;
}

.navbar-toggle span {
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
}

/* Icons */
.icon-search,
.icon-up {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid currentColor;
  position: relative;
}

.icon-search::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transform: rotate(45deg);
  right: -4px;
  bottom: 1px;
}

.icon-up::before {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(135deg);
  top: 2px;
  left: 50%;
  translate: -50% 0;
}

/* Theme toggle icons */
#theme-toggle .icon-sun,
#theme-toggle .icon-moon {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid currentColor;
}

#theme-toggle .icon-moon {
  box-shadow: -4px 0 0 0 var(--bg);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

html[data-theme="dark"] #theme-toggle .icon-sun {
  opacity: 0;
  transform: translateY(-4px);
}

html[data-theme="dark"] #theme-toggle .icon-moon {
  opacity: 1;
  transform: translateY(0);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
}

/* very light hero glow – already cheap */
.hero-bg-animated {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 0, rgba(236, 55, 80, 0.35), transparent 55%),
    radial-gradient(circle at 80% 0, rgba(51, 142, 218, 0.28), transparent 55%),
    radial-gradient(circle at 50% 80%, rgba(51, 214, 166, 0.18), transparent 60%);
  opacity: 0.7;
  mix-blend-mode: screen;
  pointer-events: none;
  animation: heroPulse 14s ease-in-out infinite alternate;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 3.5rem;
  align-items: center;
  padding-top: 2rem;
}

.hero-text h1 {
  font-size: clamp(2.4rem, 3vw, 3rem);
  margin: 0 0 0.6rem;
}

.hero-tagline {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  max-width: 36rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Buttons */
.btn {
  border-radius: var(--radius-full);
  padding: 0.55rem 1.3rem;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-weight: 600;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-red), var(--color-orange), var(--color-yellow));
  background-size: 200% 200%;
  color: #fff;
  box-shadow: 0 18px 40px rgba(236, 55, 80, 0.45);
  animation: btnGradient 6s ease infinite;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 22px 55px rgba(236, 55, 80, 0.6);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.5);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  border-color: var(--color-blue);
  background: rgba(15, 23, 42, 0.7);
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  border: 1px solid transparent;
}

.badge-red {
  background: rgba(236, 55, 80, 0.12);
  border-color: rgba(236, 55, 80, 0.5);
  color: var(--color-red);
}

.badge-orange {
  background: rgba(255, 140, 55, 0.12);
  border-color: rgba(255, 140, 55, 0.5);
  color: var(--color-orange);
}

.badge-yellow {
  background: rgba(241, 196, 15, 0.12);
  border-color: rgba(241, 196, 15, 0.6);
  color: var(--color-yellow);
}

.badge-green {
  background: rgba(51, 214, 166, 0.12);
  border-color: rgba(51, 214, 166, 0.6);
  color: var(--color-green);
}

.badge-cyan {
  background: rgba(91, 192, 222, 0.12);
  border-color: rgba(91, 192, 222, 0.6);
  color: var(--color-cyan);
}

.badge-blue {
  background: rgba(51, 142, 218, 0.12);
  border-color: rgba(51, 142, 218, 0.6);
  color: var(--color-blue);
}

/* Hero visual */
.hero-visual {
  position: relative;
  justify-self: end;
}

.hero-orbit {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 1px dashed rgba(148, 163, 184, 0.5);
  animation: spin 16s linear infinite;
}

.hero-orbit-node {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #fff;
}

.node-red {
  top: 0;
  left: 50%;
  background: var(--color-red);
}
.node-orange {
  right: 0;
  top: 50%;
  background: var(--color-orange);
}
.node-yellow {
  bottom: 0;
  left: 50%;
  background: var(--color-yellow);
}
.node-green {
  left: 0;
  top: 50%;
  background: var(--color-green);
}
.node-cyan {
  top: 20%;
  left: 10%;
  background: var(--color-cyan);
}
.node-blue {
  bottom: 20%;
  right: 10%;
  background: var(--color-blue);
}

.hero-image {
  position: relative;
  display: block;
  max-width: 320px;
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.4);
}

/* Cards */
.card {
  position: relative;
  background: radial-gradient(circle at top left, rgba(51, 142, 218, 0.14), var(--bg-elevated));
  border-radius: var(--radius-lg);
  padding: 1.3rem 1.4rem;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: -40%;
  opacity: 0;
  background: radial-gradient(circle at 0 0, rgba(236, 55, 80, 0.15), transparent 60%),
              radial-gradient(circle at 100% 100%, rgba(51, 142, 218, 0.18), transparent 60%);
  pointer-events: none;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  border-color: rgba(148, 163, 184, 0.7);
}

.card:hover::before {
  opacity: 1;
}

/* Expandable card specifics */
.expandable-card {
  cursor: pointer;
}

.expandable-card .card-media img {
  width: 100%;
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  display: block;
}

.card-title {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
}

.card-subtitle {
  margin: 0 0 0.3rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.card-meta {
  margin: 0 0 0.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.card-meta a {
  color: inherit;
  text-decoration: underline dashed;
}

.card-tags {
  margin-top: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* Stats */
.stats-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 2.5rem;
}

.stat-card {
  text-align: left;
}

.stat-label {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
}

/* Filters & search */
.filters-bar {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-bottom: 2rem;
  padding: 1.2rem 1.3rem;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(148, 163, 184, 0.5);
  background: radial-gradient(circle at top left, rgba(51, 214, 166, 0.08), transparent 60%);
}

.filters-bar-animated .filter-row:nth-child(1) {
  border-left: 2px solid var(--color-red);
  padding-left: 0.8rem;
}
.filters-bar-animated .filter-row:nth-child(2) {
  border-left: 2px solid var(--color-green);
  padding-left: 0.8rem;
}
.filters-bar-animated .filter-row:nth-child(3) {
  border-left: 2px solid var(--color-blue);
  padding-left: 0.8rem;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  justify-content: space-between;
}

.filter-title {
  margin: 0;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Chips */
.chip {
  border-radius: var(--radius-full);
  padding: 0.25rem 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.7);
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

html[data-theme="light"] .chip {
  background: rgba(243, 244, 246, 0.9);
}

.chip-filter.active {
  color: #fff;
  border-color: var(--color-blue);
  background: linear-gradient(135deg, var(--color-blue), var(--color-cyan));
  transform: translateY(-1px);
}

/* Inputs */
.input {
  width: 100%;
  border-radius: var(--radius-full);
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.85);
  padding: 0.5rem 2.3rem 0.5rem 0.9rem;
  color: var(--text);
  font-size: 0.88rem;
  outline: none;
}

html[data-theme="light"] .input {
  background: rgba(255, 255, 255, 0.92);
}

.input:focus-visible {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 1px rgba(51, 142, 218, 0.45);
  transform: translateY(-1px);
}

.search-group {
  position: relative;
  max-width: 360px;
}

.input-icon {
  position: absolute;
  right: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

/* Accordion */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.accordion-item {
  width: 100%;
  text-align: left;
  background: rgba(15, 23, 42, 0.8);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  padding: 0.8rem 0.9rem;
  color: var(--text);
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.7rem;
}

html[data-theme="light"] .accordion-item {
  background: rgba(255, 255, 255, 0.9);
}

.accordion-title {
  font-size: 0.95rem;
}

.accordion-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.6);
  position: relative;
}

.accordion-icon::before,
.accordion-icon::after {
  content: "";
  position: absolute;
  background: rgba(148, 163, 184, 0.9);
  border-radius: 999px;
  transition: transform var(--transition-fast);
}

.accordion-icon::before {
  width: 10px;
  height: 2px;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
}

.accordion-icon::after {
  width: 2px;
  height: 10px;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
}

.accordion-item[aria-expanded="true"] .accordion-icon::after {
  transform: scaleY(0);
}

.accordion-content {
  grid-column: 1 / -1;
  max-height: 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: max-height 220ms ease;
}

.accordion-item[aria-expanded="true"] .accordion-content {
  max-height: 160px;
}

/* Donate */
.donate-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: flex-start;
}

.donate-list {
  padding-left: 1.1rem;
  color: var(--text-muted);
}

.donate-list li {
  margin-bottom: 0.45rem;
}

.donate-actions {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.donate-visual {
  text-align: center;
}

.donate-qr {
  max-width: 210px;
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.6);
  box-shadow: var(--shadow-soft);
}

.qr-caption {
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Announcements */
.announcements-grid .announcement-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.announcement-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.announcement-body {
  margin: 0;
  color: var(--text-muted);
}

.announcement-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

.announcement-author {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.4rem;
}

.announcement-author img {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
}

.author-name {
  margin: 0;
  font-size: 0.9rem;
}
.author-role {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* About / contact lists */
.about-grid,
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: flex-start;
}

.about-list,
.contact-list {
  padding-left: 1.1rem;
  color: var(--text-muted);
}

.about-list li,
.contact-list li {
  margin-bottom: 0.4rem;
}

/* Section CTA */
.section-cta {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

/* Footer */
.footer {
  margin-top: 4rem;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.95), #020617);
}

html[data-theme="light"] .footer {
  background: radial-gradient(circle at top, #e5e7eb, #f9fafb);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 2.25rem;
  padding: 2.8rem 0 1.8rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.footer-text {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-column h3 {
  margin-top: 0;
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-column p {
  margin: 0 0 0.3rem;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.footer-column a {
  color: inherit;
  text-decoration: none;
}

.footer-column a:hover {
  text-decoration: underline;
}

.footer-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  padding: 0.4rem 1.1rem;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--color-green), var(--color-cyan));
  color: #020617;
  text-decoration: none;
}

.footer-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.55);
}

.footer-cta-outline {
  background: transparent;
  color: var(--color-cyan);
  border-color: rgba(91, 192, 222, 0.7);
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding: 0.9rem 0 1.2rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Back to top */
.back-to-top {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: radial-gradient(circle at 30% 0, #1f2937, #020617);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  z-index: 40;
}

html[data-theme="light"] .back-to-top {
  background: radial-gradient(circle at 30% 0, #e5e7eb, #f9fafb);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  border-color: var(--color-green);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7);
}

/* Card modal overlay */
.card-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 60;
}

.card-modal.open {
  display: flex;
}

.card-modal-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.9), #020617);
  backdrop-filter: blur(20px);
}

.card-modal-content {
  position: relative;
  max-width: 720px;
  width: calc(100% - 2.5rem);
  max-height: calc(100% - 3rem);
  background: radial-gradient(circle at top left, rgba(51, 142, 218, 0.18), var(--bg-elevated));
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.75);
  padding: 1.6rem 1.4rem 1.4rem;
  transform: scale(0.96) translateY(12px);
  opacity: 0;
  overflow-y: auto;
}

.card-modal.open .card-modal-content {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.card-modal-close,
.card-modal-prev,
.card-modal-next {
  position: absolute;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
  width: 30px;
  height: 30px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

html[data-theme="light"] .card-modal-close,
html[data-theme="light"] .card-modal-prev,
html[data-theme="light"] .card-modal-next {
  background: rgba(243, 244, 246, 0.96);
}

.card-modal-close {
  top: 0.6rem;
  right: 0.6rem;
}
.card-modal-prev {
  left: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
}
.card-modal-next {
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
}

/* Video thumbnails */
.video-thumb {
  position: relative;
}

.video-thumb img {
  display: block;
  width: 100%;
  border-radius: var(--radius-md);
}

.play-icon {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 2px solid rgba(248, 250, 252, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 0, rgba(248, 250, 252, 0.75), rgba(15, 23, 42, 0.4));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
}

.play-icon::before {
  content: "";
  margin-left: 2px;
  border-style: solid;
  border-width: 8px 0 8px 14px;
  border-color: transparent transparent transparent #020617;
}

/* Intro overlay */
.intro-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.96), #020617);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 80;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 600ms ease;
}

.intro-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.intro-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  transform: scale(0.88);
  opacity: 0;
  animation: introScale 900ms ease forwards;
}

.intro-logo-mark {
  width: 54px;
  height: 54px;
  border-radius: 36%;
  background: conic-gradient(
    from 200deg,
    var(--color-red),
    var(--color-orange),
    var(--color-yellow),
    var(--color-green),
    var(--color-cyan),
    var(--color-blue),
    var(--color-red)
  );
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.intro-logo-text {
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Page transition overlay */
.page-transition {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.98), #020617);
  transform: translateY(100%);
  transition: transform 280ms ease-in-out;
  z-index: 70;
}

.page-transition.active {
  transform: translateY(0);
}

/* Social links with icons */
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.8rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.8rem;
  text-decoration: none;
  border: 1px solid rgba(148, 163, 184, 0.55);
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.9);
}

html[data-theme="light"] .social-link {
  background: rgba(243, 244, 246, 0.9);
}

.social-link-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.social-link:hover,
.social-link:focus-visible {
  color: #fff;
  border-color: var(--color-blue);
  background: radial-gradient(circle at 0 0, rgba(51, 142, 218, 0.3), rgba(15, 23, 42, 0.9));
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.9);
}

/* Fade reveal */
.fade-in-up {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 400ms ease-out, transform 400ms ease-out;
}

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

/* Accessibility */
.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;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid,
  .donate-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-visual {
    justify-self: start;
  }

  .hero-image {
    max-width: 260px;
  }

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

@media (max-width: 720px) {
  .navbar-inner {
    gap: 0.5rem;
  }

  .navbar-toggle {
    display: flex;
  }

  /* MOBILE NAVBAR: fixed at bottom of screen */
  .navbar-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;                     /* at the bottom */
    display: block;
    background: rgba(5, 7, 16, 0.96);
    backdrop-filter: blur(18px);
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    transform: translateY(100%);   /* hidden below screen */
    transition: transform 220ms ease-in-out;
    z-index: 45;
  }

  html[data-theme="light"] .navbar-nav {
    background: rgba(243, 244, 246, 0.98);
  }

  .navbar-nav.open {
    transform: translateY(0);      /* slide up into view */
  }

  .navbar-links {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.8rem 1.4rem 1.2rem;
  }

  .navbar-links a {
    width: 100%;
  }

  .filters-bar {
    padding: 1rem;
  }

  .filter-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .card-modal-content {
    width: calc(100% - 1.2rem);
    padding-inline: 1.1rem;
  }
}

/* Keyframes */
@keyframes introScale {
  0% {
    opacity: 0;
    transform: scale(0.84) translateY(8px);
  }
  60% {
    opacity: 1;
    transform: scale(1.04) translateY(0);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}

@keyframes heroPulse {
  0% {
    opacity: 0.5;
    transform: scale(1);
  }
  100% {
    opacity: 0.9;
    transform: scale(1.05);
  }
}

@keyframes btnGradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
