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

:root {
  --purple: #6b3fa0;
  --purple-dark: #4e2e78;
  --purple-light: #9b6fc8;
  --orange: #f7941d;
  --cream: #faf7f2;
  --dark: #2d2d2d;
  --gray: #6b6b6b;
  --light-gray: #f0ebf7;
  --white: #ffffff;
  --radius: 16px;
  --shadow: 0 8px 32px rgba(107,63,160,0.12);
  --transition: 0.3s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  color: var(--dark);
  background: var(--white);
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  border: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
.btn-primary { background: var(--orange); color: var(--white); }
.btn-primary:hover { background: #e07f0a; }
.btn-outline { background: transparent; color: var(--white); border: 2px solid var(--white); }
.btn-outline:hover { background: var(--white); color: var(--purple); }
.btn-outline-light { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.6); }
.btn-outline-light:hover { background: var(--white); color: var(--purple); }
.btn-sm { padding: 8px 20px; font-size: 0.9rem; background: var(--purple); color: var(--white); }
.btn-sm:hover { background: var(--purple-dark); }
.btn-donate { background: var(--orange); color: var(--white); font-size: 1.1rem; padding: 16px 40px; width: 100%; }
.btn-donate:hover { background: #e07f0a; }
.center-btn { text-align: center; margin-top: 48px; }

/* ── Nav ── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: background var(--transition), box-shadow var(--transition);
  padding: 16px 0;
  background: rgba(255,255,255,0.90);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
#navbar.scrolled {
  background: var(--white);
  box-shadow: 0 2px 20px rgba(0,0,0,0.1);
  padding: 10px 0;
}
#navbar.scrolled .nav-links a { color: var(--dark); }
#navbar.scrolled .nav-links a:hover { color: var(--purple); }
#navbar.scrolled .nav-donate { background: var(--purple) !important; color: var(--white) !important; }
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; }
.nav-logo img { height: 64px; }
.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-links a {
  color: var(--dark);
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 50px;
  transition: background var(--transition), color var(--transition);
}
.nav-links a:hover { background: var(--light-gray); color: var(--purple); }
.nav-donate {
  background: var(--orange) !important;
  color: var(--white) !important;
  text-shadow: none !important;
}
.nav-donate:hover { background: #e07f0a !important; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.6rem; color: var(--white); cursor: pointer; }
#navbar.scrolled .nav-toggle { color: var(--dark); }

/* ── Hero ── */
.hero {
  position: relative;
  height: 82vh;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero-slide.active { opacity: 1; }
.hero-slide-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(78,46,120,0.7) 0%, rgba(0,0,0,0.4) 100%);
}
.hero-content {
  position: relative;
  text-align: center;
  color: var(--white);
  padding: 0 24px;
  max-width: 800px;
  animation: heroFadeUp 1s ease 0.3s both;
}
.hero-eyebrow {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 16px;
}
.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1.1;
  margin-bottom: 20px;
}
.hero-title span { color: var(--orange); }
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.25rem);
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.6;
}
.hero-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-dots {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}
.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.dot.active { background: var(--orange); transform: scale(1.3); }

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

/* ── Stats Bar ── */
.stats-bar {
  background: var(--purple);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
}
.stat {
  flex: 1;
  min-width: 150px;
  text-align: center;
  padding: 32px 24px;
  color: var(--white);
  border-right: 1px solid rgba(255,255,255,0.15);
}
.stat:last-child { border-right: none; }
.stat-num {
  font-size: 2.8rem;
  font-weight: 900;
  display: inline;
}
.stat span { font-size: 2rem; font-weight: 900; }
.stat p { font-size: 0.9rem; opacity: 0.8; margin-top: 4px; }

/* ── Sections ── */
.section { padding: 96px 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section-header { text-align: center; margin-bottom: 64px; }
.section-eyebrow {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 12px;
}
.section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 16px;
  color: var(--dark);
}
.section-sub { color: var(--gray); font-size: 1.1rem; max-width: 600px; margin: 0 auto; line-height: 1.7; }
.section-header.light .section-eyebrow { color: rgba(255,255,255,0.7); }
.section-header.light h2 { color: var(--white); }
.section-header.light .section-sub { color: rgba(255,255,255,0.8); }

/* ── About ── */
.about-section { background: var(--cream); }
.about-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; }
.about-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.about-card:hover { transform: translateY(-6px); box-shadow: 0 16px 48px rgba(107,63,160,0.18); }
.about-card-icon { font-size: 3rem; margin-bottom: 20px; }
.about-card h3 { font-size: 1.4rem; font-weight: 800; margin-bottom: 12px; color: var(--purple); }
.about-card p { color: var(--gray); line-height: 1.7; }

