/*
Theme Name: Sankat Mochan Theme
Theme URI: http://sankatmochanfoundation.org/
Description: A custom WordPress theme for the Sankat Mochan Foundation, converted from static HTML.
Author: Antigravity
Version: 1.1.6
Text Domain: sankat-mochan-theme
*/

/* ============ FOUNDATIONS ============ */
:root {
  --saffron: #E65100;
  --saffron-deep: #BF4300;
  --saffron-soft: #FF6F20;
  --maroon: #6B1F18;
  --ivory: #F6EFE0;
  --ivory-deep: #EFE5D0;
  --paper: #FAF6EC;
  --gold: #B08A3E;
  --gold-soft: #C9A961;
  --ink: #1F1812;
  --ink-soft: #4A3D32;
  --river: #3A5466;
  --river-deep: #1F3441;
  --line: rgba(31, 24, 18, 0.15);
  --shadow-soft: 0 4px 20px rgba(31, 24, 18, 0.08);
  --shadow-mid: 0 12px 40px rgba(31, 24, 18, 0.12);
  --shadow-deep: 0 20px 60px rgba(31, 24, 18, 0.18);
  --smf-nav-h: 80px;
  --container-max: 1200px;
  --margin-edge: clamp(18px, 4vw, 48px);
  /* Unified vertical rhythm + layout gaps (all inner pages) */
  --smf-section-y: clamp(2.75rem, 6.5vw, 5rem);
  --smf-section-y-sm: clamp(2.25rem, 5.5vw, 3.75rem);
  --smf-grid-gap: clamp(1.5rem, 3.8vw, 2.25rem);
  --smf-split-gap: clamp(2.25rem, 5vw, 5rem);
  /* WP admin bar offset for fixed nav (overridden when body.admin-bar) */
  --smf-admin-offset: 0px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-style: normal !important;
}

html {
  scroll-behavior: smooth;
}

/* Lock background scroll when mobile nav is open (prevents iOS rubber-band behind menu) */
body.smf-menu-open {
  overflow: hidden;
}

body {
  font-family: 'Open Sans', sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(176, 138, 62, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(199, 84, 28, 0.03) 0%, transparent 40%);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.12 0 0 0 0 0.09 0 0 0 0 0.07 0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.6;
  z-index: 1;
  mix-blend-mode: multiply;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.glass-panel {
  background: rgba(253, 249, 240, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined' !important;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ============ FIREFLIES ============ */
.firefly-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.firefly {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--gold-soft);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--gold);
  animation: fireflyMove var(--d) linear infinite;
  opacity: 0;
}

@keyframes fireflyMove {
  0% { transform: translate(0, 0) scale(0); opacity: 0; }
  20% { opacity: 0.6; }
  80% { opacity: 0.6; }
  100% { transform: translate(var(--x), var(--y)) scale(1); opacity: 0; }
}

/* Back-to-top: see unified rule below (must stay BELOW #globalNav z-index so the menu bar stays visible) */

/* ============ FLOATING DIYA ============ */
.floating-diya {
  position: absolute;
  width: 180px;
  bottom: 13%;
  right: 12%;
  z-index: 5;
  animation: floatDiya 5s ease-in-out infinite;
  filter: drop-shadow(0 6px 18px rgba(255, 120, 0, 0.5));
}

@keyframes floatDiya {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  40% { transform: translateY(-16px) rotate(1.2deg); }
  70% { transform: translateY(-7px) rotate(-0.5deg); }
}

.diya-glow {
  position: absolute;
  width: 140px;
  height: 40px;
  background: radial-gradient(ellipse, rgba(255, 140, 0, 0.4) 0%, transparent 70%);
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  animation: glowPulse 2.5s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes glowPulse {
  0% { opacity: 0.45; transform: translateX(-50%) scale(1); }
  100% { opacity: 0.9; transform: translateX(-50%) scale(1.2); }
}

.diya-flame {
  width: 18px;
  height: 38px;
  background: linear-gradient(to top, #e63000 0%, #ff8c00 40%, #ffd700 80%, #fffff0 100%);
  border-radius: 50% 50% 35% 35% / 60% 60% 40% 40%;
  margin: 0 auto;
  position: relative;
  animation: flameFlicker 0.8s ease-in-out infinite alternate;
  box-shadow: 0 0 12px 5px rgba(255, 140, 0, 0.65), 0 0 30px 12px rgba(255, 60, 0, 0.3);
}

@keyframes flameFlicker {
  0% { transform: scaleX(1) scaleY(1) skewX(4deg); opacity: 0.9; }
  25% { transform: scaleX(0.88) scaleY(1.06) skewX(-3deg); opacity: 1; }
  60% { transform: scaleX(1.08) scaleY(0.97) skewX(2deg); opacity: 0.95; }
  100% { transform: scaleX(0.95) scaleY(1.08) skewX(-4deg); opacity: 1; }
}

/* ============ PAGE HERO ============ */
.page-hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 40px 40px;
  text-align: center;
  background: var(--paper);
  overflow: hidden;
  z-index: 2;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(31, 24, 18, 0.08) 0%, transparent 100%),
              radial-gradient(circle at 10% 20%, rgba(199, 84, 28, 0.08) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(107, 31, 24, 0.06) 0%, transparent 40%);
  z-index: 0;
}

.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.15;
  mix-blend-mode: multiply;
  z-index: 1;
  pointer-events: none;
}

.hero-ornament-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  pointer-events: none;
}

