/*
Theme Name: Satsang Trust
Theme URI: https://gpsuitesai.com
Author: GPSuites AI
Author URI: https://gpsuitesai.com
Description: Custom dark/gold theme for Satsang Trust (Sri Sri Thakur Anukul Chandra), built for Elementor page editing and ACF-driven custom content.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: satsang-trust
*/

:root {
  --color-primary: #FFFFFF;
  --color-secondary: #edc99e;
  --color-secondary-light: #f0d4b0;
  --color-secondary-dark: #dda86f;
  --color-bg: #101010;
  --color-bg-alt: #1a1a1a;
  --color-bg-darker: #0a0a0a;
  --color-border: #404040;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;
  --font-display: "Recoleta", Georgia, "Times New Roman", serif;
  --gradient-warm: linear-gradient(91.18deg, #edc99e 0%, #dda86f 100%);
}

* { box-sizing: border-box; }

html, body {
  overflow-x: hidden;
  max-width: 100%;
  scroll-padding-top: 100px;
}

body {
  background: var(--color-bg);
  color: #fff;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  margin: 0;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;
  font-style: normal;
  margin: 0 0 0.5em;
}

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

/* When an image is cropped to fill a fixed-height box (object-fit:cover),
   anchor the crop to the top so faces/heads in portrait photos never get
   cut off -- crop from the bottom instead. */
img { object-position: top; }

.wrapper,
.container-custom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.wrapper { max-width: 1800px; }

.gradient-heading {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 500;
  text-align: center;
  width: 100%;
  background: var(--gradient-warm);
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding: 4.5rem 0 2.5rem;
  display: block;
}

.gradient-heading.align-left { text-align: left; padding-left: 0; }

.glass-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  box-shadow: 0 20px 40px rgba(0,0,0,.3);
  border-radius: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.8rem;
  border: 1px solid transparent;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 0.75rem;
  transition: all .2s ease;
  cursor: pointer;
}

.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--gradient-warm);
  color: var(--color-bg);
}
.btn-primary:hover { opacity: .9; color: var(--color-bg); }

