/**
 * COMPREHENSIVE MOBILE FIXES - FINAL
 * All issues resolved in one deployment
 */

/* =============================================
   1. NAV BANNER - MOBILE SIZING
   (was unscoped and leaking onto desktop, shrinking
   the nav and fighting the desktop font-family rule)
   ============================================= */
@media (max-width: 768px) {
  .nav {
    padding: 16px 0 !important; /* Increased from 12px */
  }

  .nav-logo {
    font-size: 16px !important; /* Increased from 14px */
    font-family: var(--font-display) !important; /* Anton */
    letter-spacing: 1.5px;
    color: rgba(10, 10, 10, 0.82) !important;
    gap: 10px !important;
  }

  .nav-logo img {
    height: 40px !important; /* Increased from 32px */
    width: auto !important;
  }
}

/* =============================================
   2. HAMBURGER MENU - FUNCTIONAL
   ============================================= */

/* Hide burger menu on desktop */
@media (min-width: 769px) {
  .mobile-menu-toggle {
    display: none !important;
  }
}

/* Show burger menu on mobile only */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--yellow);
    flex-direction: column;
    padding: 80px 32px 32px;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    pointer-events: auto; /* Ensure links are clickable */
  }

  .nav-menu.active {
    display: flex !important;
    right: 0 !important;
  }

  .nav-menu li {
    width: 100%;
    margin: 8px 0;
  }

  .nav-link {
    display: block;
    padding: 16px;
    color: var(--black);
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid rgba(10,10,10,0.1);
    cursor: pointer; /* Show it's clickable */
    pointer-events: auto; /* Ensure clicks work */
  }

  /* Hamburger button */
  .mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 32px;
    color: var(--black);
    cursor: pointer;
    padding: 8px;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    min-width: 48px;
    min-height: 48px;
  }

  /* Overlay - clicks close menu */
  .menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    pointer-events: none; /* Don't block clicks when hidden */
  }

  .menu-overlay.active {
    display: block !important;
    pointer-events: auto; /* Receive clicks to close menu */
  }
}

/* =============================================
   3. CTA BUTTONS - LEFT ALIGNED
   ============================================= */
.hero-buttons {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important; /* LEFT ALIGN */
  gap: 12px !important;
  margin-top: 32px;
}

.hero-buttons .btn {
  text-align: center !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px 32px !important;
  font-size: 16px !important;
  min-width: 200px !important;
  max-width: 280px !important;
}

/* Desktop CTA alignment too */
@media (min-width: 769px) {
  .hero-buttons {
    flex-direction: row !important;
    align-items: flex-start !important; /* LEFT ALIGN on desktop */
  }

  section .btn,
  section a.btn {
    text-align: center !important;
  }
}

/* =============================================
   4. BUTTON COLORS - DEFINITIVE FIX
   ============================================= */

/* Work with Us - YELLOW BG, BLACK TEXT (Primary CTA) */
.btn-ghost-hero,
a[href="join.html"].btn-ghost-hero {
  background: var(--yellow, #F9D024) !important;
  color: var(--black, #0A0A0A) !important;
  border: none !important; /* REMOVE BLACK BORDER */
  font-weight: 600 !important;
}

/* Pitch Your Project - BLACK BG, YELLOW TEXT (Secondary CTA) */
.btn-black-hero,
a[href="pitch.html"].btn-black-hero {
  background: var(--black, #0A0A0A) !important;
  color: var(--yellow, #F9D024) !important;
  border: none !important;
  font-weight: 600 !important;
}

/* Apply to Join - BLACK BG, YELLOW TEXT */
.btn-ghost,
section a[href="join.html"]:not(.btn-ghost-hero),
section .btn {
  background: var(--black, #0A0A0A) !important;
  color: var(--yellow, #F9D024) !important;
  border: none !important;
  font-weight: 600 !important;
  text-align: center !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Work With Us in sections - YELLOW BG, BLACK TEXT */
.btn-black {
  background: var(--yellow, #F9D024) !important;
  color: var(--black, #0A0A0A) !important;
  border: none !important;
}

/* =============================================
   5. STATS - PERMANENT HORIZONTAL FIX
   ============================================= */

/* BASE - Always horizontal */
.stats,
.stats-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 24px !important;
  text-align: center !important;
  align-items: center !important;
  margin: 0 auto !important;
}

.stat-item {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Desktop */
@media (min-width: 769px) {
  .stats,
  .stats-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 48px !important;
    max-width: 800px !important;
    margin: 0 auto !important;
  }

  .stat-number {
    font-size: 64px !important;
  }

  .stat-label {
    font-size: 16px !important;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .stats,
  .stats-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 16px !important;
  }

  .stat-number {
    font-size: 36px !important;
    margin-bottom: 4px !important;
    line-height: 1 !important;
  }

  .stat-label {
    font-size: 11px !important;
    line-height: 1.3 !important;
  }
}

/* =============================================
   6. FOOTER - COMPACT VERSION
   ============================================= */
@media (max-width: 768px) {
  footer {
    padding: 32px 0 24px !important;
  }

  .footer-content {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  .footer-section {
    margin-bottom: 0 !important;
  }

  .footer-section h4 {
    font-size: 14px !important;
    margin-bottom: 12px !important;
  }

  .footer-section p,
  .footer-section a {
    font-size: 13px !important;
    line-height: 1.6 !important;
    margin-bottom: 8px !important;
  }

  .social-links {
    display: flex !important;
    gap: 16px !important;
    margin-top: 16px !important;
  }
}

/* Desktop footer */
@media (min-width: 769px) {
  footer {
    padding: 48px 0 32px !important;
  }

  .footer-content {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 48px !important;
  }
}

/* =============================================
   7. ALL TEXT LEFT-ALIGNED IN SECTIONS
   ============================================= */
section {
  text-align: left !important;
}

section h1,
section h2,
section h3,
section p {
  text-align: left !important;
}

.hero-overlay h1,
.hero-overlay p {
  text-align: left !important;
}

/* =============================================
   8. BUTTON TEXT ALIGNMENT FIX
   ============================================= */
.btn,
a.btn,
button.btn {
  text-align: center !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1.2 !important;
  vertical-align: middle !important;
}

/* =============================================
   9. REMOVE ALL BUTTON BORDERS
   ============================================= */
.btn,
.btn-ghost-hero,
.btn-black-hero,
.btn-ghost,
.btn-black,
a.btn {
  border: none !important;
}

.btn:active {
  border: none !important;
}

/* =============================================
   10. LAUREL IMAGES - FESTIVAL STYLE
   ============================================= */

/* Desktop laurels */
@media (min-width: 769px) {
  .laurel-left,
  .laurel-right {
    height: 100px !important;
    opacity: 0.25 !important;
  }
}

/* Mobile laurels - smaller */
@media (max-width: 768px) {
  .laurel-left,
  .laurel-right {
    height: 50px !important;
    opacity: 0.2 !important;
  }
  
  .laurel-left {
    left: -10px !important;
  }
  
  .laurel-right {
    right: -10px !important;
  }
}

/* Stats section positioning */
.stats-section {
  position: relative !important;
  overflow: hidden !important;
}

.stats-section .container {
  position: relative !important;
}
