/* ===========================================================================
   HinduInfo.com — Professional Design System
   Color: Orange (sacred/accent) + Blue (navigation/structural) + White (content)
   Typography: Inter (English) + Noto Sans Telugu (Telugu)
   =========================================================================== */

/* ------------------------------------------------------------------ Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  min-width: 320px;
  max-width: 100vw;
  overflow-x: hidden;
  background: #f8f9fb;
  color: #1a1a2e;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
a:hover { color: #c0501a; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; border-radius: 4px; }
::selection { background: rgba(192, 80, 26, 0.15); }

/* ------------------------------------------------------------ Variables */
:root {
  /* Orange — sacred, devotional, primary accent */
  --orange-50: #fff7ed;
  --orange-100: #ffedd5;
  --orange-200: #fed7aa;
  --orange-300: #fdba74;
  --orange-400: #fb923c;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --orange-700: #c0501a;
  --orange-800: #9a3412;
  --orange-900: #7c2d12;
  --orange-primary: #ea580c;
  --orange-hover: #c0501a;
  --orange-light: #fff7ed;
  --orange-surface: #fff4e6;

  /* Blue — navigation, information, structural */
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-300: #93c5fd;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e3a5f;
  --blue-900: #1e293b;
  --blue-primary: #2563eb;
  --blue-hover: #1d4ed8;
  --blue-nav: #1e293b;
  --blue-light: #eff6ff;

  /* Neutrals */
  --white: #ffffff;
  --gray-50: #f8f9fb;
  --gray-100: #f1f3f5;
  --gray-200: #e2e5ea;
  --gray-300: #c8ccd4;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Semantic */
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --bg: #f8f9fb;
  --text-primary: #1a1a2e;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --border: #e2e5ea;
  --border-light: #f1f3f5;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 50px rgba(0,0,0,0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Typography */
  --font-telugu: 'Noto Sans Telugu', 'Nirmala UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Georgia', 'Times New Roman', serif;
  --maxw: 1200px;
  --maxw-narrow: 760px;
}

/* Telugu body override */
html[lang="te"] body,
body[lang="te"] {
  font-family: var(--font-telugu);
}

