/*
Theme Name: Malliyam Charitable Foundation
Theme URI: https://malliyamfoundation.org
Author: Malliyam Charitable Foundation
Description: Official WordPress theme for Malliyam Charitable Foundation — a non-profit committed to rural community welfare.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: malliyam
*/

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Lato:wght@300;400;700&display=swap');

/* ===================== CSS VARIABLES ===================== */
:root {
  --background:    hsl(39, 70%, 95%);
  --foreground:    hsl(27, 100%, 12%);
  --card:          hsl(39, 60%, 92%);
  --primary:       hsl(38, 70%, 47%);
  --primary-fg:    hsl(27, 100%, 5%);
  --secondary:     hsl(27, 100%, 8%);
  --secondary-fg:  hsl(39, 60%, 90%);
  --muted:         hsl(39, 40%, 88%);
  --muted-fg:      hsl(27, 40%, 35%);
  --border:        hsl(38, 50%, 80%);
  --gold:          hsl(38, 70%, 47%);
  --gold-light:    hsl(40, 78%, 60%);
  --radius:        0.375rem;
}

/* ===================== RESET & BASE ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Lato', sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Cinzel', serif;
  line-height: 1.2;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ===================== UTILITIES ===================== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-tag {
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 1rem;
}

.section-line {
  width: 4rem;
  height: 2px;
  background-color: var(--primary);
  margin-bottom: 1.5rem;
}

.section-line.mx-auto { margin-left: auto; margin-right: auto; }

.section-desc {
  color: var(--muted-fg);
  line-height: 1.7;
  max-width: 42rem;
}

/* Center section-desc when inside centered sections */
.initiatives .section-desc,
.gallery-preview .section-desc,
.testimonials .section-desc,
.timeline-section .section-desc,
.section-desc.mx-auto {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.btn-primary {
  display: inline-block;
  background-color: var(--primary);
  color: var(--primary-fg);
  padding: 0.75rem 2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.875rem;
  border-radius: 2px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
  font-family: 'Lato', sans-serif;
}
.btn-primary:hover { background-color: var(--gold-light); }

.btn-outline {
  display: inline-block;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 0.75rem 2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.875rem;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-outline:hover { background-color: var(--primary); color: var(--primary-fg); }

/* ===================== ANIMATIONS ===================== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

.slide-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.slide-left.visible { opacity: 1; transform: translateX(0); }

.slide-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.slide-right.visible { opacity: 1; transform: translateX(0); }

.scale-in {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.scale-in.visible { opacity: 1; transform: scale(1); }

/* stagger delays */
.stagger-1 { transition-delay: 0.05s; }
.stagger-2 { transition-delay: 0.1s; }
.stagger-3 { transition-delay: 0.15s; }
.stagger-4 { transition-delay: 0.2s; }
.stagger-5 { transition-delay: 0.25s; }
.stagger-6 { transition-delay: 0.3s; }

/* ===================== NAVBAR ===================== */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  background-color: rgba(27, 8, 2, 0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(184, 134, 50, 0.3);
}

/* Push nav down when WordPress admin bar is visible */
.admin-bar .site-nav {
  top: 32px;
}
@media screen and (max-width: 782px) {
  .admin-bar .site-nav {
    top: 46px;
  }
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 5rem;
}

.nav-brand { display: flex; align-items: center; gap: 0.75rem; }

.nav-logo {
  width: 3rem; height: 3rem;
  border-radius: 50%;
  border: 2px solid rgba(184, 134, 50, 0.5);
  background-color: rgba(255,255,255,0.05);
  display: flex; align-items: center; justify-content: center;
}
.nav-logo span {
  font-family: 'Cinzel', serif;
  color: var(--gold-light);
  font-size: 1.1rem;
  font-weight: 700;
}

.nav-brand-text { display: flex; flex-direction: column; }
.nav-brand-name {
  font-family: 'Cinzel', serif;
  color: var(--gold-light);
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}
.nav-brand-sub {
  font-size: 0.65rem;
  color: rgba(230,210,180,0.45);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

.nav-links a {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(230,210,180,0.8);
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold-light); }

.nav-cta {
  background: linear-gradient(135deg, var(--gold-light) 0%, hsl(32, 75%, 40%) 100%);
  color: hsl(27, 100%, 8%) !important;
  padding: 0.55rem 1.4rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  box-shadow: 0 2px 14px rgba(184, 134, 50, 0.5), inset 0 1px 0 rgba(255,255,255,0.18);
  border: 1px solid rgba(255, 210, 100, 0.35);
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease !important;
}
.nav-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.18) 0%, transparent 60%);
  opacity: 1;
  pointer-events: none;
}
.nav-cta:hover {
  background: linear-gradient(135deg, hsl(43, 92%, 68%) 0%, var(--gold-light) 100%) !important;
  color: hsl(27, 100%, 5%) !important;
  box-shadow: 0 4px 22px rgba(184, 134, 50, 0.7), inset 0 1px 0 rgba(255,255,255,0.25) !important;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gold-light);
  padding: 0.5rem;
}

