/* ============================================
   Jnananidhi Educational Trust - Main Stylesheet
   Aesthetic: Warm Heritage, Editorial Elegance
   Fonts: Cormorant Garamond + DM Sans
============================================ */

:root {
  --navy:    #1a3c5e;
  --gold:    #c8832a;
  --gold-lt: #e9a84a;
  --cream:   #faf7f2;
  --warm:    #f3ede3;
  --text:    #2c2c2c;
  --muted:   #6b6b6b;
  --border:  #e0d8cc;
  --white:   #ffffff;
  --radius:  6px;
  --shadow:  0 4px 24px rgba(26,60,94,.10);
  --transition: .28s cubic-bezier(.4,0,.2,1);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--navy); }

h1, h2, h3, h4, h5 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  line-height: 1.2;
  color: var(--navy);
}

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ── HEADER ── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 999;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,.08); }
.header-inner {
  display: flex; align-items: center;
  justify-content: space-between;
  height: 76px;
}
.site-logo img { height: 54px; width: auto; object-fit: contain; }
.logo-text { font-family: 'Cormorant Garamond', serif; font-size: 1.4rem; font-weight: 700; color: var(--navy); }

.main-nav ul { list-style: none; display: flex; align-items: center; gap: 6px; }
.main-nav a {
  display: block; padding: 8px 14px;
  font-size: .9rem; font-weight: 500; color: var(--text);
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}
.main-nav a:hover { color: var(--navy); background: var(--warm); }
.main-nav a.nav-cta {
  background: var(--gold); color: var(--white) !important;
  padding: 9px 20px; border-radius: 24px;
}
.main-nav a.nav-cta:hover { background: var(--navy); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); border-radius: 2px; transition: var(--transition); }

/* ── HERO SLIDER ── */
.hero-slider {
  margin-top: 76px;
  position: relative; overflow: hidden;
  background: var(--navy);
  min-height: 88vh;
  isolation: isolate;
}
.slide {
  display: none;
  position: relative;
  align-items: center;
  background: linear-gradient(135deg, var(--navy) 0%, #0e2840 100%);
  min-height: 88vh;
  width: 100%;
}
.slide.active {
  display: flex;
  animation: fadeSlide .6s ease;
}
@keyframes fadeSlide {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.slide-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: .22;
}
.slide-content {
  position: relative; z-index: 2;
  max-width: 680px; padding: 80px 24px 80px 60px;
}
.slide-label {
  display: inline-block;
  font-size: .78rem; font-weight: 600; letter-spacing: .15em; text-transform: uppercase;
  color: var(--gold-lt); margin-bottom: 20px;
  border-left: 3px solid var(--gold); padding-left: 12px;
}
.slide-content h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  color: var(--white); line-height: 1.15; margin-bottom: 20px;
}
.slide-content p { font-size: 1.1rem; color: rgba(255,255,255,.82); max-width: 520px; margin-bottom: 36px; }
.slide-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 28px; border-radius: 30px;
  font-size: .92rem; font-weight: 600; letter-spacing: .02em;
  transition: all var(--transition); cursor: pointer; border: 2px solid transparent;
}
.btn-primary { background: var(--gold); color: var(--white); }
.btn-primary:hover { background: var(--gold-lt); color: var(--white); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(200,131,42,.35); }
.btn-outline { background: transparent; border-color: rgba(255,255,255,.5); color: var(--white); }
.btn-outline:hover { background: rgba(255,255,255,.12); border-color: var(--white); color: var(--white); }
.btn-dark { background: var(--navy); color: var(--white); }
.btn-dark:hover { background: #0e2840; transform: translateY(-2px); }

.slider-dots {
  position: absolute; bottom: 30px; left: 60px; z-index: 10;
  display: flex; gap: 10px;
}
.slider-dots button {
  width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.5);
  background: transparent; cursor: pointer; transition: var(--transition);
  padding: 0;
}
.slider-dots button.active { background: var(--gold); border-color: var(--gold); transform: scale(1.3); }

.slider-nav {
  position: absolute; top: 50%; right: 40px; z-index: 10;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 12px;
}
.slider-nav button {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.1); color: var(--white);
  cursor: pointer; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.slider-nav button:hover { background: var(--gold); border-color: var(--gold); }

/* ── SECTIONS ── */
.section { padding: 90px 0; }
.section-alt { background: var(--cream); }
.section-dark { background: var(--navy); }

