/* ========================================
   GLOBAL NAVIGATION STYLES
   ======================================== */

.main-nav {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(5, 5, 15, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid rgba(0, 242, 255, 0.2);
}

.main-nav .container {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px !important;
  max-width: 100% !important;
}

.main-nav .logo a {
  color: #ffffff;
  text-decoration: none;
  font-size: 1.8rem;
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 30px;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.3s;
  padding: 8px 16px;
}

.nav-links a:hover {
  color: #00f2ff;
}

@media (max-width: 768px) {
  .nav-links {
    flex-direction: column;
    gap: 10px;
    width: 100%;
    padding: 10px 0;
  }

  .nav-links li {
    margin: 0;
  }

  .nav-links a {
    padding: 10px 16px;
    display: block;
    text-align: center;
  }

  .main-nav .container {
    flex-wrap: wrap;
  }
}

/* Global Base Styles */
html {
  height: 100%;
  width: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  width: 100%;
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Touch-friendly minimum sizes */
button,
a.btn-primary,
a.btn-secondary,
.ui.button,
input[type="submit"],
input[type="button"] {
  min-height: 44px;
  min-width: 44px;
  cursor: pointer;
}

/* Container max-widths to prevent overflow */
.container {
  max-width: 100%;
  overflow-x: hidden;
}

/* Prevent text overflow */
h1, h2, h3, h4, h5, h6, p {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* ========================================
   CRITICAL SAFARI FIX: Hero Section
   ======================================== */

/* Fix Safari mobile viewport height bug */
body .hero {
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  overflow: visible !important;
  padding-top: 110px;
}

/* Safari/WebKit fallback for older iOS */
@supports (-webkit-touch-callout: none) {
  body .hero {
    min-height: -webkit-fill-available;
  }
}

/* Keep hero-image overflow for glow effect */
.hero-image {
  overflow: hidden;
}

/* Force containers to mobile width on all screens */
@media (max-width: 1024px) {
  body .container {
    max-width: 100% !important;
    width: 100% !important;
  }
}

/* Desktop styles (1024px and above) - no changes needed */
@media (max-width: 1024px) {
  /* Tablet adjustments */
  .container {
    width: 95%;
    padding: 0 20px;
  }
}

/* Tablet styles (768px and below) */
@media (max-width: 768px) {
  body {
    font-size: 16px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  h3 {
    font-size: 1.3rem;
  }

  body .container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 20px !important;
  }

  /* Safari: Allow hero to expand naturally on mobile */
  body .hero {
    min-height: auto;
    height: auto;
    overflow: visible !important;
    padding: 140px 20px 60px 20px !important;
  }

  /* Extra top spacing for hero content */
  .hero-content {
    padding-top: 20px;
  }

  /* Stack all grids to single column */
  .grid,
  [class*="grid"],
  .team-cards,
  .course-cards,
  .pricing-cards,
  .benefits-grid,
  .faq-grid,
  .trust-indicators,
  .footer-links,
  .guide-features,
  .portfolio-example,
  .continuation-options,
  .toc-list,
  .workshop-meta,
  .skills-grid,
  .materials-list,
  .ui.three.column.grid,
  .ui.stackable.grid {
    grid-template-columns: 1fr !important;
  }

  /* Stack all flex containers */
  .hero .container,
  .contact-wrapper,
  .lead-magnet .container,
  .guide-cover {
    flex-direction: column !important;
  }

  .cta-group {
    flex-direction: column !important;
    width: 100% !important;
  }

  .cta-group .btn-primary,
  .cta-group .btn-secondary {
    width: 100% !important;
    text-align: center !important;
  }
}

/* Mobile styles (576px and below) */
@media (max-width: 576px) {
  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.2rem;
  }

  h4 {
    font-size: 1.1rem;
  }

  .container {
    padding: 0 15px;
  }

  /* Extra padding for very small screens */
  body .hero {
    padding: 160px 15px 60px 15px !important;
  }

  .hero-content {
    padding-top: 30px;
  }

  /* Ensure all buttons are touch-friendly */
  button,
  a.btn-primary,
  a.btn-secondary,
  .ui.button,
  .btn-primary,
  .btn-secondary {
    padding: 14px 24px !important;
    font-size: 1rem;
    min-height: 44px !important;
  }

  /* Stack hero badges and timer */
  .hero-badges,
  .timer {
    flex-wrap: wrap !important;
    gap: 15px !important;
  }

  /* Team cards stack vertically */
  .team-card {
    flex-direction: column !important;
  }

  .card-image {
    width: 100% !important;
    height: auto !important;
  }

  /* Sections have reduced padding */
  section {
    padding: 60px 0 !important;
  }

  /* Cards have reduced padding */
  .course-card,
  .benefit-card,
  .pricing-card,
  .team-card,
  .trust-item,
  .faq-item,
  .feature,
  .module,
  .activity {
    padding: 20px !important;
  }
}

/* Small mobile styles (480px and below) */
@media (max-width: 480px) {
  body {
    font-size: 14px;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  h3 {
    font-size: 1.1rem;
  }

  .container {
    padding: 0 10px;
  }

  /* Maximum padding for smallest screens */
  body .hero {
    padding: 180px 10px 50px 10px !important;
  }

  .hero-content {
    padding-top: 40px;
  }

  .hero-content h1 {
    line-height: 1.2;
    margin-top: 0;
  }

  /* Stack everything vertically */
  .flex,
  [class*="flex"],
  .email-form {
    flex-direction: column !important;
  }

  /* Further reduce section padding */
  section {
    padding: 50px 0 !important;
  }

  /* Smaller cards */
  .course-card,
  .benefit-card,
  .pricing-card,
  .team-card,
  .trust-item,
  .faq-item,
  .feature,
  .module,
  .activity,
  .chapter,
  .toc,
  .cta,
  .workshop-header,
  .portfolio-section {
    padding: 15px !important;
  }

  /* Ensure inputs are touch-friendly */
  input,
  textarea,
  select {
    min-height: 44px !important;
    padding: 12px !important;
    font-size: 16px !important;
  }

  /* Pricing card price smaller */
  .pricing-card .price {
    font-size: 2.5rem !important;
  }
}
