/* ==========================================================================
   Variables & Theme Setup (Indian NGO Theme)
   ========================================================================== */
:root {
  /* Colors */
  --primary: #FF6B00;         /* Saffron/Orange - Energy, Sacrifice, Action */
  --primary-hover: #E65A00;
  --secondary: #FFF6E5;       /* Light cream - Purity, Peace, Background */
  --text-dark: #222222;
  --text-light: #666666;
  --white: #FFFFFF;
  --bg-light: #F9F9F9;
  --border-color: #E2E8F0;

  /* Typography */
  --font-main: 'Inter', sans-serif;
  
  /* Shadows & Layout */
  --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);
  --radius-md: 8px;
  --radius-lg: 16px;
  --max-width: 1200px;
  --transition: all 0.3s ease;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: var(--font-main);
  color: var(--text-dark);
  line-height: 1.6;
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--white);
}

body {
  overflow-x: hidden;
}

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

ul {
  list-style: none;
}

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography Base */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; margin-bottom: 1.5rem; text-align: center;}
h3 { font-size: 1.5rem; }
p { margin-bottom: 1rem; color: var(--text-light); }

.text-center { text-align: center; }
.section-subtitle { 
  display: block;
  text-align: center;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   Components
   ========================================================================== */
/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 50px; /* pill shape for modern feel */
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  text-align: center;
  transition: var(--transition);
  font-family: var(--font-main);
  font-size: 1rem;
}

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

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

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

.btn-white {
  background-color: var(--white);
  color: var(--primary);
}
.btn-white:hover {
  background-color: var(--secondary);
  transform: translateY(-2px);
}

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  transition: var(--transition);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

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

.card-img-top {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card-img-top {
  transform: scale(1.05);
}

.card-body {
  padding: 1.5rem;
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section-bg {
  background-color: var(--secondary);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--white);
  z-index: 1000;
  transition: var(--transition);
  padding: 15px 0;
}

.header.scrolled {
  box-shadow: var(--shadow-md);
  padding: 10px 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo span {
  color: var(--text-dark);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-weight: 500;
  color: var(--text-dark);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

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

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-dark);
  cursor: pointer;
}

/* ==========================================================================
   Home Page specific
   ========================================================================== */
/* Hero Section */
.hero {
  height: 100vh;
  min-height: 600px;
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://images.unsplash.com/photo-1488521787991-ed7bbaae773c?q=80&w=2070&auto=format&fit=crop') center/cover no-repeat;
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--white);
  padding-top: 80px; /* Offset for header */
}

.hero h1 {
  color: var(--white);
  font-size: 3.5rem;
  margin-bottom: 20px;
  animation: fadeUp 1s ease 0.2s backwards;
}

.hero p {
  color: #eeeeee;
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto 30px;
  animation: fadeUp 1s ease 0.4s backwards;
}

.hero .btn-group {
  animation: fadeUp 1s ease 0.6s backwards;
  display: flex;
  gap: 15px;
  justify-content: center;
}

/* Stats Section */
.stats {
  margin-top: -50px;
  position: relative;
  z-index: 10;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.stat-card {
  background: var(--white);
  padding: 30px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  text-align: center;
  border-bottom: 4px solid var(--primary);
}
.stat-card h3 {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 5px;
}
.stat-card p {
  color: var(--text-dark);
  font-weight: 500;
  margin: 0;
}

/* Programs Preview Grid */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.program-card {
  padding: 0;
}

/* Testimonials Slider (CSS Base) */
.testimonial-slider {
  position: relative;
  max-width: 800px;
  margin: 40px auto 0;
  overflow: hidden;
  text-align: center;
}
.testimonial-slide {
  display: none;
  padding: 20px;
  animation: fadeIn 0.5s ease;
}
.testimonial-slide.active {
  display: block;
}
.test-text {
  font-size: 1.2rem;
  font-style: italic;
  margin-bottom: 20px;
  color: var(--text-dark);
}
.test-author {
  font-weight: 700;
  color: var(--primary);
}
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #ccc;
  cursor: pointer;
  transition: var(--transition);
}
.dot.active {
  background-color: var(--primary);
}

/* CTA Section */
.cta-section {
  background-color: var(--primary);
  color: var(--white);
  text-align: center;
  padding: 80px 0;
}
.cta-section h2, .cta-section p {
  color: var(--white);
}

