/* Paaz Website - Refined Main CSS with Hamburger Navigation */
/* Import component stylesheets */
@import url('./components/gradient.css?v=1.0');
@import url('./components/glass.css?v=1.0');
@import url('./components/typography.css?v=1.0');
@import url('./components/spacing.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);
}

/* Universal Dark Header with improved spacing */
header {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(var(--blur-xl));
  -webkit-backdrop-filter: blur(var(--blur-xl));
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: var(--space-4);
  min-height: 70px;
  position: relative;
}

.logo {
  height: 40px;
  width: auto;
  filter: brightness(1.1) contrast(1.1);
  transition: all 0.3s ease;
  z-index: 1001;
}

/* 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.85);
  font-weight: var(--font-medium);
  font-size: var(--text-base);
  transition: all 0.3s ease;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-lg);
  position: relative;
  min-height: var(--min-touch-target);
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.nav-links a:hover {
  color: rgba(255, 255, 255, 1);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
  border: 1px solid rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.nav-links a.active {
  color: rgba(255, 255, 255, 1);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(var(--blur-md));
  -webkit-backdrop-filter: blur(var(--blur-md));
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: inherit;
  pointer-events: none;
}

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

.hamburger span {
  width: 26px;
  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: 6px;
}

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

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

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

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  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: all 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-6);
  text-align: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-menu .nav-links a {
  display: flex !important;
  /* Ensure links are visible */
  font-size: var(--text-xl);
  padding: var(--space-4) var(--space-8);
  min-width: 200px;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  color: rgba(255, 255, 255, 0.9) !important;
  text-decoration: none;
  font-weight: var(--font-medium);
  transition: all 0.3s ease;
}

.mobile-menu .nav-links a:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  color: rgba(255, 255, 255, 1) !important;
  transform: scale(1.05);
}

.mobile-menu .nav-links a.active {
  background: rgba(59, 130, 246, 0.3);
  border-color: rgba(59, 130, 246, 0.6);
  color: rgba(255, 255, 255, 1) !important;
}

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

/* Section spacing */
section {
  margin-block: var(--section-gap);
}

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-6);
}

#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;
}

/* 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;
}

/* 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;
}

/* Logo hover enhancement */
.logo:hover {
  filter: brightness(1.2) contrast(1.2);
  transform: scale(1.02);
}

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

  .header-scrolled {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(var(--blur-2xl));
    -webkit-backdrop-filter: blur(var(--blur-2xl));
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
  }
}

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

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

  .nav-links {
    display: none;
  }

  header {
    background: rgba(0, 0, 0, 0.8);
  }

  .logo {
    height: 36px;
  }

  main {
    margin-top: 70px;
  }

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

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

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

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

@media (max-width: 480px) {
  nav {
    padding-block: var(--space-3);
    min-height: 60px;
  }

  .logo {
    height: 32px;
  }

  main {
    margin-top: 60px;
  }

  #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-lg);
    min-width: 180px;
    padding: var(--space-3) var(--space-6);
  }
}

/* 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);
  }
}