/* ---------------------------------------------------------------- Layout */
.container, .header-inner, .footer-inner, .home-hero, .home-section,
.panchangam-shell, .calendar-shell, .content-shell, .domain-shell, .gita-shell,
.search-shell, .placeholder-page, .auth-shell, .admin-page, .admin-main {
  max-width: var(--maxw);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* ======================================================== Logo masthead */
.logo-masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: clamp(10px, 2.5vw, 34px);
  height: auto;
  min-height: 120px;
  max-height: 280px;
  align-items: center;
  padding: 10px 20px;
  background: #000000;
  background-color: #000000 !important;
  overflow: hidden;
}
.logo-masthead-link {
  display: inline-grid;
  place-items: center;
  line-height: 0;
}
.logo-masthead-image {
  display: block;
  width: auto;
  max-width: min(92vw, 420px);
  height: 200px;
  object-fit: contain;
  object-position: 20% 15%;
  filter: brightness(1.7) contrast(1.2) drop-shadow(0 0 2px rgba(255,255,255,0.6));
}
.logo-social {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.4vw, 14px);
  min-width: 0;
  max-width: 100%;
}
.logo-social-left { justify-content: flex-end; }
.logo-social-right { justify-content: flex-start; }
.logo-social-link,
.mobile-social-links a {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 179, 79, .38);
  border-radius: 999px;
  color: #ffcc85;
  background: rgba(255, 255, 255, .06);
  transition: transform .18s, color .18s, border-color .18s, background .18s;
}
.logo-social-link:hover,
.logo-social-link:focus-visible,
.mobile-social-links a:hover,
.mobile-social-links a:focus-visible {
  color: #fff;
  border-color: #ffb34f;
  background: rgba(255, 179, 79, .18);
  transform: translateY(-1px);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(255, 179, 79, .22);
}
.logo-social-link:active { transform: translateY(0); }
.social-icon-svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ================================================================ Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #8f0000;
  border-bottom: 1px solid rgba(255, 179, 79, 0.42);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  height: 72px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  flex-shrink: 0;
  text-decoration: none;
}
.brand:hover { color: inherit; }
.brand-mark {
  font-size: 1.8rem;
  color: var(--orange-primary);
  line-height: 1;
  font-weight: 400;
}
.brand-name {
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.brand-name span { color: #ffb34f; }

/* Search */
.search-form {
  display: flex;
  flex: 1;
  max-width: 400px;
  margin: 0 16px;
}
.search-label { position: absolute; left: -9999px; }
.search-input {
  width: 100%;
  padding: 9px 16px 9px 40px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--gray-50);
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
}
.search-input:focus {
  outline: none;
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  background-color: var(--white);
}
.search-input::placeholder { color: var(--gray-400); }

/* Nav actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  gap: 2px;
}
.nav-link {
  padding: 8px 12px;
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(255,255,255,0.92);
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.nav-link:hover { color: #ffb34f; background: rgba(255,255,255,0.08); }
.nav-link[aria-current="page"] {
  color: #ffb34f;
  background: rgba(255,255,255,0.1);
  font-weight: 600;
}

/* Language switcher */
.language-switcher {
  display: flex;
  border: 1.5px solid rgba(255,255,255,0.35);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.lang-btn {
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.92);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  line-height: 1.4;
}
.lang-btn:hover { background: rgba(255,255,255,0.08); color: #ffb34f; }
.lang-btn[aria-pressed="true"] {
  background: var(--orange-primary);
  color: var(--white);
}
.lang-btn[aria-pressed="true"]:hover { background: var(--orange-hover); }

/* Account links */
.account-link {
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.92);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  white-space: nowrap;
  text-decoration: none;
}
.account-link:hover { color: #ffb34f; background: rgba(255,255,255,0.08); }

/* Mobile extras inside nav (desktop: visible inline) */
.nav-links .mobile-extras {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding-left: 12px;
  border-left: 1px solid rgba(255,255,255,0.15);
}

/* Mobile menu button */
.menu-button {
  display: none;
  border: 1.5px solid rgba(255,255,255,0.45);
  background: transparent;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
  color: var(--white);
  transition: all 0.2s;
  line-height: 1;
}
.menu-button:hover { border-color: #ffb34f; color: #ffb34f; }
.menu-button svg { width: 22px; height: 22px; }

/* Mobile extras inside nav (desktop: visible inline with nav links) */
.nav-links .mobile-extras {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding-left: 12px;
  border-left: 1px solid rgba(255,255,255,0.15);
}

/* ================================================================ Footer */
.mobile-social-links { display: none; }

/* ================================================================ Footer */
.site-footer {
  margin-top: 64px;
  background: var(--blue-nav);
  color: var(--white);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
  padding: 40px 20px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 180px;
}
.footer-brand strong {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--white);
}
.footer-brand small { color: var(--gray-400); font-size: 0.82rem; }
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.site-footer nav a {
  color: rgba(255,255,255,0.75);
  font-size: 0.88rem;
  padding: 4px 0;
  transition: color 0.2s;
}
.site-footer nav a:hover { color: var(--white); }
.footer-bottom {
  width: 100%;
  padding-top: 20px;
  margin-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}

/* ================================================================ Hero */
.home-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 56px 20px 48px;
}
.home-hero-image {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--orange-surface);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.home-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-xl);
}
.home-hero-image[aria-hidden="true"] {
  background: linear-gradient(135deg, var(--orange-light) 0%, var(--blue-light) 100%);
}
.home-hero-image[aria-hidden="true"]::after {
  content: '🕉';
  font-size: 5rem;
  opacity: 0.2;
}
.home-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.home-hero-copy .section-kicker {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--orange-primary);
}
.home-hero-copy h1 {
  font-family: var(--font-telugu);
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--gray-900);
  letter-spacing: -0.02em;
}
.home-hero-copy blockquote {
  font-family: var(--font-telugu);
  font-size: 1.25rem;
  line-height: 1.6;
  border-left: 4px solid var(--orange-primary);
  padding: 12px 20px;
  margin: 8px 0;
  background: var(--orange-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--gray-800);
  font-style: italic;
}
.home-hero-copy h2 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 4px;
}
.home-hero-copy p {
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 50ch;
}
.home-hero-copy small {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 4px;
}

/* Hero CTA buttons */
.hero-ctas {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* ============================================================= Sections */
.section-kicker {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--orange-primary);
  margin-bottom: 6px;
}
.home-search, .home-section {
  padding: 36px 20px;
}
.home-search h2, .home-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}

