
:root {
    --primary-color: #059669;
    --secondary-color: #0ea5e9;
    --accent-color: #8b5cf6;
    --warning-color: #f59e0b;
    --dark-primary: #1a1a1a;
    --dark-secondary: #2a2a2a;
    --dark-accent: #3a3a3a;
    --vh: 1vh;
    --animation-duration: 0.3s;
}

/* Animaciones para la mascota */
@keyframes mascotFloat {
    0%, 100% {
        transform: translateY(0px) rotate(-5deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes jugadoresMove {
    0%, 100% {
        transform: translateX(0px);
    }
    50% {
        transform: translateX(10px);
    }
}

.hero-bg {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.8) 0%, rgba(124, 58, 237, 0.8) 100%),
                url('https://images.unsplash.com/photo-1574629810360-7efbbe195018?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80') center/cover;
    position: relative;
    overflow: hidden;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(34, 197, 94, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    animation: gradientShift 8s ease-in-out infinite;
}

/* Animación de la mascota */
.hero-bg .animate-bounce:first-of-type {
    animation: mascotFloat 4s ease-in-out infinite;
}

/* Animación de los jugadores */
.hero-bg .opacity-70 > .flex {
    animation: jugadoresMove 3s ease-in-out infinite;
}

.services-bg {
    background: linear-gradient(rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.95)),
                url('https://images.unsplash.com/photo-1529900748604-07564a03e7a6?ixlib=rb-4.0.3&auto=format&fit=crop&w=2093&q=80') center/cover fixed;
}

.dark .services-bg {
    background: linear-gradient(rgba(31, 41, 55, 0.95), rgba(31, 41, 55, 0.95)),
                url('https://images.unsplash.com/photo-1529900748604-07564a03e7a6?ixlib=rb-4.0.3&auto=format&fit=crop&w=2093&q=80') center/cover fixed;
}

.canchas-bg {
    background: linear-gradient(rgba(243, 244, 246, 0.9), rgba(243, 244, 246, 0.9)),
                url('https://images.unsplash.com/photo-1556056504-5c7696c4c28d?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80') center/cover fixed;
}

.dark .canchas-bg {
    background: linear-gradient(rgba(17, 24, 39, 0.9), rgba(17, 24, 39, 0.9)),
                url('https://images.unsplash.com/photo-1556056504-5c7696c4c28d?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80') center/cover fixed;
}

.stats-bg {
    background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)),
                url('https://images.unsplash.com/photo-1518604666860-f20c3092c956?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80') center/cover fixed;
}

.dark .stats-bg {
    background: linear-gradient(rgba(31, 41, 55, 0.9), rgba(31, 41, 55, 0.9)),
                url('https://images.unsplash.com/photo-1518604666860-f20c3092c956?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80') center/cover fixed;
}