.nav-mobile {
  display: none;
  background-color: rgba(27,8,2,0.98);
  border-top: 1px solid rgba(184,134,50,0.2);
  padding: 1rem 2rem;
  flex-direction: column;
  gap: 0.75rem;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(184,134,50,0.1);
  color: rgba(230,210,180,0.8);
}
.nav-mobile a:hover { color: var(--gold-light); }

/* ===================== HERO ===================== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  text-align: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
}
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(27, 8, 2, 0.7);
}

.hero-content {
  position: relative;
  z-index: 10;
  width: 100%;
}

.hero-tag {
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  display: block;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.1s forwards;
}

.hero-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 700;
  color: hsl(39, 60%, 90%);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.3s forwards;
}
.hero-title .gold { color: var(--gold-light); }

.hero-desc {
  color: rgba(230,210,180,0.7);
  max-width: 42rem;
  margin: 0 auto 2rem;
  font-size: 1.1rem;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.5s forwards;
}

.hero-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.7s forwards;
}

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

/* ===================== STATS BAR ===================== */
.stats-bar {
  background-color: var(--secondary);
  border-top: 1px solid rgba(184,134,50,0.2);
  border-bottom: 1px solid rgba(184,134,50,0.2);
  padding: 2rem 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  text-align: center;
}
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-num {
  font-family: 'Cinzel', serif;
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--gold-light);
}
.stat-label {
  color: rgba(230,210,180,0.5);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.25rem;
}

/* ===================== ABOUT PREVIEW ===================== */
.about-preview { padding: 5rem 0; background-color: var(--background); }

.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 1024px) { .two-col { grid-template-columns: 1fr 1fr; } }

.about-img-wrap {
  position: relative;
  border-radius: 0.75rem;
  overflow: hidden;
  aspect-ratio: 4/3;
}
.about-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.about-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(27,8,2,0.6), transparent);
}
.about-img-badge {
  position: absolute;
  bottom: 1.5rem; left: 1.5rem; right: 1.5rem;
  background-color: rgba(27,8,2,0.8);
  backdrop-filter: blur(4px);
  border-radius: 0.5rem;
  padding: 1rem;
  border: 1px solid rgba(184,134,50,0.2);
}
.about-img-badge p:first-child { color: var(--gold-light); font-family: 'Cinzel',serif; font-weight: 700; }
.about-img-badge p:last-child { color: rgba(230,210,180,0.6); font-size: 0.875rem; }

.tags { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2rem; }
.tag {
  background-color: var(--card);
  border: 1px solid var(--border);
  color: var(--foreground);
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
}

.learn-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  font-weight: 600;
  transition: color 0.2s;
}
.learn-more:hover { color: var(--gold-light); }

