/* --- VARIABLES & RESET --- */
:root {
  --primary: #8a1d1d;
  --primary-light: #a83a3a;
  --primary-dark: #6e1717;
  --secondary: #1a5e63;
  --accent: #f39c12;
  --light: #f8f9fa;
  --dark: #212529;
  --gray: #6c757d;
  --light-gray: #e9ecef;
  --border-radius: 12px;
  --box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background-color: #fff;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      circle at 10% 20%,
      rgba(138, 29, 29, 0.03) 0%,
      rgba(255, 255, 255, 0) 20%
    ),
    radial-gradient(
      circle at 90% 80%,
      rgba(26, 94, 99, 0.03) 0%,
      rgba(255, 255, 255, 0) 25%
    );
  z-index: -1;
  pointer-events: none;
}

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

section {
  padding: 6rem 0;
  position: relative;
}

h1,
h2,
h3,
h4 {
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

p {
  margin-bottom: 1.5rem;
  color: var(--gray);
  font-size: 1.1rem;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  font-size: 1.1rem;
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(138, 29, 29, 0.25);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(138, 29, 29, 0.35);
}

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

.btn-outline:hover {
  background-color: var(--primary);
  color: white;
}

.btn-large {
  padding: 1.1rem 2.8rem;
  font-size: 1.2rem;
}

.section-title {
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
}

.section-title h2 {
  font-size: 2.8rem;
  color: var(--primary);
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 5px;
  background-color: var(--accent);
  border-radius: 2px;
}

.section-title p {
  font-size: 1.25rem;
  max-width: 700px;
  margin: 2rem auto 0;
}

/* --- HEADER SECTION --- */
header {
  background-color: transparent;
  padding: 2rem 0 0;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.logo img {
  height: 52px;
  width: auto;
  display: block;
  border-radius: 1rem;
}

/* --- HERO SECTION --- */
.hero {
  padding: 5rem 0 8rem;
  position: relative;
  overflow: hidden;
}

.hero-container {
  display: flex;
  align-items: center;
  gap: 4rem;
}

.hero-content {
  flex: 1;
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  position: relative;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
  100% {
    transform: translateY(0px);
  }
}

.hero-image::before {
  content: "";
  position: absolute;
  width: 110%;
  height: 110%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  transform: rotate(15deg);
  z-index: -1;
  opacity: 0.1;
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.hero-img {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border: 8px solid white;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1.8rem;
  line-height: 1.15;
}

.hero h1 span {
  color: var(--primary);
  position: relative;
  display: inline-block;
}

.hero h1 span::after {
  content: "";
  position: absolute;
  bottom: 10px;
  left: 0;
  width: 100%;
  height: 12px;
  background: rgba(138, 29, 29, 0.2);
  z-index: -1;
  border-radius: 4px;
  display: none;
}

.hero p {
  font-size: 1.25rem;
  max-width: 600px;
}

.hero-buttons {
  display: flex;
  gap: 1.2rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  max-width: 600px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.stat-number {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1.1rem;
  color: var(--gray);
  font-weight: 600;
}

/* --- WHY SECTION --- */
.why-section {
  background-color: var(--light);
  position: relative;
}

.benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
}

.benefit-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 2.5rem;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.benefit-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 0;
  background: var(--primary);
  transition: var(--transition);
}

.benefit-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.benefit-card:hover::before {
  height: 100%;
}

.benefit-icon {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
  transition: var(--transition);
}

.benefit-card:hover .benefit-icon {
  transform: scale(1.1);
}

.benefit-card h3 {
  font-size: 1.6rem;
  margin-bottom: 1.2rem;
  color: var(--primary);
}

/* --- GALLERY SECTION --- */
.gallery-section {
  padding: 3rem 0;
  background-color: white;
  position: relative;
}

.gallery-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem;
}

.carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-out;
  will-change: transform;
}