.btn-secondary,
.btn-outline {
  background: transparent;
  border: 1px solid var(--color-border);
  color: #fff;
}
.btn-secondary:hover,
.btn-outline:hover { background: rgba(255,255,255,.05); color: #fff; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 999;
  background: rgba(16,16,16,.9);
  backdrop-filter: blur(6px);
  transition: all .3s ease;
  padding: 1rem 0;
}
.site-header.scrolled {
  background: #101010;
  box-shadow: 0 10px 25px rgba(0,0,0,.35);
  padding: .5rem 0;
}
.site-header .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-branding {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.site-branding img { height: 40px; width: auto; object-fit: contain; }
.site-branding span {
  font-size: 1.25rem;
  font-weight: 300;
  text-transform: uppercase;
  color: #fff;
  font-family: var(--font-sans);
}

.primary-menu { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.primary-menu li { position: relative; }
.primary-menu li a {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .5rem .75rem;
  font-size: .875rem;
  font-weight: 500;
  border-radius: .5rem;
  color: rgba(255,255,255,.8);
  transition: all .2s ease;
}
.primary-menu li > a:hover,
.primary-menu li.current-menu-item > a {
  color: var(--color-secondary);
  background: rgba(255,255,255,.1);
}

/* Dropdown caret for items with children */
.primary-menu li.menu-item-has-children > a::after {
  content: '';
  width: 6px; height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-top: -3px;
  opacity: .6;
}

.primary-menu .sub-menu {
  list-style: none;
  margin: 0;
  padding: .5rem;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background: #101010;
  border: 1px solid var(--color-border);
  border-radius: .85rem;
  box-shadow: 0 20px 40px rgba(0,0,0,.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all .18s ease;
  z-index: 100;
}

.primary-menu li.menu-item-has-children:hover > .sub-menu,
.primary-menu li.menu-item-has-children:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Submenu links rest fully transparent. Only the one item actually
   under the pointer/keyboard focus -- or the genuinely current page,
   if it happens to be a submenu link -- ever highlights. Never the
   whole list at once. */
.primary-menu .sub-menu li a {
  display: block;
  padding: .6rem .85rem;
  font-size: .85rem;
  white-space: nowrap;
  border-radius: .5rem;
  background: transparent;
  color: rgba(255,255,255,.8);
}

.primary-menu .sub-menu li > a:hover,
.primary-menu .sub-menu li > a:focus {
  background: rgba(255,255,255,.1);
  color: var(--color-secondary);
}

.primary-menu .sub-menu li.current-menu-item > a {
  background: rgba(255,255,255,.1);
  color: var(--color-secondary);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  padding: .5rem;
  cursor: pointer;
}

.mobile-menu-panel {
  position: fixed;
  top: 0; right: 0;
  height: 100%;
  width: 280px;
  background: #101010;
  border-left: 1px solid var(--color-border);
  z-index: 1000;
  box-shadow: -10px 0 30px rgba(0,0,0,.4);
  transform: translateX(100%);
  transition: transform .2s ease;
  overflow-y: auto;
}
.mobile-menu-panel.open { transform: translateX(0); }
.mobile-menu-panel .panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem; border-bottom: 1px solid var(--color-border);
}
.mobile-menu-panel ul { list-style: none; margin: 0; padding: 1.5rem; display: flex; flex-direction: column; gap: .5rem; }
.mobile-menu-panel ul a {
  display: block; padding: .75rem 1rem; border-radius: .5rem;
  color: rgba(255,255,255,.8); font-weight: 500;
}
.mobile-menu-panel ul a:hover,
.mobile-menu-panel ul li.current-menu-item > a { color: var(--color-secondary); background: rgba(255,255,255,.1); }

.mobile-menu-panel .sub-menu {
  list-style: none;
  margin: .25rem 0 .5rem 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  border-left: 2px solid var(--color-border);
  padding-left: .75rem;
}
.mobile-menu-panel .sub-menu a { font-size: .875rem; padding: .5rem .75rem; color: rgba(255,255,255,.6); }

@media (max-width: 1023px) {
  .primary-menu { display: none; }
  .menu-toggle { display: inline-flex; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-bg-darker);
  color: #fff;
  padding: 5rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }

.footer-grid h4 {
  font-family: var(--font-sans);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--color-secondary);
  margin-bottom: 1.5rem;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .75rem; }
.footer-grid ul a { color: rgba(255,255,255,.7); font-size: .875rem; }
.footer-grid ul a:hover { color: var(--color-secondary); }

.footer-brand { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.5rem; }
.footer-brand img { height: 48px; width: auto; }
.footer-brand span { font-size: 1.5rem; font-weight: 300; text-transform: uppercase; color: var(--color-secondary); }
.footer-desc { color: rgba(255,255,255,.7); font-size: .875rem; line-height: 1.7; margin-bottom: 1.5rem; }
.footer-social { display: flex; gap: 1rem; }
.footer-social a {
  width: 40px; height: 40px; border-radius: 999px;
  background: rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  transition: all .3s ease;
}
.footer-social a:hover { background: var(--color-secondary); color: var(--color-secondary-dark); }

.footer-contact li { display: flex; align-items: flex-start; gap: .75rem; color: rgba(255,255,255,.7); font-size: .875rem; }
.footer-contact svg { flex-shrink: 0; margin-top: .15rem; color: var(--color-secondary); }

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 1rem;
  color: rgba(255,255,255,.5); font-size: .75rem; text-align: center;
}
@media (min-width: 768px) { .footer-bottom { flex-direction: row; text-align: left; } }
.footer-bottom a:hover { color: var(--color-secondary); }

/* ---------- Generic content sections (used by page templates) ---------- */
.section { padding: 6rem 0; }
.section-alt { background: var(--color-bg-darker); }
.eyebrow {
  color: var(--color-secondary);
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  font-size: .85rem;
  display: block;
  margin-bottom: 1rem;
}
.card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 1.5rem;
  padding: 2.5rem;
}
.icon-box {
  width: 5rem; height: 5rem;
  background: rgba(255,255,255,.05);
  border-radius: 1rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.5rem;
  transition: all .3s ease;
}
.card:hover .icon-box,
.icon-box:hover {
  background: var(--gradient-warm);
  color: var(--color-bg);
}
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 4rem; align-items: center; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 768px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.wp-block-button__link, .elementor-button { font-family: var(--font-sans); }