/* ===================== INITIATIVES ===================== */
.initiatives { padding: 5rem 0; background-color: var(--background); }
.initiatives .container { text-align: center; }

.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  text-align: left;
}
@media (min-width: 768px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cards-grid { grid-template-columns: repeat(3, 1fr); } }

.init-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 2rem;
  transition: all 0.3s;
  height: 100%;
}
.init-card:hover { box-shadow: 0 10px 30px rgba(0,0,0,0.1); transform: translateY(-4px); }
.init-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.init-card h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.75rem;
  transition: color 0.2s;
}
.init-card:hover h3 { color: var(--primary); }
.init-card p { color: var(--muted-fg); font-size: 0.875rem; line-height: 1.7; }

/* ===================== TIMELINE ===================== */
.timeline-section { padding: 5rem 0; background-color: var(--secondary); }
.timeline-section .section-title { color: hsl(39, 60%, 90%); }
.timeline-section .section-desc { color: rgba(230,210,180,0.6); max-width: 42rem; text-align: center; margin-left: auto; margin-right: auto; }

.timeline-wrap {
  position: relative;
  max-width: 48rem;
  margin: 0 auto;
}
.timeline-line {
  position: absolute;
  left: 1rem;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, rgba(184,134,50,0.5) 10%, rgba(184,134,50,0.5) 90%, transparent);
}
@media (min-width: 768px) { .timeline-line { left: 50%; transform: translateX(-50%); } }

.timeline-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  /* Smart scroll animation — items slide in from their respective side */
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
@media (min-width: 768px) {
  .timeline-item:nth-child(even) {
    flex-direction: row-reverse;
    transform: translateX(30px);
  }
}
.timeline-item.tl-visible {
  opacity: 1;
  transform: translateX(0) !important;
}

.timeline-dot {
  position: absolute;
  left: 1rem;
  width: 1rem; height: 1rem;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold-light) 0%, var(--primary) 100%);
  border: 2px solid var(--secondary);
  box-shadow: 0 0 0 3px rgba(184, 134, 50, 0.25);
  transform: translateX(-50%) scale(0);
  margin-top: 0.4rem;
  z-index: 5;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s, box-shadow 0.3s ease;
}
@media (min-width: 768px) { .timeline-dot { left: 50%; } }
.timeline-item.tl-visible .timeline-dot {
  transform: translateX(-50%) scale(1);
}
.timeline-item.tl-visible .timeline-dot:hover {
  box-shadow: 0 0 0 6px rgba(184, 134, 50, 0.2);
}

.timeline-content {
  margin-left: 3rem;
  padding-bottom: 0.5rem;
}
@media (min-width: 768px) {
  .timeline-item:nth-child(odd) .timeline-content  { margin-left: 0; padding-right: 2rem; width: calc(50% - 1rem); text-align: right; }
  .timeline-item:nth-child(even) .timeline-content { margin-left: auto; padding-left: 2rem; width: calc(50% - 1rem); text-align: left; }
}

.timeline-year { color: var(--primary); font-weight: 600; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.1em; }
.timeline-title { font-family: 'Cinzel', serif; font-size: 1rem; font-weight: 700; color: hsl(39, 60%, 90%); margin: 0.25rem 0 0.5rem; }
.timeline-desc { color: rgba(230,210,180,0.6); font-size: 0.875rem; line-height: 1.7; }

/* ===================== PURPOSE ===================== */
.purpose-section { padding: 5rem 0; background-color: var(--background); text-align: center; }

.purpose-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 3rem;
}
@media (min-width: 768px) { .purpose-grid { grid-template-columns: repeat(3, 1fr); } }

.purpose-card {
  text-align: left;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background-color: var(--card);
  height: 100%;
}
.purpose-num {
  font-family: 'Cinzel', serif;
  font-size: 3rem;
  font-weight: 700;
  color: rgba(184,134,50,0.2);
  margin-bottom: 1rem;
}
.purpose-card p { color: var(--muted-fg); line-height: 1.7; }

