/* YourLocal Mobile Enhancements - Black & Orange Theme */

/* ============================================
   CSS Custom Properties (Theme Variables)
   ============================================ */
:root {
  --yl-orange: #f97316;
  --yl-orange-bright: #fb923c;
  --yl-orange-glow: rgba(249, 115, 22, 0.15);
  --yl-orange-border: rgba(249, 115, 22, 0.4);
  --yl-black: #0a0a0a;
  --yl-dark: #171717;
  --yl-dark-border: #262626;
  --yl-text-light: #f5f5f5;
  --yl-text-muted: #d4d4d4;
  --yl-text-dim: #a3a3a3;
}

/* ============================================
   Mobile Navigation Enhancement
   ============================================ */
@media (max-width: 640px) {
  /* Make header sticky for better mobile UX */
  header {
    position: sticky !important;
    top: 0;
    z-index: 50;
    background: rgba(10, 10, 10, 0.95) !important;
  }

  /* Enlarge logo for better tap target */
  header a[href="/"] {
    font-size: 1.25rem !important;
  }

  /* Improve nav link spacing and tap targets */
  header nav {
    gap: 1rem !important;
  }

  header nav a {
    font-size: 0.875rem !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: 0.5rem;
    background: rgba(249, 115, 22, 0.05);
    border: 1px solid transparent;
    transition: all 0.2s ease;
  }

  header nav a:hover,
  header nav a:active {
    background: rgba(249, 115, 22, 0.15) !important;
    border-color: var(--yl-orange-border) !important;
    color: white !important;
  }
}

/* ============================================
   Mobile Typography Enhancements
   ============================================ */
@media (max-width: 640px) {
  /* Hero headline - larger and more impactful */
  main h1 {
    font-size: 2rem !important;
    line-height: 1.2 !important;
    letter-spacing: -0.025em;
  }

  /* Section headings */
  main h2 {
    font-size: 1.5rem !important;
    line-height: 1.3 !important;
  }

  /* Body text - slightly larger for readability */
  main p {
    font-size: 1rem !important;
    line-height: 1.65 !important;
  }

  /* List items */
  main li {
    font-size: 0.9375rem !important;
    line-height: 1.5 !important;
  }

  /* Orange accent labels - make them pop more */
  .text-orange-500 {
    text-shadow: 0 0 20px rgba(249, 115, 22, 0.3);
  }

  span.text-orange-500:not(li span) {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--yl-orange-glow);
    border-radius: 9999px;
    font-weight: 600 !important;
    margin-bottom: 0.5rem;
  }
}

/* ============================================
   Mobile Card Enhancements
   ============================================ */
@media (max-width: 640px) {
  /* Cards with orange glow effect */
  .border-neutral-800.rounded-2xl {
    border-color: rgba(249, 115, 22, 0.2) !important;
    box-shadow:
      0 0 0 1px rgba(249, 115, 22, 0.1),
      0 4px 24px rgba(0, 0, 0, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.03);
  }

  /* Reduce card padding on mobile */
  .p-8 {
    padding: 1.5rem !important;
  }

  .p-10 {
    padding: 1.75rem !important;
  }

  /* Add orange top border accent to cards */
  main .border-neutral-800.rounded-2xl.bg-neutral-900 {
    border-top: 2px solid var(--yl-orange) !important;
    position: relative;
    overflow: hidden;
  }

  /* Subtle corner glow */
  main .border-neutral-800.rounded-2xl.bg-neutral-900::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(180deg, rgba(249, 115, 22, 0.08) 0%, transparent 100%);
    pointer-events: none;
  }
}

/* ============================================
   Mobile Spacing & Layout
   ============================================ */
@media (max-width: 640px) {
  /* Reduce excessive padding on mobile */
  .py-20 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  /* Tighter section spacing */
  .space-y-28 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 4rem !important;
  }

  .space-y-16 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 2.5rem !important;
  }

  /* Better grid gaps */
  .gap-16 {
    gap: 2.5rem !important;
  }

  .gap-10 {
    gap: 1.5rem !important;
  }

  /* Full width containers */
  .px-6 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

/* ============================================
   Mobile Feature List Enhancement
   ============================================ */
@media (max-width: 640px) {
  /* Bullet points with larger orange dots */
  main li .text-orange-500 {
    font-size: 0.75rem !important;
    padding: 0 !important;
    background: transparent !important;
    text-shadow: 0 0 8px rgba(249, 115, 22, 0.6);
  }

  /* Better list spacing */
  .space-y-4 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 1.25rem !important;
  }

  .space-y-3 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 1rem !important;
  }
}

