/* =====================================================================
   NAGASIDHI JYOTHISYALAYAM — SITE THEME
   File: public/assets/css/theme.css
   Palette matches the client's existing brand banner: deep temple
   maroon/red base with rich gold ornamentation (not a generic navy
   "cosmic" theme) — sacred-geometry gold accents, cream body text.
   ===================================================================== */

:root {
  /* Brand palette — sampled from the NagaSidhi banner artwork */
  --ns-maroon-950: #2a0808;
  --ns-maroon-900: #3d0c0c;
  --ns-maroon-800: #5a1414;
  --ns-maroon-700: #7a1c1c;
  --ns-red-600: #9c2a1e;
  --ns-gold-100: #fdf3d0;
  --ns-gold-300: #f6e27a;
  --ns-gold-500: #d4af37;
  --ns-gold-700: #a9812a;
  --ns-cream: #fdf6e3;
  --ns-ink: #2a1a0d;

  --ns-gradient-hero: radial-gradient(ellipse at top, var(--ns-maroon-700) 0%, var(--ns-maroon-900) 55%, var(--ns-maroon-950) 100%);
  --ns-gradient-gold: linear-gradient(135deg, var(--ns-gold-300), var(--ns-gold-500) 50%, var(--ns-gold-700));
  --ns-shadow-gold: 0 8px 30px rgba(212, 175, 55, 0.25);
  --ns-shadow-card: 0 10px 40px rgba(0, 0, 0, 0.35);

  --font-heading: 'Cinzel', 'Noto Sans Telugu', serif;
  --font-body: 'Mukta', 'Noto Sans Telugu', sans-serif;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-body);
  background-color: var(--ns-maroon-950);
  color: var(--ns-cream);
  overflow-x: hidden;
  max-width: 100vw;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Mobile scroll performance: backdrop-filter (used for the frosted-glass
   navbar/cards) forces the browser to re-blur everything behind a fixed or
   animated element on every scroll frame — on phones this is the single
   biggest cause of stutter/jank while scrolling. Drop it below the tablet
   breakpoint and compensate with a touch more background opacity so the
   cards/navbar still read as intentionally "frosted," just without the
   live per-frame blur cost. Desktop keeps the full effect. */
@media (max-width: 991.98px) {
  .ns-navbar { backdrop-filter: none; }
  .ns-card { background: rgba(255, 246, 227, 0.1); backdrop-filter: none; }
}

h1, h2, h3, h4, .ns-heading {
  font-family: var(--font-heading);
  color: var(--ns-gold-300);
  letter-spacing: 0.5px;
}

/* Sacred-geometry backdrop: faint Sri Chakra + mandala rings, pure CSS/SVG, no external image dependency */
.ns-yantra-bg {
  position: relative;
  overflow: hidden;
}
.ns-yantra-bg::before {
  content: "";
  position: absolute;
  inset: -20%;
  background-image:
    repeating-radial-gradient(circle at 50% 50%, transparent 0, transparent 60px, rgba(212,175,55,0.05) 61px, transparent 62px);
  pointer-events: none;
  animation: ns-rotate 120s linear infinite;
}
@keyframes ns-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Gold hairline rule used between sections, echoes the temple-border strip in the banner */
.ns-gold-rule {
  height: 3px;
  width: 90px;
  margin: 0 auto 1.5rem;
  background: var(--ns-gradient-gold);
  border-radius: 3px;
  box-shadow: var(--ns-shadow-gold);
}

/* Glass-morphism card */
.ns-card {
  background: rgba(255, 246, 227, 0.06);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 18px;
  backdrop-filter: blur(10px);
  box-shadow: var(--ns-shadow-card);
}