/* ===================== GALLERY PREVIEW ===================== */
.gallery-preview { padding: 5rem 0; background-color: var(--card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.gallery-preview .container { text-align: center; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
  text-align: left;
}
@media (min-width: 768px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
  aspect-ratio: 4/3;
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.1); }
.gallery-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(27,8,2,0);
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-item:hover .gallery-overlay { background-color: rgba(27,8,2,0.6); }
.gallery-overlay span {
  font-family: 'Cinzel', serif;
  color: var(--gold-light);
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.875rem;
  text-align: center;
  padding: 0.5rem;
}
.gallery-item:hover .gallery-overlay span { opacity: 1; }

/* ===================== TESTIMONIALS ===================== */
.testimonials { padding: 5rem 0; background-color: var(--secondary); }
.testimonials .container { text-align: center; }

.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 64rem;
  margin: 0 auto;
  text-align: left;
}
@media (min-width: 768px) { .testimonials-grid { grid-template-columns: repeat(3, 1fr); } }

.testimonial-card {
  border: 1px solid rgba(184,134,50,0.2);
  border-radius: 0.75rem;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.testimonial-quote-icon { color: var(--primary); font-size: 2rem; margin-bottom: 1rem; line-height: 1; }
.testimonial-text { color: rgba(230,210,180,0.7); font-size: 0.875rem; line-height: 1.7; font-style: italic; flex: 1; }
.testimonial-author { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid rgba(184,134,50,0.1); }
.testimonial-name { font-family: 'Cinzel', serif; color: var(--gold-light); font-weight: 700; font-size: 0.875rem; }
.testimonial-role { color: rgba(230,210,180,0.5); font-size: 0.75rem; }

/* ===================== IMPACT ===================== */
.impact { padding: 5rem 0; background-color: var(--background); }
.impact .container { text-align: center; }

.impact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  max-width: 56rem;
  margin: 0 auto;
}
@media (min-width: 1024px) { .impact-grid { grid-template-columns: repeat(4, 1fr); } }

.impact-card {
  text-align: center;
  padding: 1.5rem;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
}
.impact-icon { font-size: 2rem; margin-bottom: 0.75rem; color: var(--primary); }
.impact-num { font-family: 'Cinzel', serif; font-size: 1.875rem; font-weight: 700; color: var(--foreground); margin-bottom: 0.25rem; }
.impact-label { color: var(--muted-fg); font-size: 0.875rem; }

/* ===================== DONATE CTA ===================== */
.donate-cta { padding: 5rem 0; background-color: var(--card); border-top: 1px solid var(--border); }
.donate-cta .container { max-width: 48rem; text-align: center; }
.donate-box { background-color: var(--background); border: 1px solid var(--border); border-radius: 0.75rem; padding: 3rem; }
@media (min-width: 768px) { .donate-box { padding: 3.5rem; } }

.donate-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  text-align: left;
  margin-bottom: 2.5rem;
}
@media (min-width: 576px) { .donate-features { grid-template-columns: repeat(2, 1fr); } }

.donate-feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-fg);
}
.donate-feature .check { color: var(--primary); font-weight: 700; }

.tax-badge {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: var(--muted-fg);
  background-color: var(--muted);
  padding: 0.5rem 1rem;
  border-radius: 999px;
}

/* ===================== FOOTER ===================== */
.site-footer { background-color: var(--secondary); color: hsl(39, 60%, 90%); }

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding: 4rem 0;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }

.footer-title { font-family: 'Cinzel', serif; color: var(--gold-light); font-size: 1.25rem; margin-bottom: 1rem; }
.footer-text { color: rgba(230,210,180,0.55); font-size: 0.875rem; line-height: 1.7; }