.hero-ornament-bg::after {
  font-family: 'Tiro Devanagari Sanskrit', serif;
  font-size: 300px;
  color: var(--saffron);
  opacity: 0.12;
  line-height: 1.2;
  filter: blur(1px);
  display: block;
  margin-top: 40px;
}

/* ============ UTILITIES ============ */
.section-eyebrow {
  font-family: 'Open Sans', sans-serif;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--saffron);
  margin-bottom: 16px;
  display: inline-block;
}

.section-eyebrow::before {
  content: 'â—† ';
  color: var(--gold);
  margin-right: 6px;
}

.section-title {
  font-family: 'Open Sans', sans-serif;
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 600;
  color: var(--maroon);
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.section-title em {
  color: var(--saffron);
  font-style: normal;
}

/* ============ HERO SLIDER ============ */
.hero-slider {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #000; /* Fallback background */
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 2s ease-in-out;
  background-size: cover;
  background-position: center;
  z-index: 2;
}

.hero-slide.active {
  opacity: 1;
  z-index: 3;
}

.hero-slider-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(31, 24, 18, 0.85) 0%, rgba(31, 24, 18, 0.4) 50%, transparent 100%);
  z-index: 4;
}


/* ============ HERO NAV BUTTONS ============ */
.hero-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  color: white;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 20;
  transition: all 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-nav-btn:hover {
  background: var(--saffron);
  border-color: var(--saffron);
  transform: translateY(-50%) scale(1.1);
}

.hero-nav-prev { left: 40px; }
.hero-nav-next { right: 40px; }


/* Logged-in: #wpadminbar is fixed â€” sit theme header below it */
body.admin-bar,
html.admin-bar {
  --smf-admin-offset: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar,
  html.admin-bar {
    --smf-admin-offset: 46px;
  }
}

/* Fix for overlapping header in screenshot */
nav#globalNav {
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(10px) !important;
  top: var(--smf-admin-offset, 0px) !important;
}

/* Desktop menu links must stay readable on light header (incl. when admin styles load) */
#globalNavMenu a.font-label-caps {
  color: #475569 !important;
}
#globalNavMenu a.font-label-caps:hover {
  color: var(--saffron) !important;
}
#globalNavMenu a.font-label-caps.text-primary,
#globalNavMenu a.font-label-caps.active {
  color: var(--saffron) !important;
}

.nav-link {
  font-size: 11px !important;
  letter-spacing: 0.1em !important;
}

/* ============ PAGE ROUTING ============ */
.page-section {
  display: none !important;
}

.page-section.active {
  display: block !important;
  animation: fadeIn 0.8s ease-out;
}

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

/* ============ FOOTER ============ */
.footer {
  background: #1f1812;
  color: #e6e1e0;
  padding: 80px 0 40px;
  border-top: 4px solid var(--saffron);
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 60px;
  margin-bottom: 60px;
}
.footer h4 {
  color: var(--saffron);
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  margin-bottom: 25px;
}
.footer ul {
  list-style: none;
  padding: 0;
}
.footer ul li {
  margin-bottom: 12px;
}
.footer ul li a {
  color: #e6e1e0;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
}
.footer ul li a:hover {
  color: var(--saffron);
}
.footer-brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  color: var(--saffron);
  margin-bottom: 10px;
}
.footer-mantra {
  font-size: 18px;
  color: #8c7e75;
  margin-bottom: 20px;
}
.footer-desc {
  font-size: 14px;
  line-height: 1.6;
  color: #8c7e75;
  margin-bottom: 30px;
}
.footer-socials {
  display: flex;
  gap: 20px;
}
.footer-socials a {
  color: #e6e1e0;
  transition: transform 0.3s;
}
.footer-socials a:hover {
  color: var(--saffron);
  transform: translateY(-3px);
}
.footer-contact p {
  font-size: 14px;
  color: #8c7e75;
  margin-bottom: 15px;
  line-height: 1.6;
}
.footer-contact strong {
  display: block;
  color: #e6e1e0;
  margin-bottom: 5px;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #665c55;
}

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-bottom { flex-direction: column; gap: 15px; text-align: center; }
}

/* ============ BACK TO TOP (below fixed nav z-100 so header/menu are never covered) ============ */
.back-to-top {
  position: fixed;
  left: auto;
  right: max(24px, env(safe-area-inset-right, 0px));
  bottom: max(32px, env(safe-area-inset-bottom, 0px));
  width: 50px;
  height: 50px;
  background: var(--saffron);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 60;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background 0.3s;
  opacity: 0;
  visibility: hidden;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}
.back-to-top:hover {
  transform: translateY(-5px);
  background: #bd631b;
}

/* ============ PAGE HERO MODERN UI ============ */
.page-hero {
  position: relative;
  padding: 120px 0 80px;
  background: var(--paper);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-ornament-bg {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(230, 81, 0, 0.03) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(58, 84, 102, 0.03) 0%, transparent 40%);
  z-index: 0;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--saffron), var(--maroon));
  opacity: 0.8;
}

.page-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 40px;
}

.breadcrumb {
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.breadcrumb a {
  color: var(--saffron);
  text-decoration: none;
  transition: color 0.3s;
}

.breadcrumb a:hover {
  color: var(--maroon);
}

.breadcrumb span {
  font-size: 8px;
  opacity: 0.4;
}

.page-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 64px;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 25px;
  font-weight: 700;
}

.page-hero h1 em {
  font-style: italic;
  color: #ffffff !important;
  font-weight: 500;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.45);
}