/* ============================================================= Search */
.home-search form {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.home-search input {
  flex: 1;
  min-width: 240px;
  padding: 14px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--white);
}
.home-search input:focus {
  outline: none;
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.home-search button, .btn-primary {
  background: var(--orange-primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 28px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  white-space: nowrap;
}
.home-search button:hover, .btn-primary:hover {
  background: var(--orange-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.home-search button:active, .btn-primary:active { transform: translateY(0); }

/* ============================================================= Quick Links */
.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.quick-links a {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  text-decoration: none;
}
.quick-links a:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--orange-primary);
  color: inherit;
}
.quick-links a span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--orange-light);
  color: var(--orange-primary);
  font-weight: 800;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}
.quick-links h3 {
  font-family: var(--font-telugu);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-900);
}
.quick-links p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================================ Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.feature-grid > div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.feature-grid h2 {
  font-family: var(--font-telugu);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.feature-grid p { color: var(--text-secondary); line-height: 1.6; }

/* ============================================================ Wishes / Greetings */
.home-wishes { background: var(--surface); }
.wishes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.wish-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.wish-card-media img {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: var(--gray-100);
}
.wish-card-kicker {
  margin: 0 0 6px;
  color: var(--orange-primary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.wish-card-copy h3 {
  margin: 0 0 8px;
  font-family: var(--font-telugu);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gray-900);
}
.wish-card-subtitle {
  margin: 0 0 8px;
  color: var(--text-secondary);
  font-size: 0.92rem;
}
.wish-card-message {
  margin: 0 0 12px;
  color: var(--gray-700);
  font-size: 0.92rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* ============================================================ Discovery Lists */
.discovery-list, .domain-list, .article-list, .topic-list {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}
.discovery-list a, .domain-list a, .article-list a, .topic-list a {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  font-family: var(--font-telugu);
  font-weight: 500;
  color: var(--gray-800);
}
.discovery-list a:hover, .domain-list a:hover, .article-list a:hover, .topic-list a:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  border-color: var(--orange-primary);
  color: var(--gray-900);
}

/* ========================================================= Text Actions */
.text-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 10px 20px;
  background: var(--orange-primary);
  color: var(--white);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  text-decoration: none;
}
.text-action:hover {
  background: var(--orange-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: var(--white);
}
.text-action-secondary {
  background: var(--blue-primary);
}
.text-action-secondary:hover {
  background: var(--blue-hover);
}
.logout-form { margin: 0; }
.logout-button {
  border: 0;
  cursor: pointer;
}

/* ========================================================= Volunteer CTA */
.volunteer-callout {
  background: linear-gradient(135deg, var(--orange-light) 0%, var(--blue-light) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  margin: 32px 0;
  text-align: center;
}
.volunteer-callout h2 {
  font-family: var(--font-telugu);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 8px 0;
}
.volunteer-callout p {
  color: var(--text-secondary);
  max-width: 50ch;
  margin: 0 auto 16px;
  line-height: 1.6;
}
.volunteer-callout div {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========================================================== Content Shells */
.content-shell, .domain-shell, .gita-shell, .search-shell,
.placeholder-page, .panchangam-shell, .calendar-shell {
  padding: 36px 20px;
}
.section-intro {
  color: var(--text-secondary);
  max-width: 70ch;
  line-height: 1.7;
}
.empty-state, .data-notice {
  background: var(--orange-light);
  border: 1px dashed var(--orange-200);
  border-radius: var(--radius-md);
  padding: 20px;
  color: var(--gray-700);
  text-align: center;
  font-size: 0.95rem;
}
.reading-shell {
  max-width: var(--maxw-narrow);
  margin: 0 auto;
  padding: 40px 20px;
}
.reading-header h1 {
  font-family: var(--font-telugu);
  font-size: 2rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 8px;
}
.reading-summary {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}
.article-body p {
  margin-bottom: 1.2em;
  line-height: 1.8;
  color: var(--gray-700);
}
.breadcrumbs {
  margin-bottom: 20px;
}
.breadcrumbs ol {
  display: flex;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  align-items: center;
}
.breadcrumbs li + li::before {
  content: '›';
  margin-right: 8px;
  color: var(--gray-300);
}
.breadcrumbs a {
  color: var(--orange-primary);
  font-weight: 500;
}
.breadcrumbs a:hover { text-decoration: underline; }

/* ====================================================== Panchangam Layout */
.panchangam-date, .panchangam-location, .panchangam-sun,
.panchangam-grid, .panchangam-times, .panchangam-calendar,
.panchangam-festivals { margin: 18px 0; }
.panchangam-sun {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.panchangam-sun article, .panchangam-grid article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}
.panchangam-sun article:hover, .panchangam-grid article:hover {
  box-shadow: var(--shadow-md);
}
.panchangam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.panchangam-grid strong, .panchangam-sun strong {
  font-family: var(--font-telugu);
  display: block;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--orange-primary);
  margin-bottom: 4px;
}
.panchangam-controls, .calendar-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 16px 0;
}
.panchangam-controls button, .calendar-nav button, .calendar-year-nav button {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--gray-700);
  transition: all 0.2s;
}
.panchangam-controls button:hover, .calendar-nav button:hover,
.calendar-year-nav button:hover {
  border-color: var(--orange-primary);
  color: var(--orange-primary);
  background: var(--orange-light);
}
.calendar-nav-btn {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--gray-700);
  text-decoration: none;
  transition: all 0.2s;
}
.calendar-nav-btn:hover {
  border-color: var(--orange-primary);
  color: var(--orange-primary);
  background: var(--orange-light);
}
.calendar-nav-btn[aria-disabled="true"] {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

/* =========================================================== Calendar */
.calendar-month { margin: 20px 0; }
.calendar-weekdays, .calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.calendar-weekdays {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 0;
}
.calendar-day {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  min-height: 80px;
  transition: border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.calendar-day:hover { border-color: var(--blue-primary); }
.calendar-day-selected {
  border-color: var(--orange-primary) !important;
  box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.2);
  background: var(--orange-light);
}
.cal-has-festival {
  border-color: var(--orange-primary) !important;
  background: var(--orange-light);
}
.cal-has-festival strong { color: var(--orange-primary); }
.calendar-blank { background: transparent; border-color: transparent; cursor: default; }
.calendar-blank:hover { border-color: transparent; }
.calendar-day strong { font-size: 1rem; font-weight: 600; color: var(--gray-800); }
.calendar-day span, .calendar-day small {
  display: block;
  font-family: var(--font-telugu);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.calendar-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 20px 0;
}
.calendar-facts article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.calendar-facts strong {
  font-family: var(--font-telugu);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--blue-primary);
  margin-bottom: 4px;
  display: block;
}