.footer-heading { color: var(--gold-light); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.875rem; margin-bottom: 1rem; }
.footer-links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a { color: rgba(230,210,180,0.55); font-size: 0.875rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--gold-light); }

.footer-bottom {
  border-top: 1px solid rgba(184,134,50,0.15);
  padding: 1.25rem 0;
}
.footer-bottom-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
@media (min-width: 768px) { .footer-bottom-inner { flex-direction: row; justify-content: space-between; } }
.footer-copy { color: rgba(230,210,180,0.4); font-size: 0.75rem; }
.footer-badge { color: var(--primary); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; }

/* ===================== PAGE HERO ===================== */
.page-hero {
  background-color: var(--secondary);
  padding: 8rem 0 4rem;
  text-align: center;
}
.page-hero-with-bg {
  position: relative;
  height: 50vh;
  min-height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.page-hero-with-bg .hero-bg img { width: 100%; height: 100%; object-fit: cover; }

.page-hero-tag { color: var(--primary); text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.875rem; margin-bottom: 0.75rem; display: block; }
.page-hero-title { font-family: 'Cinzel', serif; font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; color: hsl(39,60%,90%); }
.page-hero-desc { color: rgba(230,210,180,0.6); max-width: 36rem; margin: 1rem auto 0; }

/* ===================== ABOUT PAGE ===================== */
.about-content { padding: 5rem 0; background-color: var(--background); }

.founder-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 2rem;
}
@media (min-width: 1024px) { .founder-card { padding: 2.5rem; } }

.founder-avatar {
  width: 4rem; height: 4rem;
  border-radius: 50%;
  background-color: rgba(184,134,50,0.1);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.5rem;
}
.founder-avatar span { font-family: 'Cinzel',serif; color: var(--primary); font-size: 1.5rem; font-weight: 700; }
.founder-name { font-family: 'Cinzel',serif; font-size: 1.25rem; font-weight: 700; color: var(--foreground); margin-bottom: 0.25rem; }
.founder-role { color: var(--primary); font-size: 0.875rem; margin-bottom: 1rem; }
.founder-bio { color: var(--muted-fg); line-height: 1.7; }

.values-list { display: flex; flex-direction: column; gap: 0.75rem; }
.value-item { display: flex; align-items: center; gap: 0.75rem; }
.value-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background-color: var(--primary); flex-shrink: 0; }
.value-item span { color: var(--foreground); font-weight: 500; }

.mission-vision { padding: 5rem 0; background-color: var(--secondary); }
.mission-vision .section-title { color: hsl(39,60%,90%); }
.mv-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; max-width: 56rem; margin: 0 auto; }
@media (min-width: 768px) { .mv-grid { grid-template-columns: repeat(2, 1fr); } }
.mv-card { border: 1px solid rgba(184,134,50,0.2); border-radius: 0.5rem; padding: 2rem; height: 100%; }
.mv-card h3 { font-family: 'Cinzel',serif; color: var(--gold-light); font-size: 1.1rem; margin-bottom: 1rem; }
.mv-card p { color: rgba(230,210,180,0.7); line-height: 1.7; }

/* ===================== GALLERY PAGE ===================== */
.gallery-page { padding: 5rem 0; background-color: var(--background); }

.gallery-full-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) { .gallery-full-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .gallery-full-grid { grid-template-columns: repeat(3, 1fr); } }

.gallery-full-item {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  aspect-ratio: 4/3;
}
.gallery-full-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery-full-item:hover img { transform: scale(1.1); }

.gallery-full-overlay {
  position: absolute;
  inset: 0;
  background: rgba(27,8,2,0);
  display: flex;
  align-items: flex-end;
  transition: all 0.3s;
}
.gallery-full-item:hover .gallery-full-overlay { background: rgba(27,8,2,0.7); }

