/* ============================================
   VIBRANT RED THEME WITH ANIMATIONS
   FONT: INTER
   Dynamic, engaging NGO design
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

:root {
  --primary: #d60000;        /* Strong red */
  --primary-dark: #b30000;
  --primary-light: #ff6b6b;
  --secondary: #2e86ab;      /* Blue accent */
  --secondary-light: #5fa8d3;
  --accent: #ff9e1f;         /* Orange accent */
  --accent-light: #ffc46b;
  --success: #27ae60;        /* Green */
  --light-grey: #f3f3f3;
  --dark-grey: #2d3436;
  --text-dark: #1c1c1c;
  --text-soft: #575757;
  --gradient-primary: linear-gradient(135deg, #d60000, #ff6b6b);
  --gradient-secondary: linear-gradient(135deg, #2e86ab, #5fa8d3);
  --gradient-accent: linear-gradient(135deg, #ff9e1f, #ffc46b);
  --card-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  --card-shadow-hover: 0 12px 30px rgba(214, 0, 0, 0.15);
  --radius: 12px;
  --maxw: 1150px;
}

body {
  background: white;
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

/* -------------------------------
   ANIMATIONS
--------------------------------*/

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

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes slideInFromTop {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes bounce {
  0%, 20%, 53%, 80%, 100% {
    transform: translate3d(0,0,0);
  }
  40%, 43% {
    transform: translate3d(0,-8px,0);
  }
  70% {
    transform: translate3d(0,-4px,0);
  }
  90% {
    transform: translate3d(0,-2px,0);
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

/* -------------------------------
   GENERAL LAYOUT
--------------------------------*/

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px 20px;
  animation: fadeInUp 0.8s ease-out;
}

/* -------------------------------
   HEADER
--------------------------------*/

.site-header {
  background: rgba(255, 255, 255, 0.95);
  padding: 18px 0;
  border-bottom: 2px solid var(--light-grey);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  animation: slideInFromTop 0.6s ease-out;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.brand:hover {
  transform: translateX(5px);
}

.brand-text {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-dark);
  position: relative;
}

.brand-text::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
}

.brand:hover .brand-text::after {
  width: 100%;
}

.logo {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 8px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.brand:hover .logo {
  transform: rotate(5deg) scale(1.1);
  border-color: var(--primary);
}

/* NAV */

.nav ul {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav a {
  text-decoration: none;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  color: var(--text-dark);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.nav a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  transition: left 0.3s ease;
  z-index: -1;
}

.nav a:hover {
  color: white;
  transform: translateY(-2px);
}

.nav a:hover::before {
  left: 0;
}

.nav a.active {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 15px rgba(214, 0, 0, 0.3);
}

.nav a.active:hover {
  animation: pulse 0.5s ease;
}

/* Mobile menu */
.nav-toggle {
  display: none;
  font-size: 1.6rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary);
  transition: transform 0.3s ease;
}

.nav-toggle:hover {
  transform: rotate(90deg);
  color: var(--primary-dark);
}

/* -------------------------------
   HERO SECTION
--------------------------------*/

.hero {
  padding: 80px 0;
  background: linear-gradient(135deg, #ffffff 0%, #fff5f5 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: var(--gradient-primary);
  border-radius: 50%;
  opacity: 0.1;
  animation: bounce 8s ease-in-out infinite;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 50px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-content {
  animation: fadeInLeft 0.8s ease-out 0.2s both;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--text-dark);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: var(--text-soft);
  margin-bottom: 30px;
  font-size: 1.1rem;
}

.hero-media {
  animation: fadeInRight 0.8s ease-out 0.4s both;
  position: relative;
}

.hero-media::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: 10px;
  bottom: 10px;
  background: var(--gradient-primary);
  border-radius: 20px;
  z-index: -1;
  opacity: 0.3;
}

.hero-media img {
  width: 100%;
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  transition: all 0.5s ease;
  position: relative;
}

.hero-media:hover img {
  transform: translate(-5px, -5px);
  box-shadow: var(--card-shadow-hover);
}

/* Buttons */

.btn {
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
  margin-right: 15px;
  margin-bottom: 10px;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 15px rgba(214, 0, 0, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(214, 0, 0, 0.4);
  animation: pulse 1s infinite;
}

.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-outline:hover {
  background: var(--gradient-primary);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(214, 0, 0, 0.3);
}

/* -------------------------------
   CARDS (MISSION / VISION)
--------------------------------*/

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-top: 40px;
}

.card {
  background: white;
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  transition: all 0.4s ease;
  border-top: 4px solid transparent;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.card:hover::before {
  transform: scaleX(1);
}

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

.card:nth-child(1):hover {
  border-top-color: var(--primary);
}

.card:nth-child(2):hover {
  border-top-color: var(--secondary);
}

.card:nth-child(3):hover {
  border-top-color: var(--accent);
}

.card h2 {
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--text-dark);
}

.card p {
  color: var(--text-soft);
}

/* -------------------------------
   PROGRAM PREVIEW BLOCKS
--------------------------------*/

.programs-preview .grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-top: 30px;
}

.prog-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: all 0.4s ease;
  position: relative;
}

.prog-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

.prog-card:hover::before {
  opacity: 0.1;
}

.prog-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--card-shadow-hover);
}

.prog-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.prog-card:hover img {
  transform: scale(1.1);
}

.prog-card h3 {
  padding: 20px 20px 8px;
  color: var(--text-dark);
  position: relative;
  z-index: 2;
}

.prog-card p {
  padding: 0 20px 20px;
  color: var(--text-soft);
  position: relative;
  z-index: 2;
}

/* -------------------------------
   IMPACT SECTION
--------------------------------*/

.impact {
  background: linear-gradient(135deg, #fff8f8 0%, #ffecec 100%);
  padding: 70px 0;
  margin-top: 60px;
  border-top: 2px solid #ffecec;
  position: relative;
  overflow: hidden;
}

.impact::before {
  content: '';
  position: absolute;
  bottom: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  background: var(--gradient-secondary);
  border-radius: 50%;
  opacity: 0.1;
  animation: bounce 10s ease-in-out infinite;
}

.impact-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 2;
}

.impact-stats {
  display: flex;
  gap: 25px;
}

.impact-stats div {
  background: white;
  padding: 25px;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  text-align: center;
  transition: all 0.4s ease;
  min-width: 140px;
  border-bottom: 4px solid transparent;
}

.impact-stats div:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-shadow-hover);
}

