/* 11xplay - Enhanced CSS with UX Fixes */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900&display=swap');

/* CSS Variables */
:root {
  --primary: #1a3da6;
  --secondary: #0f2462;
  --accent: #f7b731;
  --dark-bg: #0d0d0d;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow-x: hidden;
  background-attachment: fixed;
}

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

::-webkit-scrollbar-track {
  background: rgba(30, 30, 30, 0.5);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #1a3da6, #f7b731);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #f7b731, #1a3da6);
}

/* Selection Styling */
::selection {
  background: #f7b731;
  color: #0d0d0d;
}

/* Better Focus States for Accessibility */
:focus-visible {
  outline: 2px solid #fbbf24;
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid #f7b731;
  outline-offset: 2px;
}

/* Form & Button Improvements */
button {
  cursor: pointer;
  position: relative;
  overflow: hidden;
  font-family: inherit;
  border: none;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

input, textarea {
  font-family: inherit;
  font-size: 16px; /* Prevents iOS zoom on input focus */
}

/* Better Text Contrast */
.text-gray-300 {
  color: #d1d5db;
}

.text-gray-400 {
  color: #9ca3af;
}

.text-yellow-300 {
  color: #fcd34d;
}

/* Link Styles */
a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

a:hover:not(.no-underline) {
  color: #f7b731;
}

/* Image Handling */
img {
  display: block;
  max-width: 100%;
  height: auto;
  transition: opacity 0.3s ease;
}

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

/* Mobile-First Responsive Typography */
h1 { font-size: clamp(1.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.25rem, 4vw, 3rem); }
h3 { font-size: clamp(1rem, 3vw, 1.75rem); }
p { font-size: clamp(0.875rem, 2vw, 1.125rem); }

/* Better card hover states */
.group {
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.group:hover {
  transform: translateY(-5px);
}

/* Mobile Menu Improvements */
#mobile-menu {
  animation: slideDown 0.3s ease-out;
}

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

/* Better Touch Targets (Min 44x44px on mobile) */
@media (max-width: 768px) {
  button, a[href] {
    min-height: 44px;
    min-width: 44px;
    padding: max(8px, (44px - 1em) / 2) 1rem;
  }
}

/* Improved spacing on small devices */
@media (max-width: 640px) {
  section {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
  
  .px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .gap-6 {
    gap: 1rem;
  }
  
  .gap-8 {
    gap: 1.5rem;
  }
}

/* Improved button states */
button:active {
  transform: scale(0.98);
}

button:hover:not(:disabled) {
  transform: translateY(-2px);
}

/* Utility Classes */
.truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.no-underline {
  text-decoration: none;
}

/* Print Styles */
@media print {
  body { background: white; }
  button, nav, #mobile-menu { display: none; }
  a { text-decoration: underline; }
}

/* Loading state */
.loading {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* WhatsApp Popup Specific Styles */
#whatsapp-popup {
  transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

#whatsapp-popup.show-popup {
  opacity: 1;
  transform: translateY(0);
}

#whatsapp-popup.show-popup > div {
  pointer-events: auto;
}

#whatsapp-popup:not(.show-popup) > div {
  pointer-events: none;
}

#close-whatsapp:hover {
  transform: rotate(90deg) scale(1.1);
  color: #ef4444;
}

.backdrop-blur-2xl {
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
}

@keyframes popup-pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  70% { box-shadow: 0 0 0 20px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@keyframes whatsapp-pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  70% { box-shadow: 0 0 0 20px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.whatsapp-pulse {
  animation: whatsapp-pulse 2s infinite;
}

/* Smooth visibility transitions */
.fade-in {
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
