/* Sacred Saffron & Vedic Temple Design System */
:root {
  --bg-deep: #fef9f2;                  /* Sacred temple sandalwood / ivory cream */
  --bg-surface: #fff3e0;               /* Soft sacred Kesariya / Marigold tint */
  --bg-card: #ffffff;                  /* Crisp ivory card */
  --bg-card-hover: #fffdfa;
  --border-gold: rgba(234, 88, 12, 0.22);
  --border-gold-bright: #ea580c;       /* Sacred Vedic Saffron (Kesariya) */
  --gold-grad: linear-gradient(135deg, #f97316 0%, #ea580c 50%, #c2410c 100%);
  --gold-text: #c2410c;                /* Rich burnt saffron */
  --saffron: #ea580c;                  /* Authentic Kesariya */
  --saffron-bright: #f97316;
  --saffron-light: #fff7ed;
  --saffron-border: #fed7aa;
  --crimson: #991b1b;                  /* Sacred Kumkum */
  --text-main: #2a1407;                /* Deep temple mahogany / wood */
  --text-muted: #6e462c;               /* Warm earthy brown */
  --text-dim: #996e4f;
  --accent-good: #15803d;              /* Tulsi Green */
  --accent-warn: #d97706;              /* Turmeric Gold */
  --accent-bad: #b91c1c;               /* Red Kumkum */
  --shadow-lg: 0 14px 40px rgba(180, 83, 9, 0.09);
  --shadow-glow: 0 0 24px rgba(234, 88, 12, 0.16);
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --font-serif: "Cinzel", Georgia, "Times New Roman", serif;
  --font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: light;
}

body {
  background-color: var(--bg-deep);
  background-image: 
    radial-gradient(circle at 12% 10%, rgba(249, 115, 22, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 88% 14%, rgba(217, 119, 6, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 50% 92%, rgba(234, 88, 12, 0.06) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  min-height: 100vh;
}

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

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

/* Header & Royal Saffron Branding */
.portal-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 251, 245, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 2px solid var(--border-gold-bright);
  box-shadow: 0 4px 20px rgba(217, 119, 6, 0.08);
}

.top-bar-ticker {
  background: linear-gradient(90deg, #b91c1c 0%, #c2410c 30%, #ea580c 70%, #d97706 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 20px;
  font-size: 0.8rem;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
  font-weight: 500;
}

.ticker-content {
  display: flex;
  gap: 28px;
  white-space: nowrap;
  animation: ticker-slide 35s linear infinite;
}

.ticker-content:hover {
  animation-play-state: paused;
}

@keyframes ticker-slide {
  0% { transform: translateX(10%); }
  100% { transform: translateX(-60%); }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff9e6;
}

.ticker-item span {
  color: #ffffff;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}

.header-main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid var(--border-gold-bright);
  object-fit: cover;
  box-shadow: 0 0 14px rgba(234, 88, 12, 0.35);
}

.brand-titles h1 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  letter-spacing: 0.03em;
  color: #7c2d12;
  line-height: 1.15;
}

.brand-titles p {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-vedic {
  background: #ffffff;
  color: #9a3412;
  border: 1px solid var(--border-gold-bright);
  border-radius: var(--radius-md);
  padding: 9px 16px;
  font-size: 0.86rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.1);
  transition: all 0.2s ease;
}

.btn-vedic:hover {
  background: var(--saffron-light);
  border-color: #c2410c;
  color: #7c2d12;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.2);
  transform: translateY(-1px);
}

.btn-vedic.primary {
  background: var(--gold-grad);
  color: #ffffff;
  border: none;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.3);
}

.btn-vedic.primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 6px 18px rgba(234, 88, 12, 0.4);
}

.btn-vedic.active {
  background: var(--gold-grad);
  color: #ffffff;
  border-color: #c2410c;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.3);
}

.btn-royal {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 50%, #b91c1c 100%);
  color: #ffffff;
  border: 1.5px solid rgba(254, 215, 170, 0.7);
  border-radius: var(--radius-md);
  padding: 9px 18px;
  font-size: 0.88rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.28);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}

.btn-royal:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
  box-shadow: 0 7px 20px rgba(234, 88, 12, 0.4);
  color: #ffffff;
  border-color: #fde047;
}

.btn-royal:active {
  transform: scale(0.97);
}