.carousel-slide {
  flex-shrink: 0;
  width: 100%;
  aspect-ratio: 16/9;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

.carousel-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #e9ecef;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-indicator.active {
  background-color: #8a1d1d;
  transform: scale(1.3);
}

/* MOBILE SWIPE STYLES */
@media (max-width: 768px) {
  .carousel-slide {
    aspect-ratio: 4/3;
  }

  .carousel {
    touch-action: pan-y;
  }
}

/* --- VOLUNTEER TYPES --- */
.volunteer-types {
  padding: 6rem 0;
  background-color: var(--light);
}

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

.volunteer-card {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.volunteer-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.card-image {
  height: 200px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4.5rem;
  color: white;
  opacity: 0.9;
}

.card-content {
  padding: 2rem;
}

.volunteer-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

/* PARTNERS SECTION STYLES */
.partners-section {
  padding: 5rem 0;
  background-color: #ffffff;
  position: relative;
  overflow: hidden;
}

.partners-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.partners-header {
  text-align: center;
  margin-bottom: 3.5rem;
  position: relative;
}

.partners-header h2 {
  font-size: 2.8rem;
  color: #8a1d1d;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.partners-header h2::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 5px;
  background-color: #f39c12;
  border-radius: 2px;
}

.partners-header p {
  font-size: 1.25rem;
  color: #6c757d;
  max-width: 600px;
  margin: 2.5rem auto 0;
}

.partners-marquee {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1rem 0;
  height: auto;
  position: relative;
  display: flex;
  justify-content: flex-start;
  scrollbar-width: none;
}

.partners-marquee::-webkit-scrollbar {
  display: none;
}

.partners-track {
  display: flex;
  position: relative;
  will-change: transform;
  min-width: max-content;
  padding: 0 20px;
  gap: 20px;
}

.partner-logo {
  width: 150px;
  height: 90px;
  margin: 0;
  flex-shrink: 0;
  border-radius: 12px;
  background-color: white;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  padding: 20px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.partner-logo img {
  max-width: 90%;
  max-height: 90%;
  filter: grayscale(100%);
  opacity: 0.8;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* --- FEATURED PROJECTS --- */
.featured-projects {
  background-color: var(--light);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2.5rem;
}

.project-card {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.volunteer-card,
.project-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.card-content,
.project-body {
  padding: 1.8rem;
}

.volunteer-card h3,
.project-header h3 {
  font-size: 1.6rem;
  margin-bottom: 1.2rem;
}

.volunteer-card p,
.project-body p {
  font-size: 1.05rem;
  line-height: 1.7;
}

/* Signup button styles */
.signup-btn {
  display: block;
  width: 100%;
  padding: 0.8rem;
  margin-top: 1.5rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  text-decoration: none;
}

.signup-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(138, 29, 29, 0.25);
}

.signup-btn.disabled {
  background: var(--light-gray);
  color: var(--gray);
  cursor: not-allowed;
  pointer-events: none;
}

/* --- INSTITUTION BUTTON --- */
.institution-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 0.7rem;
  margin-top: 0.8rem;
  background: transparent;
  border: 2px solid var(--secondary);
  color: var(--secondary);
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  text-decoration: none;
  font-size: 1rem;
}

.institution-btn:hover {
  background: var(--secondary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(26, 94, 99, 0.2);
}

.institution-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 94, 99, 0.3);
}

.institution-btn i {
  font-size: 0.9em;
}

/* Disabled cards adjustment */
.project-card.closed .institution-btn {
  opacity: 0.7;
  pointer-events: none;
}

.project-header {
  padding: 1.8rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
}

.project-header h3 {
  margin-bottom: 0;
}

.project-body {
  padding: 2rem;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 1.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--light-gray);
}

.project-card.closed {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gray);
  font-weight: 500;
}

