/* Hero Section - Mobile-First Design Matching Reference Image */
:root {
    --liga-red: #dc2626;
    --liga-green: #10b981;
    --liga-gold: #f59e0b;
    --liga-dark: #1f2937;
}

.hero-section {
    position: relative;
    height: calc(100vh - 60px);
    height: calc(100dvh - 60px); /* Dynamic viewport height for mobile - 60px */
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Background Image */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(15, 23, 42, 0.85) 0%,
        rgba(30, 41, 59, 0.75) 50%,
        rgba(15, 23, 42, 0.85) 100%
    );
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 10;
    flex: 1;
    text-align: center;
    color: white;
    /* Eliminamos las propiedades de layout para que Tailwind tenga control */
}

/* Logo */
.hero-logo {
    /* Eliminamos margin-bottom para que Tailwind controle el espaciado */
    animation: logoEntrance 1.5s ease-out;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.hero-logo img {
    /* Permitir que Tailwind controle el tamaño completamente */
    object-fit: contain;
    filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.3));
    animation: logoPulse 3s ease-in-out infinite;
    transition: transform 0.3s ease;
    animation-delay: 1.8s; /* Start after entrance animation completes */
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

/* Forzar respeto de tamaños de Tailwind */
.hero-logo img.w-full {
    width: 100% !important;
}

.hero-logo img.h-12 {
    height: 3rem !important; /* 48px */
}

@media (min-width: 768px) {
    .hero-logo img.md\:h-16 {
        height: 4rem !important; /* 64px */
    }
}

.hero-logo img.permanent-animation {
    animation: ballSubtle 6s ease-in-out infinite, 
               ballShadow 6s ease-in-out infinite !important;
    animation-delay: 0s !important;
}

.hero-logo img:hover {
    transform: scale(1.05);
    animation-play-state: paused;
}

/* Logo Animations */
@keyframes logoEntrance {
    0% {
        opacity: 0;
        transform: translateY(-30px) scale(0.8);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-10px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.3)) 
                drop-shadow(0 0 0 rgba(220, 38, 38, 0));
    }
    50% {
        transform: scale(1.02);
        filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.4)) 
                drop-shadow(0 0 20px rgba(220, 38, 38, 0.3));
    }
}

@keyframes ballSubtle {
    0% {
        transform: translateY(0) scale(1) rotateZ(0deg);
        animation-timing-function: cubic-bezier(0.4, 0, 0.6, 1);
    }
    25% {
        transform: translateY(-8px) scale(1.02) rotateZ(90deg); /* Reducido de -12px a -8px */
        animation-timing-function: cubic-bezier(0.4, 0, 0.6, 1);
    }
    50% {
        transform: translateY(0) scale(0.96) rotateZ(180deg);
        animation-timing-function: cubic-bezier(0.4, 0, 0.6, 1);
    }
    75% {
        transform: translateY(-4px) scale(1.01) rotateZ(270deg); /* Reducido de -6px a -4px */
        animation-timing-function: cubic-bezier(0.4, 0, 0.6, 1);
    }
    100% {
        transform: translateY(0) scale(1) rotateZ(360deg);
        animation-timing-function: cubic-bezier(0.4, 0, 0.6, 1);
    }
}

@keyframes ballShadow {
    0% {
        filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.3)) 
                drop-shadow(0 0 0 rgba(220, 38, 38, 0));
    }
    25% {
        filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.45)) 
                drop-shadow(0 0 12px rgba(220, 38, 38, 0.2));
    }
    50% {
        filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25)) 
                drop-shadow(0 0 4px rgba(220, 38, 38, 0.1));
    }
    75% {
        filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.38)) 
                drop-shadow(0 0 8px rgba(220, 38, 38, 0.15));
    }
    100% {
        filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.3)) 
                drop-shadow(0 0 0 rgba(220, 38, 38, 0));
    }
}

