/* Paaz Website - Main CSS with Hamburger Navigation */
/* Import consolidated stylesheets */
@import url('./foundation.css?v=1.0');
@import url('./pages.css?v=1.0');

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: var(--leading-relaxed);
  color: rgba(255, 255, 255, 0.95);
  min-height: 100vh;
  font-size: var(--text-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Gradient applied in gradient.css */
}

/* Container with enhanced spacing */
.container {
  max-width: var(--container-max-width);
  margin-inline: auto;
  padding-inline: var(--container-padding-x);
}

/* Floating Dark Header with glass morphism - pill style */
header {
  background: var(--glass-container-bg);
  backdrop-filter: blur(var(--blur-xl));
  -webkit-backdrop-filter: blur(var(--blur-xl));
  position: fixed;
  top: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - var(--space-16) * 2);
  max-width: 1200px;
  z-index: 1000;
  border: var(--glass-border-width) solid var(--glass-border);
  border-radius: var(--radius-full);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-10);
  padding: var(--space-3) var(--space-8);
  min-height: auto;
  position: relative;
}

header .container {
  padding-inline: 0;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  z-index: 1001;
  padding: var(--space-2);
  margin: calc(-1 * var(--space-2));
  min-height: var(--min-touch-target);
  border-radius: var(--radius-lg);
  transition: opacity 0.2s ease;
}

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

.logo-link:active {
  opacity: 0.7;
}

.logo-icon {
  height: 40px;
  width: 40px;
  display: block;
  transition: all 0.3s ease;
}

.logo-text {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: -0.02em;
}

/* Desktop Navigation */
.nav-links {
  display: flex;
  list-style: none;
  gap: var(--space-10);
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.7);
  font-weight: var(--font-medium);
  font-size: var(--text-base);
  transition: opacity 0.3s ease;
  padding: var(--space-2) var(--space-1);
  position: relative;
  min-height: var(--min-touch-target);
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.nav-links a:hover {
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
  transition: all 0.3s ease;
  padding: 0;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 1px;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transform-origin: center;
  position: absolute;
  display: block;
  left: 50%;
  transform: translateX(-50%);
}

.hamburger span:nth-child(1) {
  top: 12px;
}

.hamburger span:nth-child(2) {
  top: 19px;
}

.hamburger span:nth-child(3) {
  top: 26px;
}

.hamburger:hover span {
  background: rgba(255, 255, 255, 1);
}

.hamburger.active span:nth-child(1) {
  transform: translateX(-50%) rotate(45deg);
  top: 19px;
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateX(-50%) rotate(-45deg);
  top: 19px;
}

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed;
  /* Extend beyond safe areas to cover entire screen */
  top: calc(-1 * env(safe-area-inset-top, 0px));
  left: calc(-1 * env(safe-area-inset-left, 0px));
  right: calc(-1 * env(safe-area-inset-right, 0px));
  bottom: calc(-1 * env(safe-area-inset-bottom, 0px));
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(var(--blur-2xl));
  -webkit-backdrop-filter: blur(var(--blur-2xl));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.mobile-menu .nav-links {
  display: flex !important;
  /* Override the display: none from @media query */
  flex-direction: column;
  gap: var(--space-8);
  text-align: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-menu .nav-links a {
  display: flex !important;
  font-size: var(--text-3xl);
  padding: var(--space-5) var(--space-10);
  min-width: 220px;
  justify-content: center;
  align-items: center;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: var(--font-medium);
  transition: opacity 0.3s ease;
}

.mobile-menu .nav-links a:hover {
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Main content with proper top spacing for floating header */
main {
  margin-top: 140px;
  padding-block: var(--space-lg);
}

/* Section spacing */
section {
  margin-block: var(--section-gap);
  scroll-margin-top: calc(var(--space-16) + var(--space-20) + var(--space-8));
}

section:first-child {
  margin-top: 0;
}

section:last-child {
  margin-bottom: 0;
}

/* Home section specific styling */
#home .content-frame {
  text-align: center;
  padding-block: var(--space-2xl);
}

#home h1 {
  margin-bottom: var(--space-8);
}

#home p {
  max-width: 600px;
  margin-inline: auto;
}

