/* JW Global Premium Styles - Super Mobile Optimized */

:root {
  --midnight: #0A1428;
  --gold: #D4AF37;
  --gold-light: #F4D03F;
  --gold-dark: #B8932F;
  --emerald: #10B981;
  --blue: #3B82F6;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

.font-display {
  font-family: 'Playfair Display', serif;
}

/* Color Classes */
.bg-midnight {
  background-color: var(--midnight);
}

.text-gold {
  color: var(--gold);
}

.gold-text {
  color: var(--gold);
}

/* Gradient Text */
.gold-gradient-text {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Buttons */
.gold-button {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--midnight);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gold-button:hover {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
}

.glass-button {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.glass-button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--gold);
}

/* Glass Card */
.glass-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  transition: all 0.3s ease;
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(212, 175, 55, 0.3);
  transform: translateY(-2px);
}

/* Business Card */
.business-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.business-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(212, 175, 55, 0.3);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.1);
}

/* Timeline */
.timeline-item {
  position: relative;
}

.timeline-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 2rem;
  transition: all 0.3s ease;
}

.timeline-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(212, 175, 55, 0.3);
}

/* Partner Logos */
.partner-logo {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem 2rem;
  border-radius: 0.5rem;
  color: white;
  font-weight: 700;
  font-size: 1.25rem;
  transition: all 0.3s ease;
}

.partner-logo:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--gold);
  color: var(--gold);
  transform: scale(1.05);
}

.partner-logo-large {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem;
  border-radius: 1rem;
  color: white;
  font-weight: 800;
  font-size: 2rem;
  text-align: center;
  transition: all 0.3s ease;
}

.partner-logo-large:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--gold);
  color: var(--gold);
}

/* Shadows */
.shadow-gold {
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.2);
}

/* Navigation */
#mainNav {
  background: rgba(10, 20, 40, 0);
  transition: all 0.3s ease;
}

#mainNav.scrolled {
  background: rgba(10, 20, 40, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Desktop Navigation - Single Line Optimization */
@media (min-width: 1024px) {
  #mainNav .container {
    max-width: 100% !important;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
  
  /* Menu items - compact spacing */
  .nav-link {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    font-size: 0.875rem !important;
    white-space: nowrap;
  }
  
  /* Partner with Us button - compact */
  .gold-button {
    padding: 0.625rem 1.25rem !important;
    font-size: 0.875rem !important;
    white-space: nowrap;
  }
  
  /* Language buttons - compact */
  .lang-btn {
    padding: 0.375rem 0.625rem !important;
    font-size: 0.8125rem !important;
  }
  
  /* Reduce space between items */
  #mainNav .space-x-4 > * + * {
    margin-left: 0.75rem !important;
  }
  
  #mainNav .space-x-2 > * + * {
    margin-left: 0.375rem !important;
  }
}

/* Extra large screens - slightly more spacing */
@media (min-width: 1280px) {
  .nav-link {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  .gold-button {
    padding: 0.75rem 1.5rem !important;
  }
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 80%;
}

/* Particle Animation */
.particle-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--gold);
  border-radius: 50%;
  animation: float 10s infinite;
  opacity: 0.3;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  50% {
    opacity: 0.3;
  }
  100% {
    transform: translateY(-100vh) translateX(50px);
    opacity: 0;
  }
}

/* Animations */
@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-down {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fade-in 1s ease-out;
}

.animate-fade-in-up {
  animation: fade-in-up 1s ease-out;
}

/* Mobile Menu Animations */
#mobileMenu {
  animation: slide-down 0.3s ease-out;
  max-height: 100vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#mobileMenu.hidden {
  display: none;
}

/* Mobile menu scrollbar */
#mobileMenu::-webkit-scrollbar {
  width: 4px;
}

#mobileMenu::-webkit-scrollbar-track {
  background: transparent;
}

#mobileMenu::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 2px;
}

/* ========================================
   SUPER MOBILE OPTIMIZATION
   Android & iPhone Specific
   ======================================== */

