@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --primary-navy: #000000;
  --secondary-navy: #1a1a1a;
  --navy-dark: #000000;
  --accent-gold: #810081;
  --accent-gold-hover: #650065;
  --accent-gold-light: #f3e0f3;
  --accent-teal: #2b6cb0;
  --accent-teal-dark: #1e4e8c;
  --accent-teal-light: #ebf8ff;
  --accent-yellow: #810081;
  --accent-emerald: #22543d;
  --accent-emerald-light: #f0fff4;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --text-dark: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.16), 0 4px 6px -2px rgba(0,0,0,0.05);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --radius-pill: 50px;
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-body);
  background-color: var(--bg-light);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .brand-title, .stat-item h3 {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--primary-navy);
}

header {
  background-color: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-logo svg {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.brand-logo-img {
  height: 48px;
  width: auto;
  flex-shrink: 0;
}

.brand-title {
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--primary-navy);
  line-height: 1.15;
}

.brand-subtitle {
  font-size: 0.7rem;
  color: var(--accent-gold);
  font-weight: 700;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: 'Montserrat', sans-serif;
}

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

nav li {
  display: inline-block;
  margin: 0;
  padding: 0;
}

nav a {
  text-decoration: none;
  color: var(--text-dark);
  font-size: calc(0.88rem + 1px);
  font-weight: 700;
  transition: color 0.2s ease;
  white-space: nowrap;
}

nav a:hover, nav a.active {
  color: var(--accent-gold);
}

.btn-primary {
  background-color: var(--primary-navy);
  color: #ffffff !important;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.88rem;
  transition: all 0.2s ease;
  display: inline-block;
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
}
.btn-primary:hover {
  background-color: var(--secondary-navy);
  transform: translateY(-1px);
}

.btn-gold {
  background-color: var(--accent-gold);
  color: #ffffff !important;
  padding: 0.6rem 1.35rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  display: inline-block;
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  box-shadow: 0 4px 10px rgba(129, 0, 129, 0.3);
}
.btn-gold:hover {
  background-color: var(--accent-gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(129, 0, 129, 0.4);
}

.btn-outline {
  border: 2px solid var(--primary-navy);
  color: var(--primary-navy) !important;
  padding: 0.5rem 1.15rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.88rem;
  transition: all 0.2s ease;
  display: inline-block;
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
}
.btn-outline:hover {
  background-color: var(--primary-navy);
  color: #ffffff !important;
  transform: translateY(-2px);
}

.hero {
  color: #ffffff;
  padding: 5.5rem 2rem 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero h1 {
  color: #ffffff;
  font-size: 2.85rem;
  line-height: 1.2;
  font-weight: 800;
  margin-bottom: 1.25rem;
  letter-spacing: -0.03em;
}

.hero-content { max-width: 920px; margin: 0 auto; position: relative; z-index: 2; }
.hero-tag {
  display: inline-block;
  background: rgba(129, 0, 129, 0.3);
  color: #f0c9f0;
  border: 1px solid rgba(129, 0, 129, 0.6);
  padding: 0.35rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 11px;
  line-height: 20px;
  font-weight: 700;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: 'Montserrat', sans-serif;
}

.hero p {
  font-size: 1.18rem;
  color: #f1f5f9;
  max-width: 780px;
  margin: 0 auto 2.25rem;
}

.hero-actions {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
}

.stat-bar {
  background-color: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  padding: 2.25rem 2rem;
  margin-top: -2.25rem;
  border-radius: var(--radius-md);
  max-width: 1160px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 10;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  text-align: center;
}

.stat-item h3, .stat-item .stat-value {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary-navy);
  margin-bottom: 0.2rem;
  letter-spacing: -0.03em;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.stat-item p {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: 'Montserrat', sans-serif;
}

.container { max-width: 1160px; margin: 0 auto; padding: 4.5rem 2rem; }
.section-header { text-align: center; max-width: 800px; margin: 4.5rem auto 3rem; }
.section-header:first-child { margin-top: 0; }
.section-header h2 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary-navy);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}
.section-header p {
  color: var(--text-muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

/* Three cards per row on wide screens, content top-aligned */
.cards-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cards-grid-3 .card-body,
.cards-top .card-body {
  justify-content: flex-start;
}

/* Keep footer metrics pinned to the bottom of top-aligned cards */
.cards-grid-3 .card-metrics,
.cards-top .card-metrics {
  margin-top: auto;
}

/* Center a lone card in the middle column of a three-column grid */
.cards-grid-center > .card:only-child {
  grid-column: 2;
}

@media (max-width: 1000px) {
  .cards-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards-grid-center > .card:only-child { grid-column: 1 / -1; justify-self: center; width: calc((100% - 2rem) / 2); }
}

@media (max-width: 680px) {
  .cards-grid-3 { grid-template-columns: 1fr; }
  .cards-grid-center > .card:only-child { grid-column: auto; width: 100%; }
}

.card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-teal-dark);
}

.card.active-card {
  border: 2px solid var(--accent-teal-dark);
  box-shadow: var(--shadow-lg);
}

.card-img-wrap {
  position: relative;
  width: 100%;
  height: 210px;
  overflow: hidden;
  background-color: #e2e8f0;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card:hover .card-img-wrap img {
  transform: scale(1.04);
}

/* Team photo with social links revealed on hover */
.card-img-wrap.team-photo {
  height: 280px;
}

.card-img-wrap.team-photo img {
  object-position: center 25%;
}

.team-socials {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.9rem;
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.team-social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

.team-social svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.team-social.linkedin { background-color: #0a66c2; }
.team-social.facebook { background-color: #1877f2; }
.team-social.instagram { background: linear-gradient(45deg, #f09433, #dc2743 50%, #bc1888); }

.card:hover .team-socials,
.team-socials:focus-within {
  opacity: 1;
  transform: translateY(0);
}

@media (hover: none) {
  .team-socials {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Expandable personal bio on team cards */
.team-bio {
  margin: 0.25rem 0 1rem;
  border-top: 1px solid var(--border-color);
  padding-top: 0.85rem;
}

.team-bio summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--accent-gold);
  font-size: 0.92rem;
}

.team-bio[open] summary {
  margin-bottom: 0.75rem;
}

.team-bio p {
  font-size: 0.92rem;
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.team-bio .team-fun {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.card-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

.card-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.85rem;
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 0.05em;
  align-self: flex-start;
}

.tag-medical { background-color: var(--accent-teal-light); color: var(--accent-teal); }
.tag-food { background-color: var(--accent-gold-light); color: #5b0060; }
.tag-shelter { background-color: var(--accent-emerald-light); color: var(--accent-emerald); }
.tag-wash { background-color: var(--accent-teal-light); color: var(--accent-teal-dark); }

.card h3, .card h4 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-navy);
  margin-bottom: 0.65rem;
  letter-spacing: -0.01em;
}

.card p {
  color: var(--text-body);
  font-size: 0.94rem;
  margin-bottom: 1.2rem;
  line-height: 1.6;
}

.card-metrics {
  border-top: 1px solid var(--border-color);
  padding-top: 0.85rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary-navy);
  font-family: 'Montserrat', sans-serif;
}

.btn-read-story {
  background-color: var(--bg-light);
  border: 1px solid var(--border-color);
  color: var(--primary-navy);
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  width: 100%;
  text-align: center;
  transition: all 0.2s ease;
  font-family: 'Montserrat', sans-serif;
}
.btn-read-story:hover {
  background-color: var(--primary-navy);
  color: #ffffff;
  border-color: var(--primary-navy);
}

.story-reader-section {
  background-color: var(--bg-white);
  border: 2px solid var(--accent-teal-dark);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
  margin: 3rem 0;
  transition: all 0.3s ease;
}

.story-reader-header {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
}

.story-reader-badge-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.btn-collapse {
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-collapse:hover {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}

.story-reader-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--primary-navy);
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.story-reader-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  font-weight: 600;
}

.story-reader-media-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 1.75rem 0;
}

.story-reader-img-wrap {
  border-radius: var(--radius-sm);
  overflow: hidden;
  height: 320px;
  background-color: #e2e8f0;
}

.story-reader-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-reader-video-wrap {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  height: 320px;
  background-color: #000000;
}

.story-reader-video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.story-reader-body {
  font-size: 1.05rem;
  color: var(--text-body);
  line-height: 1.8;
}

.story-reader-body p {
  margin-bottom: 1.25rem;
}

@media (max-width: 860px) {
  .story-reader-media-grid { grid-template-columns: 1fr; }
  .story-reader-section { padding: 1.5rem; }
  .story-reader-title { font-size: 1.4rem; }
}

.callout-box {
  background-color: #f1f5f9;
  border-left: 5px solid var(--primary-navy);
  padding: 1.75rem 2.25rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 2.5rem 0;
}

.callout-box h4 {
  font-size: 1.2rem;
  color: var(--primary-navy);
  margin-bottom: 0.5rem;
}

.callout-box p {
  font-size: 0.98rem;
  color: #334155;
  line-height: 1.7;
}

.grafana-map-container {
  position: relative;
  width: 100%;
  height: 650px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  background: #181b1f;
}
.grafana-map-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 2rem 0;
}
.table-scroll .data-table {
  margin: 0;
  min-width: 560px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin: 2rem 0;
  border: 1px solid var(--border-color);
}

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

.data-table th {
  background-color: #f8fafc;
  color: var(--primary-navy);
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
}

.data-table tr:hover { background-color: #f8fafc; }

footer {
  background-color: var(--navy-dark);
  color: #94a3b8;
  padding: 4.5rem 2rem 2.25rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-container {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: 'Montserrat', sans-serif;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--accent-gold); }

.footer-legal {
  max-width: 1160px;
  margin: 0 auto;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
  font-size: 0.8rem;
  color: #64748b;
  text-align: center;
  line-height: 1.7;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--primary-navy);
  margin: 5px 0;
  transition: all 0.2s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1100px) {
  nav ul { gap: 0.75rem; }
  nav a { font-size: 0.82rem; }
}

@media (max-width: 1100px) {
  .footer-container { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .menu-toggle { display: block; order: 3; }
  nav { order: 2; }
  nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg-white);
    flex-direction: column;
    padding: 0.5rem 0;
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid var(--border-color);
    gap: 0;
  }
  nav ul.active { display: flex; }
  nav ul.active li { width: 100%; }
  nav ul.active li a {
    display: block;
    width: 100%;
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
    border-bottom: 1px solid var(--border-color);
    box-sizing: border-box;
  }
  nav ul.active li:last-child a { border-bottom: none; }
  nav ul.active li a.btn-primary {
    margin: 0.5rem 1.5rem;
    width: calc(100% - 3rem);
    text-align: center;
  }
  .hero h1 { font-size: 2.1rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions a { width: 100%; box-sizing: border-box; }
  .section-header h2 { font-size: 1.7rem; }
  .callout-box { padding: 1.25rem 1.5rem; }
  .card-img-wrap { height: 170px; }
  .data-table th, .data-table td { padding: 0.75rem 0.9rem; font-size: 0.85rem; }
  .grafana-map-container { height: 60vh; min-height: 420px; }
}

@media (max-width: 480px) {
  .footer-container { grid-template-columns: 1fr; }
  .hero { padding: 3.5rem 1.25rem 3rem; }
  .hero h1 { font-size: 1.65rem; }
  .hero p { font-size: 1rem; }
  .hero-tag { font-size: 0.72rem; padding: 0.3rem 0.8rem; }
  .container { padding: 3rem 1.25rem; }
  .section-header h2 { font-size: 1.4rem; }
  .section-header p { font-size: 0.95rem; }
  .stat-item h3, .stat-item .stat-value { font-size: 1.7rem; }
  .card-body { padding: 1.25rem; }
  .story-reader-section { padding: 1rem; }
  .story-reader-img-wrap, .story-reader-video-wrap { height: 200px; }
  .story-reader-title { font-size: 1.15rem; }
  .story-reader-meta { gap: 0.75rem; font-size: 0.82rem; }
  .grafana-map-container { height: 50vh; min-height: 340px; }
  .btn-primary, .btn-gold, .btn-outline, .btn-donate {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
  }
}
/* Homepage hero slideshow with Ken Burns effect */
.hero-slideshow {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: heroSlideFade 20s infinite, heroSlideZoom 20s infinite;
  animation-timing-function: ease-in-out, linear;
  will-change: opacity, transform;
}

.hero-slide:nth-child(1) { animation-delay: 0s, 0s; }
.hero-slide:nth-child(2) { animation-delay: -5s, -5s; }
.hero-slide:nth-child(3) { animation-delay: -10s, -10s; }
.hero-slide:nth-child(4) { animation-delay: -15s, -15s; }

@keyframes heroSlideFade {
  0%    { opacity: 0; }
  5%    { opacity: 1; }
  25%   { opacity: 1; }
  32.5% { opacity: 0; }
  100%  { opacity: 0; }
}

@keyframes heroSlideZoom {
  0%   { transform: scale(1); }
  100% { transform: scale(1.18); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide {
    animation: none;
    opacity: 0;
  }
  .hero-slide:first-child {
    opacity: 1;
  }
}