/* ============================================
   Mobile Hero Glow Enhancement
   ============================================ */
@media (max-width: 640px) {
  /* Enhanced orange glow behind cards */
  .bg-orange-500\/10 {
    background: linear-gradient(135deg,
      rgba(249, 115, 22, 0.15) 0%,
      rgba(249, 115, 22, 0.08) 50%,
      rgba(249, 115, 22, 0.15) 100%) !important;
  }

  /* Blur effect enhancement */
  .blur-3xl {
    filter: blur(80px) !important;
  }
}

/* ============================================
   Mobile Footer Enhancement
   ============================================ */
@media (max-width: 640px) {
  footer {
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  footer .flex-col {
    text-align: center;
  }

  footer p:first-child {
    color: var(--yl-text-muted);
  }
}

/* ============================================
   Mobile Interaction Enhancements
   ============================================ */
@media (max-width: 640px) {
  /* Better tap feedback */
  a, button {
    -webkit-tap-highlight-color: rgba(249, 115, 22, 0.2);
  }

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

  /* Prevent text selection on UI elements */
  nav, header, footer {
    -webkit-user-select: none;
    user-select: none;
  }
}

/* ============================================
   Mobile Orange CTA Enhancement
   ============================================ */
@media (max-width: 640px) {
  /* Email links get special treatment */
  p.text-orange-500.font-medium {
    display: inline-block !important;
    padding: 0.75rem 1.25rem !important;
    background: linear-gradient(135deg, var(--yl-orange) 0%, var(--yl-orange-bright) 100%) !important;
    color: white !important;
    border-radius: 0.75rem !important;
    font-weight: 600 !important;
    text-shadow: none !important;
    box-shadow:
      0 4px 14px rgba(249, 115, 22, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
  }

  p.text-orange-500.font-medium:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
  }
}

/* ============================================
   Safe Area Insets (iPhone notch, etc.)
   ============================================ */
@supports (padding: env(safe-area-inset-top)) {
  @media (max-width: 640px) {
    header {
      padding-top: env(safe-area-inset-top);
    }

    .px-6,
    [class*="px-"] {
      padding-left: max(1rem, env(safe-area-inset-left)) !important;
      padding-right: max(1rem, env(safe-area-inset-right)) !important;
    }
  }
}

/* ============================================
   Dark Mode Contrast Enhancement
   ============================================ */
@media (max-width: 640px) {
  /* Ensure good contrast for readability */
  .text-neutral-300 {
    color: #e0e0e0 !important;
  }

  .text-neutral-400 {
    color: #b3b3b3 !important;
  }
}

/* ============================================
   Animations for Mobile
   ============================================ */
@media (max-width: 640px) and (prefers-reduced-motion: no-preference) {
  /* Subtle fade in for main content */
  main section {
    animation: fadeInUp 0.4s ease-out;
  }

  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Staggered animation for cards */
  main .grid > div:nth-child(1) {
    animation-delay: 0.1s;
  }

  main .grid > div:nth-child(2) {
    animation-delay: 0.2s;
  }
}

/* ============================================
   Hero Image Styling
   ============================================ */

/* Hero image container */
.hero-image-container {
  position: relative;
}

/* Glow effect behind image */
main img[src*="hero-image"] {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

main img[src*="hero-image"]:hover {
  transform: scale(1.01);
}

/* Desktop hero image styling */
@media (min-width: 768px) {
  main img[src*="hero-image"] {
    border-radius: 1rem;
    box-shadow:
      0 20px 40px rgba(0, 0, 0, 0.5),
      0 0 60px rgba(249, 115, 22, 0.15);
  }
}

/* Mobile hero image styling */
@media (max-width: 767px) {
  main img[src*="hero-image"] {
    max-height: 300px !important;
    object-position: center;
  }

  /* Adjust image container on mobile */
  main .md\:col-span-2 {
    margin-bottom: 1rem;
  }
}

/* Enhance image section glow on mobile */
@media (max-width: 640px) {
  main .md\:col-span-2 .border-orange-500\/30 {
    border-color: rgba(249, 115, 22, 0.4) !important;
  }
}

/* ============================================
   Print Styles (hide non-essential)
   ============================================ */
@media print {
  header, footer {
    display: none !important;
  }

  .blur-3xl, .blur-2xl {
    display: none !important;
  }
}
