/* ================= GOOGLE FONTS ================= */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* ================= VARIABLES ================= */
:root {
  --primary: #1e4d2b;
  --primary-light: #2e7d32;
  --primary-dark: #14361e;
  --accent: #ff6d3f;
  --accent-hover: #e65100;

  --text-main: #2d3436;
  --text-muted: #636e72;
  --text-white: #ffffff;

  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-footer: #0a1f12;
  /* Deep Brand Green */

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html,
body {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text-main);
  background-color: var(--bg-body);
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
.brand h1 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

/* ================= HEADER ================= */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1rem 4%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

header.scrolled {
  padding: 0.8rem 4%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-md);
}

/* BRAND */
header .brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 50%;
}

header h1 {
  font-size: 1.25rem;
  color: var(--primary);
  letter-spacing: -0.02em;
}

/* NAV */
header nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

header nav a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  position: relative;
}

header nav a:not(.donate-btn)::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

header nav a:not(.donate-btn):hover {
  color: var(--primary);
}

header nav a:not(.donate-btn):hover::after {
  width: 100%;
}

/* DONATE BUTTON */
.donate-btn {
  background: var(--accent);
  color: var(--text-white);
  padding: 0.8rem 2rem;
  border-radius: var(--radius-full);
  display: inline-block;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(255, 109, 63, 0.3);
  transition: var(--transition);
}

.donate-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 109, 63, 0.4);
  color: var(--text-white);
}

header nav .donate-btn {
  padding: 0.6rem 1.5rem;
  font-size: 0.95rem;
}

/* ================= HERO ================= */
.hero {
  position: relative;
  min-height: calc(100vh - 80px);
  margin-top: 80px;
  display: flex;
  align-items: center;
  padding: 80px 5%;
  background: var(--primary-dark);
  overflow: hidden;
}

/* ================= HERO SLIDER ================= */
.hero-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-slider::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      rgba(15, 23, 42, 0.9) 0%,
      rgba(15, 23, 42, 0.7) 40%,
      rgba(15, 23, 42, 0.3) 100%);
  z-index: 2;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease-in-out, visibility 1s;
}

.slide.active {
  opacity: 1;
  visibility: visible;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  /* Prioritize the upper part of the image for elderly faces */
}

/* ================= HERO CONTENT ================= */
.hero-content {
  position: absolute;
  bottom: 4rem;
  left: 4%;
  z-index: 10;
  max-width: 600px;
  /* Reduced from 700px */
  color: var(--text-white);
}

.hero-content h2 {
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  /* Slightly smaller font */
  line-height: 1.25;
  margin-bottom: 0.8rem;
  letter-spacing: -0.01em;
  font-weight: 700;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hero-content p {
  font-size: clamp(0.9rem, 1.3vw, 1.1rem);
  /* Refined paragraph size */
  line-height: 1.6;
  opacity: 0.9;
  max-width: 480px;
  /* More compact paragraph */
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* ================= HERO CONTROLS ================= */
.hero-slider-controls {
  position: absolute;
  bottom: 2rem;
  right: 5%;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.hero-prev,
.hero-next {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-white);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: var(--transition);
}

.hero-prev:hover,
.hero-next:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.1);
}

/* ================= DOTS ================= */
.hero-dots {
  display: flex;
  gap: 10px;
}

.hero-dots .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.hero-dots .dot.active {
  width: 30px;
  border-radius: 10px;
  background: var(--accent);
}

/* ================= SECTIONS ================= */
section {
  padding: 120px 5% 100px;
}

section h3 {
  text-align: center;
  font-size: clamp(2rem, 4vw, 2.5rem);
  margin-bottom: 3rem;
  color: var(--primary);
  position: relative;
}

section h3::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--accent);
  border-radius: var(--radius-full);
}

/* ================= STATS ================= */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: -50px;
  position: relative;
  z-index: 20;
}