/* ============================================================= Search */
.search-discovery {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.search-discovery input {
  flex: 1;
  min-width: 260px;
  padding: 14px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--white);
}
.search-discovery input:focus {
  outline: none;
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.search-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.search-filters a {
  padding: 7px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: all 0.2s;
  background: var(--white);
}
.search-filters a:hover {
  border-color: var(--orange-primary);
  color: var(--orange-primary);
}
.search-filters a[aria-current="page"] {
  background: var(--orange-primary);
  color: var(--white);
  border-color: var(--orange-primary);
}
.search-results article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin: 12px 0;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}
.search-results article:hover { box-shadow: var(--shadow-md); }
.search-count, .search-results small {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ============================================================ Placeholder */
.placeholder-page {
  text-align: center;
  padding: 80px 20px;
}
.placeholder-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--orange-primary);
  font-weight: 700;
  font-size: 0.82rem;
  margin-bottom: 12px;
}
.placeholder-page h1 {
  font-family: var(--font-telugu);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--gray-900);
}

/* ================================================================ Forms */
.auth-shell, .auth-shell-narrow {
  max-width: 480px;
  margin: 0 auto;
  padding: 48px 24px;
}
.auth-shell h1, .auth-shell-narrow h1 {
  font-family: var(--font-telugu);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--gray-900);
  text-align: center;
  margin-bottom: 8px;
}
.auth-form {
  display: grid;
  gap: 18px;
  margin-top: 24px;
  background: var(--surface);
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.auth-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-700);
}
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"],
.auth-form input[type="tel"],
.auth-form input[type="search"] {
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--white);
}
.auth-form input:focus {
  outline: none;
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.auth-submit {
  background: var(--orange-primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 28px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  margin-top: 8px;
}
.auth-submit:hover {
  background: var(--orange-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.auth-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.auth-message {
  background: var(--blue-light);
  border: 1px solid var(--blue-200);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  color: var(--blue-800);
  font-size: 0.9rem;
}
.auth-switch { text-align: center; margin-top: 16px; font-size: 0.9rem; color: var(--text-secondary); }
.auth-switch a { color: var(--orange-primary); font-weight: 600; }
.check-label {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 400;
  cursor: pointer;
}
.check-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--orange-primary);
}

/* ============================================================= Admin */
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: var(--blue-nav);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
}
.admin-header strong {
  font-family: var(--font-telugu);
  font-size: 1.05rem;
  font-weight: 700;
}
.admin-header a {
  color: rgba(255,255,255,0.9);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}
.admin-header a:hover { color: #ffb34f; }
.admin-logout-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.9);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}
.admin-logout-button:hover { color: #ffb34f; }
.admin-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.35);
  border-radius: var(--radius-sm);
  color: var(--white);
  cursor: pointer;
}

