/**
 * ============================================================================
 * Front-End Engineering Specification: Header & Footer Visual Modernization
 * Target: schoolsindia.com
 * File: header-footer-modern.css
 * ============================================================================
 */

:root {
  --brand-primary: #0070c9;
  --brand-primary-hover: #005a9e;
  --brand-accent: #2563eb;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --header-bg: rgba(255, 255, 255, 0.95);
  --header-border: #e2e8f0;
  --header-top-bg: #0b1329;
  --header-top-text: #cbd5e1;
  --footer-bg: #0b1329;
  --footer-surface: #0f1c35;
  --footer-text-main: #f8fafc;
  --footer-text-muted: #94a3b8;
  --footer-border: rgba(255, 255, 255, 0.08);
  --transition-smooth: 0.2s ease;
}

/* ============================================================================
 * 1. HEADER MODERNIZATION
 * ============================================================================ */

/* Top Utility Bar */
.modern-top-bar {
  background-color: var(--header-top-bg);
  color: var(--header-top-text);
  font-size: 12.5px;
  line-height: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.modern-top-bar a {
  color: var(--header-top-text);
  transition: color var(--transition-smooth);
}

.modern-top-bar a:hover {
  color: #38bdf8;
}

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

/* Sticky Main Navigation */
.modern-header-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--header-border);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
  transition: all var(--transition-smooth);
}

/* Brand Logo (CLS Prevention) */
.header-brand-logo {
  display: block;
  width: 210px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 224 / 51;
  object-fit: contain;
}

/* Primary Navigation Links */
.nav-link-item {
  position: relative;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-dark);
  padding: 8px 14px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color var(--transition-smooth), background-color var(--transition-smooth);
  text-decoration: none;
}

.nav-link-item:hover,
.nav-link-item.active {
  color: var(--brand-primary);
  background-color: rgba(0, 112, 201, 0.06);
}

/* Active indicator dot */
.nav-link-item.active::after {
  content: "";
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 2px;
  background-color: var(--brand-primary);
  border-radius: 2px;
}

/* Modern Elevated Dropdown Menus */
.modern-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background: #ffffff;
  border: 1px solid var(--header-border);
  border-radius: 12px;
  box-shadow: 0 12px 30px -4px rgba(15, 23, 42, 0.12), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
  padding: 8px;
  min-width: 230px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1050;
}

/* Invisible hover bridge connecting trigger link to dropdown menu so hover is never lost */
.modern-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -16px;
  left: -12px;
  right: -12px;
  height: 20px;
  background: transparent;
  display: block;
}

.nav-group-parent:hover .modern-dropdown-menu,
.nav-group-parent:focus-within .modern-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-link-item .fa-chevron-down {
  transition: transform 0.2s ease;
}

.nav-group-parent:hover .nav-link-item .fa-chevron-down {
  transform: rotate(180deg);
}

.dropdown-link-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: #334155;
  border-radius: 8px;
  transition: all var(--transition-smooth);
  text-decoration: none;
}

.dropdown-link-item:hover {
  background-color: #f0f7ff;
  color: var(--brand-primary);
  transform: translateX(2px);
}

.dropdown-link-item i {
  color: #94a3b8;
  font-size: 14px;
  transition: color var(--transition-smooth);
}

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

/* Primary Header Action CTA */
.header-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--brand-primary);
  color: #ffffff !important;
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 9999px;
  box-shadow: 0 2px 6px rgba(0, 112, 201, 0.25);
  transition: all var(--transition-smooth);
  text-decoration: none;
  white-space: nowrap;
}

.header-action-btn:hover {
  background-color: var(--brand-primary-hover);
  box-shadow: 0 4px 12px rgba(0, 112, 201, 0.35);
  transform: translateY(-1px);
}

/* Mobile Hamburger Button */
.modern-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background-color: #f8fafc;
  border: 1px solid var(--header-border);
  color: var(--text-dark);
  transition: all var(--transition-smooth);
}

.modern-menu-btn:hover {
  background-color: #f1f5f9;
  color: var(--brand-primary);
}

/* Mobile Off-Canvas / Drawer Menu */
#mobileMenu {
  background-color: #ffffff;
  border-top: 1px solid var(--header-border);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  max-height: 80vh;
  overflow-y: auto;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  border-radius: 8px;
  min-height: 44px;
  transition: all var(--transition-smooth);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  background-color: #f0f7ff;
  color: var(--brand-primary);
}

.mobile-submenu-link {
  display: flex;
  align-items: center;
  padding: 10px 16px 10px 32px;
  font-size: 14px;
  font-weight: 500;
  color: #475569;
  min-height: 42px;
  border-radius: 6px;
  transition: all var(--transition-smooth);
}

.mobile-submenu-link:hover {
  background-color: #f8fafc;
  color: var(--brand-primary);
}

/* ============================================================================
 * 2. FOOTER MODERNIZATION
 * ============================================================================ */

.modern-footer {
  background-color: var(--footer-bg);
  color: var(--footer-text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
}

/* Section Headings */
.footer-heading {
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--footer-text-main);
  margin-bottom: 18px;
  position: relative;
  display: inline-block;
}

.footer-heading::after {
  content: "";
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--brand-primary);
  margin-top: 6px;
  border-radius: 2px;
}

/* Footer Link Items */
.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--footer-text-muted);
  padding: 5px 0;
  transition: all var(--transition-smooth);
  text-decoration: none;
}

.footer-link:hover {
  color: #ffffff;
  transform: translateX(4px);
}

/* Social Media Icon Badges */
.footer-social-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 14px;
  transition: all var(--transition-smooth);
}

.footer-social-badge:hover {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 112, 201, 0.4);
}

/* Colorful Social Media Badges (Matching Live Website) */
.footer-social-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background-color: #ffffff;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  text-decoration: none;
}

.footer-social-card:hover {
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.footer-social-card.facebook {
  color: #1877F2;
}

.footer-social-card.twitter {
  color: #0f172a;
}

.footer-social-card.linkedin {
  color: #0A66C2;
}

.footer-social-card.youtube {
  color: #FF0000;
}

.footer-social-card.instagram {
  color: #E4405F;
}

/* Footer Contact Item */
.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--footer-text-muted);
  margin-bottom: 12px;
}

.footer-contact-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background-color: rgba(0, 112, 201, 0.12);
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Modern Footer Paragraph Override */
.modern-footer p {
  color: #cbd5e1 !important;
}

/* Bottom Copyright & Legal Sub-Bar (High Contrast & Perfect Visibility) */
.footer-bottom-bar {
  background-color: #070d1d;
  border-top: 1px solid var(--footer-border);
  padding: 18px 0;
  font-size: 13px;
  color: #cbd5e1 !important;
}

.footer-bottom-bar p {
  color: #cbd5e1 !important;
  margin-bottom: 0 !important;
}

.footer-bottom-bar p span {
  color: #ffffff !important;
  font-weight: 600;
}

.legal-link {
  color: #cbd5e1 !important;
  transition: color var(--transition-smooth);
  text-decoration: none;
}

.legal-link:hover {
  color: #38bdf8 !important;
}
