/*
Theme Name: Vaarahi Charitable Trust
Theme URI: https://vaarahi.org
Author: AVM Creations
Description: Modern, elegant charity theme inspired by premium NGO designs. Fully editable via Customizer. Home, About, Gallery, Videos, Contact, Donate.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: vaarahi-charity
Tags: charity, nonprofit, custom-logo, custom-menu, featured-images, theme-options, one-column, two-columns
*/

/* ========== CSS Variables ========== */
:root {
  --primary: #1a7a4c;
  --primary-dark: #0f5c38;
  --accent: #e8a317;
  --accent-hover: #d4920f;
  --bg-soft: #f8f5f0;
  --bg-cream: #faf7f2;
  --text: #1a1a1a;
  --text-muted: #5a5a5a;
  --white: #ffffff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 40px rgba(0,0,0,0.08);
  --shadow-sm: 0 4px 16px rgba(0,0,0,0.06);
  --logo-size: 52px;
  --font: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-cream);
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: 0.25s ease; }
ul { list-style: none; }

/* ========== Header ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
}
.custom-logo-link img,
.site-logo {
  height: var(--logo-size);
  width: auto;
  object-fit: contain;
}
.site-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.3px;
}
.site-description { display: none; }

.main-navigation ul {
  display: flex;
  align-items: center;
  gap: 8px;
}
.main-navigation a {
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--text);
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a {
  color: var(--primary);
  background: rgba(26,122,76,0.08);
}
.header-cta .btn {
  padding: 10px 22px;
  font-size: 0.92rem;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary);
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: 0.25s ease;
}
.btn-primary {
  background: var(--primary);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(26,122,76,0.3);
}
.btn-accent {
  background: var(--accent);
  color: #1a1a1a;
}
.btn-accent:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}
.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}
.btn-white {
  background: var(--white);
  color: var(--primary);
}
.btn-white:hover {
  background: var(--bg-soft);
}

/* ========== Hero Split ========== */
.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 560px;
  background: var(--bg-cream);
}
.hero-content-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 48px 60px 8%;
}
.hero-label {
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}
.hero-content-side h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 18px;
  color: var(--text);
  letter-spacing: -1px;
}
.hero-content-side p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  max-width: 440px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.hero-link {
  font-weight: 600;
  color: var(--primary);
  font-size: 0.95rem;
}
.hero-link:hover { text-decoration: underline; }

.hero-image-side {
  position: relative;
  overflow: hidden;
  background: var(--primary);
}
.hero-image-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 560px;
}
.hero-image-side .hero-badge {
  position: absolute;
  bottom: 28px;
  left: 28px;
  background: var(--white);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  max-width: 240px;
}
.hero-badge h4 {
  font-size: 0.95rem;
  margin-bottom: 4px;
  color: var(--text);
}
.hero-badge p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
}

/* ========== Stats Bar ========== */
.stats-bar {
  background: var(--primary);
  color: var(--white);
  padding: 28px 24px;
}
.stats-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  text-align: center;
}
.stat-item h3 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.stat-item p {
  font-size: 0.88rem;
  opacity: 0.9;
  margin: 0;
}

/* ========== Sections ========== */
.section {
  padding: 80px 28px;
}
.section-inner {
  max-width: 1140px;
  margin: 0 auto;
}
.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}
.section-header p {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* ========== Cards Grid ========== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: 0.3s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}
.card-img {
  aspect-ratio: 16/10;
  overflow: hidden;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.card:hover .card-img img {
  transform: scale(1.05);
}
.card-body {
  padding: 22px;
}
.card-body h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--text);
}
.card-body p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

/* ========== Gallery ========== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-sm);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.gallery-item:hover img {
  transform: scale(1.08);
}
.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
}

/* ========== Impact / Features ========== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}
.feature-card {
  background: var(--white);
  padding: 28px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.feature-icon {
  width: 56px;
  height: 56px;
  background: rgba(26,122,76,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.5rem;
  color: var(--primary);
}
.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* ========== Page Content ========== */
.page-hero {
  background: var(--primary);
  color: var(--white);
  padding: 70px 28px;
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 8px;
}
.page-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 50px 28px;
}
.page-content h1, .page-content h2 {
  color: var(--primary);
  margin-bottom: 16px;
}
.page-content p {
  margin-bottom: 16px;
  color: var(--text-muted);
}

/* ========== Donate Box ========== */
.donate-section {
  background: var(--bg-soft);
  padding: 70px 28px;
}
.donate-box {
  max-width: 520px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
  box-shadow: var(--shadow);
  border-top: 5px solid var(--primary);
}
.donate-box h2 {
  color: var(--primary);
  margin-bottom: 12px;
  font-size: 1.6rem;
}
.donate-box p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ========== Contact Form ========== */
.contact-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.9rem;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid #e0e0e0;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--white);
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,122,76,0.12);
}
.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

/* ========== Footer ========== */
.site-footer {
  background: #0d3d28;
  color: #c8d9d0;
  padding: 56px 28px 20px;
}
.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 36px;
}
.footer-brand h3 {
  color: var(--white);
  font-size: 1.2rem;
  margin-bottom: 12px;
}
.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 16px;
}
.footer-widget h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 16px;
}
.footer-widget a,
.footer-widget p {
  display: block;
  font-size: 0.9rem;
  color: #a8c4b5;
  margin-bottom: 8px;
  line-height: 1.5;
}
.footer-widget a:hover {
  color: var(--accent);
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 18px;
  text-align: center;
  font-size: 0.85rem;
  color: #7a9a88;
}

/* ========== Responsive ========== */
@media (max-width: 980px) {
  .hero-split {
    grid-template-columns: 1fr;
  }
  .hero-image-side img {
    min-height: 320px;
  }
  .hero-content-side {
    padding: 48px 28px;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
  .stats-inner {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .main-navigation {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: var(--shadow);
    display: none;
    padding: 12px;
  }
  .main-navigation.active { display: block; }
  .main-navigation ul {
    flex-direction: column;
    align-items: stretch;
  }
  .header-cta { display: none; }
  .footer-inner {
    grid-template-columns: 1fr;
  }
}