/* Title */
.hero-title {
    font-family: 'Audiowide', sans-serif;
    /* Eliminamos margin-bottom para que Tailwind controle el espaciado */
    line-height: 1.1;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.title-main {
    display: block;
    font-weight: 400;
    color: white;
    letter-spacing: 0.1em;
    /* Eliminamos font-size y margin-bottom para que Tailwind controle */
}

.title-year {
    display: block;
    font-weight: 700;
    color: var(--liga-gold);
    letter-spacing: 0.15em;
    /* Eliminamos font-size para que Tailwind controle */
}

/* Subtitle */
.hero-subtitle {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    /* Eliminamos font-size y margin-bottom para que Tailwind controle */
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Match Info Card - Solo estilos que no estén en Tailwind */
.hero-match {
    /* Mantenemos solo los efectos especiales */
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    /* Eliminamos background, border-radius, padding, max-width para que Tailwind controle */
}

.match-label {
    font-family: 'Audiowide', sans-serif;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    /* Eliminamos font-size y margin para que Tailwind controle */
}

.match-teams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    /* Eliminamos font-size y margin-bottom para que Tailwind controle */
}

.match-teams span:not(.vs) {
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.vs {
    font-family: 'Audiowide', sans-serif;
    color: var(--liga-gold);
    font-weight: 700;
    font-size: 1.25rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    animation: pulse-gold 2s ease-in-out infinite;
}

@keyframes pulse-gold {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

.match-info {
    font-family: 'Inter', sans-serif;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    /* Eliminamos font-size y font-weight para que Tailwind controle */
}

/* Buttons - Solo efectos especiales, Tailwind controla el resto */
.btn {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-shadow: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    /* Eliminamos font-size, padding, gap para que Tailwind controle */
}

.btn-primary {
    background-color: var(--liga-red);
    color: white;
    border: 2px solid var(--liga-red);
}

.btn-primary:hover {
    background-color: #b91c1c;
    border-color: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

.btn-secondary {
    background-color: var(--liga-green);
    color: white;
    border: 2px solid var(--liga-green);
}

.btn-secondary:hover {
    background-color: #059669;
    border-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.4s ease;
    /* Ensure centering */
    margin-left: 0;
    margin-right: 0;
}

.scroll-indicator:hover {
    color: white;
    transform: translateX(-50%) translateY(-5px);
}

.scroll-circle {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: bounce-subtle 2s ease-in-out infinite;
}

.scroll-indicator:hover .scroll-circle {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--liga-gold);
}

.scroll-circle svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
}

.scroll-indicator span {
    font-family: 'Audiowide', sans-serif;
    font-size: 0.625rem;
    font-weight: 400;
    letter-spacing: 0.1em;
}

@keyframes bounce-subtle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Mobile Optimizations */
@media (max-width: 480px) {
    .title-main {
        font-size: 2.8rem;
    }
    
    .title-year {
        font-size: 2rem;
    }
    
    .match-teams {
        font-size: 1rem;
        gap: 0.75rem;
    }
    
    .vs {
        font-size: 1.125rem;
    }
    
    .btn {
        font-size: 0.9rem;
    }
    
    .scroll-circle {
        width: 35px;
        height: 35px;
    }
    
    .scroll-circle svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 360px) {
    .title-main {
        font-size: 2.5rem;
    }
    
    .title-year {
        font-size: 1.8rem;
    }
    
    .match-teams {
        font-size: 0.9rem;
    }
}

/* Fix for very small screen height (mobile landscape) - Ensure all content is visible */
@media (max-height: 550px) {
    .hero-content {
        height: auto !important;
        min-height: 100% !important;
        margin-top: 1.2rem!important;
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
        justify-content: flex-start !important;
    }
    
    .hero-section {
        height: auto !important;
        min-height: 100vh !important;
    }
}

/* Landscape mobile adjustments */
@media (max-height: 600px) and (orientation: landscape) {
    .title-main {
        font-size: 2.2rem;
    }
    
    .title-year {
        font-size: 1.6rem;
    }
    
    .btn {
        font-size: 0.85rem;
    }
}

/* JavaScript Dynamic Height Adjustments */
/* Heights will be set dynamically by JavaScript for responsive behavior */