.section-header { text-align: center; margin-bottom: 60px; }
.section-label {
  display: inline-block; font-size: .78rem; font-weight: 600;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 12px;
}
.section-header h2 { font-size: clamp(2rem, 4vw, 3rem); }
.section-header p { font-size: 1.05rem; color: var(--muted); max-width: 580px; margin: 16px auto 0; }

/* ── ABOUT STRIP ── */
.about-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-image-wrap { position: relative; }
.about-image-wrap img { border-radius: 12px; box-shadow: var(--shadow); }
.about-badge {
  position: absolute; bottom: -20px; right: -20px;
  background: var(--gold); color: var(--white);
  border-radius: 8px; padding: 20px 24px; text-align: center;
  box-shadow: 0 8px 30px rgba(200,131,42,.4);
}
.about-badge .big { display: block; font-size: 2.5rem; font-family: 'Cormorant Garamond', serif; font-weight: 700; line-height: 1; }
.about-badge .sm  { display: block; font-size: .78rem; font-weight: 600; opacity: .9; }
.about-text .section-label { text-align: left; display: block; }
.about-text h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: 20px; }
.about-text p { color: var(--muted); margin-bottom: 16px; }

/* ── SERVICES ── */
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px; }
.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 36px 28px;
  transition: all var(--transition);
  position: relative; overflow: hidden;
}
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gold); transform: scaleX(0); transition: transform var(--transition);
}
.service-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); border-color: transparent; }
.service-card:hover::before { transform: scaleX(1); }
.service-icon { width: 54px; height: 54px; background: var(--warm); border-radius: 12px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.service-icon svg { width: 26px; height: 26px; stroke: var(--gold); fill: none; stroke-width: 1.8; }
.service-card h3 { font-size: 1.3rem; margin-bottom: 12px; }
.service-card p { color: var(--muted); font-size: .95rem; line-height: 1.65; }
.service-card a.read-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; font-size: .88rem; font-weight: 600; color: var(--gold); }
.service-card a.read-more:hover { gap: 10px; }

/* ── STATS ── */
.stats-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 0; }
.stat-item { text-align: center; padding: 50px 20px; background: rgba(255,255,255,.06); position: relative; z-index: 1; }
.stat-item:not(:last-child) { border-right: 1px solid rgba(255,255,255,.1); }
.stat-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3.5rem; font-weight: 700; color: #e9a84a; line-height: 1;
  display: block;
}
.stat-label { font-size: .88rem; color: rgba(255,255,255,.7); margin-top: 8px; letter-spacing: .05em; display: block; }