--- FOUNDERS SECTION --- .founders-section {
  background: linear-gradient(
      rgba(255, 255, 255, 0.95),
      rgba(255, 255, 255, 0.95)
    ),
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="%23f8f8f8"/><path d="M0 50 L100 50 M50 0 L50 100" stroke="%23e9ecef" stroke-width="1"/></svg>');
  background-size: 30px 30px;
}

.founders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
}

.founder-card {
  text-align: center;
  background: white;
  padding: 3rem 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.founder-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.founder-image {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  margin: 0 auto 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: white;
  overflow: hidden;
  position: relative;
}

.founder-name {
  font-size: 1.6rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.founder-role {
  color: var(--secondary);
  margin-bottom: 1.5rem;
  font-weight: 600;
  font-size: 1.1rem;
}

/* --- CTA SECTION --- */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  text-align: center;
  padding: 8rem 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 70%
  );
  z-index: 0;
}

.cta-content {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.cta-content h2 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

.cta-content p {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  opacity: 0.9;
  color: rgba(255, 255, 255, 0.9);
}

.cta-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-btn {
  background: white;
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.cta-btn:hover {
  background: var(--light-gray);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* --- FOOTER --- */
footer {
  background-color: var(--dark);
  color: white;
  padding: 4rem 0 2rem;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.footer-logo {
  margin-bottom: 1.5rem;
  width: 5rem;
}

.footer-links {
  display: flex;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: var(--transition);
  font-size: 1.1rem;
  font-weight: 500;
}

.footer-links a:hover {
  color: white;
}

.copyright {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
  max-width: 500px;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 992px) {
  .hero-container {
    flex-direction: column;
    gap: 3rem;
  }

  .hero-content {
    text-align: center;
  }

  .hero-buttons,
  .hero-stats {
    justify-content: center;
  }

  .hero-stats {
    margin: 3rem auto 0;
  }

  .stat-item {
    align-items: center;
  }

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

  .section-title h2 {
    font-size: 2.5rem;
  }

  .carousel {
    height: 450px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

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

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .section-title h2 {
    font-size: 2.2rem;
  }

  .carousel {
    height: auto;
  }

  .carousel-slide {
    aspect-ratio: 4/3; /* Better mobile ratio */
  }

  .slide-caption {
    padding: 2rem;
    padding-top: 4rem;
  }

  .slide-caption h3 {
    font-size: 1.8rem;
  }

  .slide-caption p {
    font-size: 1.1rem;
  }

  .carousel-btn {
    width: 50px;
    height: 50px;
  }

  .carousel-btn i {
    font-size: 1.5rem;
  }

  .carousel-btn.prev {
    left: 20px;
  }

  .carousel-btn.next {
    right: 20px;
  }

  .partners-marquee {
    overflow: hidden;
    height: 200px;
    justify-content: center;
  }

  .partners-track {
    animation: scroll 30s linear infinite;
    min-width: auto;
    gap: 0;
  }

  .partner-logo {
    width: 200px;
    height: 120px;
    margin: 0 40px;
  }

  .footer-content {
    align-items: center;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .carousel {
    height: 350px;
    border-radius: 12px;
  }

  .carousel-btn {
    width: 40px;
    height: 40px;
  }

  .carousel-btn i {
    font-size: 1.2rem;
  }

  .gallery-header h2 {
    font-size: 2.2rem;
  }

  .gallery-header p {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding-top: 3rem;
  }
  .hero h1 {
    font-size: 2.8rem;
  }

  .section-title h2 {
    font-size: 2rem;
  }

  .hero-stats {
    justify-content: center;
    flex-wrap: wrap;
    max-width: 100%;
    row-gap: 0 !important;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .stat-item {
    flex: 1 1 45%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1rem;
  }

  .stat-item:nth-child(3) {
    flex-basis: 100%;
    order: 1;
    margin-top: 1rem;
  }

  .carousel {
    height: 300px;
  }

  .partners-header h2 {
    font-size: 2rem;
  }

  .partner-logo {
    width: 130px;
    height: 80px;
    margin: 0 15px;
  }
}