.btn-secondary {
  background: #ffffff;
  color: var(--gold-text);
  border: 1.5px solid var(--saffron-border);
  border-radius: var(--radius-md);
  padding: 8px 16px;
  font-size: 0.86rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(180, 83, 9, 0.06);
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-secondary:hover {
  background: var(--saffron-light);
  border-color: var(--saffron);
  color: #7c2d12;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.15);
}

.btn-secondary:active {
  transform: scale(0.97);
}

/* Navigation Tabs & Royal Mega-Menu */
.portal-nav-bar {
  background: #fff8ee;
  border-top: 1px solid var(--saffron-border);
  position: relative;
  z-index: 950;
  overflow: visible;
}

.nav-container {
  max-width: 1440px;
  margin: 0 auto;
  position: relative;
  overflow: visible;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  list-style: none;
  margin: 0;
  overflow: visible;
}

.nav-item {
  position: relative;
}

.nav-tab-btn {
  background: none;
  color: #431407;
  padding: 13px 18px;
  font-size: 0.92rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: all 0.2s ease;
}

.dropdown-arrow {
  font-size: 0.75rem;
  color: #9a3412;
  transition: transform 0.25s ease;
}

.nav-item:hover .dropdown-arrow {
  transform: rotate(180deg);
  color: #ea580c;
}

.nav-tab-btn:hover {
  color: var(--saffron);
  background: rgba(254, 215, 170, 0.35);
}

.nav-tab-btn.active {
  color: #7c2d12;
  border-bottom-color: var(--saffron);
  background: #ffedd5;
}

/* Mega-Menu Dropdown Panel */
.mega-dropdown {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  min-width: 540px;
  max-width: min(640px, 94vw);
  background: #ffffff;
  border: 2px solid var(--border-gold-bright);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 48px rgba(67, 20, 7, 0.22), 0 4px 14px rgba(234, 88, 12, 0.12);
  padding: 16px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  pointer-events: none;
}

/* Invisible bridge so mouse movement from button to dropdown never flickers or drops hover */
.mega-dropdown::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 12px;
}

.nav-item:hover .mega-dropdown,
.nav-item:focus-within .mega-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* Right-align dropdowns on the right side of the bar so they never clip off screen */
.nav-item:nth-last-child(-n+3) .mega-dropdown {
  left: auto;
  right: 0;
}

.mega-dropdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mega-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: #fffaf0;
  border: 1px solid #fed7aa;
  text-decoration: none;
  transition: all 0.2s ease;
}

.mega-link:hover {
  background: #ffedd5;
  border-color: #ea580c;
  transform: translateX(2px);
  box-shadow: 0 3px 10px rgba(234, 88, 12, 0.15);
}

.mega-icon {
  font-size: 1.35rem;
  width: 36px;
  height: 36px;
  min-width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid var(--border-gold-bright);
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(234, 88, 12, 0.12);
}

.mega-link strong {
  display: block;
  color: #431407;
  font-size: 0.86rem;
  font-family: var(--font-serif);
  line-height: 1.25;
}

.mega-link small {
  display: block;
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.25;
  margin-top: 2px;
}

/* Page Body Container */
.portal-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* Tab Panels */
.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease forwards;
}

.tab-panel.active {
  display: block;
}

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

/* Hero Section */
.hero-banner {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 50%, #fed7aa 100%);
  border: 1.5px solid var(--saffron-border);
  border-radius: var(--radius-xl);
  padding: 32px;
  margin-bottom: 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
  box-shadow: 0 10px 30px rgba(234, 88, 12, 0.1);
  position: relative;
  overflow: hidden;
}

.hero-banner::after {
  content: 'ॐ';
  position: absolute;
  right: 280px;
  top: -40px;
  font-size: 16rem;
  color: rgba(234, 88, 12, 0.05);
  pointer-events: none;
  font-family: var(--font-serif);
}

.hero-text .eyebrow {
  color: #c2410c;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-text h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 2.5vw, 2.4rem);
  margin: 6px 0 10px;
  color: #431407;
  line-height: 1.2;
}

.hero-text p {
  color: var(--text-muted);
  max-width: 720px;
  font-size: 0.96rem;
  line-height: 1.6;
}