.gallery-caption {
  padding: 1.5rem;
  transform: translateY(100%);
  transition: transform 0.3s;
}
.gallery-full-item:hover .gallery-caption { transform: translateY(0); }
.gallery-caption h3 { font-family: 'Cinzel',serif; color: var(--gold-light); font-size: 1.1rem; margin-bottom: 0.25rem; }
.gallery-caption p { color: rgba(230,210,180,0.7); font-size: 0.875rem; }

/* ===================== CONTACT PAGE ===================== */
.contact-section { padding: 5rem 0; background-color: var(--background); }

.contact-form-title { font-family: 'Cinzel',serif; font-size: 1.5rem; font-weight: 700; color: var(--foreground); margin-bottom: 1.5rem; }

.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.875rem; font-weight: 500; color: var(--foreground); margin-bottom: 0.5rem; }
.form-input, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background-color: var(--card);
  color: var(--foreground);
  font-family: 'Lato', sans-serif;
  font-size: 1rem;
  outline: none;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.form-input:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(184,134,50,0.15);
}
.form-textarea { resize: none; }

.contact-info-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 2rem;
  margin-bottom: 2rem;
}
.contact-info-card h3 { font-family: 'Cinzel',serif; font-size: 1.25rem; font-weight: 700; color: var(--foreground); margin-bottom: 1.5rem; }

.contact-info-items { display: flex; flex-direction: column; gap: 1.25rem; }
.contact-info-item { display: flex; align-items: flex-start; gap: 1rem; }
.contact-info-icon { color: var(--primary); flex-shrink: 0; margin-top: 0.1rem; font-size: 1.25rem; }
.contact-info-label { font-weight: 500; color: var(--foreground); margin-bottom: 0.25rem; }
.contact-info-value { color: var(--muted-fg); font-size: 0.875rem; }

.donate-info-box {
  background-color: var(--secondary);
  border: 1px solid rgba(184,134,50,0.2);
  border-radius: 0.75rem;
  padding: 2rem;
  text-align: center;
}
.donate-info-box h3 { font-family: 'Cinzel',serif; color: var(--gold-light); font-size: 1.25rem; margin-bottom: 0.75rem; }
.donate-info-box p { color: rgba(230,210,180,0.6); font-size: 0.875rem; line-height: 1.7; margin-bottom: 1rem; }
.donate-badge-inline { display: inline-block; font-size: 0.75rem; color: var(--primary); background-color: rgba(184,134,50,0.1); padding: 0.5rem 1rem; border-radius: 999px; font-weight: 600; }

/* ===================== SUCCESS MESSAGE ===================== */
.form-success {
  display: none;
  background-color: hsl(120, 50%, 95%);
  border: 1px solid hsl(120, 50%, 70%);
  border-radius: 0.5rem;
  padding: 1rem;
  color: hsl(120, 50%, 25%);
  margin-top: 1rem;
  font-weight: 500;
}
.form-success.show { display: block; }

/* ===================== CONTENT TOP PADDING ===================== */
/* site-content has NO padding — navbar overlays content, hero fills full viewport */
.site-content { padding-top: 0; }