/* Elementor editor readability */
.elementor-widget-heading .elementor-heading-title { font-family: var(--font-display); }

/* Contact form (matches custom PHP handler) */
.contact-form-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 768px) { .contact-form-grid { grid-template-columns: 1fr 1fr; } }
.form-field { display: flex; flex-direction: column; gap: .5rem; }
.form-field label { font-size: .75rem; font-weight: 700; color: rgba(255,255,255,.4); text-transform: uppercase; letter-spacing: .1em; }
.form-field input, .form-field textarea {
  width: 100%; padding: 1rem 1.25rem; border-radius: .75rem;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: #fff; font-family: var(--font-sans);
}
.form-field input:focus, .form-field textarea:focus {
  outline: none; border-color: var(--color-secondary);
  box-shadow: 0 0 0 4px rgba(237,201,158,.1);
}
.form-message { padding: 1rem; border-radius: .75rem; font-size: .875rem; font-weight: 700; margin-bottom: 1.5rem; }
.form-message.success { color: #4ade80; background: rgba(74,222,128,.1); border: 1px solid rgba(74,222,128,.2); }
.form-message.error { color: #f87171; background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.2); }
.honeypot-field { position: absolute; left: -9999px; }

/* ---------- Timeline (Sri Sri Thakur page) ---------- */
.timeline { position: relative; max-width: 1000px; margin: 0 auto; }
.timeline::before {
  content: '';
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 2px;
  background: var(--color-border);
  transform: translateX(-50%);
}
.timeline-item { position: relative; width: 50%; padding: 0 3rem 3rem; box-sizing: border-box; }
.timeline-left { left: 0; text-align: right; }
.timeline-right { left: 50%; text-align: left; }
.timeline-dot {
  position: absolute; top: 4px;
  width: 16px; height: 16px; border-radius: 999px;
  background: var(--gradient-warm);
  box-shadow: 0 0 0 4px var(--color-bg), 0 0 0 5px var(--color-border);
}
.timeline-left .timeline-dot { right: -8px; }
.timeline-right .timeline-dot { left: -8px; }
.timeline-text p { margin: 0; }
.timeline-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 1.25rem;
  padding: 1.5rem;
  text-align: left;
  display: inline-block;
  width: 100%;
}

@media (max-width: 767px) {
  .timeline::before { left: 20px; }
  .timeline-item, .timeline-left, .timeline-right {
    width: 100%; left: 0; padding-left: 3rem; padding-right: 0; text-align: left;
  }
  .timeline-left .timeline-dot, .timeline-right .timeline-dot { left: 12px; right: auto; }
}

/* ---------- Filter pills (Gallery / Publications / Activities) ---------- */
.filter-pills { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-bottom: 3rem; }
.filter-pill {
  padding: .5rem 1.25rem; font-size: .85rem; border-radius: .75rem;
  border: 1px solid var(--color-border); background: transparent; color: #fff;
  cursor: pointer; transition: all .2s ease; font-family: inherit;
}
.filter-pill:hover { background: rgba(255,255,255,.05); }
.filter-pill.active {
  background: var(--gradient-warm); color: var(--color-bg); border-color: transparent; font-weight: 700;
}
.filterable-item { transition: opacity .2s ease; }
.filterable-item[hidden] { display: none; }

/* ---------- Lightbox ---------- */
.lightbox-trigger { cursor: zoom-in; }
.lightbox-overlay {
  position: fixed; inset: 0; background: rgba(10,10,10,.95);
  display: none; align-items: center; justify-content: center; flex-direction: column;
  z-index: 2000; padding: 2rem;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img { max-width: min(90vw, 1000px); max-height: 78vh; border-radius: .75rem; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.lightbox-overlay p { color: rgba(255,255,255,.7); margin-top: 1rem; font-size: .95rem; }
.lightbox-close {
  position: absolute; top: 1.5rem; right: 2rem;
  background: none; border: none; color: #fff; font-size: 2.5rem; line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { color: var(--color-secondary); }

/* ---------- Devotional ornamentation ---------- */
.ornament-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .85rem;
  margin: 0 auto 1.75rem;
  color: var(--color-secondary);
  opacity: .85;
}
.ornament-divider .ornament-line {
  width: 44px; height: 1px;
  background: linear-gradient(90deg, transparent, currentColor);
}
.ornament-divider .ornament-line.reverse {
  background: linear-gradient(270deg, transparent, currentColor);
}
.ornament-divider svg { flex-shrink: 0; }

.glow-wrap { position: relative; }
.glow-wrap::before {
  content: '';
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle, rgba(237,201,158,.22) 0%, rgba(237,201,158,0) 68%);
  z-index: -1;
  pointer-events: none;
}

.sacred-bg {
  position: relative;
}
.sacred-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: .05;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23edc99e' stroke-width='1'%3E%3Ccircle cx='60' cy='60' r='50'/%3E%3Ccircle cx='60' cy='60' r='34'/%3E%3Ccircle cx='60' cy='60' r='18'/%3E%3Cpath d='M60 10 L60 110 M10 60 L110 60 M25 25 L95 95 M95 25 L25 95'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 120px 120px;
}

blockquote.devotional-quote {
  position: relative;
  border: none;
  padding: 0 1rem;
}
/* ---------- Clickable content cards (Teachings/Events/Publications/Activities) ---------- */
.card-clickable {
  position: relative;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  display: flex;
  flex-direction: column;
}
.card-clickable:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 50px rgba(0,0,0,.5);
  border-color: rgba(237,201,158,.45);
}
.card-clickable .card-media {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  margin: -2.5rem -2.5rem 1.5rem;
}
.card-clickable .card-media img {
  transition: transform .5s ease;
}
.card-clickable:hover .card-media img {
  transform: scale(1.06);
}
.card-clickable .card-body { flex: 1; display: flex; flex-direction: column; }
.card-clickable .card-title {
  font-size: 1.2rem;
  margin-bottom: .5rem;
  transition: color .2s ease;
}
.card-clickable:hover .card-title { color: var(--color-secondary); }
.card-clickable .card-excerpt {
  color: rgba(255,255,255,.6);
  line-height: 1.7;
  flex: 1;
}
.card-clickable .card-readmore {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--color-secondary);
  font-weight: 700;
  font-size: .85rem;
  margin-top: 1.25rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.card-clickable .card-readmore svg { transition: transform .2s ease; }
