/* Header & Navigation */
.site-visitor-bubble {
  position: fixed;
  top: auto;
  bottom: max(1rem, env(safe-area-inset-bottom));
  left: 1rem;
  z-index: 1100;
  font-family: var(--font-sans);
}

.site-visitor-count {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(212, 175, 55, 0.75);
  border-radius: 999px;
  background: linear-gradient(135deg, #3A030C, #200106);
  color: #fffdf7;
  box-shadow: 0 5px 18px rgba(32, 1, 6, 0.3);
  font-size: 0.75rem;
  font-weight: 700;
}

.site-visitor-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--gold-light);
}

.site-visitor-count strong {
  color: var(--gold-light);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  min-width: 1ch;
}

.site-visitor-count-label {
  white-space: nowrap;
}

.temple-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--surface);
  box-shadow: 0 4px 20px rgba(58, 4, 12, 0.08);
  border-bottom: 2px solid var(--border-gold);
  transition: var(--transition);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  min-height: 82px;
}

/* Temple Logo Branding */
.temple-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo-wrap {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
}

.brand-logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.15;
  letter-spacing: 0.5px;
}

.brand-tagline {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gold-dark);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Navigation Links */
.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  list-style: none;
  gap: 0.15rem 0.35rem;
  width: 100%;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition);
  position: relative;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background-color: rgba(90, 8, 21, 0.05);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0.75rem;
  right: 0.75rem;
  height: 2px;
  background: var(--gold);
}

/* Navigation Dropdown */
.nav-item-dropdown {
  position: relative;
}

.nav-item-dropdown .dropdown-caret {
  display: inline-block;
  margin-left: 3px;
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.nav-item-dropdown:hover .dropdown-caret {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  background: #ffffff;
  border: 1px solid var(--border-gold);
  border-top: 3px solid var(--primary);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: 0 10px 25px rgba(58, 4, 12, 0.15);
  list-style: none;
  padding: 0.4rem 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 1050;
}

.nav-item-dropdown:hover .nav-dropdown-menu,
.nav-item-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-link {
  display: block;
  padding: 0.65rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
}

.nav-dropdown-link:hover,
.nav-dropdown-link.active {
  background: rgba(90, 8, 21, 0.08);
  color: var(--primary);
  padding-left: 1.35rem;
}

/* Header Action Right */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  margin-left: auto;
}

/* Announcements Notification Bell Button */
.notification-bell-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFFDF7 0%, #FEE89D 100%);
  color: #7A1B28;
  border: 1.5px solid #C49A45;
  box-shadow: 0 3px 10px rgba(122, 27, 40, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.9);
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  text-decoration: none;
  cursor: pointer;
}

.notification-bell-btn:hover {
  transform: translateY(-2px) scale(1.05);
  background: linear-gradient(135deg, #FEE89D 0%, #D4AF37 100%);
  color: #5A0E1A;
  box-shadow: 0 6px 16px rgba(196, 154, 69, 0.38);
  border-color: #B4882F;
}

.notification-bell-btn:active,
.notification-bell-btn.active {
  background: #7A1B28;
  color: #FEE89D;
  border-color: #F0C465;
  box-shadow: 0 0 12px rgba(196, 154, 69, 0.5);
}

.notification-bell-btn .bell-icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  transform-origin: top center;
  transition: transform 0.3s ease;
}

.notification-bell-btn:hover .bell-icon {
  animation: bellRingAnim 0.7s ease-in-out infinite alternate;
}

@keyframes bellRingAnim {
  0% { transform: rotate(0deg); }
  20% { transform: rotate(14deg); }
  40% { transform: rotate(-12deg); }
  60% { transform: rotate(8deg); }
  80% { transform: rotate(-6deg); }
  100% { transform: rotate(0deg); }
}

.notification-bell-btn .bell-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  background: linear-gradient(135deg, #DC2626 0%, #991B1B 100%);
  color: #FFFFFF;
  border: 2px solid #FFFFFF;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
  line-height: 1;
}

.notification-bell-btn .bell-badge-pulse {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 10px;
  height: 10px;
  background: #DC2626;
  border-radius: 50%;
  border: 2px solid #FFF;
  box-shadow: 0 0 0 rgba(220, 38, 38, 0.6);
  animation: bellPulseAnim 2s infinite;
}