/* ==========================================================================
   Other Pages (About, Programs, Donate, Contact)
   ========================================================================== */
/* Page Header */
.page-header {
  padding: 120px 0 60px;
  background-color: var(--secondary);
  text-align: center;
}
.page-header h1 {
  margin-bottom: 10px;
  color: var(--primary);
}

/* About / Team Grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}
.team-member {
  text-align: center;
}
.team-member img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 20px;
  border: 4px solid var(--secondary);
  transition: var(--transition);
}
.team-member:hover img {
  border-color: var(--primary);
}

/* Donate UI */
.donate-box {
  max-width: 600px;
  margin: 0 auto;
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.amount-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 25px;
}
.amount-btn {
  background: var(--bg-light);
  border: 2px solid var(--border-color);
  color: var(--text-dark);
}
.amount-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}
.custom-amount {
  width: 100%;
  padding: 15px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 1rem;
  margin-bottom: 25px;
  transition: var(--transition);
}
.custom-amount:focus {
  outline: none;
  border-color: var(--primary);
}
.trust-badges {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Contact UI */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}
.contact-info {
  background: var(--secondary);
  padding: 40px;
  border-radius: var(--radius-lg);
}
.info-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 25px;
}
.info-icon {
  color: var(--primary);
  font-size: 1.5rem;
}
.contact-form .form-group {
  margin-bottom: 20px;
}
.form-control {
  width: 100%;
  padding: 15px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 1rem;
  background: var(--bg-light);
  transition: var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
}
textarea.form-control {
  min-height: 150px;
  resize: vertical;
}
.map-container {
  margin-top: 50px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 400px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background-color: var(--text-dark);
  color: var(--white);
  padding: 60px 0 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}
.footer h3 {
  color: var(--white);
  margin-bottom: 20px;
  font-size: 1.2rem;
}
.footer p {
  color: #aaa;
}
.footer-links li {
  margin-bottom: 10px;
}
.footer-links a {
  color: #aaa;
}
.footer-links a:hover {
  color: var(--primary);
  padding-left: 5px;
}
.social-icons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}
.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: var(--white);
  transition: var(--transition);
}
.social-icons a:hover {
  background: var(--primary);
  transform: translateY(-3px);
}
.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: #aaa;
  font-size: 0.9rem;
}

/* ==========================================================================
   Animations & Utility
   ========================================================================== */
.fade-in-element {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in-element.visible {
  opacity: 1;
  transform: translateY(0);
}

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

/* ==========================================================================
   Dropdown Navigation
   ========================================================================== */
.dropdown {
  position: relative;
}
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--white);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-md);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  padding: 10px 0;
}
.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-menu a::after {
  display: none; /* remove hover line */
}
.dropdown-menu a {
  padding: 10px 20px;
  color: var(--text-dark);
  font-weight: 500;
  width: 100%;
  display: block;
}
.dropdown-menu a:hover, .dropdown-menu a.active {
  background-color: var(--bg-light);
  color: var(--primary);
}

/* ==========================================================================
   Content Pages (Legal, Info)
   ========================================================================== */
.content-section {
  max-width: 800px;
  margin: 0 auto;
}
.content-section h2 {
  text-align: left;
  margin-top: 40px;
  margin-bottom: 20px;
}
.content-section p, .content-section ul {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 20px;
}
.content-section ul {
  padding-left: 20px;
  list-style-type: disc;
}

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
}
.faq-item {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 15px;
  overflow: hidden;
}
.faq-question {
  width: 100%;
  text-align: left;
  padding: 20px;
  background: none;
  border: none;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-main);
  transition: var(--transition);
}
.faq-question:hover {
  color: var(--primary);
}
.faq-question svg {
  transition: transform 0.3s ease;
}
.faq-item.active .faq-question svg {
  transform: rotate(180deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: var(--bg-light);
}
.faq-item.active .faq-answer {
  max-height: 500px; /* arbitrary max height for animation */
}
.faq-answer-inner {
  padding: 20px;
  color: var(--text-light);
  border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   Gallery Grid
   ========================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  height: 300px;
}
.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-item:hover .gallery-img {
  transform: scale(1.1);
}

/* ==========================================================================
   Blog/News Feed
   ========================================================================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}
.blog-card .card-body {
  padding: 1.5rem;
}
.blog-date {
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 10px;
  display: block;
}

/* ==========================================================================
   Partners Grid
   ========================================================================== */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  align-items: center;
}
.partner-logo {
  filter: grayscale(100%);
  opacity: 0.6;
  transition: var(--transition);
  max-height: 80px;
  margin: 0 auto;
}
.partner-logo:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* ==========================================================================
   Dark Mode & Header Controls
   ========================================================================== */