/* Gold outline CTA button */
.btn-ns-gold {
  background: var(--ns-gradient-gold);
  color: var(--ns-maroon-950);
  font-weight: 700;
  border: none;
  border-radius: 999px;
  padding: 0.65rem 1.75rem;
  box-shadow: var(--ns-shadow-gold);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.btn-ns-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(212, 175, 55, 0.4);
  color: var(--ns-maroon-950);
}
.btn-ns-outline {
  border: 1.5px solid var(--ns-gold-500);
  color: var(--ns-gold-300);
  border-radius: 999px;
  padding: 0.6rem 1.6rem;
  background: transparent;
  transition: all 0.25s ease;
}
.btn-ns-outline:hover {
  background: rgba(212, 175, 55, 0.12);
  color: var(--ns-gold-100);
}

/* Guru portrait frame — circular gold ring, echoes the banner's inset photo treatment */
.ns-portrait-frame {
  position: relative;
  border-radius: 50%;
  padding: 8px;
  background: var(--ns-gradient-gold);
  box-shadow: var(--ns-shadow-gold);
  display: inline-block;
}
.ns-portrait-frame img {
  border-radius: 50%;
  border: 4px solid var(--ns-maroon-950);
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Timeline */
.ns-timeline {
  position: relative;
  padding-left: 2.5rem;
  border-left: 2px solid rgba(212, 175, 55, 0.4);
}
.ns-timeline-item {
  position: relative;
  padding-bottom: 2rem;
}
.ns-timeline-item::before {
  content: "\2726";
  position: absolute;
  left: -2.85rem;
  top: 0;
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  border-radius: 50%;
  background: var(--ns-gradient-gold);
  color: var(--ns-maroon-950);
  font-size: 0.85rem;
}

.ns-breadcrumb a { color: var(--ns-gold-300); text-decoration: none; }
.ns-breadcrumb a:hover { text-decoration: underline; }
.ns-breadcrumb .sep { color: rgba(253,246,227,0.4); margin: 0 0.4rem; }

.ns-section-eyebrow {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.8rem;
  color: var(--ns-gold-500);
}
.ns-hero .ns-section-eyebrow,
.ns-hero h1 {
  text-shadow: 0 1px 8px rgba(0, 0, 0, .5);
}

/* Language switch pill */
.ns-lang-switch a {
  color: var(--ns-cream);
  opacity: 0.7;
  text-decoration: none;
  font-weight: 600;
}
.ns-lang-switch a.active { opacity: 1; color: var(--ns-gold-300); }

/* =====================================================================
   COSMIC BACKDROP + OM CHANTING AMBIENCE
   Sits underneath the maroon/gold brand palette (does not replace it):
   a fixed starfield + slowly breathing mandala rings run the full height
   of every page, floating Om (ॐ) glyphs drift up through the hero, and an
   optional looping Om-chant audio track can be toggled by the visitor.
   ===================================================================== */

/* Fixed, full-viewport, z-index:-1 so it always sits BEHIND normal page
   content no matter how far the user scrolls — this is the "continuously
   moving cosmic background" layer. */
.ns-cosmic-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(212,175,55,0.10), transparent 45%),
    radial-gradient(ellipse at 80% 75%, rgba(154,42,30,0.30), transparent 50%),
    var(--ns-maroon-950);
}
.ns-cosmic-layer .ns-stars,
.ns-cosmic-layer .ns-stars::after {
  content: "";
  position: absolute; inset: -10%;
  background-repeat: repeat;
  background-image:
    radial-gradient(1.5px 1.5px at 20px 30px, rgba(253,246,227,.9), transparent),
    radial-gradient(1px 1px at 90px 120px, rgba(253,246,227,.7), transparent),
    radial-gradient(1.5px 1.5px at 160px 60px, rgba(246,226,122,.85), transparent),
    radial-gradient(1px 1px at 220px 180px, rgba(253,246,227,.6), transparent),
    radial-gradient(1.5px 1.5px at 280px 40px, rgba(253,246,227,.8), transparent);
  background-size: 320px 220px;
  animation: ns-star-drift 100s linear infinite;
}
.ns-cosmic-layer .ns-stars::after {
  position: absolute; inset: -10%;
  animation-duration: 160s;
  animation-direction: reverse;
  opacity: .5;
}
@keyframes ns-star-drift {
  from { background-position: 0 0, 0 0; }
  to   { background-position: -1000px 700px, -1000px 700px; }
}