.impact-stats div:nth-child(1):hover {
  border-bottom-color: var(--primary);
}

.impact-stats div:nth-child(2):hover {
  border-bottom-color: var(--secondary);
}

.impact-stats div:nth-child(3):hover {
  border-bottom-color: var(--accent);
}

.impact-stats strong {
  display: block;
  color: var(--primary);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 5px;
  transition: all 0.3s ease;
}

.impact-stats div:hover strong {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transform: scale(1.1);
}

/* -------------------------------
   FORMS
--------------------------------*/

input,
textarea {
  width: 100%;
  padding: 16px;
  font-size: 1rem;
  border: 2px solid #e8e8e8;
  border-radius: 10px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
  background: white;
}

input:focus,
textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(214, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* -------------------------------
   FOOTER
--------------------------------*/

.site-footer {
  margin-top: 80px;
  background: linear-gradient(135deg, var(--dark-grey) 0%, #1a1a1a 100%);
  padding: 60px 0 30px;
  color: white;
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  position: relative;
  z-index: 2;
}

.footer-grid h3,
.footer-grid h4 {
  font-weight: 700;
  color: white;
  margin-bottom: 20px;
}

.footer-grid a {
  color: #cccccc;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
}

.footer-grid a:hover {
  color: var(--primary-light);
  transform: translateX(5px);
}

.site-credit {
  margin-top: 40px;
  text-align: center;
  color: #888;
  font-size: 0.9rem;
  position: relative;
  z-index: 2;
}

/* -------------------------------
   GALLERY & MEDIA STYLES
--------------------------------*/

.gallery-section {
  padding: 60px 0;
  background: linear-gradient(135deg, #ffffff 0%, #fff8f8 100%);
}

.gallery-intro {
  text-align: center;
  margin-bottom: 50px;
}

.gallery-intro h1 {
  font-size: 2.8rem;
  margin-bottom: 20px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gallery-intro p {
  font-size: 1.1rem;
  color: var(--text-soft);
  max-width: 700px;
  margin: 0 auto;
}

.gallery-filters {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 12px 24px;
  background: white;
  border: 2px solid var(--light-grey);
  border-radius: 25px;
  font-weight: 600;
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.filter-btn.active {
  background: var(--gradient-primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 15px rgba(214, 0, 0, 0.2);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-bottom: 60px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: all 0.4s ease;
  background: white;
}

.gallery-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--card-shadow-hover);
}

.gallery-item img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  transition: all 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  padding: 30px 20px 20px;
  color: white;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
  transform: translateY(0);
}

.gallery-overlay h3 {
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.gallery-overlay p {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 15px;
}

.overlay-btn {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.overlay-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Videos Section */
.videos-section {
  padding: 60px 0;
  background: linear-gradient(135deg, #f8fcff 0%, #f0f7ff 100%);
}

.videos-intro {
  text-align: center;
  margin-bottom: 50px;
}

.videos-intro h2 {
  font-size: 2.2rem;
  margin-bottom: 20px;
  color: var(--text-dark);
}

.videos-intro p {
  font-size: 1.1rem;
  color: var(--text-soft);
  max-width: 700px;
  margin: 0 auto;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.video-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: all 0.4s ease;
  background: white;
}

.video-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--card-shadow-hover);
}

.video-item iframe,
.video-item video {
  width: 100%;
  height: 280px;
  border: none;
  display: block;
}

.video-caption {
  padding: 20px;
  background: white;
}

.video-caption h3 {
  margin-bottom: 8px;
  color: var(--text-dark);
}

.video-caption p {
  color: var(--text-soft);
  font-size: 0.9rem;
}

/* Lightbox Modal */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  animation: zoomIn 0.3s ease;
}

.lightbox-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 90%;
  max-height: 90%;
}

.lightbox-content img,
.lightbox-content video {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(0, 0, 0, 0.5);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover {
  background: var(--primary);
  transform: scale(1.1);
}

.lightbox-caption {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  text-align: center;
  background: rgba(0, 0, 0, 0.7);
  padding: 15px 25px;
  border-radius: 25px;
  max-width: 80%;
}

/* Scroll animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

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

.stagger-item {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}

.stagger-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* -------------------------------
   RESPONSIVE
--------------------------------*/

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .programs-preview .grid,
  .cards,
  .footer-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .video-grid {
    grid-template-columns: 1fr;
  }

  .nav {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .nav ul {
    display: block;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    position: absolute;
    right: 20px;
    top: 90px;
    min-width: 200px;
    animation: fadeInUp 0.3s ease-out;
  }

  .nav a {
    display: block;
    margin-bottom: 12px;
    text-align: center;
  }

  .impact-stats {
    flex-direction: column;
    align-items: center;
  }

  .impact-stats div {
    width: 100%;
    max-width: 250px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .gallery-intro h1,
  .videos-intro h2 {
    font-size: 2.2rem;
  }
}

@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .gallery-filters {
    flex-direction: column;
    align-items: center;
  }
  
  .filter-btn {
    width: 100%;
    max-width: 250px;
    text-align: center;
  }
  
  .gallery-item img {
    height: 240px;
  }
  
  .video-item iframe,
  .video-item video {
    height: 220px;
  }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}