.page-hero .lede {
  font-size: 20px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 700px;
  margin: 0 auto;
  font-family: 'Open Sans', sans-serif;
  font-weight: 300;
}

.page-hero .ornament {
  margin-top: 40px;
  color: var(--saffron);
  opacity: 0.5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.page-hero .ornament::before,
.page-hero .ornament::after {
  content: '';
  width: 50px;
  height: 1px;
  background: currentColor;
}

@media (max-width: 768px) {
  .page-hero { padding: 100px 0 60px; }
  .page-hero h1 { font-size: 40px; }
  .page-hero .lede { font-size: 16px; }
}

/* ============ HEADER PREMIUM REFINEMENT ============ */
nav#globalNav {
  height: 80px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: 1px solid transparent;
}

@media (max-width: 1023px) {
  /* Single-row mobile header (menu in drawer only) */
  nav#globalNav {
    height: auto !important;
    min-height: 0;
  }
  nav#globalNav.scrolled {
    height: auto !important;
  }
}

nav#globalNav.scrolled {
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  border-bottom: 1px solid rgba(230, 81, 0, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

@media (min-width: 1024px) {
  nav#globalNav.scrolled {
    height: 70px;
  }
}

/* Offset page content for fixed header + optional WP admin bar */
#main-content,
#primary.site-main {
  padding-top: calc(var(--smf-admin-offset, 0px) + var(--smf-nav-h, 80px));
}

@media (min-width: 1024px) {
  /* Desktop menu â€” theme-controlled (do not rely on Tailwind .hidden alone) */
  .smf-desktop-nav#globalNavMenu {
    display: flex !important;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 2rem;
    margin-left: 0.75rem;
  }
}

/* Below lg: desktop strip must never paint (fixes stray â€œHOMEâ€ when CDN utilities fail) */
.smf-desktop-nav {
  display: none !important;
}

.nav-link {
  position: relative;
  font-weight: 600 !important;
  color: var(--ink) !important;
  transition: color 0.3s;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--saffron);
  transition: width 0.3s;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:hover {
  color: var(--saffron) !important;
}

/* ============ CONTENT CONTAINERS & BREATHING ROOM ============ */
/* Vertical padding for inner bands is set once in "GLOBAL SECTION SPACING" below */
.page-section > .section {
  position: relative;
}

.section-inner {
  max-width: var(--container-max) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: var(--margin-edge) !important;
  padding-right: var(--margin-edge) !important;
  width: 100%;
}

/* Prose - Better spacing for readability */
.prose p {
  margin-bottom: 28px;
  line-height: 1.8;
  font-size: 17px;
  color: var(--ink-soft);
}

.prose h2, .prose h3 {
  font-family: 'Playfair Display', serif;
  color: var(--ink);
  margin-bottom: 24px;
  margin-top: 48px;
}

.prose h2:first-child, .prose h3:first-child {
  margin-top: 0;
}

/* Horizontal edge: always follow --margin-edge (no mixed 40px/24px) */
@media (max-width: 1024px) {
  .section-inner {
    padding-left: var(--margin-edge) !important;
    padding-right: var(--margin-edge) !important;
  }
}

@media (max-width: 640px) {
  .prose p { font-size: 16px; }
}

/* ============ FINAL STANDARDIZATION (LIVE SITE PARITY) ============ */
* {
  font-family: 'Open Sans', sans-serif !important;
}

/* Global Heading Standardization */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Open Sans', sans-serif !important;
  font-weight: 700 !important;
  color: var(--ink) !important;
  letter-spacing: -0.02em !important;
  font-style: normal !important;
}

h1 { font-size: 32px !important; }
h2 { font-size: 28px !important; }
h3 { font-size: 24px !important; }
h4 { font-size: 20px !important; }

/* Compact Glassmorphic Hero */
.page-hero {
  padding: 40px 0 !important;
  background: var(--paper) !important;
  min-height: auto !important;
}

.page-hero-inner {
  background: rgba(255, 255, 255, 0.4) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  border-radius: 20px !important;
  padding: 30px 40px !important;
  max-width: 1200px !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.03) !important;
}

.page-hero h1 {
  margin-bottom: 10px !important;
  color: var(--primary) !important;
}

.page-hero .lede {
  font-size: 16px !important;
  max-width: 800px !important;
  margin: 0 auto !important;
  opacity: 0.8 !important;
}

/* Section title sizing (do not force text-align â€” breaks inner page heroes; see .page-hero rules below) */
.section-title {
  font-size: 32px !important;
  margin-bottom: 20px !important;
}

/* ============ PAGE HERO BACKGROUND IMAGE & BLUR ============ */
.page-hero {
  position: relative;
  padding: 80px 0 !important;
  background: #1f1812 !important;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: -10px;
  /* Theme asset (works on hosts that block external CDNs); gradient fallback if file missing */
  background-image:
    linear-gradient(135deg, rgba(230, 81, 0, 0.12) 0%, transparent 55%),
    linear-gradient(225deg, rgba(58, 84, 102, 0.18) 0%, transparent 50%),
    url('assets/img/img_173313_56.jpg');
  background-size: cover;
  background-position: center;
  filter: blur(15px);
  opacity: 0.5;
  z-index: 0;
  transform: scale(1.1);
}

.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(31, 24, 18, 0.4), rgba(31, 24, 18, 0.7));
  z-index: 1;
}

.page-hero-inner {
  position: relative;
  z-index: 2 !important;
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(25px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(25px) saturate(150%) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3) !important;
}