.guru-spotlight {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: linear-gradient(145deg, #ffffff 0%, #fffbf5 100%);
  padding: 22px 24px;
  border-radius: var(--radius-xl);
  border: 2px solid var(--border-gold-bright);
  box-shadow: 0 16px 44px rgba(234, 88, 12, 0.22), 0 0 35px rgba(249, 115, 22, 0.15);
  max-width: 320px;
  width: 100%;
  position: relative;
}

.guru-spotlight::before {
  content: '✦ श्री गणेशाय नमः ✦';
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  color: #c2410c;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.guru-image-frame {
  position: relative;
  margin-bottom: 14px;
  border-radius: 18px;
  padding: 6px;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 50%, #d97706 100%);
  box-shadow: 0 10px 32px rgba(234, 88, 12, 0.38);
}

.guru-spotlight img {
  width: 220px;
  height: 260px;
  object-fit: cover;
  object-position: center 15%;
  border-radius: 14px;
  display: block;
  border: 2px solid #ffffff;
}

.guru-info small {
  color: #ea580c;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
}

.guru-info h4 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: #431407;
  margin: 4px 0 6px;
  line-height: 1.25;
}

.guru-info p {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 8px;
}

.guru-blessing-badge {
  background: #ffedd5;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 99px;
  margin-top: 6px;
  display: inline-block;
}

/* Quick Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--saffron-border);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.05);
}

.feature-card:hover {
  border-color: var(--border-gold-bright);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(234, 88, 12, 0.14);
}

.feature-card-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #ffedd5;
  color: #c2410c;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  border: 1px solid var(--saffron-border);
}

.feature-card h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: #431407;
  margin-bottom: 4px;
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.feature-card-btn {
  margin-top: 14px;
  color: #c2410c;
  font-size: 0.85rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
}

.feature-card-btn:hover {
  color: #7c2d12;
}

/* Toast Notifications */
.toast-notice {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: #7c2d12;
  color: #ffffff;
  padding: 12px 26px;
  border-radius: var(--radius-md);
  border: 1px solid #f97316;
  box-shadow: 0 12px 36px rgba(67, 20, 7, 0.25);
  font-size: 0.92rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 9999;
}

.toast-notice.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #78350f;
  flex-wrap: wrap;
}
.breadcrumb-nav a {
  color: #b45309;
  text-decoration: none;
  transition: color 0.15s ease;
}
.breadcrumb-nav a:hover {
  color: #ea580c;
  text-decoration: underline;
}
.breadcrumb-separator {
  color: #d97706;
  font-size: 0.75rem;
}
.breadcrumb-current {
  color: #431407;
  font-weight: 700;
}

/* SEO Article & Verse Styles */
.seo-header-panel {
  background: linear-gradient(135deg, #fffbeb 0%, #fff7ed 100%);
  border: 1.5px solid var(--border-gold-bright);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  margin-bottom: 28px;
  box-shadow: 0 10px 30px rgba(67, 20, 7, 0.08);
}
.seo-header-title {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  color: #431407;
  margin-bottom: 8px;
  line-height: 1.25;
}
.seo-header-subtitle {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: #9a3412;
  margin-bottom: 16px;
}
.seo-meta-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}
.seo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #fed7aa;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #7c2d12;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.seo-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px dashed #fed7aa;
}

/* Verse Card Container */
.verse-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 28px 0;
}
.verse-card {
  background: #ffffff;
  border: 1.5px solid #fed7aa;
  border-left: 5px solid #ea580c;
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: 0 4px 14px rgba(67, 20, 7, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.verse-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(67, 20, 7, 0.12);
  border-color: #f97316;
}
.verse-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px dashed #fef3c7;
  padding-bottom: 8px;
}
.verse-number {
  display: inline-block;
  background: #ffedd5;
  color: #9a3412;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.verse-sanskrit {
  font-family: var(--font-serif);
  font-size: 1.28rem;
  line-height: 1.8;
  color: #431407;
  white-space: pre-line;
  margin-bottom: 12px;
  font-weight: 600;
}
.verse-translit {
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #7c2d12;
  white-space: pre-line;
  margin-bottom: 14px;
  background: #fffaf0;
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid #ffedd5;
}
.verse-meaning {
  font-size: 0.96rem;
  line-height: 1.6;
  color: #27272a;
}
.verse-meaning strong {
  color: #9a3412;
}

/* Related Items Grid */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.related-card {
  background: #ffffff;
  border: 1px solid #fed7aa;
  border-radius: var(--radius-md);
  padding: 16px 18px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  display: block;
}
.related-card:hover {
  background: #fffaf0;
  border-color: #ea580c;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(234, 88, 12, 0.14);
}
.related-card h4 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: #431407;
  margin-bottom: 4px;
}
.related-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ==========================================================================
   ADVANCED UI/UX POLISH & MODERN SACRED VEDIC DESIGN ENHANCEMENTS
   ========================================================================== */