/* Inner pages: page-hero and page-hero-with-bg clear the 80px fixed navbar */
.page-hero {
  background-color: var(--secondary);
  padding-top: 8rem;   /* 5rem navbar height + 3rem breathing room */
  padding-bottom: 4rem;
  text-align: center;
}
.page-hero-with-bg {
  position: relative;
  height: 50vh;
  min-height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
/* The text content inside page-hero-with-bg needs to clear the navbar */
.page-hero-with-bg .page-hero-content {
  padding-top: 5rem;
}

/* ===================== RESPONSIVE NAV ===================== */
@media (max-width: 767px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
}
@media (min-width: 768px) {
  .nav-mobile { display: none !important; }
}

/* ===================== ADMIN BAR + NAV FIXES ===================== */
.admin-bar .site-nav { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar .site-nav { top: 46px; }
}
/* When admin bar is visible, bump inner page heroes down a bit more */
.admin-bar .page-hero { padding-top: calc(8rem + 32px); }
@media screen and (max-width: 782px) {
  .admin-bar .page-hero { padding-top: calc(8rem + 46px); }
}
.admin-bar .page-hero-with-bg .page-hero-content { padding-top: calc(5rem + 32px); }

.site-nav { z-index: 9999; }

/* ===================== LOGO IMAGE ===================== */
.nav-logo-img {
  height: 3rem;        /* adjust height as needed */
  width: auto;
  display: block;
  object-fit: contain;
}

/* ===================== FOOTER CREDIT & TERMS ===================== */
.footer-credit {
  color: var(--gold-light);
  font-weight: 600;
  transition: color 0.2s;
}
.footer-credit:hover { color: var(--primary); }

.footer-terms {
  color: rgba(230,210,180,0.5);
  font-size: 0.75rem;
  transition: color 0.2s;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-terms:hover { color: var(--gold-light); }

/* ============================================================
   PREMIUM UPGRADES
   ============================================================ */

/* 1 — Page fade-in */
html { opacity: 0; transition: opacity 0.5s ease; }
html.page-loaded { opacity: 1; }

/* 2 — Navbar scroll shrink + shadow */
.site-nav {
  transition: height 0.35s ease, box-shadow 0.35s ease, background-color 0.35s ease, padding 0.35s ease;
}
.site-nav .nav-inner { transition: height 0.35s ease; }
.site-nav.scrolled {
  background-color: rgba(20, 6, 1, 0.99) !important;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(184, 134, 50, 0.25);
}
.site-nav.scrolled .nav-inner { height: 3.75rem; }

/* 3 — Gold animated underline on nav links */
.nav-links a {
  position: relative;
  padding-bottom: 2px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--gold-light);
  transition: width 0.3s ease;
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links .nav-cta::after { display: none; }

/* 4 — Hero parallax: keep img contained */
.hero .hero-bg { overflow: hidden; }
.hero .hero-bg img {
  will-change: transform;
  transition: none;
}

/* 5 — Floating particles: ensure z-index above particles */
.hero-content,
.timeline-section .container,
.testimonials .container,
.stats-bar .container { position: relative; z-index: 2; }

/* 6 — Gold top border + warm glow on card hover */
.init-card {
  border-top: 3px solid transparent;
  transition: all 0.3s ease;
}
.init-card:hover {
  border-top-color: var(--gold-light);
  box-shadow: 0 8px 32px rgba(184, 134, 50, 0.12), 0 2px 8px rgba(0,0,0,0.08);
  transform: translateY(-5px);
}

.testimonial-card {
  transition: all 0.3s ease;
  border-top: 3px solid transparent;
}
.testimonial-card:hover {
  border-top-color: var(--gold-light);
  box-shadow: 0 8px 28px rgba(184, 134, 50, 0.1);
  transform: translateY(-4px);
}

/* 7 — Gold gradient footer top border */
.site-footer {
  position: relative;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--gold) 25%,
    var(--gold-light) 50%,
    var(--gold) 75%,
    transparent 100%
  );
}

/* 8 — Back to top button */
#backToTop {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-fg);
  border: 2px solid rgba(184, 134, 50, 0.4);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
  pointer-events: none;
}
#backToTop.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#backToTop:hover {
  background: var(--gold-light);
  box-shadow: 0 4px 20px rgba(184, 134, 50, 0.4);
}

/* Gold section-line animated draw-in */
.section-line {
  width: 0;
  transition: width 0.8s ease 0.2s;
}
.section-line.visible-line { width: 4rem; }


/* ===================== MOBILE & TABLET RESPONSIVENESS ===================== */