.page-hero h1 {
  color: #fff !important;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3) !important;
}

.page-hero .lede {
  color: rgba(255, 255, 255, 0.9) !important;
}

.breadcrumb {
  color: rgba(255, 255, 255, 0.6) !important;
}

.breadcrumb a {
  color: var(--saffron) !important;
}

/* ============ VISIBILITY FIXES (TABLE & BADGES) ============ */
table td {
  color: #1f1812 !important;
  opacity: 1 !important;
  font-size: 15px !important;
}

.bg-saffron { background-color: #E65100 !important; }
.bg-river { background-color: #3a5466 !important; }
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
  background-color: #000000 !important;
}
.text-white { color: #ffffff !important; opacity: 1 !important; }

/* Ensure 'Member' text is visible */
td .text-ink-soft {
  color: #1f1812 !important;
  opacity: 0.8 !important;
}

/* Explicit Post Column Fix */
td span.font-bold {
  color: #ffffff !important;
  display: inline-block !important;
  padding: 6px 16px !important;
}

/* ============ REMOVING GLASSMORPHISM FROM HERO ============ */
.page-hero-inner {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  text-align: center !important;
  display: block !important;
}

.page-hero h1 {
  font-size: 42px !important;
  margin-bottom: 20px !important;
  text-shadow: 0 4px 15px rgba(0,0,0,0.5) !important;
}

.page-hero .lede {
  font-size: 18px !important;
  line-height: 1.6 !important;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5) !important;
}

.page-hero .ornament {
  color: var(--saffron) !important;
  opacity: 1 !important;
  margin-top: 30px !important;
}

/* Inner-page hero = About/History: centered title, light accent on <em>, optional divider */
.page-hero h1,
.page-hero .text-gradient {
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.page-hero h1.text-gradient,
.page-hero .text-gradient {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif !important;
  font-size: clamp(1.85rem, 4.5vw, 2.75rem) !important;
  line-height: 1.18 !important;
  font-weight: 700 !important;
  color: #fff !important;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.45) !important;
  letter-spacing: -0.02em !important;
}

.page-hero h1 em,
.page-hero .text-gradient em {
  color: #ffffff !important;
  font-style: italic !important;
  font-weight: 500 !important;
}

.page-hero .section-divider {
  width: min(200px, 46vw);
  height: 2px;
  margin: 1.25rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 183, 122, 0.95), transparent);
  opacity: 0.9;
}

.page-section {
  margin-bottom: 0 !important;
}

/* ============ IMPROVING BACKGROUND CONTRAST ============ */
.bg-surface {
  background-color: #f9f7f2 !important;
  background-image: radial-gradient(#e6e0d4 0.5px, transparent 0.5px);
  background-size: 20px 20px;
}

#page-vision.bg-surface {
  background-color: #f2efe6 !important;
}

/* ============ MOBILE RESPONSIVENESS OVERHAUL ============ */
@media (max-width: 1024px) {
  .section-inner {
    padding-left: var(--margin-edge) !important;
    padding-right: var(--margin-edge) !important;
  }
  
  .contact-flex, .donate-flex {
    flex-direction: column !important;
  }
  
  .contact-details, .contact-form-box, .donate-card-box, .donate-impact-details {
    width: 100% !important;
    flex: none !important;
  }
}

@media (max-width: 768px) {
  h1 { font-size: 28px !important; }
  h2 { font-size: 24px !important; }
  h3 { font-size: 20px !important; }
  
  /* Home quick contact: keep 2-column field rows (global .grid rule below forces 1 col) */
  #page-home #homeQuickContactForm .home-quick-contact-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.5rem !important;
  }
  
  .page-hero {
    padding: 60px 20px !important;
    text-align: center !important;
  }
  
  .page-hero-inner {
    padding: 20px !important;
  }
  
  /* Hamburger Menu Visibility */
  .menu-toggle {
    display: flex !important;
    z-index: 9999 !important;
  }
  
  .nav-menu {
    position: fixed !important;
    top: 0; right: -100%;
    width: 80% !important;
    height: 100vh !important;
    background: #fff !important;
    flex-direction: column !important;
    padding: 100px 40px !important;
    transition: 0.4s ease-in-out !important;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1) !important;
  }
  
  .nav-menu.active {
    right: 0 !important;
  }
  
  .nav-link {
    font-size: 18px !important;
    margin: 15px 0 !important;
  }
  
  /* Committee Table Responsive */
  .overflow-x-auto {
    -webkit-overflow-scrolling: touch !important;
  }
  
  table td {
    padding: 15px 10px !important;
    font-size: 13px !important;
  }
  
  /* Vision Cards */
  .vision-card {
    height: auto !important;
    min-height: 450px !important;
  }
  
  .vision-card-content {
    padding: 30px !important;
  }
  
  /* Grid Layouts Stack */
  /* Mobile drawer: keep 2-col submenu grids (global .grid forces 1 col below) */
  #globalMobileMenu .mobile-nav-group .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .grid {
    grid-template-columns: 1fr !important;
  }
  
  .lg\\:col-span-12, .lg\\:col-span-7, .lg\\:col-span-5 {
    grid-column: span 1 / span 1 !important;
  }
}

@media (max-width: 360px) {
  #page-home #homeQuickContactForm .home-quick-contact-row {
    grid-template-columns: 1fr !important;
  }
}

/* ============ MOBILE MENU (ADVANCED block removed â€” was fighting .hidden / display) ============ */
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #E65100;
  margin: 5px 0;
  transition: 0.3s;
}