/* Sacred Saffron Custom Scrollbar */
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #f97316 0%, #ea580c 50%, #c2410c 100%);
  border-radius: 6px;
  border: 2px solid var(--bg-deep);
}
::-webkit-scrollbar-thumb:hover {
  background: #9a3412;
}

/* Saffron Selection Highlight */
::selection {
  background: #fed7aa;
  color: #431407;
}
::-moz-selection {
  background: #fed7aa;
  color: #431407;
}

/* Card & Tool Panel Elevation */
.tool-panel {
  border: 1.5px solid var(--saffron-border) !important;
  box-shadow: 0 10px 30px -4px rgba(180, 83, 9, 0.08) !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease !important;
}

.tool-panel:hover {
  border-color: rgba(234, 88, 12, 0.38) !important;
  box-shadow: 0 14px 38px -4px rgba(234, 88, 12, 0.13) !important;
}

/* Enhanced Form Input Focus Glow */
.form-control:focus {
  border-color: var(--saffron) !important;
  box-shadow: 0 0 0 3.5px rgba(234, 88, 12, 0.18) !important;
}

/* Refined Data Tables across Panchang, Kundali, Matchmaking */
table {
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius-md);
}

th {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  color: #7c2d12;
  font-family: var(--font-serif);
  font-weight: 700;
  border-bottom: 2px solid var(--saffron-border);
}

tr:nth-child(even) td {
  background: #fffdfa;
}

tr:hover td {
  background: #ffedd5;
}