/* Large ambient mandala watermark, always centered in the viewport, rotating
   continuously behind every section — the "mesmerising circles moving" effect. */
.ns-mandala {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 900px; height: 900px;
  max-width: 150vw; max-height: 150vw;
  pointer-events: none;
}
.ns-mandala span {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(212,175,55,.35);
}
.ns-mandala--bg { opacity: .16; width: 1300px; height: 1300px; }
.ns-mandala span:nth-child(1) { inset: 0;    animation: ns-spin-cw 90s linear infinite; }
.ns-mandala span:nth-child(2) { inset: 70px;  animation: ns-spin-ccw 70s linear infinite; border-style: dashed; }
.ns-mandala span:nth-child(3) { inset: 150px; animation: ns-spin-cw 50s linear infinite; }
.ns-mandala span:nth-child(4) { inset: 230px; animation: ns-spin-ccw 35s linear infinite; border-color: rgba(246,226,122,.55); }
.ns-mandala span:nth-child(5) { inset: 310px; animation: ns-spin-cw 22s linear infinite; border-style: dotted; }
@keyframes ns-spin-cw  { from { transform: rotate(0deg);   } to { transform: rotate(360deg); } }
@keyframes ns-spin-ccw { from { transform: rotate(360deg); } to { transform: rotate(0deg);   } }