/* Hero text fixes */
@media (max-width: 640px) {
  .page-hero h1 { font-size: 32px !important; line-height: 1.2 !important; }
  .page-hero .lede { font-size: 16px !important; }
  
  /* Card paddings */
  .bg-white.p-10 { padding: 25px !important; }
  .vision-card-content { padding: 25px !important; }
  
  /* Button sizes */
  .submit-btn-premium, .donate-submit-btn { padding: 15px !important; font-size: 14px !important; }
}

/* ============ GLOBAL SECTION SPACING (single source of truth) ============ */
.py-section-gap,
.page-section > .section {
  padding-top: var(--smf-section-y) !important;
  padding-bottom: var(--smf-section-y) !important;
}

@media (max-width: 768px) {
  .py-section-gap,
  .page-section > .section {
    padding-top: var(--smf-section-y-sm) !important;
    padding-bottom: var(--smf-section-y-sm) !important;
  }
}

/* Aligning featured items on home page */
.news-featured-grid {
  align-items: flex-start !important;
}

.news-featured-card {
  margin-top: 0 !important;
  padding-top: 20px !important;
}

/* ============ GLOBAL MOBILE & ALIGNMENT REFINEMENT ============ */
.footer-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
  gap: 40px !important;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr !important;
    text-align: center !important;
  }
  
  .footer-socials {
    justify-content: center !important;
  }
  
  .footer-bottom {
    flex-direction: column !important;
    gap: 10px !important;
    text-align: center !important;
  }
  
  /* Hero text scale */
  .page-hero h1 {
    font-size: 36px !important;
  }
}

/* Fix for the featured news alignment */
.featured-news-section .grid {
  align-items: flex-start !important;
}

.featured-news-card {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Exclude only the home hero strip from vertical padding */
#page-home > .section:first-child,
.hero-slider,
#page-home .hero-parallax {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Home content strips: same rhythm as inner pages */
#page-home .section:not(:first-child),
#page-home .py-section-gap {
  padding-top: var(--smf-section-y) !important;
  padding-bottom: var(--smf-section-y) !important;
}

@media (max-width: 768px) {
  #page-home .section:not(:first-child),
  #page-home .py-section-gap {
    padding-top: var(--smf-section-y-sm) !important;
    padding-bottom: var(--smf-section-y-sm) !important;
  }
}

.golden-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(230, 81, 0, 0.2), transparent);
  margin: 10px 0 !important;
}

.container-standard {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--margin-edge);
  padding-right: var(--margin-edge);
}

/* Contact & Donate: same outer rhythm as other inner pages */
#page-contact .contact-container,
#page-donate .donate-container {
  max-width: min(var(--container-max), 100%) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-top: var(--smf-section-y) !important;
  padding-left: var(--margin-edge) !important;
  padding-right: var(--margin-edge) !important;
}

#page-contact .contact-container {
  padding-bottom: calc(var(--smf-section-y) + 2.25rem) !important;
}

#page-donate .donate-container {
  padding-bottom: var(--smf-section-y) !important;
}

@media (max-width: 768px) {
  #page-contact .contact-container,
  #page-donate .donate-container {
    padding-top: var(--smf-section-y-sm) !important;
  }
  #page-contact .contact-container {
    padding-bottom: calc(var(--smf-section-y-sm) + 2.5rem) !important;
  }
  #page-donate .donate-container {
    padding-bottom: var(--smf-section-y-sm) !important;
  }
}

#page-contact .contact-flex,
#page-donate .donate-flex {
  gap: var(--smf-split-gap) !important;
}

/* ============ REVEAL ANIMATIONS ============ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform, opacity;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ============ MOBILE RESPONSIVENESS FIXES ============ */
@media (max-width: 768px) {
  /* Overriding Tailwind's static spacing for mobile */
  .px-margin-edge {
    padding-left: var(--margin-edge) !important;
    padding-right: var(--margin-edge) !important;
  }
  
  .container-standard {
    padding-left: var(--margin-edge);
    padding-right: var(--margin-edge);
  }

  /* Header logo: allow wrap / scale on narrow screens */
  #globalNav .group .font-bold {
    font-size: clamp(15px, 4vw, 18px) !important;
    white-space: normal !important;
    max-width: min(70vw, 15rem);
    line-height: 1.2 !important;
  }

  h1, .text-display-lg, .font-display-lg { font-size: 32px !important; line-height: 1.2 !important; }
  h2, .section-title { font-size: 28px !important; line-height: 1.3 !important; }
  h3 { font-size: 22px !important; }
  
  .page-hero {
    padding: 100px 15px 40px !important;
  }

  /* Force stack on mobile for general grids */
  .grid-cols-1, .grid-cols-2, .grid-cols-3, .grid-cols-4, .lg\:grid-cols-12, .md\:grid-cols-2, .md\:grid-cols-4 {
    grid-template-columns: 1fr !important;
  }

  /* Fix for giant SVGs if Tailwind fails to load or classes are overridden */
  svg {
    max-width: 100% !important;
    height: auto !important;
  }

  /* Constrain material symbols */
  .material-symbols-outlined {
    font-size: 24px !important; /* Base size */
    max-width: 1em;
    overflow: hidden;
  }
}



/* Ensure technical tables are scrollable on small screens */
.overflow-x-auto {
  -webkit-overflow-scrolling: touch;
  margin-bottom: 20px;
  overflow-x: auto;
}

@media (max-width: 768px) {
  table {
    min-width: 600px; /* Force scroll on very narrow screens */
  }
}

