/* ==========================================================================
   SP CALBAYOG - HALLOWEEN & UNDAS 3-WAY THEME SYSTEM
   Modes: 'normal' (Off), 'subtle' (Tasteful), 'spooky' (Full Overhaul)
   ========================================================================== */

:root {
  --hw-orange: #ff7518;
  --hw-orange-glow: rgba(255, 117, 24, 0.45);
  --hw-purple: #7b2cbf;
  --hw-purple-dark: #240046;
  --hw-amber: #ff9e00;
  --hw-midnight: #0b0f19;
  --hw-card-dark: #121826;
  --hw-text-glow: 0 0 12px rgba(255, 158, 0, 0.6);
}

/* ==========================================================================
   1. HEADER 3-WAY THEME SWITCHER
   ========================================================================== */
.halloween-switcher {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 3px;
  gap: 3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 1002;
  transition: all 0.3s ease;
  margin-left: 0.75rem;
}

body.hw-mode-subtle .halloween-switcher,
body.hw-mode-spooky .halloween-switcher {
  border-color: rgba(255, 117, 24, 0.55);
  box-shadow: 0 0 16px var(--hw-orange-glow);
}

.hw-switch-btn {
  background: transparent;
  border: none;
  outline: none;
  color: #cbd5e1;
  font-family: 'Poppins', sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  user-select: none;
}

