﻿/* ── DW-style HimachalGovt header ── */
:root {
  --hg-cyan: #00adee;
  --hg-cyan-dark: #0099d4;
  --hg-navy: #002d5a;
  --hg-yellow: #ffd800;
  --hg-mega-blue: #009fda;
  --hg-header-h: 62px;
  --hg-header-h-scrolled: 56px;
}

/* Sticky shell — stays fixed at top while scrolling */
.hg-site-header {
  position: sticky;
  top: 0;
  z-index: 300;
  width: 100%;
  transition: box-shadow 0.28s ease, backdrop-filter 0.28s ease;
}

.hg-site-header--scrolled {
  box-shadow: 0 4px 18px rgba(0, 45, 90, 0.22);
}

.hg-site-header--scrolled .hg-bar {
  background: rgba(0, 173, 238, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hg-site-header--scrolled .hg-bar__inner {
  min-height: var(--hg-header-h-scrolled);
}

.hg-site-header--scrolled .hg-logo__svg {
  transform: scale(0.92);
  transform-origin: center;
}

.hg-site-header--menu-open {
  position: sticky;
}

/* Logo — DW-style twin overlapping circles */
.hg-logo {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  line-height: 0;
  color: var(--hg-cyan);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.hg-logo:hover {
  opacity: 0.88;
}

.hg-logo__svg {
  display: block;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.hg-logo--static {
  pointer-events: none;
}

/* Main cyan bar */
.hg-bar {
  background: var(--hg-cyan);
  color: var(--hg-navy);
  font-family: 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background 0.28s ease;
}

.hg-bar__inner {
  max-width: 1440px;
  margin: 0 auto;
  min-height: var(--hg-header-h);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition: min-height 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.hg-bar__left {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
  flex: 1;
}

.hg-bar__news {
  display: none;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
  min-width: 0;
  overflow: hidden;
  padding-right: 12px;
  border-right: 1px solid rgba(0, 45, 90, 0.18);
  margin-right: 4px;
}

@media (min-width: 768px) {
  .hg-bar__news {
    display: flex;
  }
}

.hg-bar__news-label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--hg-navy);
  white-space: nowrap;
  text-transform: uppercase;
  text-decoration: none;
}

.hg-bar__news-label:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hg-bar__news-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--hg-navy);
  text-decoration: none;
  white-space: nowrap;
}

.hg-bar__news-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hg-bar__news-link:first-of-type {
  color: #004080;
}

.hg-bar__focus {
  display: none;
  align-items: center;
  gap: 16px;
  flex-wrap: nowrap;
  min-width: 0;
  overflow: hidden;
}

@media (min-width: 768px) {
  .hg-bar__focus {
    display: flex;
  }
}

.hg-bar__focus-label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--hg-navy);
  white-space: nowrap;
  text-transform: uppercase;
}

.hg-bar__focus-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--hg-navy);
  text-decoration: none;
  white-space: nowrap;
}

.hg-bar__focus-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hg-bar__right {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

.hg-bar__auth,
.hg-mega__auth {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.hg-bar__auth {
  display: none;
}

@media (min-width: 900px) {
  .hg-bar__auth {
    display: flex;
  }
}

.hg-bar__auth-link,
.hg-mega__auth-link {
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.hg-bar__auth-link {
  color: var(--hg-navy) !important;
}

.hg-mega__auth-link {
  color: #fff !important;
}

.hg-bar__auth-link:hover {
  background: rgba(0, 45, 90, 0.07);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hg-mega__auth-link:hover {
  background: rgba(255, 255, 255, 0.14);
  text-decoration: underline;
  text-underline-offset: 3px;
  color: #fff !important;
}

.hg-bar__auth-sep,
.hg-mega__auth-sep {
  font-weight: 400;
  user-select: none;
  opacity: 0.45;
}

.hg-bar__util {
  display: none;
  align-items: center;
  gap: 8px;
  color: var(--hg-navy);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

@media (min-width: 900px) {
  .hg-bar__util {
    display: inline-flex;
  }
}

.hg-bar__util:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hg-bar__util svg {
  flex-shrink: 0;
  stroke-width: 2;
}

/* Entertainment pill — replaces Latest videos / audio / Live TV */
.hg-bar__entertainment {
  display: none;
  align-items: center;
  gap: 8px;
  background: var(--hg-navy);
  color: #fff !important;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
  padding: 8px 18px 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

@media (min-width: 640px) {
  .hg-bar__entertainment {
    display: inline-flex;
  }
}

.hg-bar__entertainment:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 45, 90, 0.22);
  background: #001d3d;
  color: #fff !important;
}

.hg-bar__entertainment svg {
  flex-shrink: 0;
}

/* Live TV pill — DW style */
.hg-bar__live {
  display: none;
  align-items: center;
  gap: 8px;
  background: var(--hg-yellow);
  color: var(--hg-navy);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
  padding: 8px 18px 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

@media (min-width: 640px) {
  .hg-bar__live {
    display: inline-flex;
  }
}

.hg-bar__live:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 45, 90, 0.18);
}

.hg-bar__live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--hg-navy);
  flex-shrink: 0;
}

.hg-bar__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--hg-navy);
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.hg-bar__icon-btn:hover,
.hg-bar__icon-btn.is-active {
  background: rgba(0, 45, 90, 0.1);
}