/* Floating Om (ॐ) glyphs drifting slowly upward through the hero, like temple incense smoke */
.ns-om-field { position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.ns-om {
  position: absolute;
  bottom: -15%;
  color: var(--ns-gold-300);
  opacity: 0;
  filter: blur(0.3px);
  animation-name: ns-om-rise;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
@keyframes ns-om-rise {
  0%   { transform: translateY(0) rotate(0deg) scale(0.9);   opacity: 0; }
  12%  { opacity: .3; }
  50%  { opacity: .45; }
  90%  { opacity: 0; }
  100% { transform: translateY(-130vh) rotate(25deg) scale(1.25); opacity: 0; }
}

/* Om-chanting audio toggle — bottom-left, pulses with a soft gold ring while playing */
.ns-chant-toggle {
  position: fixed; bottom: 24px; left: 24px;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--ns-gradient-gold);
  color: var(--ns-maroon-950);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  border: none;
  box-shadow: var(--ns-shadow-gold);
  z-index: 2001;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
}
.ns-chant-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(212, 175, 55, .45);
}
.ns-chant-toggle::before {
  content: "";
  position: absolute; inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(212,175,55,.6);
  opacity: 0;
}
.ns-chant-toggle.playing::before { animation: ns-chant-pulse 1.8s ease-out infinite; }
@keyframes ns-chant-pulse {
  0%   { transform: scale(0.85); opacity: .8; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* Twinkling zodiac glyphs (12 signs) + star glyphs scattered across the fixed cosmic layer */
.ns-zodiac-field { position: absolute; inset: 0; overflow: hidden; }
.ns-zodiac-glyph {
  position: absolute;
  color: var(--ns-gold-300);
  opacity: 0;
  line-height: 1;
  animation-name: ns-twinkle;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}
@keyframes ns-twinkle {
  0%, 100% { opacity: .08; transform: scale(.9); }
  50%      { opacity: .55; transform: scale(1.2); }
}

/* Navagraha orbit system — nine Vedic "planets" continuously revolving around a
   glowing Sun core, each ring a different radius/speed so it never looks static. */
.ns-orbit-system { position: absolute; top: 50%; left: 50%; width: 0; height: 0; pointer-events: none; }
.ns-orbit-system::before {
  content: "";
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 22px; height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff6d0, #ffb74d 60%, transparent 100%);
  box-shadow: 0 0 30px 10px rgba(255, 183, 77, .45);
}
.ns-orbit {
  position: absolute; top: 50%; left: 50%;
  border: 1px solid rgba(212, 175, 55, .18);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.ns-orbit.spin-cw  { animation-name: ns-spin-cw;  animation-timing-function: linear; animation-iteration-count: infinite; }
.ns-orbit.spin-ccw { animation-name: ns-spin-ccw; animation-timing-function: linear; animation-iteration-count: infinite; }
.ns-orbit .ns-planet {
  position: absolute; top: -5px; left: 50%;
  width: 10px; height: 10px; margin-left: -5px;
  border-radius: 50%;
  box-shadow: 0 0 8px 2px currentColor, 0 0 18px 5px currentColor;
}
.ns-orbit--surya   { width: 110px; height: 110px; animation-duration: 20s; }
.ns-orbit--chandra { width: 170px; height: 170px; animation-duration: 26s; }
.ns-orbit--budha   { width: 230px; height: 230px; animation-duration: 32s; }
.ns-orbit--shukra  { width: 290px; height: 290px; animation-duration: 38s; }
.ns-orbit--mangal  { width: 350px; height: 350px; animation-duration: 46s; }
.ns-orbit--guru    { width: 410px; height: 410px; animation-duration: 55s; }
.ns-orbit--shani   { width: 470px; height: 470px; animation-duration: 65s; }
.ns-orbit--nodes   { width: 530px; height: 530px; animation-duration: 90s; }
.ns-planet--surya   { background: #FFB74D; color: #FFB74D; }
.ns-planet--chandra { background: #E8E8E8; color: #E8E8E8; }
.ns-planet--budha   { background: #66BB6A; color: #66BB6A; }
.ns-planet--shukra  { background: #FFF8E1; color: #FFF8E1; }
.ns-planet--mangal  { background: #E53935; color: #E53935; }
.ns-planet--guru    { background: #FDD835; color: #FDD835; }
.ns-planet--shani   { background: #7986CB; color: #7986CB; }
.ns-planet--rahu    { background: #78909C; color: #78909C; }
.ns-planet--ketu    { background: #8D6E63; color: #8D6E63; top: auto; bottom: -5px; }

@media (prefers-reduced-motion: reduce) {
  .ns-cosmic-layer .ns-stars,
  .ns-cosmic-layer .ns-stars::after,
  .ns-mandala span,
  .ns-orbit,
  .ns-zodiac-glyph,
  .ns-om { animation: none !important; }
}

/* =====================================================================
   PAGE CHROME — navbar, hero, section rhythm, floats, fallbacks
   (shared by every view via layouts/frontend-header.php + frontend-footer.php)
   ===================================================================== */

section { padding: 4.5rem 0; position: relative; z-index: 1; }

/* Masthead banner: fixed strip above the navbar, aspect-locked to the artwork.
   object-fit:contain guarantees the ENTIRE banner is always visible (no cropping),
   with a maroon letterbox backdrop that blends with the theme on any viewport. */
:root {
  --ns-masthead-h: clamp(56px, 16.72vw, 260px);
}
.ns-masthead {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--ns-masthead-h);
  overflow: hidden;
  line-height: 0;
  z-index: 1031;
  background: var(--ns-maroon-950);
  box-shadow: 0 2px 14px rgba(0, 0, 0, .5);
}
.ns-masthead-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
}
/* Soft fade at the bottom edge so the banner artwork melts into the page's
   own maroon tone instead of hard-cutting into the navbar strip — this is
   what stops the banner from reading as a visually separate "pasted in"
   image on top of the rest of the site. */
.ns-masthead::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 45%;
  background: linear-gradient(to bottom, rgba(42,8,8,0) 0%, var(--ns-maroon-950) 100%);
  pointer-events: none;
}

.ns-navbar {
  background: rgba(42, 8, 8, .85) !important;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(212, 175, 55, .25);
}
.ns-navbar.fixed-top { top: var(--ns-masthead-h); }
.ns-brand-name {
  margin-left: .6rem;
  font-size: 1.15rem;
  color: var(--ns-gold-300);
  letter-spacing: .5px;
}
.ns-navbar .nav-link {
  color: var(--ns-cream) !important;
  font-weight: 500;
  position: relative;
  transition: color .2s ease;
}
.ns-navbar .nav-link::after {
  content: "";
  position: absolute;
  left: 50%; right: 50%; bottom: -2px;
  height: 2px;
  background: var(--ns-gradient-gold);
  transition: left .2s ease, right .2s ease;
}
.ns-navbar .nav-link:hover { color: var(--ns-gold-300) !important; }
.ns-navbar .nav-link:hover::after,
.ns-navbar .nav-link.active::after { left: 0; right: 0; }
.ns-navbar .nav-link.active { color: var(--ns-gold-300) !important; }

/* Mobile menu (hamburger) toggler — Bootstrap's default icon is a dark
   grey SVG that disappears against the dark maroon header on phones.
   Recolored to theme gold + a visible gold outline so it reads clearly. */
.ns-navbar .navbar-toggler {
  border-color: var(--ns-gold-500);
  padding: .35rem .55rem;
}
.ns-navbar .navbar-toggler:focus {
  box-shadow: 0 0 0 .2rem rgba(212, 175, 55, .35);
}
.ns-navbar .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23d4af37' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Mobile dropdown menu (below the lg breakpoint, hamburger tapped) — give
   the stacked link list clear touch-sized rows and a visible separator
   from the collapsed bar above it, so it reads as a deliberate menu panel
   rather than plain text spilling under the logo. */
@media (max-width: 991.98px) {
  .ns-navbar .navbar-collapse {
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px solid rgba(212, 175, 55, .2);
  }
  .ns-navbar .navbar-nav { gap: .15rem; }
  .ns-navbar .nav-link {
    padding: .6rem .25rem;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
  }
  .ns-navbar .navbar-nav > li:last-of-type .nav-link { border-bottom: none; }
  .ns-navbar .ns-lang-switch { padding: .5rem .25rem; }
  .ns-navbar .btn-ns-gold { display: inline-block; margin-top: .5rem; text-align: center; }
}

/* Fallback for "Request Desktop Site" on browsers that DO widen the layout
   viewport but land it in the 768-991px gap between Bootstrap's md and lg
   breakpoints (a common default, e.g. ~980px) — navbar-expand-lg would
   otherwise still show the mobile hamburger nav in that range. The inline
   script in frontend-header.php handles the more common case (Android
   browsers that only change the User-Agent); this covers the rest. */
@media (min-width: 850px) and (max-width: 991.98px) {
  .ns-navbar .container { max-width: 100%; }
  .ns-navbar .navbar-toggler { display: none !important; }
  .ns-navbar .navbar-collapse {
    display: flex !important;
    flex-basis: auto;
  }
  .ns-navbar .navbar-nav { gap: .35rem !important; }
  .ns-navbar .nav-link { padding-left: .5rem !important; padding-right: .5rem !important; font-size: .9rem; }
  .ns-navbar .btn-ns-gold.btn-sm { padding-left: .75rem; padding-right: .75rem; font-size: .85rem; white-space: nowrap; }
}

.ns-hero {
  background: var(--ns-gradient-hero);
  position: relative;
  overflow: hidden;
  padding: calc(7rem + var(--ns-masthead-h)) 0 5rem;
  z-index: 1;
}
.ns-hero::before {
  content: "";
  position: absolute;
  inset: -20%;
  background-image: repeating-radial-gradient(circle at 50% 50%, transparent 0, transparent 60px, rgba(212,175,55,.06) 61px, transparent 62px);
  animation: ns-rotate 140s linear infinite;
  pointer-events: none;
}

.ns-prose :is(p, ul, ol) { color: rgba(253, 246, 227, .85); }
.ns-prose :is(ul, ol) { padding-left: 1.25rem; }

/* Every page hero (home, about, services, contact, appointment, gallery,
   videos, blog...) uses Bootstrap's ".lead.text-white-50" for its subtitle
   line. rgba(255,255,255,.5) reads fine on a plain dark background, but on
   the busier hero backdrop (radial gradient + floating zodiac glyphs/Om
   marks) it washes out almost to the point of being unreadable, especially
   on small phone screens where the decorative layer sits closer to the
   text. Override with the same higher-contrast cream tone already used for
   prose/footer text everywhere else on the site. */
.ns-hero .lead.text-white-50,
.ns-hero p.text-white-50 {
  color: rgba(253, 246, 227, .92) !important;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .45);
}

/* Footer — same maroon/gold identity as the masthead, one notch quieter */
.ns-footer {
  position: relative;
  z-index: 1;
  padding: 4rem 0 2rem;
  background: var(--ns-gradient-hero);
  border-top: 2px solid transparent;
  border-image: var(--ns-gradient-gold) 1;
}
.ns-footer-text { color: rgba(253, 246, 227, .75); }
.ns-footer-links a,
.ns-footer-contact {
  color: rgba(253, 246, 227, .75) !important;
  text-decoration: none;
  transition: color .2s ease, padding-left .2s ease;
}
.ns-footer-links a:hover,
.ns-footer-contact:hover { color: var(--ns-gold-300) !important; padding-left: 3px; }
.ns-footer-social {
  display: flex;
  gap: .6rem;
}
.ns-footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, .4);
  color: var(--ns-gold-300);
  font-size: 1rem;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.ns-footer-social a:hover {
  background: var(--ns-gradient-gold);
  color: var(--ns-maroon-950);
  transform: translateY(-2px);
}

/* Intro video overlay — hidden until JS decides to show it (once per
   session), full-screen player that can shrink to a quiet corner box. */
.ns-intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.ns-intro-overlay.ns-intro-show { display: flex; }
.ns-intro-overlay.ns-intro-closed { display: none !important; }

.ns-intro-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 2, 2, .82);
  backdrop-filter: blur(4px);
  transition: opacity .3s ease;
}

.ns-intro-player {
  position: relative;
  width: min(880px, 92vw);
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6), 0 0 0 2px rgba(212, 175, 55, .4);
  z-index: 1;
  transition: width .35s cubic-bezier(.4,0,.2,1), border-radius .35s ease;
}

.ns-intro-media,
.ns-intro-media video,
.ns-intro-media iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
  z-index: 0;
}

.ns-intro-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  gap: 8px;
}
.ns-intro-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(42, 8, 8, .75);
  border: 1px solid rgba(212, 175, 55, .5);
  color: var(--ns-gold-300);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.ns-intro-btn:hover {
  background: var(--ns-gradient-gold);
  color: var(--ns-maroon-950);
  transform: scale(1.08);
}

.ns-intro-expand {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--ns-gold-300);
  font-size: 1.3rem;
  opacity: 0;
  cursor: pointer;
  transition: opacity .2s ease, background .2s ease;
}

/* Minimized: shrink to a small corner box, backdrop disappears so the rest
   of the page becomes usable again, video keeps playing quietly. */
.ns-intro-overlay.ns-intro-mini {
  align-items: flex-end;
  justify-content: flex-end;
  /* The overlay div still spans the full viewport (position:fixed; inset:0)
     even though only a small corner box is visible — without this, its
     transparent, "empty" area silently swallows every click across the
     rest of the page (navbar links, buttons, everything) even though
     nothing is visibly there. Turn off hit-testing on the overlay itself,
     then explicitly re-enable it only on the small player box below so
     its own mute/expand/close controls keep working. */
  pointer-events: none;
}
.ns-intro-overlay.ns-intro-mini .ns-intro-backdrop {
  opacity: 0;
  pointer-events: none;
}
.ns-intro-overlay.ns-intro-mini .ns-intro-player {
  width: 260px;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .5), 0 0 0 2px rgba(212, 175, 55, .55);
  pointer-events: auto;
}
.ns-intro-overlay.ns-intro-mini .ns-intro-controls {
  top: 6px;
  right: 6px;
  gap: 5px;
}
.ns-intro-overlay.ns-intro-mini .ns-intro-btn {
  width: 26px;
  height: 26px;
  font-size: .75rem;
}
.ns-intro-overlay.ns-intro-mini .ns-intro-expand {
  display: flex;
}
.ns-intro-overlay.ns-intro-mini .ns-intro-player:hover .ns-intro-expand {
  opacity: 1;
  background: rgba(0, 0, 0, .35);
}