[data-theme="dark"] {
  --white: #1A202C;
  --bg-light: #2D3748;
  --text-dark: #F7FAFC;
  --text-light: #A0AEC0;
  --border-color: #4A5568;
  --secondary: #2D3748;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-left: 20px;
}
#theme-toggle {
  background: none;
  border: none;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sun-icon { display: none; }
.moon-icon { display: block; }

[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }

/* Google Translate Widget Overrides */
.goog-te-gadget-simple {
  background-color: var(--white) !important;
  border: 1px solid var(--border-color) !important;
  padding: 5px !important;
  border-radius: var(--radius-md) !important;
  font-family: var(--font-main) !important;
}
.goog-te-gadget-simple span {
  color: var(--text-dark) !important;
}

/* ==========================================================================
   Payment Modal Mock UI
   ========================================================================== */
.payment-modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.payment-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.payment-modal {
  background: var(--white);
  width: 100%;
  max-width: 450px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
}
.payment-modal-overlay.active .payment-modal {
  transform: translateY(0);
}
.payment-header {
  background: var(--primary);
  color: white;
  padding: 20px;
  text-align: center;
  position: relative;
}
.payment-body {
  padding: 30px;
}
.mock-input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  margin-bottom: 15px;
  background: var(--bg-light);
  color: var(--text-dark);
  outline: none;
}
.close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

/* ==========================================================================
   Custom Language Dropdown UI
   ========================================================================== */
.custom-language-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 6px 12px;
    background-color: var(--white);
    color: var(--text-dark);
}
.custom-language-selector svg {
    margin-right: 8px;
    color: var(--primary);
}
#lang-switcher {
    border: none;
    background: transparent;
    color: var(--text-dark);
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
}
#lang-switcher option {
    color: #222;
}

/* Hide Native Google Translate Bar entirely */
.skiptranslate iframe,
.goog-te-banner-frame.skiptranslate {
    display: none !important;
}
body {
    top: 0px !important;
}

/* ==========================================================================
   Responsive Media Queries
   ========================================================================== */
@media (max-width: 992px) {
  .hero h1 { font-size: 2.8rem; }
  .stats-grid { grid-template-columns: 1fr; margin-top: 30px;}
  .stats { margin-top: 0; padding-top: 40px;}
  .contact-wrapper { grid-template-columns: 1fr; gap: 30px;}
}

@media (max-width: 768px) {
  .mobile-menu-overlay {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background: rgba(0,0,0,0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  .mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: auto;
    max-height: 0;
    background-color: var(--bg-light, var(--white));
    flex-direction: column;
    align-items: flex-start;
    padding: 0 25px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    z-index: 999;
    overflow: hidden;
    opacity: 0;
  }
  .nav-links.active {
    max-height: 85vh;
    padding: 20px 25px;
    opacity: 1;
    overflow-y: auto;
  }
  .nav-links > a, .nav-links .dropdown {
    width: 100%;
    border-bottom: 1px solid var(--border-color);
  }
  .nav-links > a, .nav-links .dropdown > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 15px 0;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-dark);
  }
  .nav-links .dropdown > a svg {
    transition: transform 0.3s ease;
  }
  .nav-links .dropdown.open > a svg {
    transform: rotate(180deg);
  }
  .nav-links .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--primary);
    margin: 0 0 10px 10px;
    padding: 5px 0 5px 15px;
    border-radius: 0;
    transform: none;
    display: none;
    flex-direction: column;
    gap: 12px;
  }
  .nav-links .dropdown.open .dropdown-menu {
    display: flex;
  }
  .nav-links .custom-language-selector {
    margin-top: 30px;
    width: 100%;
    justify-content: center;
    padding: 10px;
    border: 1px solid var(--border-color);
    background: var(--white);
  }
  .mobile-menu-btn {
    display: block;
  }
  .hero h1 { font-size: 2.2rem; }
  .section { padding: 3rem 0; }
  .amount-options { grid-template-columns: 1fr; }
}
