/* ================================
   Modern Header Design System
   Learn Today - 2025
   ================================ */

:root {
  /* Header Variables */
  --header-height: 70px;
  --header-bg: rgba(255, 255, 255, 0.98);
  --header-border: rgba(226, 232, 240, 0.8);
  --header-shadow: 0 1px 3px rgba(0,0,0,0.08);

  /* Colors */
  --primary-color: #667eea;
  --primary-hover: #5a67d8;
  --text-primary: #1a202c;
  --text-secondary: #4a5568;
  --text-muted: #718096;

  /* Spacing */
  --nav-gap: 2rem;
  --item-gap: 0.5rem;
}

/* ================================
   Main Header Structure
   ================================ */

.unified-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  box-shadow: var(--header-shadow);
  backdrop-filter: blur(20px);
  z-index: 9999;
}

.header-container {
  max-width: 1400px;
  height: 100%;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
}

/* ================================
   Logo Section
   ================================ */

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.header-logo:hover {
  opacity: 0.85;
}

.logo-image {
  height: 2rem;
  width: auto;
  object-fit: contain;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  white-space: nowrap;
}

/* ================================
   Navigation Section
   ================================ */

.header-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.5rem;
  height: 100%;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;
}

.nav-menu a,
.nav-menu button {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.nav-menu a:hover,
.nav-menu button:hover {
  color: var(--text-primary);
  background: rgba(102, 126, 234, 0.08);
}

/* ================================
   Contact Phone
   ================================ */

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

.header-phone {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.header-phone:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

.phone-icon {
  font-size: 1.1rem;
}

/* ================================
   CTA Button
   ================================ */

.header-cta {
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25);
}

.header-cta:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}

/* ================================
   EdTech Partners Dropdown
   ================================ */

.edutech-dropdown {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  white-space: nowrap;
}

.dropdown-trigger:hover {
  color: var(--text-primary);
  background: rgba(102, 126, 234, 0.08);
}

.dropdown-trigger svg {
  transition: transform 0.3s ease;
}

.edutech-dropdown:hover .dropdown-trigger svg {
  transform: rotate(180deg);
}

/* Mega Dropdown */

.mega-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border: 1px solid var(--header-border);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
  padding: 1.5rem;
  min-width: 650px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  z-index: 10000;
}

.mega-dropdown.show {
  opacity: 1;
  visibility: visible;
}

.dropdown-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  text-decoration: none;
  color: var(--text-primary);
  border-radius: 10px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  background: white;
}

.dropdown-item:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
  transform: translateY(-2px);
}

.dropdown-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.dropdown-content {
  flex: 1;
  min-width: 0;
}

.dropdown-content h4 {
  margin: 0 0 0.25rem 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #111827;
}

.dropdown-content p {
  margin: 0;
  font-size: 0.8rem;
  color: #6b7280;
  line-height: 1.4;
}

/* ================================
   Language Toggle
   ================================ */

.language-toggle {
  width: 40px;
  height: 40px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.language-toggle:hover {
  background: #e2e8f0;
  color: #334155;
  border-color: #cbd5e1;
}

/* ================================
   Mobile Menu
   ================================ */

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-primary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.mobile-menu {
  display: none;
}

/* ================================
   Responsive Design
   ================================ */

@media (max-width: 1024px) {
  .header-container {
    padding: 0 1.5rem;
  }

  .mega-dropdown {
    min-width: 500px;
  }

  .dropdown-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  .header-container {
    grid-template-columns: auto 1fr auto;
    padding: 0 1rem;
    gap: 1rem;
  }

  .logo-image {
    height: 2rem;
  }

  .logo-text {
    font-size: 1.25rem;
  }

  .header-nav {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

  /* Mobile Menu */
  .mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid var(--header-border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .mobile-menu.active {
    display: block;
    max-height: 500px;
  }

  .mobile-menu .nav-menu {
    flex-direction: column;
    padding: 1rem;
    gap: 0.25rem;
    width: 100%;
  }

  .mobile-menu .nav-menu a,
  .mobile-menu .nav-menu button {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    justify-content: flex-start;
  }

  .mobile-menu .header-phone-mobile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    font-weight: 600;
    color: #ef4444;
    text-decoration: none;
    font-size: 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
  }

  .mobile-menu .header-phone-mobile:hover {
    background: rgba(239, 68, 68, 0.08);
  }

  .mobile-menu .header-cta {
    width: 100%;
    text-align: center;
    margin-top: 0.5rem;
  }

  .language-toggle.mobile {
    width: 100%;
    height: 44px;
    margin-top: 0.5rem;
  }
}

/* ================================
   Body Padding
   ================================ */

body {
  padding-top: var(--header-height);
}

/* ================================
   Accessibility
   ================================ */

.nav-menu a:focus,
.dropdown-trigger:focus,
.header-cta:focus,
.header-phone:focus,
.language-toggle:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* ================================
   Performance
   ================================ */

.header-logo,
.nav-menu a,
.header-cta,
.dropdown-item {
  -webkit-tap-highlight-color: transparent;
}