/* ── Animals ── */
.animals-section { background: var(--white); }
.animals-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.animal-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--white);
  transition: transform var(--transition), box-shadow var(--transition);
}
.animal-card { display: block; color: inherit; text-decoration: none; cursor: pointer; }
.animal-card:hover { transform: translateY(-8px); box-shadow: 0 20px 48px rgba(107,63,160,0.2); }
.animal-img-wrap { position: relative; overflow: hidden; height: 180px; background: var(--cream); }
.animal-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.animal-img-wrap img.img-contain {
  object-fit: contain;
  object-position: center;
}
.animal-card:hover .animal-img-wrap img { transform: scale(1.06); }
.animal-badge {
  position: absolute;
  top: 14px; right: 14px;
  background: var(--orange);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 50px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.age-badge {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(78,46,120,0.85));
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 800;
  padding: 20px 12px 10px;
  letter-spacing: 0.5px;
}
.animal-info { padding: 16px; }
.animal-info h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 6px; }
.animal-info p { color: var(--gray); margin-bottom: 14px; line-height: 1.5; font-size: 0.9rem; }
@media (max-width: 900px) { .animals-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .animals-grid { grid-template-columns: 1fr; } }

/* ── Team ── */
.team-section { background: var(--light-gray); }
.team-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 32px; }
.team-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-align: center;
  width: 200px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.team-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(107,63,160,0.18); }
.team-img-wrap { height: 200px; overflow: hidden; }
.team-img-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.5s ease; }
.team-card:hover .team-img-wrap img { transform: scale(1.05); }
.team-card h3 { font-size: 1rem; font-weight: 800; padding: 16px 12px 4px; }
.team-role { font-size: 0.85rem; color: var(--purple); font-weight: 700; padding-bottom: 16px; padding-left: 12px; padding-right: 12px; }
.team-card { cursor: pointer; }
.team-card .bio-hint { font-size: 0.75rem; color: var(--purple-light); padding-bottom: 12px; }

/* ── Bio popup ── */
.bio-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.bio-overlay.active { display: flex; }
.bio-popup {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 520px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(0,0,0,0.3);
  overflow: hidden;
  animation: popupIn 0.25s ease;
}
.bio-popup-header {
  background: linear-gradient(135deg, var(--purple-dark), var(--purple));
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.bio-popup-header img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  border: 3px solid rgba(255,255,255,0.4);
  flex-shrink: 0;
}
.bio-popup-header-text h3 { color: var(--white); font-size: 1.2rem; margin-bottom: 4px; }
.bio-popup-header-text p { color: rgba(255,255,255,0.75); font-size: 0.85rem; font-weight: 700; }
.bio-popup-body { padding: 28px; max-height: 45vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.bio-popup-body p { color: var(--gray); line-height: 1.75; font-size: 0.95rem; }
.bio-popup-close {
  display: block;
  margin: 16px 28px 28px auto;
  background: var(--purple);
  color: var(--white);
  border: none;
  border-radius: 50px;
  padding: 8px 24px;
  font-weight: 800;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
}
.bio-popup-close:hover { background: var(--purple-dark); }

@keyframes popupIn {
  from { opacity: 0; transform: scale(0.92) translateY(16px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Support ── */
.support-section { background: linear-gradient(135deg, var(--purple-dark) 0%, var(--purple) 100%); color: var(--white); }
.support-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-bottom: 64px; }
.support-donate, .support-ways {
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 40px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
}
.support-donate h3, .support-ways h3 { font-size: 1.5rem; font-weight: 800; margin-bottom: 12px; }
.support-donate p, .support-ways p { opacity: 0.85; margin-bottom: 24px; line-height: 1.6; }
.support-list { list-style: none; margin-bottom: 28px; }
.support-list li { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.1); font-size: 1rem; line-height: 1.5; }
.support-list li:last-child { border-bottom: none; }
.partners { text-align: center; }
.partners-label { font-size: 0.85rem; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; opacity: 0.7; margin-bottom: 24px; }
.partners-logos { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 32px; background: rgba(255,255,255,0.95); border-radius: var(--radius); padding: 28px 32px; }
.partners-logos a { display: flex; align-items: center; justify-content: center; }
.partners-logos img { height: 48px; width: auto; object-fit: contain; opacity: 0.9; transition: opacity var(--transition), transform var(--transition); mix-blend-mode: multiply; }
.partners-logos a:hover img { opacity: 1; transform: scale(1.08); }

/* ── Contact ── */
.contact-section { background: var(--cream); }
.contact-inner { display: flex; align-items: center; justify-content: center; gap: 64px; flex-wrap: wrap; }
.contact-info p { font-size: 1.1rem; margin-bottom: 16px; }
.contact-info a { color: var(--purple); font-weight: 700; }
.contact-info a:hover { text-decoration: underline; }

/* ── Footer ── */
.footer { background: var(--dark); color: var(--white); padding: 40px 24px; text-align: center; }
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-logo { height: 48px; margin: 0 auto 24px; filter: brightness(0) invert(1); opacity: 0.8; }
.footer-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.footer-nav a { color: rgba(255,255,255,0.7); font-weight: 700; padding: 6px 14px; border-radius: 50px; transition: color var(--transition), background var(--transition); }
.footer-nav a:hover { color: var(--white); background: rgba(255,255,255,0.1); }
.footer-copy { color: rgba(255,255,255,0.4); font-size: 0.85rem; }

/* ── Fade-in animation ── */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── Mobile ── */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  }
  .nav-links.open { display: flex; }
  .nav-links a { color: var(--dark); width: 100%; text-align: center; }
  .support-inner { grid-template-columns: 1fr; }
  .stat { min-width: 50%; }
  .hero-btns { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
  .stat { min-width: 100%; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.15); }
}