.hw-switch-btn .btn-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.hw-switch-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.hw-switch-btn.active {
  background: linear-gradient(135deg, #ff7518, #e85d04);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(255, 117, 24, 0.5);
  transform: scale(1.02);
}

.hw-switch-btn[data-mode="normal"].active {
  background: linear-gradient(135deg, #0f7e6a, #0b5c4e);
  box-shadow: 0 2px 8px rgba(15, 126, 106, 0.4);
}

.hw-switch-btn[data-mode="subtle"].active {
  background: linear-gradient(135deg, #d97706, #b45309);
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.4);
}

/* Ensure Header Container & Dropdown Menus ALWAYS render on top of the advisory bar */
.header-container {
  position: relative !important;
  z-index: 1005 !important;
}

.dropdown .dropdown-menu {
  z-index: 1010 !important;
}

@media (max-width: 992px) {
  nav ul {
    z-index: 1010 !important;
  }
}

body.hw-mode-spooky .dropdown .dropdown-menu {
  background: #101626 !important;
  border: 1px solid rgba(255, 117, 24, 0.45) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 15px rgba(255, 117, 24, 0.25) !important;
}

body.hw-mode-spooky .dropdown .dropdown-menu li a:hover {
  background: rgba(255, 117, 24, 0.2) !important;
  color: #ff9e00 !important;
}

/* ==========================================================================
   2. UNDAS & HALLOWEEN PUBLIC ADVISORY BANNER
   ========================================================================== */
.halloween-advisory-bar {
  background: linear-gradient(90deg, #1b0c2e 0%, #3c096c 35%, #7b2cbf 70%, #d9480f 100%);
  color: #ffffff;
  position: relative;
  z-index: 1000 !important;
  border-bottom: 2px solid #ff9e00;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  font-family: 'Poppins', sans-serif;
  overflow: hidden;
  display: block;
  transition: max-height 0.35s ease, opacity 0.3s ease;
}

.halloween-advisory-bar::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  animation: hwShine 6s infinite ease-in-out;
  pointer-events: none;
}

@keyframes hwShine {
  0% { left: -100%; }
  25% { left: 150%; }
  100% { left: 150%; }
}

.advisory-bar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 8px 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.86rem;
}

.advisory-bar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.advisory-badge-pill {
  background: #ff7518;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  animation: pulseBadge 2.5s infinite;
}

@keyframes pulseBadge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.advisory-bar-text {
  line-height: 1.4;
  color: #f1f5f9;
}

.advisory-bar-text strong {
  color: #ffbe0b;
}

.advisory-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.advisory-btn-details {
  background: #ffffff;
  color: #240046;
  border: none;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.advisory-btn-details:hover {
  background: #ffbe0b;
  color: #000;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(255, 190, 11, 0.4);
}

.advisory-btn-dismiss {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: background 0.2s ease;
}

.advisory-btn-dismiss:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   3. CORNER SPIDERWEBS & DANGLING SPIDER (Subtle & Spooky Modes)
   ========================================================================== */
.hw-decor-container {
  display: none;
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1001;
  overflow: hidden;
}

body.hw-mode-subtle .hw-decor-container,
body.hw-mode-spooky .hw-decor-container {
  display: block;
}

.hw-corner-web {
  position: absolute;
  top: 0;
  width: 140px;
  height: 140px;
  opacity: 0.85;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.hw-corner-web.left {
  left: 0;
}

.hw-corner-web.right {
  right: 0;
  transform: scaleX(-1);
}

/* Dangling Spider on top right */
.hw-dangling-spider-box {
  position: absolute;
  top: 0;
  right: 80px;
  width: 32px;
  height: 140px;
  pointer-events: auto;
  cursor: pointer;
  transform-origin: top center;
  animation: spiderSwing 4s infinite ease-in-out;
}

@keyframes spiderSwing {
  0%, 100% { transform: rotate(4deg); }
  50% { transform: rotate(-5deg); }
}

.hw-spider-thread {
  position: absolute;
  top: 0;
  left: 15px;
  width: 1.5px;
  height: 95px;
  background: linear-gradient(180deg, rgba(255,255,255,0.7), rgba(255,255,255,0.2));
  transition: height 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hw-spider-body {
  position: absolute;
  top: 92px;
  left: 3px;
  width: 25px;
  height: 25px;
  transition: top 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.5));
}

.hw-dangling-spider-box:hover .hw-spider-thread {
  height: 40px;
}
.hw-dangling-spider-box:hover .hw-spider-body {
  top: 36px;
}

/* Logo Witch Hat */
.logo {
  position: relative;
}

.hw-logo-witchhat {
  display: none;
  position: absolute;
  top: -12px;
  left: 14px;
  width: 28px;
  height: 28px;
  pointer-events: none;
  transform: rotate(-16deg);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
  z-index: 10;
  animation: hatWiggle 5s infinite ease-in-out;
}

body.hw-mode-subtle .hw-logo-witchhat,
body.hw-mode-spooky .hw-logo-witchhat {
  display: block;
}

@keyframes hatWiggle {
  0%, 90%, 100% { transform: rotate(-16deg); }
  93% { transform: rotate(-8deg); }
  96% { transform: rotate(-22deg); }
}

/* ==========================================================================
   4. FULL SPOOKTACULAR MODE ATMOSPHERE (Bats, Ghosts, Midnight Theme)
   ========================================================================== */
body.hw-mode-spooky {
  background-color: #0c101c !important;
}

body.hw-mode-spooky header {
  background-color: #101626 !important;
  border-bottom: 2px solid var(--hw-orange) !important;
  box-shadow: 0 4px 20px rgba(255, 117, 24, 0.3) !important;
}

body.hw-mode-spooky header .logo h1 {
  color: #ff9e00 !important;
  text-shadow: var(--hw-text-glow);
}

body.hw-mode-spooky nav ul li a {
  color: #f1f5f9 !important;
}

body.hw-mode-spooky nav ul li a:hover {
  color: #ff9e00 !important;
}

body.hw-mode-spooky .event-filter-pill.active {
  background: linear-gradient(135deg, #ff7518, #9d0208) !important;
  border-color: #ff7518 !important;
  box-shadow: 0 4px 15px rgba(255, 117, 24, 0.4) !important;
}

body.hw-mode-spooky .event-filter-pill:hover {
  border-color: #ff7518 !important;
  color: #ff7518 !important;
}

body.hw-mode-spooky .events-header .events-section-label {
  background: linear-gradient(135deg, #7b2cbf, #ff7518) !important;
  box-shadow: 0 4px 14px rgba(255, 117, 24, 0.3) !important;
}

/* ==========================================================================
   OFFICIALS & LEGISLATIVE BODY SECTION (Spooky High-Contrast Mode)
   Fixes dark text visibility by applying bright pumpkin amber & glowing text
   ========================================================================== */
body.hw-mode-spooky .officials-container {
  background: radial-gradient(ellipse at 50% 20%, #151d32 0%, #0c101c 100%) !important;
  position: relative;
  border-top: 1px solid rgba(255, 117, 24, 0.2);
  border-bottom: 1px solid rgba(255, 117, 24, 0.2);
}

body.hw-mode-spooky .officials-container h3 {
  color: #ff9e00 !important;
  text-shadow: 0 0 16px rgba(255, 158, 0, 0.5) !important;
  font-size: 2.2rem !important;
  font-weight: 700 !important;
}

body.hw-mode-spooky .officials-container p,
body.hw-mode-spooky .officials-container > p {
  color: #f1f5f9 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6) !important;
  font-size: 1.05rem !important;
}

body.hw-mode-spooky .district-header {
  background: linear-gradient(135deg, #7b2cbf, #e85d04) !important;
  border: 1px solid rgba(255, 190, 11, 0.4) !important;
  box-shadow: 0 4px 16px rgba(255, 117, 24, 0.4) !important;
}

body.hw-mode-spooky .district-header h4 {
  color: #ffffff !important;
  font-weight: 800 !important;
  letter-spacing: 0.05em !important;
}

body.hw-mode-spooky .district-header p {
  color: #ffd166 !important;
  font-weight: 600 !important;
}

body.hw-mode-spooky .official-card {
  border: 2px solid rgba(255, 117, 24, 0.35) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 14px rgba(255, 117, 24, 0.25) !important;
}

body.hw-mode-spooky .official-card:hover {
  border-color: #ff9e00 !important;
  box-shadow: 0 10px 30px rgba(255, 117, 24, 0.55) !important;
}

body.hw-mode-spooky .official-content h5 {
  color: #ffffff !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9) !important;
}

body.hw-mode-spooky .official-content .position {
  color: #ffd166 !important;
  font-weight: 500 !important;
}

/* Former Vice Mayors Section */
body.hw-mode-spooky .ex-vm-section {
  background: radial-gradient(ellipse at 50% 20%, #151d32 0%, #0c101c 100%) !important;
}

body.hw-mode-spooky .ex-vm-section h3 {
  color: #ff9e00 !important;
  text-shadow: 0 0 16px rgba(255, 158, 0, 0.5) !important;
}

body.hw-mode-spooky .ex-vm-section-divider {
  background: linear-gradient(90deg, #ff7518, #ffd166) !important;
  box-shadow: 0 0 8px rgba(255, 117, 24, 0.5) !important;
}

body.hw-mode-spooky .ex-vm-section p,
body.hw-mode-spooky .ex-vm-section > p {
  color: #f1f5f9 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6) !important;
}

body.hw-mode-spooky .ex-vm-card {
  border: 2px solid rgba(255, 117, 24, 0.35) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 12px rgba(255, 117, 24, 0.25) !important;
}

body.hw-mode-spooky .ex-vm-content {
  background: linear-gradient(0deg, rgba(16, 22, 38, 0.98) 0%, rgba(36, 0, 70, 0.85) 60%, transparent 100%) !important;
}

/* ==========================================================================
   CONTACT SECTION (Spooky High-Contrast Mode)
   Fixes dark text visibility by applying bright pumpkin amber & glowing text
   ========================================================================== */
body.hw-mode-spooky .contact-container {
  background: radial-gradient(ellipse at 50% 20%, #151d32 0%, #0c101c 100%) !important;
  position: relative;
  border-top: 1px solid rgba(255, 117, 24, 0.2);
  border-bottom: 1px solid rgba(255, 117, 24, 0.2);
}

body.hw-mode-spooky .contact-container h3 {
  color: #ff9e00 !important;
  text-shadow: 0 0 16px rgba(255, 158, 0, 0.5) !important;
  font-size: 2.2rem !important;
  font-weight: 700 !important;
}

body.hw-mode-spooky .contact-container p,
body.hw-mode-spooky .contact-container > p {
  color: #f1f5f9 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6) !important;
  font-size: 1.05rem !important;
}

body.hw-mode-spooky .contact-info-card {
  background: #141b2d !important;
  border: 1px solid rgba(255, 117, 24, 0.35) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 117, 24, 0.15) !important;
  color: #f1f5f9 !important;
}

body.hw-mode-spooky .contact-info-card h4 {
  color: #ff9e00 !important;
  text-shadow: 0 0 10px rgba(255, 158, 0, 0.4) !important;
  font-size: 1.15rem !important;
}

body.hw-mode-spooky .contact-info-card p {
  color: #cbd5e1 !important;
  text-align: left !important;
  text-shadow: none !important;
}

body.hw-mode-spooky .contact-info-card strong {
  color: #ffffff !important;
}

body.hw-mode-spooky .contact-info-card i {
  color: #ff7518 !important;
}

body.hw-mode-spooky .contact-info-card a {
  color: #ffbe0b !important;
}

body.hw-mode-spooky .contact-info-card a:hover {
  color: #ffffff !important;
  text-decoration: underline;
}

body.hw-mode-spooky .map-container {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 117, 24, 0.35) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5) !important;
}

/* ==========================================================================
   FOOTER (Spooky Mode)
   ========================================================================== */
body.hw-mode-spooky .gwt-footer {
  background: #0b0f19 !important;
  border-top: 2px solid var(--hw-orange) !important;
  box-shadow: 0 -10px 40px rgba(255, 117, 24, 0.15) !important;
  color: #cbd5e1 !important;
}

body.hw-mode-spooky .gwt-footer::before {
  background: linear-gradient(90deg, #ff7518, #7b2cbf, #ff9e00) !important;
}

body.hw-mode-spooky .footer-heading {
  color: #ff9e00 !important;
  text-shadow: 0 0 10px rgba(255, 158, 0, 0.4) !important;
}

body.hw-mode-spooky .footer-heading i {
  color: #ff7518 !important;
}

body.hw-mode-spooky .footer-links a,
body.hw-mode-spooky .contact-info p,
body.hw-mode-spooky .about-text {
  color: #e2e8f0 !important;
}

body.hw-mode-spooky .footer-links a:hover {
  color: #ff9e00 !important;
}

body.hw-mode-spooky .footer-links li i {
  color: #ff7518 !important;
}

body.hw-mode-spooky .email-link {
  color: #ffbe0b !important;
}

body.hw-mode-spooky .custom-govph-footer {
  background-color: #060911 !important;
  border-top: 1px solid rgba(255, 117, 24, 0.3) !important;
  color: #cbd5e1 !important;
}

body.hw-mode-spooky .custom-govph-footer h4 {
  color: #ff9e00 !important;
}

body.hw-mode-spooky .custom-govph-footer a {
  color: #ffd166 !important;
}

body.hw-mode-spooky::before {
  opacity: 0.05 !important;
}

/* Floating Bats Container */
.hw-floating-bats-layer {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 998;
  overflow: hidden;
}

body.hw-mode-spooky .hw-floating-bats-layer {
  display: block;
}

/* ==========================================================================
   FLAPPING BATS (Ambient & Swarm Flock)
   ========================================================================== */
.hw-bat {
  position: absolute;
  width: 44px;
  height: 28px;
  opacity: 0.78;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
  animation: flyAcross linear infinite;
}

.hw-bat.bat-1 {
  top: 22%;
  left: -70px;
  animation-duration: 17s;
  animation-delay: 1s;
  transform: scale(0.9);
}

.hw-bat.bat-2 {
  top: 48%;
  left: -70px;
  animation-duration: 21s;
  animation-delay: 7s;
  transform: scale(1.2);
}

.hw-bat.bat-3 {
  top: 68%;
  left: -70px;
  animation-duration: 15s;
  animation-delay: 3s;
  transform: scale(0.75);
}

/* Wing Flapping Keyframes */
.hw-bat-wing.hw-wing-left {
  transform-origin: 50px 30px;
  animation: batFlapLeft var(--flap-dur, 0.16s) ease-in-out infinite alternate;
}

.hw-bat-wing.hw-wing-right {
  transform-origin: 50px 30px;
  animation: batFlapRight var(--flap-dur, 0.16s) ease-in-out infinite alternate;
}

.hw-bat-torso {
  animation: batTorsoBob var(--flap-dur, 0.16s) ease-in-out infinite alternate;
}

@keyframes batFlapLeft {
  0% {
    transform: rotate(32deg) scaleY(0.4) translateY(-3px);
  }
  50% {
    transform: rotate(0deg) scaleY(1) translateY(0);
  }
  100% {
    transform: rotate(-30deg) scaleY(0.8) translateY(3px);
  }
}

@keyframes batFlapRight {
  0% {
    transform: rotate(-32deg) scaleY(0.4) translateY(-3px);
  }
  50% {
    transform: rotate(0deg) scaleY(1) translateY(0);
  }
  100% {
    transform: rotate(30deg) scaleY(0.8) translateY(3px);
  }
}

@keyframes batTorsoBob {
  0% { transform: translateY(0); }
  100% { transform: translateY(-2px); }
}

@keyframes flyAcross {
  0% {
    left: -70px;
    transform: translateY(0) rotate(5deg);
  }
  25% {
    transform: translateY(-30px) rotate(-8deg);
  }
  50% {
    transform: translateY(22px) rotate(10deg);
  }
  75% {
    transform: translateY(-18px) rotate(-6deg);
  }
  100% {
    left: calc(100% + 70px);
    transform: translateY(0) rotate(5deg);
  }
}

/* ==========================================================================
   BAT FLOCK / SWARM (When Button Clicked)
   ========================================================================== */
.hw-flock-bat {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 10005;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.65));
  animation: flockBatFlight var(--dur, 3s) cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--delay, 0s);
  opacity: 0;
  will-change: transform, opacity;
}

@keyframes flockBatFlight {
  0% {
    opacity: 0;
    transform: translate3d(var(--start-x), var(--start-y), 0) scale(0.3) rotate(var(--tilt));
  }
  10% {
    opacity: 0.95;
    transform: translate3d(calc(var(--start-x) * 0.75 + var(--mid-x) * 0.25), calc(var(--start-y) * 0.75 + var(--mid-y) * 0.25), 0) scale(0.7) rotate(calc(var(--tilt) * 0.8));
  }
  50% {
    opacity: 1;
    transform: translate3d(var(--mid-x), var(--mid-y), 0) scale(1.1) rotate(calc(var(--tilt) * 1.2));
  }
  85% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--dest-x), var(--dest-y), 0) scale(1.25) rotate(calc(var(--tilt) * 1.5));
  }
}

/* Release Bat Swarm Buttons */
.hw-flock-btn {
  background: linear-gradient(135deg, #240046, #7b2cbf);
  color: #ffd166;
  border: 1px solid rgba(255, 117, 24, 0.45);
  border-radius: 999px;
  padding: 5px 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 10px rgba(123, 44, 191, 0.4);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  white-space: nowrap;
  margin-left: 6px;
}

.hw-flock-btn:hover {
  background: linear-gradient(135deg, #7b2cbf, #ff7518);
  color: #ffffff;
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(255, 117, 24, 0.55);
}

.hw-flock-btn:active {
  transform: scale(0.96);
}

.hw-widget-flock-btn {
  background: linear-gradient(135deg, #240046, #5a189a);
  color: #ffd166;
  border: 1px solid #ffbe0b;
  border-radius: 999px;
  padding: 6px 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.hw-widget-flock-btn:hover {
  background: linear-gradient(135deg, #ff7518, #9d0208);
  color: #ffffff;
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 6px 18px rgba(255, 117, 24, 0.5);
}

/* Floating Cute Ghost */
.hw-floating-ghost {
  display: none;
  position: fixed;
  bottom: 80px;
  right: 110px;
  width: 48px;
  height: 48px;
  opacity: 0.7;
  pointer-events: none;
  z-index: 997;
  animation: floatGhost 6s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.4));
}

body.hw-mode-spooky .hw-floating-ghost {
  display: block;
}

@keyframes floatGhost {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.6; }
  50% { transform: translateY(-35px) rotate(8deg); opacity: 0.85; }
}

/* ==========================================================================
   5. TRICK-OR-TREAT FLOATING EASTER EGG WIDGET
   ========================================================================== */
.hw-easter-egg-widget {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hw-easter-egg-widget:hover {
  transform: scale(1.1) rotate(-4deg);
}

.hw-pumpkin-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ff9e00, #ff5400, #9d0208);
  border: 2px solid #ffd166;
  box-shadow: 0 4px 18px rgba(255, 84, 0, 0.5), inset 0 2px 6px rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: pumpkinBounce 3.5s infinite ease-in-out;
}

@keyframes pumpkinBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.hw-pumpkin-icon {
  font-size: 1.85rem;
  line-height: 1;
}

.hw-pumpkin-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #7b2cbf;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid #ffbe0b;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.hw-pumpkin-speech {
  background: #ffffff;
  color: #1e293b;
  font-family: 'Poppins', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  border: 1px solid #e2e8f0;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  pointer-events: none;
  white-space: nowrap;
}

.hw-pumpkin-speech::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -6px;
  transform: translateY(-50%);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 6px solid #ffffff;
}

/* ==========================================================================
   6. PUBLIC ADVISORY MODAL (UNDAS & HALLOWEEN)
   ========================================================================== */
.hw-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 15, 25, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  font-family: 'Poppins', sans-serif;
}