/* ============ MOBILE DRAWER (Tailwind .hidden must win when closed â€” no blanket display:flex) ============ */
#globalMobileMenu.hidden {
  display: none !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

#globalMobileMenu:not(.hidden) {
  display: flex !important;
  flex-direction: column;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#globalMobileMenu {
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  top: calc(var(--smf-admin-offset, 0px) + var(--smf-nav-h, 80px));
}

#hamburger.smf-mobile-nav-toggle,
#hamburger {
  position: relative;
  cursor: pointer;
  z-index: 110;
  background: transparent !important;
  outline: none !important;
  -webkit-appearance: none;
  box-sizing: border-box;
}

@media (max-width: 1023px) {
  #hamburger.smf-mobile-nav-toggle {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 10px !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    border: 2px solid rgba(230, 81, 0, 0.45) !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  }

  #hamburger.smf-mobile-nav-toggle .smf-hamburger-bar {
    display: block !important;
    width: 22px !important;
    min-height: 3px !important;
    height: 3px !important;
    background: #1f1812 !important;
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 !important;
  }

  #globalNav .smf-site-title {
    max-width: 100%;
  }
}

#hamburger.active .smf-hamburger-bar:nth-child(1) { transform: translateY(9.5px) rotate(45deg); }
#hamburger.active .smf-hamburger-bar:nth-child(2) { opacity: 0; transform: translateX(-10px); }
#hamburger.active .smf-hamburger-bar:nth-child(3) { transform: translateY(-9.5px) rotate(-45deg); }

/* Hide on desktop */
@media (min-width: 1024px) {
  #hamburger.smf-mobile-nav-toggle,
  #hamburger {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .hero-nav-btn { display: none; }
  .glass-panel { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
  
  /* Hero Buttons Visibility */
  .border-surface-bright {
    border-color: rgba(255, 255, 255, 0.4) !important;
    background: rgba(255, 255, 255, 0.1) !important;
  }
  
  /* Dashboard Responsive Fixes */
  #wq-bars {
    gap: 4px !important;
  }
  
  .wq-bar {
    min-width: 20px;
  }

  /* Force dashboard container to allow internal scroll if needed */
  .glass-panel.p-12 {
    padding: 30px 20px !important;
  }
  
  /* Adjust chart height */
  .relative.px-6.pb-2.pt-4 {
    height: 300px !important;
  }

  /* Adjust overlap for stats on mobile */
  #page-home section.relative.-mt-24 {
    margin-top: -40px !important;
  }
}

/* ============ PROJECTS & RESEARCH SECTION ============ */
#page-projects { background: #fdfaf5; }

.aiwps-section { position: relative; overflow: hidden; padding: 120px 0; }

.aiwps-grid {
  display: flex;
  gap: 100px;
  align-items: center;
}

.aiwps-img { flex: 1; position: relative; }
.aiwps-img::after {
  content: ''; position: absolute; inset: -20px;
  border: 1px solid var(--saffron); border-radius: 60px;
  z-index: -1; opacity: 0.2;
}
.aiwps-img img { width: 100%; border-radius: 40px; box-shadow: 0 40px 100px rgba(230, 81, 0, 0.1); }

.aiwps-content { flex: 1.2; }
.aiwps-content h3 { font-size: 38px !important; line-height: 1.2 !important; margin-bottom: 24px !important; }

.aiwps-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 50px;
  padding-top: 40px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.aiwps-stats .s strong { display: block; font-size: 36px; color: var(--saffron); font-family: var(--font-display); line-height: 1; margin-bottom: 8px; }
.aiwps-stats .s span { font-size: 10px; text-transform: uppercase; letter-spacing: 2.5px; color: var(--ink-soft); font-weight: 700; }

.lab-section { background: #fff; padding: 140px 0; border-top: 1px solid rgba(0,0,0,0.03); }
.lab-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 80px;
}

.lab-card {
  background: var(--paper);
  padding: 60px 45px;
  border-radius: 40px;
  border: 1px solid transparent;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.lab-card:hover { 
  background: #fff;
  border-color: var(--saffron);
  transform: translateY(-15px); 
  box-shadow: 0 40px 80px rgba(183, 138, 62, 0.1); 
}

.lab-icon {
  width: 70px; height: 70px; background: linear-gradient(135deg, var(--saffron), var(--maroon)); color: #fff;
  border-radius: 24px; display: flex; align-items: center; justify-content: center;
  font-family: 'Tiro Devanagari Sanskrit', serif; font-size: 28px; margin-bottom: 30px;
  box-shadow: 0 15px 30px rgba(230, 81, 0, 0.2);
}

.live-data { padding: 120px 0; background: #faf9f6; }
.data-table-wrap {
  background: #fff;
  border-radius: 40px;
  overflow: hidden;
  box-shadow: 0 50px 120px rgba(0,0,0,0.07);
  margin-top: 60px;
}

.data-header {
  padding: 35px 50px;
  background: var(--ink);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; padding: 30px 50px; background: #fcfbf8; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 2px; color: var(--ink-soft); }
.data-table td { padding: 25px 50px; border-bottom: 1px solid rgba(0,0,0,0.04); font-size: 16px; }
.ghat-name { font-weight: 700; color: var(--ink); }

.case-section { padding: 140px 0; }
.case-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 50px;
  margin-top: 80px;
}

.case-card {
  display: flex;
  background: #fff;
  border-radius: 40px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.04);
  transition: all 0.5s ease;
}

.case-card:hover { transform: scale(1.03); box-shadow: 0 50px 100px rgba(0,0,0,0.08); }
.case-img { width: 45%; }
.case-img img { width: 100%; height: 100%; object-fit: cover; }
.case-body { flex: 1; padding: 50px; display: flex; flex-direction: column; justify-content: center; }
.case-meta { font-size: 10px; color: var(--saffron); font-weight: 800; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 16px; }
.case-card h4 { font-size: 20px !important; line-height: 1.3 !important; margin-bottom: 16px !important; }
.case-link { display: inline-block; margin-top: 24px; font-size: 12px; font-weight: 800; color: var(--maroon); text-decoration: none; border-bottom: 2px solid var(--saffron); padding-bottom: 2px; }

.tech-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: 80px;
}

