/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variables CSS para colores de marca */
:root {
    --brand-purple: #6A21BF;
    --brand-orange: #EA9350;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Fuentes */
body {
    font-family: 'Montserrat', Arial, sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-900);
    min-height: 100vh;
}

.font-bebas {
    font-family: 'Bebas Neue', Arial Black, sans-serif;
}

/* Contenedor principal */
.container {
    min-height: 100vh;
    background-color: var(--gray-50);
}

/* Navegación */
.navigation {
    padding: 1.5rem;
}

.back-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: var(--gray-600);
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
    transition: color 0.2s ease;
    padding: 0.5rem;
    border-radius: 0.375rem;
}

.back-button:hover {
    color: var(--gray-900);
    background-color: rgba(0, 0, 0, 0.05);
}

/* Header */
.header {
    text-align: center;
    padding: 0 1.5rem;
    margin-bottom: 3rem;
}

.main-title {
    font-family: 'Bebas Neue', Arial Black, sans-serif;
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: -0.025em;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .main-title {
        font-size: 5rem;
    }
}

@media (min-width: 1024px) {
    .main-title {
        font-size: 6rem;
    }
}

.subtitle {
    font-size: 1.25rem;
    color: var(--gray-600);
    max-width: 32rem;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .subtitle {
        font-size: 1.5rem;
    }
}

/* Team Grid Container */
.team-grid-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.team-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Team Cards */
.team-card {
    background-color: var(--white);
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    transform: translateY(0);
}

.team-card:hover {
    box-shadow: var(--shadow-2xl);
    transform: translateY(-4px) scale(1.02);
}

/* Team Color Header - 50/50 split */
.team-color-header {
    height: 1rem;
    display: flex;
}

.team-color-left {
    flex: 1;
}

.team-color-right {
    flex: 1;
}

.team-card-content {
    padding: 2rem;
}

/* Team Badge */
.team-badge-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.team-badge {
    width: 5rem;
    height: 5rem;
    background-color: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.team-badge img {
    width: 3.5rem;
    height: 3.5rem;
    object-fit: contain;
}

/* Jersey Image */
.jersey-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.jersey-wrapper {
    position: relative;
}

.jersey-image {
    width: 8rem;
    height: 10rem;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.team-card:hover .jersey-image {
    transform: scale(1.1);
}

.jersey-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 0.5rem;
}

.team-card:hover .jersey-overlay {
    opacity: 1;
}

/* Team Name and League */
.team-name-container {
    text-align: center;
    margin-bottom: 1.5rem;
}

.team-short-name {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    font-family: 'Montserrat', Arial, sans-serif;
}

.team-league {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 600;
}

/* Action Button */
.action-button-container {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.team-card:hover .action-button-container {
    opacity: 1;
}

.action-button {
    width: 100%;
    background: linear-gradient(135deg, var(--brand-purple) 0%, var(--brand-orange) 100%);
    color: var(--white);
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.action-button:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, #5a1a9f 0%, #d17a2f 100%);
}

/* Footer spacing */
.footer-spacing {
    height: 4rem;
}

/* Utilidades responsive */
@media (max-width: 767px) {
    .team-grid-container {
        padding: 0 1rem;
    }
    
    .team-card-content {
        padding: 1.5rem;
    }
    
    .main-title {
        font-size: 3rem;
    }
    
    .subtitle {
        font-size: 1.125rem;
    }
}

/* Animaciones adicionales */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.team-card {
    animation: fadeInUp 0.6s ease forwards;
}

.team-card:nth-child(1) { animation-delay: 0.1s; }
.team-card:nth-child(2) { animation-delay: 0.2s; }
.team-card:nth-child(3) { animation-delay: 0.3s; }
.team-card:nth-child(4) { animation-delay: 0.4s; }
.team-card:nth-child(5) { animation-delay: 0.5s; }
.team-card:nth-child(6) { animation-delay: 0.6s; }
.team-card:nth-child(7) { animation-delay: 0.7s; }
.team-card:nth-child(8) { animation-delay: 0.8s; }
.team-card:nth-child(9) { animation-delay: 0.9s; }

/* Inicialmente ocultos para la animación */
.team-card {
    opacity: 0;
}

.jersey-image {
  transition: opacity .25s ease;
}