.hw-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.hw-modal-card {
  background: #ffffff;
  border-radius: 20px;
  max-width: 760px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
  position: relative;
  transform: translateY(30px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
}

.hw-modal-overlay.active .hw-modal-card {
  transform: translateY(0) scale(1);
}

.hw-modal-hero {
  position: relative;
  width: 100%;
  height: 210px;
  min-height: 210px;
  flex-shrink: 0;
  background-color: #240046;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  overflow: hidden;
}

.hw-modal-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hw-modal-hero-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(16, 22, 38, 0.2) 0%, rgba(16, 22, 38, 0.88) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  color: #fff;
}

.hw-modal-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ff7518;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  width: fit-content;
}

.hw-modal-hero-gradient h2 {
  font-size: 1.55rem;
  font-weight: 800;
  margin: 0;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.hw-modal-hero-gradient p {
  margin: 4px 0 0 0;
  font-size: 0.88rem;
  color: #ffbe0b;
}

.hw-modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 2;
}

.hw-modal-close-btn:hover {
  background: #ff7518;
  transform: rotate(90deg);
}

.hw-modal-content {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hw-advisory-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.hw-advisory-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.hw-advisory-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
}

.hw-advisory-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
}

.hw-advisory-card-header i {
  font-size: 1.1rem;
}