.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 56px);
}
.admin-nav {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 20px 12px;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
}
.admin-nav a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--gray-700);
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 2px;
}
.admin-nav a:hover {
  background: var(--gray-50);
  color: var(--gray-900);
}
.admin-nav a[aria-current="page"] {
  background: var(--orange-light);
  color: var(--orange-primary);
  font-weight: 600;
}
.admin-main {
  padding: 32px;
  background: var(--bg);
}
.admin-main {
  padding: 32px;
  background: var(--bg);
}
.admin-page-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 24px;
}
.admin-page-heading h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
}
.admin-record-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}
.admin-record-list article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  transition: box-shadow 0.2s;
}
.admin-record-list article:hover { box-shadow: var(--shadow-md); }
.admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-primary-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--orange-primary);
  color: var(--white);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s;
  text-decoration: none;
}
.admin-primary-link:hover {
  background: var(--orange-hover);
  color: var(--white);
}

/* Admin dashboard cards */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.admin-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.admin-stat-card h3 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.admin-stat-card .stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--gray-900);
}

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-draft { background: var(--gray-100); color: var(--gray-600); }
.badge-review { background: var(--blue-light); color: var(--blue-primary); }
.badge-approved { background: #ecfdf5; color: #059669; }
.badge-published { background: var(--orange-light); color: var(--orange-primary); }
.badge-archived { background: #fef2f2; color: #dc2626; }

/* Admin tables */
.admin-table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.admin-table th {
  background: var(--gray-50);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--gray-600);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--gray-700);
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--gray-50); }

/* ================================================================ Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; border-radius: var(--radius-md); font-weight: 600; font-size: 0.9rem; cursor: pointer; transition: all 0.2s; border: 1.5px solid transparent; text-decoration: none; }
.btn-primary { background: var(--orange-primary); color: var(--white); border-color: var(--orange-primary); }
.btn-primary:hover { background: var(--orange-hover); border-color: var(--orange-hover); color: var(--white); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--blue-primary); color: var(--white); border-color: var(--blue-primary); }
.btn-secondary:hover { background: var(--blue-hover); border-color: var(--blue-hover); color: var(--white); }
.btn-outline { background: var(--white); color: var(--gray-700); border-color: var(--border); }
.btn-outline:hover { border-color: var(--orange-primary); color: var(--orange-primary); }
.btn-danger { background: #dc2626; color: var(--white); border-color: #dc2626; }
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; color: var(--white); }
.btn-sm { padding: 6px 14px; font-size: 0.82rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* =========================================================== Gita Pages */
:root {
  --gita-bg: #0f0f0f;
  --gita-surface: #1a1a1a;
  --gita-surface-raised: #242424;
  --gita-border: #2a2a2a;
  --gita-border-light: #333333;
  --gita-text-primary: #f5f5f5;
  --gita-text-secondary: #b0b0b0;
  --gita-text-muted: #808080;
  --gita-accent: #ea580c;
  --gita-accent-light: #fdba74;
  --gita-maroon: #7c2d12;
  --gita-maroon-light: #9a3412;
  --gita-saffron: #f97316;
  --gita-gold: #fbbf24;
  --gita-reading-width: 760px;
}