@media (max-width: 576px) {
  .ns-intro-overlay.ns-intro-mini .ns-intro-player { width: 180px; }
  .ns-intro-btn { width: 32px; height: 32px; font-size: .85rem; }
}

.ns-photo-fallback {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--ns-maroon-700), var(--ns-maroon-900));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ns-gold-300);
  font-size: 2.5rem;
  border: 4px solid var(--ns-maroon-950);
}

.ns-cert-slot {
  aspect-ratio: 4 / 3;
  border: 2px dashed rgba(212, 175, 55, .4);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ns-gold-500);
  font-size: .85rem;
  text-align: center;
  padding: 1rem;
}

.ns-img-fallback {
  background: radial-gradient(circle, var(--ns-maroon-700), var(--ns-maroon-900));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ns-gold-500);
  font-size: 1.6rem;
  border-radius: 12px;
  min-height: 80px;
}

.ns-whatsapp-float {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 58px; height: 58px;
  background: #25D366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1.6rem;
  box-shadow: 0 6px 20px rgba(0,0,0,.4);
  z-index: 2001;
  transition: transform .25s ease, box-shadow .25s ease;
}
.ns-whatsapp-float:hover {
  transform: translateY(-2px);
  color: #fff;
  box-shadow: 0 12px 32px rgba(0,0,0,.5);
}