.tech-card {
  background: #fff;
  padding: 50px 40px;
  border-radius: 32px;
  text-align: center;
  border: 1px solid rgba(0,0,0,0.03);
}

.tech-card .icon { font-size: 40px; margin-bottom: 20px; display: block; }
.tech-card h5 { font-size: 18px !important; margin-bottom: 12px !important; }

@media (max-width: 1024px) {
  .aiwps-grid { flex-direction: column; gap: 60px; text-align: center; }
  .aiwps-stats { grid-template-columns: 1fr; gap: 20px; }
  .lab-grid, .case-grid, .tech-grid { grid-template-columns: 1fr; }
  .case-card { flex-direction: column; }
  .case-img { width: 100%; height: 280px; }
  .data-header { flex-direction: column; gap: 15px; text-align: center; }
  .data-table th, .data-table td { padding: 15px 20px; font-size: 13px; }
}

/* ============ PREMIUM FORM STYLES ============ */
.smf-form .form-row { 
  display: flex; 
  gap: 24px; 
  margin-bottom: 24px; 
}

.smf-form .form-field { 
  margin-bottom: 24px; 
  flex: 1; 
}

.smf-form label { 
  font-size: 11px; 
  font-weight: 700; 
  color: var(--ink); 
  margin-bottom: 10px; 
  display: block;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
}

.smf-form input, 
.smf-form select, 
.smf-form textarea {
  width: 100%; 
  padding: 14px 20px; 
  background: #f9f7f2; 
  border: 1px solid rgba(31, 24, 18, 0.05);
  border-radius: 16px; 
  outline: none; 
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
  font-size: 15px;
  color: var(--ink);
  font-family: inherit;
}

.smf-form input:focus, 
.smf-form textarea:focus,
.smf-form select:focus { 
  background: #fff;
  border-color: var(--saffron); 
  box-shadow: 0 8px 24px rgba(230, 81, 0, 0.08);
}

.smf-form textarea { 
  height: 120px; 
  resize: none; 
}

.submit-btn-premium {
  width: 100%; 
  padding: 18px; 
  background: var(--ink); 
  color: #fff; 
  border: none; 
  border-radius: 16px;
  font-weight: 700; 
  text-transform: uppercase; 
  letter-spacing: 2px; 
  cursor: pointer; 
  transition: all 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 13px;
}

.submit-btn-premium:hover { 
  background: var(--saffron);
  box-shadow: 0 15px 35px rgba(230, 81, 0, 0.25);
  transform: translateY(-3px);
}

.form-status {
  margin-top: 24px;
  padding: 16px;
  border-radius: 16px;
  font-size: 14px;
  display: none;
  text-align: center;
}

@media (max-width: 768px) {
  .smf-form .form-row { flex-direction: column; gap: 0; }
  .smf-form .form-field { margin-bottom: 20px; }
}

/* ============ MOBILE POLISH (embeds & safe areas) ============ */
#main-content iframe {
  max-width: 100%;
}

@media (max-width: 640px) {
  .back-to-top {
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
    right: max(16px, env(safe-area-inset-right, 0px));
    left: auto;
    width: 46px;
    height: 46px;
  }
}

#homeQuickContactStatus.success {
  color: #1b5e20;
  background: rgba(46, 125, 50, 0.12);
  padding: 8px 10px;
  margin-top: 4px;
  border-radius: 8px;
}
#homeQuickContactStatus.error {
  color: #b71c1c;
  background: rgba(198, 40, 40, 0.1);
  padding: 8px 10px;
  margin-top: 4px;
  border-radius: 8px;
}

/* ============ PAGE HERO BANNER (all inner pages) â€” vertical padding ============ */
.page-section > header.page-hero {
  padding-top: clamp(1.75rem, 4.5vw, 3.25rem) !important;
  padding-bottom: clamp(1.75rem, 4.5vw, 3.25rem) !important;
}

.page-section > header.page-hero .page-hero-inner {
  padding-top: clamp(0.35rem, 1.2vw, 0.85rem) !important;
  padding-bottom: clamp(0.35rem, 1.2vw, 0.85rem) !important;
}

@media (max-width: 768px) {
  .page-section > header.page-hero {
    padding-top: clamp(1.5rem, 6vw, 2.75rem) !important;
    padding-bottom: clamp(1.5rem, 6vw, 2.75rem) !important;
  }
}

/* ============ SAVE GANGA SECTION PAGES (Pollution, Struggle, Partners, Data) ============ */
#page-pollution-of-ganga > .container-standard,
#page-struggle-to-save-ganga > .container-standard,
#page-associated-organization > .container-standard,
#page-water-quality-data > .container-standard {
  width: 100%;
  max-width: min(var(--container-max, 1200px), 100%);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--margin-edge, clamp(18px, 4vw, 48px));
  padding-right: var(--margin-edge, clamp(18px, 4vw, 48px));
}