/* Universal Compact Luxury Location Picker in Header */
.header-actions div:has(#headerCitySelect),
.header-location-pill {
  background: #ffffff !important;
  border: 1.5px solid var(--saffron-border) !important;
  box-shadow: 0 1px 4px rgba(180, 83, 9, 0.08) !important;
  padding: 4px 10px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  max-width: 175px !important;
  width: auto !important;
  flex-shrink: 0 !important;
  transition: all 0.25s ease !important;
}

.header-actions div:has(#headerCitySelect):hover,
.header-actions div:has(#headerCitySelect):focus-within,
.header-location-pill:hover,
.header-location-pill:focus-within {
  border-color: var(--saffron) !important;
  box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.16) !important;
  background: #fffdfa !important;
}

.header-actions div:has(#headerCitySelect) > span,
.header-loc-icon {
  font-size: 0.95rem !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
}

.header-location-label {
  font-size: 0.95rem !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  font-size: 0 !important; /* Hide "Location:" text while keeping icon if present */
}
.header-location-label::before {
  content: "📍" !important;
  font-size: 0.95rem !important;
  margin-right: 2px !important;
}

#headerCitySelect,
.header-location-select {
  background: transparent !important;
  color: #7c2d12 !important;
  font-weight: 700 !important;
  font-size: 0.82rem !important;
  border: none !important;
  outline: none !important;
  cursor: pointer !important;
  padding: 0 !important;
  margin: 0 !important;
  max-width: 135px !important;
  width: auto !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}

#headerCitySelect option,
#headerCitySelect optgroup,
.header-location-select option,
.header-location-select optgroup {
  background: #ffffff !important;
  color: #2a1407 !important;
  font-family: var(--font-sans);
  font-size: 0.85rem !important;
}

/* Omni-Search Quick Finder Trigger in Header */
.btn-quick-search {
  background: #ffffff;
  border: 1.5px solid var(--saffron-border);
  color: #7c2d12;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(180, 83, 9, 0.06);
  transition: all 0.2s ease;
}

.btn-quick-search:hover {
  background: var(--saffron-light);
  border-color: var(--saffron);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.18);
}

.btn-quick-search kbd {
  font-size: 0.72rem;
  font-weight: 800;
  background: #ffedd5;
  color: #9a3412;
  border: 1px solid #fed7aa;
  border-radius: 4px;
  padding: 2px 5px;
  letter-spacing: 0.02em;
}

/* Omni-Search / Quick Finder Modal */
.omni-search-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(42, 20, 7, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 70px 16px 40px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.omni-search-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.omni-search-modal {
  width: 100%;
  max-width: 680px;
  background: #ffffff;
  border: 2px solid var(--border-gold-bright);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 60px rgba(67, 20, 7, 0.35), 0 0 30px rgba(234, 88, 12, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 80vh;
  transform: translateY(-12px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.omni-search-backdrop.open .omni-search-modal {
  transform: translateY(0) scale(1);
}

.omni-search-header {
  padding: 16px 20px;
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border-bottom: 1.5px solid var(--saffron-border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.omni-search-icon {
  font-size: 1.25rem;
  color: var(--saffron);
}

.omni-search-input {
  flex: 1;
  background: transparent;
  border: none;
  font-size: 1.1rem;
  font-weight: 600;
  color: #2a1407;
  outline: none;
  font-family: inherit;
}

.omni-search-input::placeholder {
  color: var(--text-dim);
  font-size: 0.95rem;
}

.omni-search-esc {
  font-size: 0.72rem;
  font-weight: 800;
  color: #7c2d12;
  background: #ffffff;
  border: 1px solid var(--saffron-border);
  padding: 4px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.omni-search-results {
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.omni-search-category-title {
  font-size: 0.75rem;
  font-weight: 800;
  color: #9a3412;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 12px 4px;
}

.omni-search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: #2a1407;
  background: #fffdfa;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  cursor: pointer;
}

.omni-search-item:hover,
.omni-search-item.selected {
  background: #ffedd5;
  border-color: var(--saffron);
  transform: translateX(3px);
}

.omni-search-item-icon {
  font-size: 1.35rem;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid var(--saffron-border);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.omni-search-item-info {
  flex: 1;
}

.omni-search-item-title {
  font-weight: 700;
  font-size: 0.96rem;
  color: #431407;
}

.omni-search-item-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.omni-search-item-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #9a3412;
  background: #fff;
  border: 1px solid #fed7aa;
  padding: 3px 8px;
  border-radius: 99px;
}

.omni-search-footer {
  padding: 10px 18px;
  background: #fff8ee;
  border-top: 1px solid var(--saffron-border);
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Mobile Hamburger Button */
.mobile-menu-btn {
  display: none !important;
  background: #ffffff;
  border: 1.5px solid var(--saffron-border);
  color: var(--saffron);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 1.3rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.12);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.mobile-menu-btn:hover {
  background: var(--saffron-light);
  border-color: var(--saffron);
  transform: scale(1.05);
}

/* Mobile Navigation Drawer */
.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(42, 20, 7, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1900;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(350px, 86vw);
  background: #ffffff;
  box-shadow: 10px 0 40px rgba(67, 20, 7, 0.25);
  z-index: 1950;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mobile-drawer-overlay.open .mobile-nav-drawer {
  transform: translateX(0);
}

.mobile-drawer-header {
  padding: 16px 18px;
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border-bottom: 2px solid var(--border-gold-bright);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-drawer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-drawer-brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--border-gold-bright);
  object-fit: cover;
}

.mobile-drawer-brand h3 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: #7c2d12;
  margin: 0;
  line-height: 1.2;
}

.mobile-drawer-brand p {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}

.mobile-drawer-close {
  background: #ffffff;
  border: 1px solid var(--saffron-border);
  color: #7c2d12;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.1rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-drawer-close:hover {
  background: #fee2e2;
  color: #b91c1c;
}

.mobile-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px 30px;
}

.mobile-drawer-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: #9a3412;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 16px 8px 8px;
}

.mobile-drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  text-decoration: none;
  color: #2a1407;
  font-weight: 700;
  font-size: 0.94rem;
  transition: all 0.2s ease;
  background: #fffdfa;
  border: 1px solid transparent;
  margin-bottom: 4px;
}

.mobile-drawer-link:hover,
.mobile-drawer-link.active {
  background: #ffedd5;
  border-color: var(--saffron);
  color: #7c2d12;
}

.mobile-drawer-accordion-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fffbf5;
  border: 1px solid var(--saffron-border);
  color: #431407;
  font-weight: 700;
  font-size: 0.94rem;
  cursor: pointer;
  margin-bottom: 6px;
  transition: all 0.2s ease;
}

.mobile-drawer-accordion-btn:hover {
  background: #ffedd5;
}

.mobile-drawer-sublinks {
  display: none;
  padding-left: 14px;
  margin-bottom: 8px;
  border-left: 2px solid #fed7aa;
}

.mobile-drawer-sublinks.open {
  display: block;
}

.mobile-drawer-sublink {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 0.86rem;
  color: #431407;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.mobile-drawer-sublink:hover {
  background: #fff7ed;
  color: var(--saffron);
}

.mobile-drawer-footer {
  padding: 14px 16px;
  background: #fff8ee;
  border-top: 1px solid var(--saffron-border);
  display: flex;
  gap: 8px;
}

/* Floating Back to Top Button */
.back-to-top-btn {
  position: fixed;
  bottom: 26px;
  right: 26px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 50%, #c2410c 100%);
  color: #ffffff;
  border: 2px solid #fef3c7;
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
  cursor: pointer;
  z-index: 1200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.9);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.back-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.back-to-top-btn:hover {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 10px 28px rgba(234, 88, 12, 0.45);
}

.back-to-top-btn:active {
  transform: scale(0.95);
}

/* Responsive Breakpoints */
@media (max-width: 960px) {
  .hero-banner {
    grid-template-columns: 1fr;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .portal-nav-bar {
    display: none;
  }
  .header-main {
    padding: 10px 16px;
  }
  .header-actions {
    gap: 8px;
  }
  .header-actions .btn-royal span:not(.btn-icon),
  .header-actions .btn-vedic span:not(.btn-icon),
  .btn-quick-search span,
  .btn-quick-search kbd {
    display: none;
  }
  .btn-quick-search {
    padding: 7px 10px;
  }
  .header-actions div:has(#headerCitySelect) {
    max-width: 170px;
  }
  .mega-dropdown {
    min-width: min(480px, 94vw) !important;
    max-width: 94vw !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) translateY(8px);
  }
  .nav-item:hover .mega-dropdown,
  .nav-item:focus-within .mega-dropdown {
    transform: translateX(-50%) translateY(0);
  }
}

@media (max-width: 600px) {
  .brand-titles h1 {
    font-size: 1.15rem;
  }
  .brand-titles p {
    font-size: 0.7rem;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .mega-dropdown-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .hero-banner {
    padding: 20px 16px;
  }
}



/* --------------------------------------------------------------------------
   SMALL LAPTOPS & SHORT VIEWPORTS RESPONSIVE DESIGN (<= 820px height or <= 1280px width)
   Prevents header/banners from hogging more than half the screen space
   -------------------------------------------------------------------------- */
@media (max-height: 820px), (max-width: 1280px) {
  .portal-header {
    position: relative; /* Prevent sticky header from permanently eating 25% of viewport height */
  }

  .top-bar-ticker {
    padding: 3px 16px;
    font-size: 0.74rem;
  }

  .header-main {
    padding: 6px 16px;
    gap: 10px;
  }

  .brand-avatar {
    width: 38px;
    height: 38px;
  }

  .brand-titles h1 {
    font-size: 1.12rem;
  }

  .brand-titles .tagline {
    display: none; /* Hide tagline on compact viewports to save vertical space */
  }

  .header-actions div:has(.header-location-select) {
    max-width: 160px;
  }

  .header-location-select {
    padding: 3px 6px;
    font-size: 0.78rem;
  }

  .portal-nav-bar {
    padding: 2px 14px;
  }

  .nav-tab-btn {
    padding: 6px 10px;
    font-size: 0.82rem;
  }

  /* Compact banner & intro panels */
  .breadcrumb-nav {
    padding: 4px 12px;
    margin-bottom: 8px;
  }

  .maharaj-philosophy-banner {
    padding: 10px 14px !important;
    margin-bottom: 12px !important;
  }

  .maharaj-philosophy-banner h3 {
    font-size: 0.95rem;
    margin: 2px 0;
  }

  .maharaj-philosophy-banner p {
    font-size: 0.8rem;
    line-height: 1.4;
  }

  .seo-header-panel {
    padding: 12px 16px !important;
    margin-bottom: 12px !important;
  }

  .seo-header-title {
    font-size: 1.3rem !important;
    margin-bottom: 2px !important;
  }

  .seo-header-subtitle {
    font-size: 0.85rem !important;
  }

  .seo-header-panel p {
    font-size: 0.86rem !important;
    line-height: 1.45 !important;
    margin-top: 6px !important;
  }

  .seo-actions-bar {
    margin-top: 10px !important;
    gap: 8px !important;
  }

  .seo-actions-bar .btn-royal,
  .seo-actions-bar .btn-secondary {
    padding: 5px 12px !important;
    font-size: 0.82rem !important;
  }

  .interactive-tool-wrapper {
    margin: 12px 0 !important;
  }
}