/* Follow-us icons — a vertical strip pinned to the left edge, out of the
   way of the WhatsApp button (bottom-right) and the Om-chant toggle
   (bottom-left). Only renders icons that are actually set + active in
   Social Links, so it silently disappears rather than showing dead links. */
.ns-social-float {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2001;
  display: flex;
  flex-direction: column;
}
.ns-social-float a {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.15rem;
  border-radius: 0 8px 8px 0;
  box-shadow: 2px 0 10px rgba(0,0,0,.3);
  transition: width .2s ease, box-shadow .2s ease;
}
.ns-social-float a:hover {
  width: 50px;
  color: #fff;
  box-shadow: 3px 0 16px rgba(0,0,0,.45);
}
.ns-social-float-facebook  { background: #1877F2; }
.ns-social-float-instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.ns-social-float-youtube   { background: #FF0000; }

.ns-video-card img { transition: opacity .2s ease, transform .2s ease; }
.ns-video-card a:hover img { opacity: .85; transform: scale(1.02); }

@media (max-width: 576px) {
  .ns-social-float a { width: 36px; height: 36px; font-size: 1rem; }
  .ns-social-float a:hover { width: 42px; }
}

/* On mobile, pin the follow-us strip to the right edge instead of the left.
   Left-side placement was overlapping the header/hamburger area on short
   viewports; the right edge is clear on mobile (WhatsApp float sits at
   bottom-right, well below this vertically-centered strip). Desktop keeps
   the left placement above. */
@media (max-width: 991.98px) {
  .ns-social-float {
    left: auto;
    right: 0;
  }
  .ns-social-float a {
    border-radius: 8px 0 0 8px;
    box-shadow: -2px 0 10px rgba(0,0,0,.3);
  }
  .ns-social-float a:hover {
    box-shadow: -3px 0 16px rgba(0,0,0,.45);
  }
}

/* Hide the floating widgets while the mobile hamburger menu is open (class
   toggled by main.js on Bootstrap's collapse show/hidden events) — an open
   dropdown can extend past the middle of a short phone screen and would
   otherwise sit on top of the vertically-centered social icons. */
@media (max-width: 991.98px) {
  body.ns-nav-open .ns-social-float,
  body.ns-nav-open .ns-whatsapp-float,
  body.ns-nav-open .ns-chant-toggle {
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease;
  }
}