#page-pollution-of-ganga .prose-premium,
#page-struggle-to-save-ganga .prose-premium {
  max-width: 68ch;
  font-size: 1.0625rem;
  line-height: 1.78;
  color: var(--ink-soft);
}

#page-pollution-of-ganga .prose-premium h3,
#page-struggle-to-save-ganga .prose-premium h3 {
  font-size: clamp(1.35rem, 2.5vw, 1.65rem) !important;
  line-height: 1.25 !important;
  margin-top: 2rem !important;
  margin-bottom: 0.85rem !important;
  color: var(--ink) !important;
  letter-spacing: -0.02em;
}

#page-pollution-of-ganga .prose-premium h3:first-child,
#page-struggle-to-save-ganga .prose-premium h3:first-child {
  margin-top: 0 !important;
}

#page-pollution-of-ganga .prose-premium p,
#page-struggle-to-save-ganga .prose-premium p {
  margin-bottom: 1.15rem;
}

#page-pollution-of-ganga .prose-premium .alert-box,
#page-struggle-to-save-ganga .prose-premium .alert-box {
  margin-top: 1.75rem;
  margin-bottom: 1.75rem;
}

#page-pollution-of-ganga > .container-standard > .grid,
#page-struggle-to-save-ganga > .container-standard > .grid,
#page-associated-organization > .container-standard > .grid:first-of-type,
#page-water-quality-data > .container-standard > .grid {
  gap: var(--smf-grid-gap);
  align-items: start;
}

/* Pollution / Struggle: media column */
#page-pollution-of-ganga .lg\:col-span-5 .relative.rounded-3xl,
#page-pollution-of-ganga .lg\:col-span-5 .relative {
  min-height: 0;
}

#page-pollution-of-ganga .lg\:col-span-5 .relative.rounded-3xl img {
  width: 100%;
  min-height: 260px;
  max-height: min(52vh, 480px);
  object-fit: cover;
  display: block;
}

/* Struggle timeline â€” mobile */
@media (max-width: 767px) {
  #page-struggle-to-save-ganga .timeline-v2 .timeline-item {
    gap: 0.35rem;
  }
  #page-struggle-to-save-ganga .timeline-item .year {
    width: auto;
    font-size: 1.25rem !important;
  }
  #page-struggle-to-save-ganga .timeline-item.border-l-2 {
    margin-left: 0 !important;
    padding-left: 1rem !important;
    border-left-width: 3px;
  }
}

/* Partners / shared: bottom callout band */
.smf-page-band {
  margin-top: var(--smf-section-y);
  padding: clamp(1.75rem, 4vw, 2.75rem) var(--margin-edge);
}

/* Water quality: sidebar not sticky on small screens */
@media (max-width: 1023px) {
  #page-water-quality-data .sticky {
    position: relative !important;
    top: auto !important;
  }
}

#page-water-quality-data .overflow-x-auto table {
  min-width: 0;
}

@media (max-width: 768px) {
  #page-water-quality-data .overflow-x-auto table {
    font-size: 0.8125rem;
  }
  #page-water-quality-data th.px-6,
  #page-water-quality-data td.px-6 {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
}

/* ========== POLAROID GALLERY CSS ========== */

/* ========== MASONRY GALLERY CSS ========== */

.masonry-section {
  position: relative;
  background: 
    radial-gradient(ellipse at top, rgba(184, 134, 73, 0.06), transparent 60%),
    var(--surface-container-low);
  overflow: hidden;
}

.masonry-grid {
  column-count: 4;
  column-gap: 16px;
  width: 100%;
}

@media (max-width: 1100px) { .masonry-grid { column-count: 3; } }
@media (max-width: 768px)  { .masonry-grid { column-count: 2; column-gap: 12px; } }
@media (max-width: 480px)  { .masonry-grid { column-count: 1; } }

.masonry-item {
  break-inside: avoid;
  margin-bottom: 16px;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: #fff;
  box-shadow: 
    0 4px 14px rgba(60, 30, 10, 0.08),
    0 1px 3px rgba(60, 30, 10, 0.05);
  transition: 
    transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.4s ease;
  display: block;
}

.masonry-item:hover {
  transform: translateY(-6px);
  box-shadow: 
    0 18px 40px rgba(60, 30, 10, 0.18),
    0 4px 12px rgba(60, 30, 10, 0.1);
}

.masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.masonry-item:hover img {
  transform: scale(1.06);
}

.masonry-item .tag {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(255, 255, 255, 0.95);
  color: #8f4e00;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  z-index: 2;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.masonry-item .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, 
    rgba(42, 28, 18, 0.92) 0%, 
    rgba(42, 28, 18, 0.5) 35%, 
    transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  pointer-events: none;
}

.masonry-item:hover .overlay {
  opacity: 1;
}

.masonry-item .overlay .title {
  color: #fefcf5;
  font-family: 'Noto Serif', serif;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 2px;
  transform: translateY(8px);
  transition: transform 0.4s ease;
}
.masonry-item .overlay .date {
  color: rgba(254, 252, 245, 0.75);
  font-size: 11px;
  letter-spacing: 0.05em;
  transform: translateY(8px);
  transition: transform 0.4s ease 0.05s;
}
.masonry-item:hover .overlay .title,
.masonry-item:hover .overlay .date {
  transform: translateY(0);
}