/* ── Mobile (max 480px) ── */
@media (max-width: 480px) {
  .container { padding: 0 1rem; }

  /* Nav */
  .nav-inner { height: 4rem; }
  .nav-brand-name { font-size: 0.75rem; }
  .nav-brand-sub { display: none; }
  .nav-logo { width: 2.5rem; height: 2.5rem; }
  .nav-cta { padding: 0.45rem 1rem; font-size: 0.7rem; }

  /* Hero */
  .hero { min-height: 100svh; }
  .hero-title { font-size: clamp(1.6rem, 8vw, 2.5rem); }
  .hero-desc { font-size: 0.95rem; padding: 0 0.5rem; }
  .hero-btns { flex-direction: column; align-items: center; gap: 0.75rem; }
  .hero-btns .btn-primary, .hero-btns .btn-outline { width: 100%; max-width: 280px; text-align: center; }

  /* Stats */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .stat-num { font-size: 1.5rem; }

  /* About */
  .about-preview { padding: 3rem 0; }
  .two-col { gap: 2rem; }
  .about-img-wrap { aspect-ratio: 3/2; }

  /* Initiatives */
  .initiatives { padding: 3rem 0; }
  .cards-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .init-card { padding: 1.5rem; }

  /* Timeline */
  .timeline-section { padding: 3rem 0; }
  .timeline-wrap { padding-left: 0.5rem; }
  .timeline-content { margin-left: 2.5rem; }

  /* Purpose */
  .purpose-section { padding: 3rem 0; }
  .purpose-grid { gap: 1.25rem; }
  .purpose-card { padding: 1.5rem; }
  .purpose-num { font-size: 2.25rem; }

  /* Gallery */
  .gallery-preview { padding: 3rem 0; }
  .gallery-grid { grid-template-columns: 1fr; gap: 0.75rem; }

  /* Testimonials */
  .testimonials { padding: 3rem 0; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .testimonial-card { padding: 1.5rem; }

  /* Impact */
  .impact { padding: 3rem 0; }
  .impact-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .impact-num { font-size: 1.5rem; }

  /* Donate CTA */
  .donate-cta { padding: 3rem 0; }
  .donate-box { padding: 2rem 1.5rem; }
  .donate-features { grid-template-columns: 1fr; }
  .section-title { font-size: clamp(1.4rem, 5vw, 2rem); }
}

/* ── Tablet (481px – 768px) ── */
@media (min-width: 481px) and (max-width: 768px) {
  .container { padding: 0 1.5rem; }

  /* Hero */
  .hero-title { font-size: clamp(1.8rem, 6vw, 3rem); }
  .hero-btns { gap: 0.875rem; }

  /* Stats */
  .stats-grid { grid-template-columns: repeat(4, 1fr); }

  /* Initiatives */
  .cards-grid { grid-template-columns: repeat(2, 1fr); }

  /* Gallery */
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }

  /* Timeline */
  .timeline-line { left: 1.25rem; }
  .timeline-dot { left: 1.25rem; }
  .timeline-content { margin-left: 3rem; }

  /* Impact */
  .impact-grid { grid-template-columns: repeat(2, 1fr); }

  /* Testimonials */
  .testimonials-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }

  /* Donate */
  .donate-box { padding: 2.5rem 2rem; }
}

/* ── Tablet landscape & small desktop (769px – 1023px) ── */
@media (min-width: 769px) and (max-width: 1023px) {
  .two-col { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-img-wrap { max-width: 560px; margin: 0 auto; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .impact-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Global: section text alignment fixes for mobile ── */
@media (max-width: 767px) {
  .section-tag { text-align: center; }
  .section-title { text-align: center; }
  .section-line { margin-left: auto; margin-right: auto; }

  /* Timeline header */
  .timeline-section .fade-up { text-align: center; }

  /* Purpose: numbers readable on small screens */
  .purpose-card { text-align: center; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .footer-links { align-items: center; }
  .footer-bottom-inner { text-align: center; }

  /* Nav mobile tweak */
  .nav-mobile a { padding: 0.75rem 0; }
}
