/* ==========================================================================
   YACHAY SIMI - MAIN STYLES
   ========================================================================== */

/* ==========================================================================
   1. LOADING SCREEN STYLES
   ========================================================================== */

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
}

.loading-subtext {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    text-align: center;
}

.loading-dots {
    display: inline-block;
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

.loading-logo {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   2. ALPINE.JS & UTILITY STYLES
   ========================================================================== */

/* Estilo para x-cloak de Alpine.js para evitar parpadeos */
[x-cloak] { display: none !important; }

/* ==========================================================================
   3. MOBILE OPTIMIZATIONS
   ========================================================================== */

/* Touch-friendly tap targets for mobile */
@media (max-width: 768px) {
    a, button {
        min-height: 48px;
        min-width: 48px;
    }
}

/* Better font sizes for mobile menu */
@media (max-width: 768px) {
    .mobile-menu-link {
        font-size: 1rem;
        font-weight: 500;
    }
}

/* ==========================================================================
   4. TEXT & VISUAL EFFECTS
   ========================================================================== */

/* Enhanced text shadow for better readability */
.text-shadow-strong {
    text-shadow: 0 2px 4px rgba(0,0,0,0.8), 0 4px 8px rgba(0,0,0,0.6);
}

/* Logo glow effect */
.logo-glow {
    box-shadow: 0 0 20px rgba(255,255,255,0.5);
}

/* ==========================================================================
   5. CSS VARIABLES & ROOT STYLES
   ========================================================================== */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #10b981;
    --secondary-dark: #059669;
    --accent: #8b5cf6;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-hero: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

html {
    scroll-behavior: smooth;
    /* Scrollbar para Firefox */
    scrollbar-width: thin;
    scrollbar-color: var(--primary) #f1f1f1;
}

body {
    font-family: 'Inter', sans-serif;
}

/* ==========================================================================
   6. CUSTOM SCROLLBAR
   ========================================================================== */

/* Custom scrollbar para navegadores WebKit */
::-webkit-scrollbar {
    width: 10px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ==========================================================================
   7. GRADIENT BACKGROUNDS
   ========================================================================== */

.gradient-primary {
    background: var(--gradient-primary);
}

.gradient-secondary {
    background: var(--gradient-secondary);
}

.gradient-hero {
    background: var(--gradient-hero);
}

/* ==========================================================================
   8. GLASS MORPHISM EFFECT
   ========================================================================== */

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

/* ==========================================================================
   9. CUSTOM BUTTONS
   ========================================================================== */

.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px -3px rgba(37, 99, 235, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: width 0.3s ease;
}

.btn-primary:hover::before {
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px -3px rgba(16, 185, 129, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: width 0.3s ease;
}

.btn-secondary:hover::before {
    width: 100%;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.4);
}

/* ==========================================================================
   10. ANIMATIONS
   ========================================================================== */

/* Animated background */
.animated-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    opacity: 0.1;
}

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

/* Hero section animations */
.hero-animation {
    animation: fadeInUp 1s ease-out;
}

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

/* Floating animation */
.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Blob animations */
@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Scroll animation */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

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

.auspiciadores-slider:hover .animate-scroll {
    animation-play-state: paused;
}

/* Shine effect */
@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
        opacity: 0;
    }
}

/* ==========================================================================
   11. CARD COMPONENTS
   ========================================================================== */

/* Modern card design */
.feature-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   12. ICON CONTAINERS
   ========================================================================== */

.icon-container {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.icon-container::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    transition: all 0.5s;
    opacity: 0;
}

.feature-card:hover .icon-container::after {
    animation: shine 0.5s ease-in-out;
}

/* ==========================================================================
   13. VIDEO CONTAINER
   ========================================================================== */

.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
}

.video-container video {
    border-radius: 20px;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
}

/* ==========================================================================
   14. GRADIENT OVERLAYS & IMAGE EFFECTS
   ========================================================================== */

.gradient-overlay {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9) 0%, rgba(16, 185, 129, 0.8) 100%);
}

.image-hover {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 20px;
    overflow: hidden;
}

.image-hover:hover {
    transform: scale(1.05) rotate(1deg);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   15. SPONSORS/AUSPICIADORES STYLES
   ========================================================================== */

.auspiciador-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #667eea 0%, #764ba2 100%) border-box;
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.auspiciador-logo:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.2);
}

.auspiciador-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
}

/* ==========================================================================
   16. SCROLL TO TOP BUTTON
   ========================================================================== */

.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.2);
    z-index: 40;
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   17. FORM INPUTS
   ========================================================================== */

.form-input {
    background: #f9fafb;
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    width: 100%;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ==========================================================================
   18. RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 768px) {
    .auspiciador-item {
        min-width: 70px;
    }
    
    .auspiciador-logo {
        width: 60px;
        height: 60px;
        border-width: 2px;
    }
    
    .auspiciador-item {
        min-width: 80px;
    }
    
    .auspiciadores-track {
        gap: 1.5rem;
    }
    
    .btn-primary, .btn-secondary {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .icon-container {
        width: 60px;
        height: 60px;
    }
    
    .feature-card {
        padding: 1.25rem;
        border-radius: 12px;
    }
    
    .video-container {
        border-radius: 12px;
    }
}

@media (max-width: 480px) {
    .btn-primary, .btn-secondary {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
    
    .auspiciador-logo {
        width: 50px;
        height: 50px;
    }
    
    /* Improve video container on mobile */
    .video-container {
        padding-bottom: 75%; /* 4:3 aspect ratio for mobile */
        border-radius: 8px;
    }
    
    /* Smoother scrolling on mobile */
    html {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
    }
}

/* ==========================================================================
   SCROLL TO TOP BUTTON
   ========================================================================== */

.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

.scroll-top:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .scroll-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 2.5rem;
        height: 2.5rem;
    }
}