/* Tablet optimization (641px - 1024px) */
@media (min-width: 641px) and (max-width: 1024px) {
  h1 {
    font-size: 3.5rem !important;
    line-height: 1.1 !important;
  }
  
  h2 {
    font-size: 2.25rem !important;
    line-height: 1.2 !important;
  }
  
  h3 {
    font-size: 1.75rem !important;
  }
  
  .container {
    padding-left: 2rem !important;
    padding-right: 2rem !important;
  }
  
  /* Tablet-friendly cards */
  .glass-card {
    padding: 2rem !important;
  }
  
  .business-card {
    padding: 1.75rem !important;
  }
}

/* Mobile Optimization - Android & iPhone (up to 640px) */
@media (max-width: 640px) {
  /* Base font size adjustments */
  body {
    font-size: 16px;
    line-height: 1.6;
  }
  
  /* Touch-friendly minimum sizes - iOS and Android standard */
  button, a, input, select, textarea {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Hero text scaling - Super fit for mobile */
  h1 {
    font-size: 2rem !important;
    line-height: 1.2 !important;
    margin-bottom: 1rem !important;
  }
  
  h2 {
    font-size: 1.5rem !important;
    line-height: 1.3 !important;
    margin-bottom: 0.75rem !important;
  }
  
  h3 {
    font-size: 1.25rem !important;
    line-height: 1.4 !important;
    margin-bottom: 0.5rem !important;
  }
  
  h4 {
    font-size: 1.125rem !important;
    line-height: 1.4 !important;
  }
  
  /* Paragraph and text optimization */
  p {
    font-size: 0.9375rem !important;
    line-height: 1.6 !important;
    margin-bottom: 1rem !important;
  }
  
  /* Small text */
  .text-sm, small {
    font-size: 0.875rem !important;
  }
  
  .text-xs {
    font-size: 0.8125rem !important;
  }
  
  /* Padding and spacing adjustments */
  .container {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Section spacing - reduce for mobile */
  section {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
  
  /* Card padding optimization */
  .glass-card {
    padding: 1.25rem !important;
    margin-bottom: 1rem !important;
    border-radius: 0.75rem !important;
  }
  
  .business-card {
    padding: 1.25rem !important;
    margin-bottom: 1rem !important;
  }
  
  /* Button sizing - touch-friendly */
  .gold-button, .glass-button {
    padding: 0.875rem 1.5rem !important;
    font-size: 0.9375rem !important;
    width: 100%;
    max-width: 100%;
    justify-content: center;
  }
  
  /* Navigation logo - smaller on mobile */
  #mainNav img {
    width: 40px !important;
    height: 40px !important;
  }
  
  /* Hide tagline on very small screens */
  #mainNav .text-xs {
    display: none;
  }
  
  /* Mobile menu improvements */
  #mobileMenu {
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1rem;
  }
  
  #mobileMenu a {
    padding: 1rem !important;
    font-size: 1rem !important;
    display: block;
    width: 100%;
  }
  
  /* Grid adjustments - single column on mobile */
  .grid {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  
  /* Flex adjustments */
  .flex-wrap {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  
  /* Image optimization */
  img {
    max-width: 100%;
    height: auto;
    display: block;
  }
  
  /* Hero section mobile optimization */
  .min-h-screen {
    min-height: 100vh;
    padding-top: 5rem !important;
    padding-bottom: 3rem !important;
  }
  
  /* Stats section - 2 columns on mobile */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }
  
  /* Partner logos - 2 columns on mobile */
  .partner-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }
  
  /* Timeline adjustments */
  .timeline-card {
    padding: 1.25rem !important;
  }
  
  /* Form inputs */
  input, textarea, select {
    font-size: 16px !important;
    padding: 0.875rem !important;
    border-radius: 0.5rem !important;
  }
  
  /* Reduce animations on mobile for performance */
  * {
    animation-duration: 0.5s !important;
  }
  
  /* Disable hover effects on mobile */
  @media (hover: none) {
    .hover\:scale-105:hover,
    .hover\:scale-110:hover,
    .group:hover .group-hover\:scale-110 {
      transform: none !important;
    }
    
    .hover\:bg-white\/10:hover {
      background: rgba(255, 255, 255, 0.05) !important;
    }
  }
  
  /* Footer optimization */
  footer .grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  
  footer h4 {
    margin-top: 1.5rem;
  }
  
  footer h4:first-child {
    margin-top: 0;
  }
  
  /* Floating buttons - adjust position for mobile */
  .fixed.bottom-6.right-6 {
    bottom: 1rem !important;
    right: 1rem !important;
  }
  
  /* Text alignment - center important content on mobile */
  .text-center-mobile {
    text-align: center !important;
  }
  
  /* Hide desktop-only elements */
  .hidden-mobile {
    display: none !important;
  }
  
  /* Space optimization */
  .space-y-8 > * + * {
    margin-top: 1.5rem !important;
  }
  
  .space-y-6 > * + * {
    margin-top: 1.25rem !important;
  }
  
  .space-y-4 > * + * {
    margin-top: 1rem !important;
  }
  
  /* Gap optimization */
  .gap-8 {
    gap: 1.5rem !important;
  }
  
  .gap-6 {
    gap: 1.25rem !important;
  }
  
  .gap-4 {
    gap: 1rem !important;
  }
}