.stat-box {
  background: var(--bg-card);
  padding: 2.5rem 1.5rem;
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

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

.stat-box h4 {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.stat-box p {
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

/* ================= ABOUT ================= */
.about {
  max-width: 900px;
  margin: auto;
  text-align: left;
}

/* ================= SERVICES ================= */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--bg-card);
  padding: 2.5rem 1.5rem;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.service-icon {
  font-size: 2.5rem;
  background: rgba(30, 77, 43, 0.05);
  /* Semi-transparent primary */
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  margin: 0 auto;
  transition: var(--transition);
}

.service-card h4 {
  font-size: 1.25rem;
  color: var(--primary);
  margin: 0;
}

.service-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

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

.service-card:hover .service-icon {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.service-card:hover h4,
.service-card:hover p {
  color: var(--text-white);
}

/* ================= SPLIT SECTIONS ================= */
.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
}

.split-section.reverse {
  direction: rtl;
}

.split-section.reverse div {
  direction: ltr;
}

.split-left h3 {
  text-align: left;
}

.split-left p {
  margin-bottom: 1.5rem;
  text-align: justify;
}

.split-left p:last-child {
  margin-bottom: 0;
}

.split-left h3::after {
  left: 0;
  transform: none;
}

.split-right img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
}

/* ================= HELP ================= */
.help {
  background: var(--bg-card);
}

.help ul {
  max-width: 800px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.help li {
  background: var(--bg-body);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  text-align: center;
  font-weight: 600;
  color: var(--primary);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.help li:hover {
  background: var(--primary);
  color: var(--text-white);
  transform: translateY(-3px);
}

/* ================= DONATION ================= */
.donation {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--text-white);
  padding: 40px 4%;
}

.donation h3 {
  margin-bottom: 1.5rem;
}

.donation .split-section {
  align-items: center;
}

.donation .split-right {
  display: flex;
  justify-content: center;
}

.donation h3 {
  color: var(--text-white);
  text-align: left;
}

.donation h3::after {
  background: var(--text-white);
  left: 0;
  transform: none;
}

.donation p {
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
  opacity: 0.95;
  text-align: justify;
}

/* PAYMENT CONTAINER */
.payment-container {
  margin-top: 0.4rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.payment-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}

.payment-tab {
  background: transparent;
  border: none;
  color: var(--text-white);
  padding: 8px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  opacity: 0.6;
  transition: var(--transition);
  position: relative;
}

.payment-tab.active {
  opacity: 1;
  color: var(--accent);
}

.payment-tab.active::after {
  content: '';
  position: absolute;
  bottom: -11px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
}

.payment-content {
  display: none;
  padding: 10px 5px;
  animation: fadeIn 0.4s ease;
}

.payment-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.payment-content p:not(.upi-id-text) {
  font-size: 1rem;
  margin-bottom: 8px;
  text-align: left;
  opacity: 1;
}

.payment-content strong {
  color: var(--accent);
}

.qr-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
}

.qr-image {
  width: auto !important;
  max-width: 200px !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  border: 2px solid #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}

.upi-id-text {
  font-size: 1.1rem;
  color: var(--text-white);
  margin: 0 !important;
}

.download-qr {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--text-white);
  color: var(--primary);
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.9rem;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}

.download-qr:hover {
  background: var(--accent);
  color: var(--text-white);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.bank-details {
  padding: 0.2rem 0;
}

.bank-details p {
  margin-bottom: 6px;
  font-size: 0.95rem;
}

/* ================= CONTACT ================= */
.contact {
  background: var(--bg-body);
  padding: 40px 4%;
}

.contact h3 {
  text-align: left;
  margin-bottom: 1.5rem;
}

.contact h3::after {
  left: 0;
  transform: none;
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin: 0 auto;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-item i {
  font-size: 1.2rem;
  color: var(--primary);
  margin-top: 4px;
}

.contact-item p {
  font-size: 1.05rem;
  color: var(--text-main);
  line-height: 1.5;
}

.social-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  /* Aligns content (text & icons) to the left absolute to itself */
  justify-self: end;
  /* Pushes the entire block to the right side of the grid cell */
}

.social-links h4 {
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.social-icons {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.social-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-white);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.social-icon.facebook {
  background: #1877f2;
}

.social-icon.instagram {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}

.social-icon.whatsapp {
  background: #25d366;
}

.social-icon.youtube {
  background: #ff0000;
}

.social-icon:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  filter: brightness(1.1);
}

span.social-icon {
  cursor: default;
}

span.social-icon:hover {
  transform: none;
  filter: none;
  box-shadow: var(--shadow-sm);
}

/* ================= FOOTER ================= */
footer {
  background: var(--bg-footer);
  color: var(--text-white);
  padding: 1.2rem 5%;
  text-align: center;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ================= MOBILE MENU ================= */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  z-index: 1001;
}

.menu-toggle span {
  width: 30px;
  height: 3px;
  background: var(--primary);
  border-radius: 3px;
  transition: var(--transition);
}

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

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

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

/* ================= RESPONSIVE ================= */
@media (max-width: 991px) {
  section {
    padding: 80px 4%;
  }

  .split-section,
  .split-section.reverse,
  .contact-container {
    grid-template-columns: 1fr;
    gap: 3rem;
    direction: ltr;
  }

  .split-section.reverse div {
    direction: ltr;
  }

  header nav {
    gap: 0.8rem;
  }

  header nav a {
    font-size: 0.85rem;
  }

  header .brand h1 {
    font-size: 1.1rem;
  }

  .split-left,
  .split-right {
    text-align: center;
  }

  .split-left h3,
  .split-left p {
    text-align: center;
  }

  .split-left h3::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .about {
    text-align: center;
  }

  .donation h3,
  .contact h3 {
    text-align: center;
  }

  .donation h3::after,
  .contact h3::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .donation p {
    text-align: center;
  }

  .contact-info {
    align-items: center;
  }

  .social-links {
    align-items: center;
    justify-self: center;
  }

  .social-icons {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  section {
    padding: 60px 4%;
  }

  header {
    background: rgba(255, 255, 255, 0.98);
    /* More opaque background for visibility */
    box-shadow: var(--shadow-md);
  }

  h2 {
    font-size: 2.2rem;
  }

  h3 {
    font-size: 1.8rem;
  }

  .menu-toggle {
    display: flex;
  }

  header nav {
    position: fixed;
    top: 0;
    right: -300px;
    /* Use a fixed negative value to avoid horizontal push */
    width: 280px;
    height: 100vh;
    background: var(--bg-card);
    flex-direction: column;
    justify-content: center;
    padding: 3rem 2rem;
    transition: var(--transition);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
  }

  header nav.active {
    right: 0;
  }

  header nav a {
    display: block;
    font-size: 1rem;
    width: 100%;
    text-align: center;
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }

  header .donate-btn {
    margin-top: 1rem;
  }

  .hero {
    height: auto;
    aspect-ratio: 16 / 10;
    /* Better match for landscape hero photos */
    min-height: auto;
    margin-top: 70px;
    padding: 0;
    display: flex;
    align-items: flex-end;
    /* Move content to bottom to not block faces */
  }

  .slide img {
    object-fit: cover;
    object-position: center center;
  }

  .hero-slider::after {
    background: linear-gradient(to top,
        rgba(10, 31, 18, 0.9) 0%,
        rgba(10, 31, 18, 0.4) 100%);
  }

  .hero-content {
    position: absolute;
    bottom: 0.8rem;
    left: 4%;
    max-width: 75%;
    padding: 0;
    background: none;
    text-align: left;
    z-index: 10;
  }

  .hero-content h2 {
    font-size: 0.9rem;
    /* Ultra-small heading */
    margin-bottom: 0.15rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  }

  .hero-content p {
    font-size: 0.7rem;
    /* Ultra-small paragraph */
    line-height: 1.25;
    margin-bottom: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  }

  .hero-slider-controls {
    bottom: 0.8rem;
    width: auto;
    justify-content: flex-end;
    left: auto;
    right: 4%;
    transform: none;
  }

  .hero-dots {
    gap: 8px;
  }

  .hero-dots .dot {
    width: 8px;
    height: 8px;
  }

  .hero-dots .dot.active {
    width: 24px;
  }

  .hero-prev,
  .hero-next {
    display: none;
  }

  .stats {
    margin-top: -30px;
    gap: 1rem;
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-box {
    padding: 1.5rem 1rem;
  }

  .stat-box h4 {
    font-size: 1.8rem;
  }

  .payment-tabs {
    flex-wrap: wrap;
    justify-content: center;
  }

  .payment-tab {
    font-size: 0.85rem;
    padding: 6px 12px;
  }

  .qr-image {
    max-width: 160px !important;
  }
}

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

  header .brand h1 {
    font-size: 1.1rem;
  }

  .logo {
    width: 38px;
    height: 38px;
  }

  .hero {
    margin-top: 65px;
    padding-top: 0;
  }

  .hero-content h2 {
    font-size: 0.8rem;
    /* Absolute minimum size */
    margin-bottom: 0.1rem;
  }

  .hero-content p {
    font-size: 0.65rem;
    /* Absolute minimum size */
    line-height: 1.15;
  }
}