.hg-bar__icon-btn svg {
  stroke-width: 2.2;
}

/* Search dropdown */
.hg-bar__search-drop {
  display: flex;
  gap: 8px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px 12px;
  background: var(--hg-cyan);
}

.hg-bar__search-drop[hidden] {
  display: none !important;
}

.hg-bar__search-drop input {
  flex: 1;
  border: none;
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--hg-navy);
  outline: none;
}

.hg-bar__search-drop button {
  border: none;
  background: var(--hg-navy);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  padding: 10px 18px;
  border-radius: 4px;
  cursor: pointer;
}

/* Mega menu overlay */
.hg-mega {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: var(--hg-mega-blue);
  color: #fff;
  overflow-y: auto;
  animation: hg-mega-in 0.22s ease;
}

@keyframes hg-mega-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hg-mega__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.hg-mega__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
}

.hg-mega__top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.hg-mega__live-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--hg-yellow);
  color: var(--hg-navy) !important;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
}

.hg-mega__live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hg-navy);
}

.hg-mega__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.hg-mega__close:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.78);
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
}

.hg-mega__close:focus-visible {
  outline: 2px solid var(--hg-yellow);
  outline-offset: 3px;
}

.hg-mega__close svg {
  display: block;
}

.hg-mega__body {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 40px;
}

.hg-mega__section {
  margin-bottom: 36px;
}

.hg-mega__heading {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  opacity: 0.72;
  margin: 0 0 16px;
}

.hg-mega__grid {
  display: grid;
  gap: 10px 24px;
}

.hg-mega__grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.hg-mega__grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
  .hg-mega__grid--3,
  .hg-mega__grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.hg-mega__link {
  color: #fff;
  text-decoration: none;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
}

.hg-mega__link:hover {
  text-decoration: underline;
}

.hg-mega__footer {
  background: var(--hg-navy);
  text-align: center;
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 600;
}

.hg-mega__footer strong {
  color: var(--hg-cyan);
  font-weight: 800;
}

@media (min-width: 480px) and (max-width: 767px) {
  .hg-bar__news {
    display: flex;
    gap: 10px;
    padding-right: 8px;
    margin-right: 0;
    border-right: none;
  }

  .hg-bar__news-link:not(:first-of-type) {
    display: none;
  }

  .hg-bar__focus {
    display: none;
  }
}

.hg-mega__link--featured {
  font-weight: 800;
  color: var(--hg-yellow);
}

@media (max-width: 640px) {
  .hg-bar__inner {
    padding: 0 14px;
    min-height: 58px;
  }

  .hg-bar__right {
    gap: 6px;
  }

  .hg-bar__focus {
    gap: 10px;
  }

  .hg-mega__top {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      'brand close'
      'actions actions';
    align-items: center;
    gap: 12px 10px;
    padding: 14px 16px;
  }

  .hg-mega__brand {
    grid-area: brand;
    font-size: 18px;
    min-width: 0;
  }

  .hg-mega__close {
    grid-area: close;
    align-self: start;
  }

  .hg-mega__top-actions {
    grid-area: actions;
    margin-left: 0;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .hg-mega__auth {
    width: 100%;
    flex-wrap: wrap;
  }

  .hg-mega__live-btn {
    align-self: flex-start;
  }
}