/* Extra Small Devices (320px - 375px) - iPhone SE, small Androids */
@media (max-width: 375px) {
  h1 {
    font-size: 1.75rem !important;
  }
  
  h2 {
    font-size: 1.375rem !important;
  }
  
  h3 {
    font-size: 1.125rem !important;
  }
  
  p {
    font-size: 0.875rem !important;
  }
  
  .container {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
  
  .glass-card, .business-card {
    padding: 1rem !important;
  }
  
  section {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }
}

/* iPhone specific optimizations */
@supports (-webkit-touch-callout: none) {
  /* iOS safe areas */
  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
  
  /* Fix iOS input zoom issue */
  input, select, textarea {
    font-size: 16px !important;
  }
  
  /* Smooth scrolling for iOS */
  * {
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix iOS momentum scrolling */
  #mobileMenu {
    -webkit-overflow-scrolling: touch;
  }
  
  /* Prevent iOS text size adjustment */
  body {
    -webkit-text-size-adjust: 100%;
  }
}

/* Android specific optimizations */
@media screen and (max-width: 640px) and (-webkit-min-device-pixel-ratio: 2) {
  /* Optimize for high DPI Android screens */
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
  /* Better tap highlighting for Android */
  a, button {
    -webkit-tap-highlight-color: rgba(212, 175, 55, 0.2);
  }
}

/* Landscape mobile orientation */
@media (max-width: 896px) and (orientation: landscape) {
  .min-h-screen {
    min-height: auto !important;
    padding-top: 3rem !important;
    padding-bottom: 2rem !important;
  }
  
  section {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--midnight);
}

::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold-light);
}

/* Mobile scrollbar - thinner */
@media (max-width: 640px) {
  ::-webkit-scrollbar {
    width: 4px;
  }
}

/* Input Styles */
input, textarea, select {
  font-family: inherit;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--gold) !important;
}

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

/* Loading Animation */
.loading {
  position: relative;
}

.loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.2), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Hover Effects - Desktop only */
@media (hover: hover) and (pointer: fine) {
  .hover-lift {
    transition: transform 0.3s ease;
  }
  
  .hover-lift:hover {
    transform: translateY(-5px);
  }
}

/* Text Selection */
::selection {
  background: var(--gold);
  color: var(--midnight);
}

::-moz-selection {
  background: var(--gold);
  color: var(--midnight);
}

/* Print Styles */
@media print {
  body {
    background: white;
    color: black;
  }
  
  .glass-card {
    border: 1px solid #ccc;
    background: white;
  }
  
  nav, footer, .fixed {
    display: none;
  }
}

/* Performance optimizations */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
