/* header.css */
/* --- Top Bar --- */
.top-bar {
  background-color: var(--primary-dark);
  color: var(--white);
  font-size: 0.8rem;
  padding: 0.25rem 0;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-left,
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.affiliation-logos {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.affiliation-logos img {
  height: 24px;
  width: auto;
  opacity: 0.8;
  filter: grayscale(100%) brightness(200%);
  transition: opacity 0.3s;
}

.affiliation-logos img:hover {
  opacity: 1;
  filter: none;
}

.top-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.top-links a {
  color: var(--white);
  text-decoration: none;
  transition: color 0.3s;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.top-links a:hover {
  color: var(--accent);
}

.top-links-divider {
  width: 1px;
  height: 12px;
  background-color: rgba(255, 255, 255, 0.2);
}

.lang-toggle {
  font-weight: 600;
  color: var(--accent-light) !important;
}

/* --- Main Header --- */
.site-header {
  background-color: var(--white);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: padding 0.3s ease, box-shadow 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  transition: padding 0.3s ease;
}

.site-header.scrolled .site-header-inner {
  padding: 0.5rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}

.brand-logo img {
  height: 80px;
  width: auto;
  transition: height 0.3s ease;
}

.site-header.scrolled .brand-logo img {
  height: 60px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-hindi {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  color: var(--accent);
  font-size: 1.1rem;
  line-height: 1.2;
  margin-top: -1.5rem !important;
}

.brand-english {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--primary);
  font-size: 1.5rem;
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 0.25rem;
}

/* --- Navigation --- */
.main-nav {
  display: flex;
}

.nav-list {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.nav-item {
  position: relative;
}

.nav-link {
  font-weight: 500;
  color: var(--primary);
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.3s;
  font-size: 0.95rem;
}

.nav-link>i {
  font-size: 14px;
}

.nav-link:hover,
.nav-item:hover>.nav-link,
.nav-item.active .nav-link {
  color: var(--accent);
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: width 0.3s ease;
}

.nav-item:hover::after,
.nav-item.active::after {
  width: 100%;
}

/* Dropdown */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--white);
  min-width: 240px;
  box-shadow: var(--shadow-md);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease;
  border-top: 3px solid var(--accent);
  z-index: 1001;
}

.nav-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.875rem 1.25rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  border-bottom: 1px solid var(--surface-alt);
  transition: background-color 0.2s, color 0.2s, padding-left 0.2s;
  text-decoration: none;
}

.dropdown-item i {
  font-size: 14px;
  color: var(--text-light);
  transition: color 0.2s;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background-color: var(--surface);
  color: var(--primary);
  padding-left: 1.5rem;
}

.dropdown-item:hover i {
  color: var(--primary);
}

/* Sub-dropdown */
.dropdown-submenu {
  position: relative;
}

.dropdown-submenu>.dropdown-menu {
  top: 0;
  left: 100%;
  margin-left: -3px;
  border-top: none;
  border-left: 3px solid var(--accent);
}

.dropdown-submenu:hover>.dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* Mobile Elements Default Hidden on Desktop */
.mobile-nav-overlay,
.mobile-sidebar {
  display: none;
}

/* Mobile Toggle */
.mobile-nav-toggle {
  display: none;
  font-size: 2rem;
  color: var(--primary);
  padding: 0.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
}

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

/* --- Ticker --- */
.notices-ticker {
  background-color: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  height: 40px;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ticker-label {
  background-color: var(--primary-dark);
  color: var(--accent);
  font-weight: 600;
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  z-index: 2;
  position: relative;
  font-size: 0.9rem;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
}

.ticker-content {
  flex: 1;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

.ticker-scroll {
  display: flex;
  white-space: nowrap;
  animation: marquee-scroll 35s linear infinite;
  gap: 3rem;
  padding-left: 100%;
}

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

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--white);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.3s;
}

.ticker-item:hover {
  color: var(--accent-light);
}

.ticker-new-badge {
  background-color: var(--success);
  color: white;
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.ticker-view-all {
  background-color: var(--primary-dark);
  color: var(--white);
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 2;
  transition: color 0.3s;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.2);
}

.ticker-view-all:hover {
  color: var(--accent);
}

@keyframes marquee-scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-100%);
  }
}

/* --- Mobile Responsive --- */
@media (max-width: 1199px) {
  .nav-list {
    gap: 1rem;
  }

  .brand-english {
    font-size: 1.3rem;
  }
}

@media (max-width: 1024px) {
  .brand-english {
    font-size: 1.2rem;
  }

  .brand-hindi {
    font-size: 1rem;
  }

  .nav-list {
    display: none;
  }

  .mobile-nav-toggle {
    display: block;
  }

  .mobile-nav-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .mobile-sidebar {
    display: block;
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100vh;
    background: var(--white);
    z-index: 1100;
    transition: left 0.3s ease;
    overflow-y: auto;
    padding: 1.5rem 1rem;
  }

  .mobile-sidebar.active {
    left: 0;
    box-shadow: var(--shadow-lg);
  }

  .mobile-sidebar .nav-list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    margin-top: 2rem;
  }

  .mobile-sidebar .nav-item {
    width: 100%;
    border-bottom: 1px solid var(--surface-alt);
  }

  .mobile-sidebar .nav-link {
    padding: 1rem 0;
    justify-content: space-between;
    width: 100%;
    font-size: 1rem;
  }

  .mobile-sidebar .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--accent);
    margin-left: 1rem;
    padding-left: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    min-width: 100%;
    border-radius: 0;
  }

  .mobile-sidebar .nav-item.open>.dropdown-menu {
    display: block;
  }

  .mobile-sidebar .dropdown-item {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }

  .mobile-sidebar .dropdown-submenu .dropdown-menu {
    margin-left: 1rem;
  }

  .mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
  }

  .mobile-close {
    font-size: 1.5rem;
    color: var(--text-primary);
  }

  .mobile-logo img {
    height: 50px;
  }
}

@media (max-width: 768px) {
  .top-bar-left {
    display: none;
  }

  .top-bar-right {
    width: 100%;
    justify-content: center;
  }

  .brand-logo img,
  .site-header.scrolled .brand-logo img {
    height: 55px;
  }

  .brand-hindi {
    display: none;
  }

  .brand-sub {
    display: none;
  }

  .ticker-label {
    display: none;
  }
}

@media (max-width: 480px) {
  .brand-english {
    font-size: 1.1rem;
  }

  .ticker-item {
    font-size: 0.8rem;
  }

  .top-links {
    gap: 0.5rem;
  }

  .top-links a {
    font-size: 0.75rem;
  }
}