/**
 * Keshava Eye Care - Header Stylesheet
 * Replicates the screenshot's deep navy header structure & mobile drawer.
 */

.site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--keshava-navy, #031c4e);
  box-shadow: 0 4px 20px rgba(3, 28, 78, 0.25);
  transition: background-color var(--transition-fast, 0.2s), padding var(--transition-fast, 0.2s);
}

/* ==========================================================================
   HEADER TOP BAR (Timings & Highlights)
   ========================================================================== */

.header-topbar {
  background-color: rgba(1, 18, 48, 0.65);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-block: 7px;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.88);
}

.header-topbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-topbar-info {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.topbar-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.topbar-item svg {
  width: 14px;
  height: 14px;
  color: var(--keshava-accent, #00f0ac);
  flex-shrink: 0;
}

.topbar-highlight-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(0, 240, 172, 0.12);
  border: 1px solid rgba(0, 240, 172, 0.35);
  color: #00f0ac;
  padding: 3px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background-color: #00f0ac;
  border-radius: 50%;
  box-shadow: 0 0 8px #00f0ac;
  animation: pulse-glow 2s infinite;
  display: inline-block;
  flex-shrink: 0;
}

@keyframes pulse-glow {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(0, 240, 172, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(0, 240, 172, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(0, 240, 172, 0);
  }
}

.header-topbar-contact {
  display: flex;
  align-items: center;
}

.topbar-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  transition: color 0.2s ease;
  text-decoration: none;
}

.topbar-link svg {
  width: 14px;
  height: 14px;
  color: var(--keshava-accent, #00f0ac);
}

.topbar-link:hover {
  color: #ffffff;
}

@media (max-width: 992px) {
  .header-topbar-contact {
    display: none;
  }
}

@media (max-width: 768px) {
  .header-topbar {
    padding-block: 6px;
  }
  .header-topbar-container {
    justify-content: center;
  }
  .header-topbar-info {
    justify-content: center;
    gap: 8px;
    width: 100%;
    text-align: center;
  }
  .topbar-item.topbar-timing {
    display: none;
  }
  .topbar-highlight-pill {
    font-size: 0.75rem;
    padding: 3px 10px;
    width: 100%;
    justify-content: flex-start;
    text-align: left;
  }
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 86px;
}

/* Brand Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.site-logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--keshava-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #012267;
}

.site-logo-text {
  display: flex;
  flex-direction: column;
}

.site-logo-title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  color: #ffffff;
  line-height: 1;
  text-transform: uppercase;
}

.site-logo-subtitle {
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 3px;
}

/* Primary Navigation */
.main-navigation {
  display: flex;
  align-items: center;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-menu a {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  font-size: 0.935rem;
  position: relative;
  padding-block: 6px;
}

.nav-menu a:hover,
.nav-menu .current-menu-item > a {
  color: #ffffff;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--keshava-accent, #60a5fa);
  transition: width var(--transition-fast, 0.2s);
  border-radius: 2px;
}

.nav-menu a:hover::after,
.nav-menu .current-menu-item > a::after {
  width: 100%;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  padding: 8px;
}

.mobile-toggle svg {
  width: 28px;
  height: 28px;
}

/* Mobile Drawer Overlay */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 380px;
  height: 100vh;
  background: var(--keshava-navy-dark);
  z-index: 1001;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.4);
}

.mobile-drawer.is-active {
  right: 0;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-drawer-close {
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  padding: 6px;
}

.mobile-nav-menu {
  list-style: none;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mobile-nav-menu a {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 600;
}

/* Mobile Bottom Fixed Contact Bar */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--keshava-navy-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 999;
  padding: 10px 16px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}

.mobile-bottom-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 8px;
}

.mobile-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  flex: 1;
  text-align: center;
  padding: 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.mobile-bar-item.highlight {
  background: var(--keshava-blue);
}

/* Responsive Rules for Header */
@media (max-width: 1024px) {
  .main-navigation {
    display: none;
  }
  .header-actions .btn-header-cta {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }
  .mobile-bottom-bar {
    display: block;
  }
  body {
    padding-bottom: 60px; /* offset for mobile bottom bar */
  }
}

/* ==========================================================================
   DESKTOP DROPDOWN — Specialised Services
   ========================================================================== */

/* Parent nav item that has a dropdown */
.nav-menu .nav-has-dropdown {
  position: relative;
}

/* The button trigger (replaces the <a> for the parent) */
.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  font-size: 0.935rem;
  font-family: inherit;
  padding-block: 6px;
  padding-inline: 0;
  position: relative;
  transition: color var(--transition-fast, 0.2s);
}

.nav-dropdown-toggle:hover,
.nav-has-dropdown.current-menu-item .nav-dropdown-toggle {
  color: #ffffff;
}

/* Underline effect matching other nav links */
.nav-dropdown-toggle::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--keshava-accent, #60a5fa);
  transition: width var(--transition-fast, 0.2s);
  border-radius: 2px;
}
.nav-dropdown-toggle:hover::after,
.nav-has-dropdown.current-menu-item .nav-dropdown-toggle::after {
  width: 100%;
}

/* Chevron icon */
.nav-chevron {
  width: 14px !important;
  height: 14px !important;
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.nav-has-dropdown.is-open .nav-chevron,
.nav-has-dropdown:hover .nav-chevron {
  transform: rotate(180deg);
}

/* Dropdown panel */
.nav-dropdown {
  display: block;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: calc(100% + 18px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  min-width: 260px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(1, 34, 103, 0.15), 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(1, 34, 103, 0.08);
  list-style: none;
  padding: 10px 0;
  z-index: 1100;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}

/* Dropdown caret pointer */
.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 8px;
  background: #ffffff;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

/* Show on hover OR when .is-open (JS toggle) */
.nav-has-dropdown:hover .nav-dropdown,
.nav-has-dropdown.is-open .nav-dropdown {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Dropdown items */
.nav-dropdown li {
  display: block;
}

.nav-dropdown a {
  display: block;
  padding: 11px 22px;
  color: var(--keshava-text, #07132f) !important;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  transition: background-color 0.18s, color 0.18s;
  border-radius: 0;
}

.nav-dropdown a:hover {
  background-color: var(--keshava-bg-soft, #f4f8fc);
  color: var(--keshava-navy, #012267) !important;
}

/* Override nav-menu underline on dropdown links */
.nav-dropdown a::after {
  display: none !important;
}

/* ==========================================================================
   MOBILE DRAWER — Specialised Services Accordion Submenu
   ========================================================================== */

.mobile-nav-has-dropdown {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* The toggle button */
.mobile-nav-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 600;
  font-family: inherit;
  padding-block: 0;
  padding-inline: 0;
  text-align: left;
  gap: 8px;
}

.mobile-nav-dropdown-toggle .nav-chevron {
  width: 18px !important;
  height: 18px !important;
  color: rgba(255, 255, 255, 0.7);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.mobile-nav-has-dropdown.is-open .mobile-nav-dropdown-toggle .nav-chevron {
  transform: rotate(180deg);
}

/* Submenu */
.mobile-nav-submenu {
  list-style: none;
  display: none;
  flex-direction: column;
  gap: 0;
  padding: 8px 0 4px 12px;
  border-left: 2px solid var(--keshava-accent, #00F0AC);
  margin-top: 10px;
}

.mobile-nav-has-dropdown.is-open .mobile-nav-submenu {
  display: flex;
}

.mobile-nav-submenu a {
  display: block;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  font-weight: 500;
  padding-block: 8px;
  transition: color 0.18s;
}

.mobile-nav-submenu a:hover {
  color: #ffffff;
}
