/**
 * Header Component Styles
 */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  background: rgba(245, 245, 245, 0.98); /* Cloud Silver with slight transparency */
  border-bottom: 2px solid #6C63FF; /* Deep Creative Violet border */
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(108, 99, 255, 0.15);
  backdrop-filter: blur(10px);
}

/* Mobile and Tablet: Fixed position to prevent scrolling */
@media (max-width: 1023px) {
  .header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
  }
}

.header--scrolled {
  background: rgba(245, 245, 245, 1); /* Solid Cloud Silver when scrolled */
  backdrop-filter: blur(10px);
  border-bottom-color: #FFD35C; /* Bright Golden Yellow when scrolled */
  box-shadow: 0 3px 10px rgba(255, 211, 92, 0.2);
}

.header__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  max-height: 60px; /* Compact professional height */
  width: 100%;
  overflow: hidden; /* Prevent any content from overflowing */
  box-sizing: border-box;
}

/* Ultra Small Mobile: Minimal margins */
@media (max-width: 359px) {
  .header__container {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    max-height: 60px;
  }
  
  .header__logo-text {
    font-size: 0.9rem;
  }
  
  .header__logo-tagline {
    font-size: 0.5rem;
  }
}

/* Small Mobile: Slightly more padding */
@media (min-width: 360px) and (max-width: 479px) {
  .header__container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    max-height: 65px;
  }
  
  .header__logo-text {
    font-size: 1rem;
  }
  
  .header__logo-tagline {
    font-size: 0.55rem;
  }
}

/* Mobile: Standard padding */
@media (min-width: 480px) and (max-width: 767px) {
  .header__container {
    padding-left: 1rem;
    padding-right: 1rem;
    max-height: 70px;
  }
  
  .header__logo-text {
    font-size: 1.1rem;
  }
  
  .header__logo-tagline {
    font-size: 0.6rem;
  }
}

/* Tablet: Professional padding */
@media (min-width: 768px) and (max-width: 1023px) {
  .header__container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    max-height: 75px;
  }
  
  .header__logo-text {
    font-size: 1.2rem;
  }
  
  .header__logo-tagline {
    font-size: 0.65rem;
  }
}

/* Logo */
.header__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.header__logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header__logo-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header__logo-image {
  height: 40px;
  width: auto;
  object-fit: contain;
  max-width: 200px;
  filter: contrast(1.1) brightness(1.05);
}

.header__logo-text-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.2;
  flex-shrink: 1;
  min-width: 0; /* Allow text to shrink */
  overflow: hidden; /* Prevent text overflow */
}

.header__logo-text {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: #0E3A8A; /* Electric Tech Blue */
  line-height: 1;
  letter-spacing: 0.02em;
  margin: 0;
  white-space: nowrap; /* Prevent text wrapping */
  overflow: hidden; /* Hide overflow text */
  text-overflow: ellipsis; /* Show ... if text is too long */
  max-width: 100%; /* Ensure it doesn't exceed container */
}

.header__logo-tagline {
  font-size: 0.6rem;
  font-weight: 400;
  color: #0E0E10; /* Midnight Black */
  opacity: 0.8;
  letter-spacing: 0.05em;
  margin: 0;
  margin-top: 0.1rem;
  white-space: nowrap; /* Prevent text wrapping */
  overflow: hidden; /* Hide overflow text */
  text-overflow: ellipsis; /* Show ... if text is too long */
  max-width: 100%; /* Ensure it doesn't exceed container */
}

.header__logo:hover {
  opacity: 0.8;
}

.header__logo-placeholder {
  display: flex;
  flex-direction: column;
}

/* Desktop Navigation */
.header__nav--desktop {
  display: none;
}

/* Hide desktop nav on mobile and tablets */
@media (max-width: 1023px) {
  .header__nav--desktop {
    display: none !important;
  }
}

/* Show desktop nav on desktop */
@media (min-width: 1024px) {
  .header__nav--desktop {
    display: flex;
  }
}

/* Mobile Menu Button - Professional Design */
.header__menu-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--color-primary) !important; /* Electric Tech Blue */
  border: none;
  cursor: pointer;
  padding: 0;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 60;
  box-shadow: 0 2px 8px rgba(14, 58, 138, 0.2);
}