.gita-shell {
  max-width: var(--gita-reading-width);
  margin: 0 auto;
  padding: 32px 20px;
}

@media (prefers-color-scheme: dark) {
  .gita-shell {
    --gita-bg: #0f0f0f;
    --gita-surface: #1a1a1a;
    --gita-text-primary: #f5f5f5;
  }
}

/* Chapter list */
.gita-chapters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.chapter-card {
  display: flex;
  flex-direction: column;
  background: var(--gita-surface);
  border: 1px solid var(--gita-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.chapter-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gita-maroon) 0%, var(--gita-saffron) 50%, var(--gita-gold) 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.chapter-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gita-border-light);
}

.chapter-card:hover::before {
  opacity: 1;
}

.chapter-card .chapter-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--gita-maroon) 0%, var(--gita-maroon-light) 100%);
  color: var(--white);
  font-weight: 800;
  font-size: 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(124, 45, 18, 0.3);
}

.chapter-card h3 {
  font-family: var(--font-telugu);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gita-text-primary);
  margin-bottom: 6px;
}

.chapter-card .chapter-desc {
  font-size: 0.9rem;
  color: var(--gita-text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.chapter-card .chapter-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--gita-text-muted);
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--gita-border);
}

/* Verse page */
.verse-shell {
  max-width: var(--gita-reading-width);
  margin: 0 auto;
  padding: 32px 20px;
}

.verse-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--gita-border);
}

.verse-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--gita-maroon) 0%, var(--gita-maroon-light) 100%);
  color: var(--white);
  font-weight: 800;
  font-size: 1.1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(124, 45, 18, 0.3);
}

.verse-sanskrit {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  line-height: 1.9;
  color: var(--gita-text-primary);
  padding: 24px 28px;
  background: var(--gita-surface);
  border-left: 4px solid var(--gita-saffron);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 20px 0;
  font-style: italic;
  box-shadow: var(--shadow-sm);
}

.verse-telugu {
  font-family: var(--font-telugu);
  font-size: 1.2rem;
  line-height: 1.9;
  color: var(--gita-text-secondary);
  margin: 20px 0;
  padding: 16px 0;
}

.verse-section-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gita-accent);
  margin-bottom: 8px;
  margin-top: 28px;
}

.verse-meta {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--gita-border);
  font-size: 0.9rem;
  color: var(--gita-text-muted);
}

/* Reading controls */
.reading-controls {
  position: sticky;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  background: var(--gita-surface-raised);
  border: 1px solid var(--gita-border);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  margin: 24px auto 0;
  width: fit-content;
}

.reading-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--gita-border);
  border-radius: var(--radius-full);
  background: var(--gita-surface);
  color: var(--gita-text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.reading-controls button:hover {
  background: var(--gita-border);
  color: var(--gita-text-primary);
  border-color: var(--gita-border-light);
}

/* Dark mode */
.gita-shell.dark-mode {
  --gita-bg: #0f0f0f;
  --gita-surface: #1a1a1a;
  --gita-surface-raised: #242424;
  --gita-border: #2a2a2a;
  --gita-text-primary: #f5f5f5;
  --gita-text-secondary: #b0b0b0;
}

/* PWA Install Modal */
.pwa-install-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.pwa-install-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.pwa-install-modal {
  width: 100%;
  max-width: 420px;
  background: var(--gita-surface);
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
  border: 1px solid var(--gita-border);
  border-bottom: none;
  padding: 28px 24px 32px;
  box-shadow: var(--shadow-xl);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

.pwa-install-overlay.is-visible .pwa-install-modal {
  transform: translateY(0);
}

.pwa-install-modal .pwa-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--gita-maroon) 0%, var(--gita-saffron) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--white);
}

.pwa-install-modal h2 {
  font-family: var(--font-telugu);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gita-text-primary);
  margin-bottom: 6px;
}