.hw-advisory-card-header.cemetery i { color: #d97706; }
.hw-advisory-card-header.traffic i { color: #2563eb; }
.hw-advisory-card-header.safety i { color: #16a34a; }
.hw-advisory-card-header.hotline i { color: #dc2626; }

.hw-advisory-card ul {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.84rem;
  color: #475569;
  line-height: 1.55;
}

.hw-advisory-card ul li {
  margin-bottom: 0.35rem;
}

.hw-advisory-callout {
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  font-size: 0.85rem;
  color: #78350f;
  line-height: 1.5;
}

.hw-advisory-callout strong {
  color: #92400e;
}

.hw-modal-footer {
  padding: 1rem 1.75rem 1.5rem;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.hw-btn-primary {
  background: linear-gradient(135deg, #ff7518, #e85d04);
  color: #ffffff;
  border: none;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.65rem 1.5rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(255, 117, 24, 0.35);
}

.hw-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 117, 24, 0.5);
}

/* ==========================================================================
   7. TRICK-OR-TREAT GREETING MODAL & CANDY PARTICLES
   ========================================================================== */
.hw-treat-modal-card {
  max-width: 480px;
  text-align: center;
  padding: 2.25rem 2rem;
  background: #ffffff;
  border-radius: 24px;
  position: relative;
}

.hw-treat-icon {
  font-size: 4rem;
  line-height: 1;
  margin-bottom: 1rem;
  animation: treatWiggle 1s ease-in-out infinite alternate;
}

@keyframes treatWiggle {
  from { transform: rotate(-8deg) scale(1); }
  to { transform: rotate(8deg) scale(1.08); }
}

.hw-treat-modal-card h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 0.5rem 0;
}

.hw-treat-modal-card p {
  font-size: 0.92rem;
  color: #64748b;
  line-height: 1.6;
  margin: 0 0 1.5rem 0;
}

.candy-particle {
  position: fixed;
  pointer-events: none;
  z-index: 10001;
  font-size: 1.6rem;
  animation: popAndFall 2.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes popAndFall {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(0.6) rotate(0deg);
  }
  30% {
    transform: translate(var(--tx), var(--ty-peak)) scale(1.3) rotate(180deg);
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--tx) * 1.3), 100vh) scale(1) rotate(420deg);
  }
}

/* ==========================================================================
   8. RESPONSIVE QUERIES
   ========================================================================== */
@media (max-width: 992px) {
  .hw-advisory-grid {
    grid-template-columns: 1fr;
  }
  .advisory-bar-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 1rem;
  }
  .advisory-bar-actions {
    width: 100%;
    justify-content: space-between;
    margin-top: 4px;
  }
  .hw-corner-web {
    width: 90px;
    height: 90px;
  }
  .hw-dangling-spider-box {
    right: 30px;
    height: 100px;
  }
  .hw-spider-thread {
    height: 65px;
  }
  .hw-spider-body {
    top: 61px;
  }
}

@media (max-width: 640px) {
  .halloween-switcher {
    padding: 2px;
  }
  .hw-switch-btn {
    padding: 4px 7px;
    font-size: 0.7rem;
    gap: 3px;
  }
  .hw-switch-btn span.btn-text {
    display: none;
  }
  .hw-easter-egg-widget .hw-pumpkin-speech {
    display: none;
  }
  .hw-pumpkin-btn {
    width: 48px;
    height: 48px;
  }
  .hw-pumpkin-icon {
    font-size: 1.5rem;
  }
}