.header__menu-button:hover {
  background: var(--color-accent-a); /* Deep Creative Violet on hover */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}

.header__menu-button--active {
  background: var(--color-accent-a); /* Deep Creative Violet when active */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}

/* Show hamburger menu on mobile and tablets */
@media (max-width: 1023px) {
  .header__menu-button {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  /* Force hamburger lines to be visible */
  .hamburger {
    display: flex !important;
    visibility: visible !important;
  }
  
  .hamburger__line {
    display: block !important;
    visibility: visible !important;
    background: white !important;
    height: 3px !important;
  }
}

/* Focus state for accessibility */
.header__menu-button:focus-visible {
  outline: 2px solid var(--color-accent-b);
  outline-offset: 2px;
}

/* Hide hamburger menu on desktop */
@media (min-width: 1024px) {
  .header__menu-button {
    display: none !important;
  }
}

/* Hamburger Icon - Professional 3-line animation */
.hamburger {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  width: 20px !important;
  height: 16px !important;
  position: relative !important;
  pointer-events: none;
  gap: 2px !important;
}

.hamburger__line {
  width: 100% !important;
  height: 3px !important;
  background: white !important;
  border-radius: 1px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  position: relative !important;
}

/* Professional hamburger to X transformation */
.hamburger--active .hamburger__line:nth-child(1) {
  transform: translateY(4px) rotate(45deg) !important;
}

.hamburger--active .hamburger__line:nth-child(2) {
  opacity: 0 !important;
  transform: scaleX(0) !important;
}

.hamburger--active .hamburger__line:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg) !important;
}

/* Mobile Menu Overlay */
.header__mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(14, 10, 16, 0.6);
  backdrop-filter: blur(4px);
  z-index: 45;
  animation: fadeIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Mobile Menu - Professional slide animation */
.header__mobile-menu {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  max-height: calc(100vh - 60px);
  background: white;
  z-index: 50;
  transform: translateY(-100%);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  overflow-y: auto;
  border-radius: 0 0 16px 16px;
}

.header__mobile-menu--open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.header__mobile-menu-content {
  height: 100%;
  overflow-y: auto;
  animation: slideIn 0.3s ease;
}

/* Mobile menu header styles removed - no longer needed */

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header__nav--mobile {
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .header__mobile-menu,
  .header__mobile-overlay {
    display: none;
  }
}

/* Responsive Logo Styles - Ensure everything fits within navigation */
@media (max-width: 1024px) {
  .header__logo-text {
    font-size: 1rem;
  }
  
  .header__logo-tagline {
    font-size: 0.58rem;
  }
  
  .header__logo-container {
    gap: 0.6rem;
  }
}

@media (max-width: 768px) {
  .header__logo-container {
    gap: 0.5rem;
  }
  
  .header__logo-text {
    font-size: 0.85rem;
    line-height: 1.1;
  }
  
  .header__logo-tagline {
    font-size: 0.52rem;
    margin-top: 0.05rem;
  }
  
  .header__logo-image {
    height: 32px;
  }
}

@media (max-width: 640px) {
  .header__logo-container {
    gap: 0.4rem;
  }
  
  .header__logo-text {
    font-size: 0.75rem;
    line-height: 1.1;
  }
  
  .header__logo-tagline {
    font-size: 0.48rem;
    margin-top: 0.05rem;
  }
  
  .header__logo-image {
    height: 30px;
  }
}

@media (max-width: 480px) {
  .header__logo-container {
    gap: 0.3rem;
  }
  
  .header__logo-text {
    font-size: 0.65rem;
    line-height: 1;
  }
  
  .header__logo-tagline {
    font-size: 0.42rem;
    margin-top: 0.02rem;
  }
  
  .header__logo-image {
    height: 28px;
  }
}

@media (max-width: 360px) {
  .header__logo-text {
    font-size: 0.6rem;
  }
  
  .header__logo-tagline {
    font-size: 0.38rem;
  }
  
  .header__logo-image {
    height: 26px;
  }
  
  .header__logo-container {
    gap: 0.25rem;
  }
}