@keyframes bellPulseAnim {
  0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.8); }
  70% { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

/* Live Darshan CTA Button */
.btn-live-darshan {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0.45rem 0.95rem;
  background: linear-gradient(135deg, #7A1B28 0%, #4A0E18 100%);
  color: #FFFDF7 !important;
  border: 1.5px solid #D4AF37;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(122, 27, 40, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.25);
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  white-space: nowrap;
}

.btn-live-darshan:hover {
  background: linear-gradient(135deg, #991B1B 0%, #5A0E1A 100%);
  color: #FEE89D !important;
  border-color: #F0C465;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 5px 18px rgba(220, 38, 38, 0.45);
}

.btn-live-darshan:active,
.btn-live-darshan.active {
  background: #DC2626;
  border-color: #FEE89D;
  box-shadow: 0 0 14px rgba(220, 38, 38, 0.6);
}

.live-dot-pulse {
  display: inline-block;
  width: 9px;
  height: 9px;
  background: #EF4444;
  border-radius: 50%;
  border: 1.5px solid #FFFFFF;
  box-shadow: 0 0 0 rgba(239, 68, 68, 0.8);
  animation: livePulseAnim 1.6s infinite;
}

@keyframes livePulseAnim {
  0% {
    transform: scale(0.92);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.9);
  }
  70% {
    transform: scale(1.08);
    box-shadow: 0 0 0 7px rgba(239, 68, 68, 0);
  }
  100% {
    transform: scale(0.92);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.live-label {
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.btn-nav-book {
  padding: 0.6rem 1.4rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
}

/* Mobile Hamburger Toggle */
.mobile-toggle-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-gold);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--primary);
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 40px;
  align-items: center;
  justify-content: center;
}

.mobile-toggle-btn span {
  display: block;
  width: 24px;
  height: 2.5px;
  background-color: var(--primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* Mobile Drawer Overlay */
.mobile-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(30, 3, 7, 0.6);
  backdrop-filter: blur(3px);
  z-index: 1500;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-drawer-overlay.active {
  opacity: 1;
  display: block;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100vh;
  background: var(--surface);
  z-index: 1600;
  box-shadow: -4px 0 25px rgba(0, 0, 0, 0.2);
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  border-left: 2px solid var(--gold);
}

.mobile-drawer.active {
  right: 0;
}

.drawer-header {
  padding: 1.25rem;
  background: var(--primary);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--gold-light);
}

.drawer-close-btn {
  background: transparent;
  border: none;
  color: var(--gold-light);
  font-size: 1.5rem;
  cursor: pointer;
}

.drawer-nav-list {
  list-style: none;
  padding: 1rem 0;
  overflow-y: auto;
  flex-grow: 1;
}

.drawer-link {
  display: block;
  padding: 0.85rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.drawer-link:hover, .drawer-link.active {
  background: var(--warm-beige);
  color: var(--primary);
  padding-left: 1.8rem;
}

.drawer-dropdown summary {
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 2.75rem;
}

.drawer-dropdown summary::-webkit-details-marker {
  display: none;
}

.drawer-dropdown summary::after {
  content: '+';
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: var(--gold-dark);
}

.drawer-dropdown[open] > summary::after {
  content: '−';
}

.drawer-subnav-list {
  list-style: none;
  padding: 0.25rem 0 0.5rem;
  background: rgba(212, 175, 55, 0.08);
}

.drawer-sublink {
  display: block;
  padding: 0.7rem 1.5rem 0.7rem 2.5rem;
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.drawer-sublink:hover,
.drawer-sublink.active {
  color: var(--primary);
  background: var(--warm-beige);
}

.drawer-footer {
  padding: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--warm-beige);
}

/* Floating mantra control */
.spiritual-audio-button {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 1400;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  padding: 0;
  border: 2px solid var(--gold-light);
  border-radius: 50%;
  background: linear-gradient(145deg, var(--primary-light), var(--primary-dark));
  color: var(--gold-light);
  box-shadow: 0 5px 18px rgba(56, 4, 12, 0.28), 0 0 0 4px rgba(212, 175, 55, 0.14);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.spiritual-audio-button:hover,
.spiritual-audio-button:focus-visible {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 8px 24px rgba(56, 4, 12, 0.34), 0 0 0 5px rgba(212, 175, 55, 0.22);
  outline: none;
}

.spiritual-audio-button:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}

.spiritual-audio-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.spiritual-audio-button.is-playing {
  animation: spiritual-audio-pulse 2.2s ease-in-out infinite;
}

@keyframes spiritual-audio-pulse {
  0%, 100% { box-shadow: 0 5px 18px rgba(56, 4, 12, 0.28), 0 0 0 4px rgba(212, 175, 55, 0.14); }
  50% { box-shadow: 0 6px 22px rgba(56, 4, 12, 0.34), 0 0 0 8px rgba(212, 175, 55, 0.25); }
}

@media (prefers-reduced-motion: reduce) {
  .spiritual-audio-button.is-playing { animation: none; }
}

@media (max-width: 1080px) {
  .header-container {
    gap: 0.75rem;
    min-height: 74px;
  }

  .temple-brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .mobile-coe-link {
    display: inline-flex;
  }

  .brand-text {
    min-width: 0;
  }

  .brand-name {
    font-size: clamp(1.05rem, 2.1vw, 1.55rem);
    line-height: 1.2;
  }

  .brand-tagline {
    display: none;
  }

  .main-nav { display: none; }
  .mobile-toggle-btn { display: flex; }

  .spiritual-audio-button {
    top: 5.25rem;
    right: 1rem;
  }
}

@media (max-width: 768px) {
  .header-container {
    gap: 0.5rem;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
    min-height: 66px;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .temple-brand {
    gap: 0.5rem;
    flex: 1 1 0;
  }

  .brand-logo-wrap {
    width: 52px;
    height: 52px;
  }

  .brand-text {
    flex: 1 1 auto;
  }

  .brand-name {
    font-size: clamp(0.86rem, 2.4vw, 1rem);
    line-height: 1.15;
  }

  .mobile-coe-link {
    display: none;
  }

  .header-actions {
    gap: 0.35rem;
    margin-left: 0;
  }

  .notification-bell-btn {
    width: 36px;
    height: 36px;
  }

  .notification-bell-btn .bell-icon {
    width: 18px;
    height: 18px;
  }

  .btn-live-darshan {
    padding: 0.35rem 0.5rem;
    font-size: 0.72rem;
    gap: 4px;
    letter-spacing: 0.5px;
  }

  .btn-nav-book {
    padding: 0.6rem 0.9rem;
    font-size: 0.75rem;
  }

  .mobile-toggle-btn {
    width: 36px;
    height: 36px;
    padding: 0.45rem;
  }

  .spiritual-audio-button {
    top: 5.4rem;
    right: 0.75rem;
    bottom: auto;
    width: 40px;
    height: 40px;
  }
}

/* Floating Live Broadcast Active Popup Notification */
.live-broadcast-popup {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  background: linear-gradient(135deg, #3B060C 0%, #1A0205 100%);
  border: 1.5px solid #D4AF37;
  border-radius: 12px;
  padding: 10px 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 450px;
  animation: livePopupSlideUp 0.4s ease-out;
}
.live-popup-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.live-popup-title {
  color: #FEE89D;
  font-weight: 800;
  font-size: 0.84rem;
  letter-spacing: 0.3px;
}
.live-popup-subtitle {
  color: rgba(255, 253, 247, 0.85);
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 230px;
}
.live-popup-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.live-popup-close-btn {
  background: transparent;
  border: none;
  color: #FFF;
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  opacity: 0.8;
}
.live-popup-close-btn:hover {
  opacity: 1;
  color: #FEE89D;
}
@keyframes livePopupSlideUp {
  from {
    transform: translateY(80px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@media (max-width: 600px) {
  .site-visitor-bubble {
    bottom: max(0.75rem, env(safe-area-inset-bottom));
    left: 0.75rem;
  }

  .site-visitor-count {
    min-height: 38px;
    padding: 0.45rem 0.7rem;
  }
  .live-broadcast-popup {
    bottom: 15px;
    right: 12px;
    left: 12px;
    max-width: none;
  }
}