/* ── DONATE CTA ── */
.donate-cta {
  background: linear-gradient(135deg, #c8832a 0%, #a86520 100%);
  border-radius: 16px; padding: 60px 50px;
  display: flex; align-items: center; justify-content: space-between; gap: 30px;
}
.donate-cta h2 { font-size: 2.2rem; color: var(--white); max-width: 520px; }
.donate-cta p { color: rgba(255,255,255,.85); margin-top: 12px; }
.donate-cta .btn { background: var(--white); color: var(--gold); flex-shrink: 0; font-size: 1rem; padding: 15px 36px; }
.donate-cta .btn:hover { background: var(--navy); color: var(--white); }

/* ── POSTS / BLOG ── */
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px; }
.post-card {
  background: var(--white); border-radius: 10px;
  border: 1px solid var(--border); overflow: hidden;
  transition: all var(--transition);
}
.post-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); border-color: transparent; }
.post-card .thumb { overflow: hidden; aspect-ratio: 16/9; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.post-card:hover .thumb img { transform: scale(1.06); }
.post-card .card-body { padding: 24px; }
.post-meta { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.post-cat {
  font-size: .73rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold); background: var(--warm); padding: 3px 10px; border-radius: 20px;
}
.post-date { font-size: .82rem; color: var(--muted); }
.post-card h3 { font-size: 1.2rem; line-height: 1.3; margin-bottom: 10px; }
.post-card h3 a { color: var(--navy); }
.post-card h3 a:hover { color: var(--gold); }
.post-card p { font-size: .92rem; color: var(--muted); line-height: 1.6; }

/* ── EVENTS ── */
.events-list { display: flex; flex-direction: column; gap: 20px; }
.event-item {
  display: grid; grid-template-columns: 100px 1fr;
  gap: 0; border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; background: var(--white);
  transition: all var(--transition);
}
.event-item:hover { box-shadow: var(--shadow); border-color: var(--gold); }
.event-date-box {
  background: var(--navy); color: var(--white);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px 10px; text-align: center;
}
.event-date-box .day { font-size: 2.2rem; font-family: 'Cormorant Garamond',serif; font-weight: 700; line-height: 1; }
.event-date-box .month { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; opacity: .8; }
.event-info { padding: 20px 24px; }
.event-info h3 { font-size: 1.2rem; margin-bottom: 8px; }
.event-info p { font-size: .9rem; color: var(--muted); }
.event-meta { display: flex; gap: 16px; margin-top: 10px; flex-wrap: wrap; }
.event-meta span { font-size: .82rem; color: var(--muted); display: flex; align-items: center; gap: 5px; }

/* ── GALLERY ── */
.gallery-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 36px; justify-content: center; }
.filter-btn {
  padding: 8px 20px; border-radius: 24px; border: 1.5px solid var(--border);
  font-size: .88rem; font-weight: 500; background: transparent; cursor: pointer;
  transition: all var(--transition);
}
.filter-btn.active, .filter-btn:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.gallery-item { position: relative; overflow: hidden; border-radius: 8px; aspect-ratio: 4/3; cursor: pointer; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-overlay {
  position: absolute; inset: 0;
  background: rgba(26,60,94,.6);
  display: flex; align-items: flex-end;
  padding: 16px; opacity: 0; transition: opacity var(--transition);
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay span { color: var(--white); font-size: .9rem; font-weight: 500; }

/* ── TESTIMONIALS ── */
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }
.testimonial-card {
  background: var(--white); border-radius: 10px;
  padding: 34px 28px; border: 1px solid var(--border);
  position: relative;
}
.testimonial-card::before {
  content: '\201C';
  font-family: 'Cormorant Garamond', serif;
  font-size: 5rem; color: var(--gold); opacity: .25;
  position: absolute; top: 10px; right: 20px; line-height: 1;
}
.testimonial-card p { color: var(--muted); font-style: italic; line-height: 1.7; margin-bottom: 20px; }
.testimonial-author strong { display: block; color: var(--navy); font-weight: 600; }
.testimonial-author span { font-size: .84rem; color: var(--muted); }

/* ── FAQ ── */
.faq-list { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
  background: var(--white);
}
.faq-question {
  width: 100%; text-align: left; padding: 20px 24px;
  font-size: 1rem; font-weight: 600; color: var(--navy);
  background: none; border: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-question span.icon { font-size: 1.4rem; transition: transform var(--transition); flex-shrink: 0; color: var(--gold); }
.faq-item.open .faq-question span.icon { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .4s ease, padding .3s; }
.faq-answer p { padding: 0 24px 20px; color: var(--muted); line-height: 1.7; }
.faq-item.open .faq-answer { max-height: 400px; }

/* ── CONTACT ── */
.contact-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 60px; }
.contact-info h3 { font-size: 1.6rem; margin-bottom: 24px; }
.contact-info-item { display: flex; gap: 14px; margin-bottom: 24px; }
.contact-info-item svg { width: 20px; height: 20px; stroke: var(--gold); flex-shrink: 0; margin-top: 3px; }
.contact-info-item p { font-size: .95rem; color: var(--muted); }
.contact-form .form-group { margin-bottom: 20px; }
.contact-form label { display: block; font-size: .88rem; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif; font-size: .95rem; color: var(--text);
  background: var(--white); transition: border-color var(--transition);
  outline: none;
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--gold); }
.contact-form textarea { resize: vertical; min-height: 130px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── PAGE HERO ── */
.page-hero {
  margin-top: 76px; background: linear-gradient(135deg, var(--navy) 0%, #0e2840 100%);
  padding: 70px 0; text-align: center;
}
.page-hero h1 { color: var(--white); font-size: clamp(2rem, 5vw, 3.5rem); }
.page-hero p { color: rgba(255,255,255,.75); margin-top: 12px; font-size: 1.05rem; }
.breadcrumb { display: flex; justify-content: center; gap: 8px; margin-top: 16px; font-size: .85rem; }
.breadcrumb a { color: var(--gold-lt); }
.breadcrumb span { color: rgba(255,255,255,.5); }

/* ── ARTICLE CONTENT ── */
.post-content { max-width: 760px; margin: 0 auto; }
.post-content h2, .post-content h3 { color: var(--navy); margin: 32px 0 12px; }
.post-content p { color: var(--muted); margin-bottom: 18px; line-height: 1.8; }
.post-content ul, .post-content ol { margin: 12px 0 18px 24px; color: var(--muted); line-height: 1.8; }

/* ── ALERT ── */
.alert {
  padding: 14px 18px; border-radius: var(--radius); margin-bottom: 18px;
  font-size: .92rem; font-weight: 500;
}
.alert-success { background: #e8f5e9; color: #2e7d32; border-left: 4px solid #4caf50; }
.alert-error   { background: #ffebee; color: #c62828; border-left: 4px solid #ef5350; }

/* ── PAGINATION ── */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 50px; flex-wrap: wrap; }
.pagination a, .pagination span {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--radius);
  font-size: .9rem; border: 1.5px solid var(--border);
  color: var(--text); transition: all var(--transition);
}
.pagination a:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }
.pagination .current { background: var(--gold); color: var(--white); border-color: var(--gold); }

/* ── LIGHTBOX ── */
.lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.93); display: none;
  align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: 4px; box-shadow: 0 0 60px rgba(0,0,0,.5); }