@keyframes gradientShift {
    0%, 100% { 
        background: linear-gradient(45deg, rgba(34, 197, 94, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    }
    50% { 
        background: linear-gradient(45deg, rgba(59, 130, 246, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
    }
}

/* Animación para el fondo del CTA final */
.animate-gradientShift {
    background-size: 400% 400%;
    animation: gradientShiftCTA 8s ease-in-out infinite;
}

@keyframes gradientShiftCTA {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Efecto de sombra extra grande */
.shadow-3xl {
    box-shadow: 0 35px 60px -12px rgba(0, 0, 0, 0.25), 0 25px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Animación para carrusel de patrocinadores */
@keyframes scroll-slow {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.animate-scroll-slow {
    animation: scroll-slow 30s linear infinite;
}

/* Pausar animación al hover */
.animate-scroll-slow:hover {
    animation-play-state: paused;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
    }
    50% { 
        transform: translateY(-20px) rotate(5deg); 
    }
}

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

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.floating-elements::before {
    content: '⚽';
    position: absolute;
    font-size: 3rem;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
    top: 20%;
    left: 10%;
}

.floating-elements::after {
    content: '🥅';
    position: absolute;
    font-size: 2.5rem;
    opacity: 0.1;
    animation: float 8s ease-in-out infinite reverse;
    top: 60%;
    right: 15%;
}

.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.card-hover {
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    backdrop-filter: blur(10px);
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.dark .card-hover:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.glass-effect {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark .glass-effect {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-scale:hover {
    transform: scale(1.05);
}

.btn-glow {
    transition: all 0.3s ease;
}

.btn-glow:hover {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

.navbar-shadow {
    transition: box-shadow 0.3s ease;
}

.navbar-shadow.scrolled {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.dark .navbar-shadow.scrolled {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.dark ::-webkit-scrollbar-track {
    background: #2a2a2a;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive Design Improvements */
@media (max-width: 480px) {
    /* Extra small devices */
    .floating-elements::before,
    .floating-elements::after {
        display: none;
    }
    
    .parallax-bg {
        background-attachment: scroll;
    }
    
    .glass-effect {
        backdrop-filter: blur(3px);
    }
    
    /* Text scaling for very small screens */
    .text-4xl {
        font-size: 2rem !important;
        line-height: 2.5rem !important;
    }
    
    .text-6xl {
        font-size: 2.5rem !important;
        line-height: 3rem !important;
    }
    
    .text-xl {
        font-size: 1rem !important;
        line-height: 1.5rem !important;
    }
    
    .text-2xl {
        font-size: 1.25rem !important;
        line-height: 1.75rem !important;
    }
    
    /* Padding adjustments */
    .py-20 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    .px-4 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* Button sizing */
    .px-10 {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
    
    .py-5 {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }
}

@media (max-width: 640px) {
    /* Small devices */
    .floating-elements::before,
    .floating-elements::after {
        display: none;
    }
    
    .parallax-bg {
        background-attachment: scroll;
    }
    
    .glass-effect {
        backdrop-filter: blur(4px);
    }
    
    /* Container adjustments */
    .max-w-7xl {
        max-width: 100% !important;
    }
    
    /* Grid adjustments */
    .grid.md\\:grid-cols-2,
    .grid.md\\:grid-cols-3,
    .grid.lg\\:grid-cols-3 {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    /* Hero section adjustments */
    .min-h-screen {
        min-height: 80vh !important;
    }
    
    /* Card spacing */
    .p-8 {
        padding: 1.5rem !important;
    }
    
    .p-6 {
        padding: 1rem !important;
    }
}

@media (max-width: 768px) {
    /* Medium devices */
    .floating-elements::before,
    .floating-elements::after {
        display: none;
    }
    
    .parallax-bg {
        background-attachment: scroll;
    }
    
    .glass-effect {
        backdrop-filter: blur(5px);
    }
    
    /* Navbar improvements */
    .navbar-dropdown {
        position: static !important;
        transform: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        background: transparent !important;
    }
    
    /* Button adjustments */
    .flex.items-center.space-x-3 {
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }
    
    .flex.items-center.space-x-3 > * {
        margin-left: 0 !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    /* Tablet devices */
    .text-6xl {
        font-size: 3.5rem !important;
        line-height: 4rem !important;
    }
    
    .text-4xl {
        font-size: 2.5rem !important;
        line-height: 3rem !important;
    }
    
    .max-w-7xl {
        max-width: 90% !important;
    }
    
    /* Grid adjustments for tablets */
    .grid.lg\\:grid-cols-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .grid.md\\:grid-cols-3:not(.lg\\:grid-cols-3) {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.focus-ring:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.stat-number {
    animation: pulse 2s ease-in-out infinite;
}

.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.service-card:hover::before {
    left: 100%;
}

.contact-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.contact-input:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary-color);
}

.footer-link {
    position: relative;
    transition: color 0.3s ease;
}

.footer-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.footer-link:hover::after {
    width: 100%;
}

.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.backdrop-blur-strong {
    backdrop-filter: blur(20px);
}

.gradient-border {
    border: 2px solid;
    border-image: linear-gradient(45deg, var(--primary-color), var(--secondary-color)) 1;
}

/* Botón flotante de WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 64px;
    height: 64px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    animation: whatsappPulse 2s infinite;
}

.whatsapp-float:hover {
    background: #20ba5a;
    transform: scale(1.1);
    box-shadow: 0 15px 35px rgba(37, 211, 102, 0.5);
    color: white;
}

.whatsapp-float i {
    font-size: 28px;
}

@keyframes whatsappPulse {
    0% {
        box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3), 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3), 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3), 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Estilos para el navbar mejorado */
.navbar-dropdown {
    transform: translateY(-10px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-dropdown.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0);
}

/* Mejoras visuales para los enlaces del navbar */
nav a:hover {
    transform: translateY(-1px);
}

/* Animación suave para el logo */
nav .flex.items-center:first-child:hover i {
    animation: rotateBall 0.6s ease-in-out;
}

@keyframes rotateBall {
    0% { transform: rotate(0deg); }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg); }
}

/* Efecto de resplandor en botones principales */
nav a[href*="admin"] {
    position: relative;
    overflow: hidden;
}

nav a[href*="admin"]:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

nav a[href*="admin"]:hover:before {
    left: 100%;
}

/* Adaptación para móviles */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
    }
    
    .whatsapp-float i {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .whatsapp-float {
        bottom: 15px;
        right: 15px;
        width: 48px;
        height: 48px;
    }
    
    .whatsapp-float i {
        font-size: 20px;
    }
}

/* Modo oscuro para el botón de WhatsApp */
.dark .whatsapp-float {
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
}

.dark .whatsapp-float:hover {
    box-shadow: 0 15px 35px rgba(37, 211, 102, 0.6);
}

/* Fix para altura de viewport en móviles */
.min-h-screen {
    min-height: 100vh;
    min-height: calc(var(--vh, 1vh) * 100);
}

/* Mejoras adicionales para iOS Safari */
@supports (-webkit-appearance: none) {
    .min-h-screen {
        min-height: -webkit-fill-available;
    }
}

/* Mejora de transiciones usando variables CSS */
* {
    transition: background-color var(--animation-duration) ease, 
                color var(--animation-duration) ease, 
                border-color var(--animation-duration) ease;
}

/* Mejoras para touch targets en móviles */
@media (hover: none) and (pointer: coarse) {
    button, a {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Aumentar área táctil de elementos interactivos */
    .card-hover {
        padding: 1.5rem;
    }
    
    /* Mejorar espaciado en formularios móviles */
    input, select, textarea {
        min-height: 44px;
        font-size: 16px; /* Prevenir zoom en iOS */
    }
}