.card-clickable:hover .card-readmore svg { transform: translateX(4px); }

/* One real <a> per card; stretched to cover the whole card so any
   click anywhere on it navigates, while staying valid HTML (no
   nested <a> tags) and accessible (one clear link name). */
.card-clickable .card-stretched-link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* ---------- Single post: hero header ---------- */
.detail-hero {
  position: relative;
  min-height: 46vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  margin-bottom: 3.5rem;
}
.detail-hero .detail-hero-bg {
  position: absolute; inset: 0;
}
.detail-hero .detail-hero-bg img {
  width: 100%; height: 100%; object-fit: cover;
}
.detail-hero .detail-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--color-bg) 5%, rgba(16,16,16,.35) 55%, rgba(16,16,16,.15));
}
.detail-hero-content {
  position: relative;
  z-index: 1;
  padding-top: 3rem;
  padding-bottom: 3rem;
  width: 100%;
}
.detail-hero.no-image { min-height: 0; padding-top: 2rem; align-items: flex-start; }

/* ---------- Prev / next navigation ---------- */
.detail-nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--color-border);
}
@media (min-width: 768px) { .detail-nav { grid-template-columns: 1fr 1fr; } }
.detail-nav-link {
  display: block;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 1.25rem;
  padding: 1.5rem;
  transition: all .2s ease;
}
.detail-nav-link:hover { border-color: var(--color-secondary); transform: translateY(-3px); }
.detail-nav-link.next { text-align: right; }
.detail-nav-label {
  display: flex;
  align-items: center;
  gap: .4rem;
  color: var(--color-secondary);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .5rem;
}
.detail-nav-link.next .detail-nav-label { justify-content: flex-end; }
.detail-nav-title { color: #fff; font-weight: 600; line-height: 1.4; }

blockquote.devotional-quote::before {
  content: '\201C';
  display: block;
  font-family: var(--font-display);
  font-size: 5rem;
  line-height: 1;
  color: var(--color-secondary);
  opacity: .35;
  margin-bottom: -1.5rem;
}