.lightbox-close {
  position: absolute; top: 20px; right: 28px;
  color: var(--white); font-size: 2.2rem; background: none; border: none; cursor: pointer;
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  color: var(--white); font-size: 2rem; background: rgba(255,255,255,.1);
  border: none; cursor: pointer; padding: 16px 20px; border-radius: var(--radius);
  transition: background var(--transition);
}
.lightbox-nav:hover { background: var(--gold); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* ── FOOTER ── */
.site-footer { background: var(--navy); color: rgba(255,255,255,.8); margin-top: auto; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 50px; padding: 70px 0 50px; }
.footer-logo { height: 60px; margin-bottom: 18px; filter: brightness(0) invert(1); opacity: .9; }
.footer-about p { font-size: .92rem; line-height: 1.7; color: rgba(255,255,255,.65); max-width: 300px; }
.footer-social { display: flex; gap: 12px; margin-top: 20px; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.7); transition: all var(--transition);
}
.footer-social a:hover { background: var(--gold); border-color: var(--gold); color: var(--white); }
.footer-col h4 { font-family: 'Cormorant Garamond',serif; font-size: 1.2rem; color: var(--white); margin-bottom: 18px; font-weight: 600; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a { font-size: .9rem; color: rgba(255,255,255,.6); transition: color var(--transition); }
.footer-col ul a:hover { color: var(--gold-lt); }
.footer-contact li { display: flex; gap: 10px; margin-bottom: 12px; font-size: .9rem; color: rgba(255,255,255,.65); align-items: flex-start; }
.footer-contact svg { flex-shrink: 0; stroke: var(--gold); fill: none; stroke-width: 2; margin-top: 2px; }
.footer-contact a { color: rgba(255,255,255,.65); }
.footer-contact a:hover { color: var(--gold-lt); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 20px 0; text-align: center;
  font-size: .84rem; color: rgba(255,255,255,.45);
  display: flex; flex-direction: column; gap: 4px;
}

/* ── UTILITY ── */
.text-center { text-align: center; }
.mt-4 { margin-top: 40px; }
.mb-4 { margin-bottom: 40px; }
.no-content { text-align: center; color: var(--muted); padding: 60px 20px; font-size: 1.1rem; }
.placeholder-img {
  background: linear-gradient(135deg, var(--warm) 0%, var(--border) 100%);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: .85rem;
  aspect-ratio: 16/9; border-radius: 8px;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .about-strip, .contact-grid { grid-template-columns: 1fr; }
  .about-badge { bottom: 10px; right: 10px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
  .donate-cta { flex-direction: column; text-align: center; }
  .stats-row { grid-template-columns: repeat(2,1fr); }
  .stat-item:not(:last-child) { border-right: none; border-bottom: 1px solid rgba(255,255,255,.1); }
  .slide-content { padding: 60px 24px; }
}

@media (max-width: 640px) {
  .main-nav { display: none; position: absolute; top: 76px; left: 0; right: 0;
    background: var(--white); border-top: 1px solid var(--border);
    padding: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.08); z-index: 999; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav li a { padding: 12px 16px; border-radius: 6px; }
  .nav-toggle { display: flex; }
  .form-row { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .slider-nav { display: none; }
  .slider-dots { left: 24px; }
  .section { padding: 60px 0; }
  .event-item { grid-template-columns: 80px 1fr; }
}