.pwa-install-modal .pwa-subtitle {
  font-size: 0.95rem;
  color: var(--gita-text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

.pwa-install-modal .pwa-benefits {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.pwa-install-modal .pwa-benefit {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--gita-text-secondary);
}

.pwa-install-modal .pwa-benefit-icon {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background: var(--gita-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.pwa-install-modal .pwa-actions {
  display: flex;
  gap: 10px;
}

.pwa-install-modal .pwa-btn {
  flex: 1;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.pwa-install-modal .pwa-btn-primary {
  background: linear-gradient(135deg, var(--gita-maroon) 0%, var(--gita-maroon-light) 100%);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(124, 45, 18, 0.3);
}

.pwa-install-modal .pwa-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(124, 45, 18, 0.4);
}

.pwa-install-modal .pwa-btn-secondary {
  background: var(--gita-border);
  color: var(--gita-text-secondary);
  border: 1px solid var(--gita-border-light);
}

.pwa-install-modal .pwa-btn-secondary:hover {
  background: var(--gita-border-light);
  color: var(--gita-text-primary);
}

.pwa-instructions {
  display: none;
  padding: 12px 16px;
  background: var(--gita-border-light);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 0.9rem;
  color: var(--gita-text-secondary);
  line-height: 1.5;
}
.pwa-instructions.is-visible {
  display: block;
}

/* iOS install hint */
.ios-install-hint {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  background: var(--gita-surface);
  color: var(--gita-text-primary);
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gita-border);
  box-shadow: var(--shadow-lg);
  z-index: 999;
  font-size: 0.9rem;
  line-height: 1.5;
  display: none;
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .gita-shell {
    padding: 24px 16px;
  }
  .gita-chapters {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .chapter-card {
    padding: 18px;
  }
  .verse-shell {
    padding: 24px 16px;
  }
  .verse-sanskrit {
    font-size: 1.15rem;
    padding: 18px 20px;
  }
  .verse-telugu {
    font-size: 1.05rem;
  }
  .reading-controls {
    bottom: 12px;
    padding: 8px 12px;
    gap: 6px;
  }
  .reading-controls button {
    padding: 6px 10px;
    font-size: 0.8rem;
  }
  .pwa-install-modal {
    padding: 24px 20px 28px;
  }
}

/* ====================================================== Temple / Festival Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  color: inherit;
}
.card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card-body h3 {
  font-family: var(--font-telugu);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-900);
}
.card-body p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}
.card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}
.card-meta .tag {
  display: inline-flex;
  padding: 2px 8px;
  background: var(--orange-light);
  color: var(--orange-primary);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

/* ================================================== Panchangam Detail */
.panchangam-detail {
  max-width: var(--maxw-narrow);
  margin: 0 auto;
}
.panchangam-detail h1 {
  font-family: var(--font-telugu);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 8px;
}
.panchangam-detail .section-kicker {
  margin-bottom: 4px;
}

/* ================================================= Responsive Design */
@media (max-width: 1024px) {
  .header-inner { gap: 12px; }
  .search-form { max-width: 320px; }
  .nav-link { padding: 8px 8px; font-size: 0.84rem; }
}

@media (max-width: 860px) {
  .home-hero { grid-template-columns: 1fr; gap: 24px; padding: 32px 20px; }
  .home-hero-image { max-height: 280px; }
  .feature-grid { grid-template-columns: 1fr; }
  .panchangam-sun { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { flex-direction: column; gap: 20px; }

  .header-inner { position: relative; padding: 0 12px; gap: 8px; height: 56px; }
  .search-form { min-width: 0; max-width: none; margin: 0 48px 0 0; flex: 1; }
  .search-input { padding: 8px 12px 8px 32px; font-size: 0.85rem; }
  .header-actions { position: absolute; top: 50%; right: 12px; margin-left: 0; transform: translateY(-50%); gap: 4px; }
  .menu-button {
    z-index: 2;
    display: flex !important;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.12);
    border: 1.5px solid rgba(255,255,255,0.35);
  }
  .nav-links {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    width: 100vw;
    max-width: 100vw;
    background: var(--surface);
    flex-direction: column;
    padding: 8px 16px 20px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    z-index: 99;
    gap: 2px;
  }
  .nav-links[data-open="true"] { display: flex; }
  .nav-link { padding: 14px 14px; color: var(--gray-700); font-size: 1rem; border-radius: var(--radius-sm); }
  .nav-link[aria-current="page"] { color: var(--orange-primary); background: var(--orange-light); }
  .nav-link:hover { background: var(--orange-light); }
  .nav-links .mobile-extras {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 6px 0;
    border-top: 1px solid var(--border-light);
    margin-top: 6px;
  }
  .nav-links .mobile-extras a,
  .nav-links .mobile-extras button {
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border: 1.5px solid var(--border);
    background: var(--white);
    color: var(--gray-700);
  }
  .nav-links .mobile-extras a[aria-pressed="true"] {
    background: var(--orange-primary);
    color: var(--white);
    border-color: var(--orange-primary);
  }
  .mobile-social-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }
  .mobile-social-links a {
    width: 100%;
    min-height: 42px;
    grid-template-columns: 20px minmax(0, 1fr);
    justify-content: start;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--gray-700);
  }
  .mobile-social-links span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .82rem;
    font-weight: 600;
  }
  .install-btn {
    background: var(--orange-primary) !important;
    color: var(--white) !important;
    border-color: var(--orange-primary) !important;
    font-weight: 700;
  }
}

@media (min-width: 861px) {
  .install-btn {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .logo-masthead {
    min-height: 100px;
    max-height: 140px;
    padding: 8px 12px;
    gap: 8px;
  }
  .logo-masthead-image {
    max-width: min(94vw, 280px);
    max-height: 120px;
  }
  .logo-social {
    gap: 6px;
    overflow: hidden;
  }
  .logo-social-link {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
  }
  .logo-social-link:nth-child(n+3) {
    display: none;
  }
  .header-inner { padding: 0 12px; gap: 8px; height: 56px; }
  .brand-name { font-size: 0.95rem; }
  .search-form { margin: 0 48px 0 0; }
  .search-input { padding: 8px 12px 8px 32px; font-size: 0.85rem; }
  .header-actions { right: 12px; }
  .menu-button { width: 40px; height: 40px; }
  .nav-links { top: 56px; }

  .home-hero-copy h1 { font-size: 1.8rem; }
  .home-hero-copy blockquote { font-size: 1.05rem; padding: 10px 14px; }
  .quick-links { grid-template-columns: 1fr; }
  .chapter-list { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .panchangam-sun { grid-template-columns: 1fr; }
  .panchangam-grid { grid-template-columns: 1fr; }
  .calendar-day { min-height: 64px; padding: 6px; }
  .calendar-weekdays, .calendar-days { gap: 3px; }
  .calendar-day strong { font-size: 0.95rem; }
  .calendar-day span, .calendar-day small { font-size: 0.7rem; }
  .auth-grid { grid-template-columns: 1fr; }
  .admin-main { padding: 16px; }
  .admin-page-heading { flex-direction: column; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .wishes-grid { grid-template-columns: 1fr; }
  .wish-card-media img { max-height: 220px; }

  /* Admin mobile */
  .admin-layout { grid-template-columns: 1fr; }
  .admin-nav {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    bottom: 0;
    width: 260px;
    z-index: 90;
    height: auto;
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }
  .admin-nav[data-open="true"] { display: block; }
  .admin-menu-toggle { display: flex; }
}

@media (max-width: 480px) {
  .logo-social-link:nth-child(n+2) {
    display: none;
  }
  .home-hero-image { max-height: 220px; }
  .home-hero-copy h1 { font-size: 1.6rem; }
  .home-hero-copy blockquote { font-size: 1rem; padding: 10px 14px; }
  .search-form { margin: 0 44px 0 0; }
  .search-input { padding: 8px 10px 8px 30px; font-size: 0.82rem; }
  .header-actions { right: 8px; }
  .menu-button { width: 36px; height: 36px; }
  .nav-links { top: 52px; }
  .calendar-day { min-height: 56px; padding: 4px; }
  .calendar-day strong { font-size: 0.85rem; }
  .calendar-day span, .calendar-day small { font-size: 0.65rem; }
  .auth-shell { padding: 32px 16px; }
  .auth-form { padding: 24px 16px; }
  .reading-header h1 { font-size: 1.5rem; }
}

@media (max-width: 375px) {
  body { font-size: 15px; }
  .home-hero-copy h1 { font-size: 1.6rem; }
  .reading-header h1 { font-size: 1.5rem; }
  .auth-shell { padding: 32px 16px; }
  .auth-form { padding: 24px 16px; }
}

/* ==================================================== Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==================================================== Print Styles */
@media print {
  .site-header, .site-footer, .menu-button, .search-form,
  .language-switcher, .account-link { display: none !important; }
  body { background: white; }
  .reading-shell { max-width: 100%; padding: 0; }
}
