/**
 * Mobile Responsiveness Fixes
 * Fixes header layout on mobile devices
 */

/* Mobile Header Fix - Hamburger Menu Support */
@media (max-width: 768px) {
  /* Hide navigation links on small screens by default */
  nav .hidden-mobile,
  header nav > a:not(.logo-link):not([href="/"]),
  header nav > button:not(.mobile-menu-button) {
    display: none !important;
  }
  
  /* Show mobile menu button */
  .mobile-menu-button {
    display: flex !important;
  }
  
  /* When mobile menu is open */
  .mobile-menu-open nav > a,
  .mobile-menu-open nav > button {
    display: flex !important;
    width: 100%;
    justify-content: center;
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }
  
  /* Stack navigation vertically on mobile */
  header nav {
    flex-direction: column;
    width: 100%;
  }
  
  /* Ensure header is scrollable if needed */
  header {
    overflow: visible;
  }
  
  /* Fix touch target sizes - minimum 44px */
  button, 
  a,
  [role="button"] {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Improve CTA button visibility on mobile */
  .cta-button {
    width: 100%;
    text-align: center;
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }
}

/* Small mobile screens */
@media (max-width: 375px) {
  /* Even smaller adjustments */
  header h1,
  header .logo {
    font-size: 1.25rem;
  }
  
  /* Stack buttons vertically */
  .button-group {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  button,
  .button {
    width: 100%;
  }
}

/* Improve accessibility - visible focus states */
button:focus,
a:focus,
input:focus,
textarea:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Skip to content link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #1a1a2e;
  color: #ffffff;
  padding: 8px 16px;
  z-index: 100;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* Ensure smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