/* Paaz section styling */
#paaz .content-frame {
  text-align: center;
}

#paaz h2 {
  margin-bottom: var(--space-4);
}

#paaz>.content-frame>p {
  margin-bottom: var(--space-12);
  font-size: var(--text-xl);
  color: rgba(255, 255, 255, 0.8);
}

/* About section styling */
#about .content-frame {
  text-align: center;
}

#about h2 {
  margin-bottom: var(--space-6);
}

#about p {
  max-width: 700px;
  margin-inline: auto;
  font-size: var(--text-lg);
}

/* Universal Dark Footer with new centered layout */
footer {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(var(--blur-lg));
  -webkit-backdrop-filter: blur(var(--blur-lg));
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  padding-block: var(--space-12);
  margin-top: var(--space-2xl);
  font-size: var(--text-sm);
}

.footer-content {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Footer center layout - stacked and centered */
.footer-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  text-align: center;
}

/* Footer links */
.footer-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: var(--font-medium);
  transition: color 0.3s ease;
  font-size: var(--text-sm);
}

.footer-link:hover {
  color: rgba(255, 255, 255, 1);
  text-decoration: underline;
}

.footer-link:focus {
  outline: 2px solid rgba(59, 130, 246, 0.8);
  outline-offset: 2px;
  border-radius: 2px;
}

.footer-link.active {
  color: rgba(255, 255, 255, 0.95);
  cursor: default;
}

/* Legacy footer styles for pages that haven't been updated yet */
.contact-email {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: var(--font-medium);
  transition: color 0.3s ease;
}

.contact-email:hover {
  color: rgba(255, 255, 255, 1);
  text-decoration: underline;
}

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

/* Fade in/out animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in.hidden {
  opacity: 0;
  transform: translateY(20px);
}

/* Enhanced focus states for accessibility */
.nav-links a:focus-visible,
.hamburger:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.8);
  outline-offset: 2px;
}


/* Header glass enhancement on scroll */
@media (min-width: 769px) {
  header {
    transition: all 0.3s ease;
  }

  .header-scrolled {
    background: var(--glass-elevated-bg);
    backdrop-filter: blur(var(--blur-2xl));
    -webkit-backdrop-filter: blur(var(--blur-2xl));
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  }
}

/* Responsive design improvements */
@media (max-width: 768px) {

  /* Show hamburger menu, hide desktop nav */
  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
  }

  header {
    width: calc(100% - var(--space-8) * 2);
    top: var(--space-8);
  }

  main {
    margin-top: 100px;
  }

  section {
    scroll-margin-top: calc(var(--space-8) + var(--space-16) + var(--space-8));
  }

  #home .content-frame {
    padding-block: var(--space-xl);
  }

  #home h1 {
    margin-bottom: var(--space-6);
  }

  footer {
    padding-block: var(--space-8);
  }

  .footer-center {
    gap: var(--space-1);
  }
}

@media (max-width: 480px) {
  header {
    width: calc(100% - var(--space-6) * 2);
    top: var(--space-6);
  }

  main {
    margin-top: 80px;
  }

  section {
    scroll-margin-top: calc(var(--space-6) + var(--space-16) + var(--space-6));
  }

  #home .content-frame {
    padding-block: var(--space-lg);
  }

  footer {
    padding-block: var(--space-6);
  }

  .footer-center {
    gap: var(--space-1);
  }

  .footer-link,
  .footer-center>div {
    font-size: var(--text-xs);
  }

  .mobile-menu .nav-links a {
    font-size: var(--text-2xl);
    min-width: 200px;
    padding: var(--space-4) var(--space-8);
  }
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
  overflow: hidden;
}

/* Additional utility classes */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Performance optimizations */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hamburger span,
  .mobile-menu {
    transition: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .nav-links a {
    border: 1px solid rgba(255, 255, 255, 0.3);
  }

  .nav-links a:hover,
  .nav-links a:focus {
    border-color: rgba(255, 255, 255, 0.8);
  }

  .hamburger span {
    background: rgba(255, 255, 255, 1);
  }

  .footer-link {
    border-bottom: 1px solid transparent;
  }

  .footer-link:hover {
    border-bottom-color: rgba(255, 255, 255, 0.6);
  }
}