:root {
    --primary-color: #d62124;
    --secondary-color: #b29b35;
    --dark-color: #000000;
    --light-color: #ffffff;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--dark-color);
    color: var(--light-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header Mejorado */
header {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(178, 155, 53, 0.1) 100%);
    backdrop-filter: blur(15px);
    border-bottom: 2px solid var(--secondary-color);
    box-shadow: 0 4px 20px rgba(214, 33, 36, 0.2);
    transition: all 0.3s ease;
    z-index: 1000;
}

header.scrolled {
    background: rgba(0, 0, 0, 0.98);
    box-shadow: 0 4px 30px rgba(214, 33, 36, 0.3);
}

.navbar-brand {
    padding: 5px 0;
}

.navbar-brand div {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-weight: bold;
    border-radius: 8px;
    padding: 10px 20px;
    box-shadow: 0 4px 15px rgba(214, 33, 36, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.navbar-brand div::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 ease;
}

.navbar-brand div:hover::before {
    left: 100%;
}

.navbar-brand div:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(214, 33, 36, 0.4);
}

.navbar-nav .nav-link {
    color: var(--light-color);
    font-weight: 600;
    margin: 0 5px;
    padding: 10px 20px !important;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    transition: left 0.5s ease;
}

.navbar-nav .nav-link:hover::before {
    left: 100%;
}

.navbar-nav .nav-link:hover {
    color: var(--light-color);
    background: rgba(214, 33, 36, 0.1);
    transform: translateY(-2px);
}

.navbar-nav .nav-link.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(214, 33, 36, 0.3);
}

.navbar-toggler {
    border: 2px solid var(--secondary-color);
    padding: 8px;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(178, 155, 53, 0.3);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Efecto de scroll */
.navbar-dark .navbar-nav .nav-link {
    position: relative;
}

.navbar-dark .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-dark .navbar-nav .nav-link:hover::after {
    width: 80%;
}

/* Hero Section Modernizado */
#hero {
    height: 100vh;
    min-height: 600px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #000000 100%);
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(214, 33, 36, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(178, 155, 53, 0.15) 0%, transparent 50%),
        url('../img/fondo3.jpg') center/cover no-repeat;
    background-blend-mode: overlay;
    z-index: 1;
    animation: backgroundShift 8s ease-in-out infinite alternate;
}

#hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(45deg, 
            transparent 0%, 
            rgba(214, 33, 36, 0.05) 25%, 
            transparent 50%, 
            rgba(178, 155, 53, 0.05) 75%, 
            transparent 100%);
    animation: shimmer 6s ease-in-out infinite;
    z-index: 2;
}

@keyframes backgroundShift {
    0% {
        transform: scale(1) rotate(0deg);
        filter: hue-rotate(0deg) contrast(1);
    }
    100% {
        transform: scale(1.05) rotate(0.5deg);
        filter: hue-rotate(5deg) contrast(1.1);
    }
}

@keyframes shimmer {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.7;
    }
}

.hero-content {
    text-align: center;
    z-index: 3;
    padding: 0 20px;
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 1s ease-out 0.5s forwards;
    position: relative;
}

.hero-content::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(214, 33, 36, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 4s ease-in-out infinite;
}

.hero-content h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #ffffff, #b29b35, #d62124);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
}

.hero-content h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #d62124, #b29b35, transparent);
    animation: lineExpand 2s ease-in-out infinite;
}

.hero-content .lead {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    position: relative;
}

.hero-content .lead::before {
    margin-right: 10px;
    animation: bounce 2s ease-in-out infinite;
}

.hero-badge {
    display: inline-block;
    background: linear-gradient(45deg, #d62124, #b29b35);
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    box-shadow: 0 10px 30px rgba(214, 33, 36, 0.4);
    animation: float 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.hero-badge::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 ease;
}

.hero-badge:hover::before {
    left: 100%;
}

.hero-badge:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(214, 33, 36, 0.6);
}

/* Animaciones adicionales */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: translateX(-50%) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translateX(-50%) scale(1.2);
        opacity: 0.8;
    }
}

@keyframes lineExpand {
    0%, 100% {
        width: 0;
        opacity: 0;
    }
    50% {
        width: 200px;
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

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

/* Partículas flotantes */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: floatParticle 20s infinite linear;
}

.particle:nth-child(1) { top: 20%; left: 10%; width: 4px; height: 4px; animation-delay: 0s; }
.particle:nth-child(2) { top: 60%; left: 80%; width: 6px; height: 6px; animation-delay: -5s; }
.particle:nth-child(3) { top: 40%; left: 30%; width: 3px; height: 3px; animation-delay: -10s; }
.particle:nth-child(4) { top: 80%; left: 50%; width: 5px; height: 5px; animation-delay: -15s; }
.particle:nth-child(5) { top: 30%; left: 70%; width: 4px; height: 4px; animation-delay: -2s; }

@keyframes floatParticle {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.scroll-arrow {
    width: 30px;
    height: 30px;
    border-right: 2px solid #b29b35;
    border-bottom: 2px solid #b29b35;
    transform: rotate(45deg);
    animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: rotate(45deg) translateY(0);
    }
    40% {
        transform: rotate(45deg) translateY(-10px);
    }
    60% {
        transform: rotate(45deg) translateY(-5px);
    }
}

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Clases de animación */
.animate-in {
    animation: fadeInUp 0.8s ease-out forwards;
}

section {
    padding: 80px 0;
}

section.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.player-card, .match-card, .starboy-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.player-card.animate-in, 
.match-card.animate-in, 
.starboy-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Secciones */
section {
    padding: 80px 0;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.section-title.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
}

/* Sobre Nosotros Mejorado */
#sobre-nosotros {
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    position: relative;
    overflow: hidden;
}

#sobre-nosotros::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(214, 33, 36, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(178, 155, 53, 0.05) 0%, transparent 50%);
    z-index: 1;
}

#sobre-nosotros .container {
    position: relative;
    z-index: 2;
}

/* Estadísticas */
.stat-item {
    padding: 20px 10px;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.stat-item.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 5px;
    font-family: 'Montserrat', sans-serif;
}

.stat-label {
    font-size: 0.9rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Tarjetas sobre nosotros */
.about-cards {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.about-card {
    display: flex;
    align-items: flex-start;
    background: linear-gradient(145deg, #1a1a1a 0%, #222 100%);
    border-radius: 15px;
    padding: 25px;
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateX(-30px);
}

.about-card.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.about-card:nth-child(even) {
    transform: translateX(30px);
}

.about-card:nth-child(even).animate-in {
    transform: translateX(0);
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(214, 33, 36, 0.2);
    border-color: rgba(178, 155, 53, 0.2);
}

.about-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 15px rgba(214, 33, 36, 0.3);
}

.about-content h4 {
    color: var(--light-color);
    margin-bottom: 10px;
    font-size: 1.3rem;
    font-weight: 600;
}

.about-content p {
    color: #ccc;
    line-height: 1.6;
    margin: 0;
}

/* Contenedor de imagen mejorado */
.about-image-container {
    position: relative;
    padding-left: 30px;
}

.about-image {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    transform: perspective(1000px) rotateY(-5deg);
    transition: all 0.5s ease;
}

.about-image:hover {
    transform: perspective(1000px) rotateY(0deg);
}

.about-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: all 0.5s ease;
}

.about-image:hover img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 30px 20px 20px;
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.4s ease;
}

.about-image:hover .image-overlay {
    transform: translateY(0);
    opacity: 1;
}

.overlay-content h4 {
    color: var(--secondary-color);
    margin-bottom: 5px;
    font-weight: 700;
}

.overlay-content p {
    color: #ddd;
    font-size: 0.9rem;
    margin: 0;
}

/* Responsive */
@media (max-width: 992px) {
    .about-image-container {
        padding-left: 0;
        margin-top: 40px;
    }
    
    .about-image {
        transform: none;
    }
    
    .about-image:hover {
        transform: none;
    }
    
    .about-card {
        flex-direction: column;
        text-align: center;
    }
    
    .about-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
}

@media (max-width: 768px) {
    .stat-number {
        font-size: 2rem;
    }
    
    .about-card {
        padding: 20px;
    }
    
    .about-image img {
        height: 300px;
    }
}

/* Plantilla - Diseño Mejorado con Filtros */
#plantilla {
    background: linear-gradient(135deg, #0a0a0a 0%, #111 100%);
    position: relative;
    overflow: hidden;
    opacity: 1 !important;
    transform: none !important;
}

#plantilla::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(214, 33, 36, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(178, 155, 53, 0.1) 0%, transparent 50%);
    z-index: 1;
}

#plantilla .container {
    position: relative;
    z-index: 2;
}

#plantilla .section-title {
    opacity: 1 !important;
    transform: none !important;
}

/* Contenedor de filtros */
.filtros-wrapper {
    transition: all 0.5s ease;
    overflow: hidden;
}

/* Estado colapsado para filtros y plantilla */
#plantilla-container.collapsed,
#filtros-container.collapsed {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-bottom: 0;
    transform: translateY(-20px);
}

#plantilla-container:not(.collapsed),
#filtros-container:not(.collapsed) {
    max-height: 5000px;
    opacity: 1;
    transition: max-height 0.8s ease, opacity 0.5s ease, transform 0.5s ease;
}

/* Estilos para los filtros de posición */
.filter-container {
    background: linear-gradient(145deg, #1a1a1a 0%, #222 100%);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transition: all 0.4s ease;
}

.filtros-wrapper.collapsed .filter-container {
    transform: scale(0.95);
    opacity: 0;
}

.filter-title {
    color: var(--light-color);
    font-weight: 600;
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.filter-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaa;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

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

.filter-btn:hover::before {
    left: 100%;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--light-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.filter-btn.active {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(214, 33, 36, 0.4);
    transform: translateY(-2px);
}

.filter-btn.active:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(214, 33, 36, 0.5);
}

.filter-count {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-left: 5px;
    font-weight: 700;
}

.filter-btn.active .filter-count {
    background: rgba(255, 255, 255, 0.2);
}

/* Contador de jugadores filtrados */
.filter-counter {
    color: var(--secondary-color);
    font-size: 0.95rem;
    margin-top: 15px;
    font-weight: 600;
    text-align: center;
    padding: 8px 15px;
    background: rgba(178, 155, 53, 0.1);
    border-radius: 10px;
    display: inline-block;
}

/* Efectos para las tarjetas al filtrar */
.player-col {
    transition: all 0.5s ease;
}

.player-card {
    background: linear-gradient(145deg, #1a1a1a 0%, #222 100%);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    height: 100%;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.player-card.hidden {
    opacity: 0.3;
    transform: scale(0.9) translateY(10px);
    pointer-events: none;
    filter: blur(1px);
}

.player-card.filtered-out {
    animation: fadeOutScale 0.4s ease forwards;
}

.player-card.filtered-in {
    animation: fadeInScale 0.4s ease forwards;
}

@keyframes fadeOutScale {
    to {
        opacity: 0.3;
        transform: scale(0.9) translateY(10px);
        filter: blur(1px);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0.3;
        transform: scale(0.9) translateY(10px);
        filter: blur(1px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

.player-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    transition: left 0.6s ease;
    z-index: 2;
}

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

.player-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(214, 33, 36, 0.3),
        0 0 0 1px rgba(178, 155, 53, 0.2);
    border-color: rgba(178, 155, 53, 0.3);
}

.player-card.hidden:hover {
    transform: scale(0.9) translateY(10px) !important;
}

.player-image-container {
    position: relative;
    height: 280px;
    overflow: hidden;
    background: #000;
}

.player-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.4s ease;
    filter: grayscale(0.1) contrast(1.1);
}

.player-card:hover .player-image {
    transform: scale(1.08);
    filter: grayscale(0) contrast(1.2);
}

.player-card.hidden:hover .player-image {
    transform: scale(1) !important;
}

.dorsal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(6rem, 12vw, 9rem);
    font-weight: 900;
    color: rgba(143, 141, 141, 0.3);
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-family: 'Montserrat', sans-serif;
}

.player-info {
    padding: 25px 20px;
    text-align: center;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.4));
    position: relative;
}

.player-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.player-info h4 {
    margin-bottom: 8px;
    color: var(--light-color);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.player-position {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-top: 5px;
    box-shadow: 0 4px 15px rgba(214, 33, 36, 0.3);
    transition: all 0.3s ease;
}

.player-card:hover .player-position {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(214, 33, 36, 0.4);
}

/* Efecto de brillo en hover */
.player-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(178, 155, 53, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.player-card:hover::after {
    opacity: 1;
}

/* Badge de posición con colores diferentes */
.player-position.portero {
    background: linear-gradient(45deg, #1e40af, #3b82f6);
}

.player-position.defensa {
    background: linear-gradient(45deg, #059669, #10b981);
}

.player-position.centrocampista {
    background: linear-gradient(45deg, #d97706, #f59e0b);
}

.player-position.delantero {
    background: linear-gradient(45deg, #dc2626, #ef4444);
}

/* Efecto de aparición escalonada */
.player-card {
    opacity: 0;
    transform: translateY(50px) rotateX(10deg);
    animation: cardEntrance 0.8s ease forwards;
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(50px) rotateX(10deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

/* Responsive para los filtros */
@media (max-width: 768px) {
    .filter-container {
        padding: 20px 15px;
        margin-bottom: 25px;
    }
    
    .filter-buttons {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .filter-title {
        font-size: 1.1rem;
    }
    
    /* Ajustes para móvil cuando está colapsado */
    #filtros-container.collapsed {
        margin-bottom: -10px;
    }
}

@media (max-width: 576px) {
    .filter-buttons {
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }
    
    .filter-btn {
        width: 90%;
        margin-bottom: 5px;
        padding: 10px 15px;
    }
    
    .filter-container {
        padding: 15px 10px;
    }
    
    .player-card.hidden {
        opacity: 0.2;
        transform: scale(0.85);
    }
}

/* Efectos especiales para el contenedor de filtros */
.filter-container {
    position: relative;
    overflow: hidden;
}

.filter-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(214, 33, 36, 0.05) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
/* Estilos para el calendario */
.calendar-controls {
    background: linear-gradient(145deg, #1a1a1a 0%, #222 100%);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.calendar-grid {
    background: linear-gradient(145deg, #1a1a1a 0%, #222 100%);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: rgba(214, 33, 36, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.calendar-day-header {
    padding: 15px 10px;
    text-align: center;
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: rgba(255, 255, 255, 0.05);
}

.calendar-day {
    background: linear-gradient(145deg, #1e1e1e 0%, #252525 100%);
    min-height: 100px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.calendar-day:hover {
    background: linear-gradient(145deg, #252525 0%, #2a2a2a 100%);
    border-color: rgba(178, 155, 53, 0.3);
    transform: scale(1.02);
    z-index: 2;
    position: relative;
}

.calendar-day.empty {
    background: transparent;
    border: none;
}

.calendar-day.today .day-number {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.calendar-day.has-match {
    border-left: 3px solid var(--secondary-color);
    cursor: pointer;
}

.calendar-day.has-match:hover {
    box-shadow: 0 5px 15px rgba(214, 33, 36, 0.3);
}

.day-number {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--light-color);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 5px;
}

.match-indicator {
    text-align: center;
    margin-top: auto;
}

.team-logo-small {
    width: 30px;
    height: 30px;
    object-fit: contain;
    margin-bottom: 5px;
    border-radius: 50%;
    border: 2px solid rgba(178, 155, 53, 0.5);
}

.match-time {
    display: block;
    font-size: 0.7rem;
    color: var(--secondary-color);
    font-weight: 600;
}

/* Estilos para el modal */
.modal-content {
    background: linear-gradient(145deg, #1a1a1a 0%, #222 100%);
    border: 1px solid rgba(178, 155, 53, 0.3);
    border-radius: 15px;
    color: var(--light-color);
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(214, 33, 36, 0.1);
}

.modal-title {
    color: var(--secondary-color);
    font-weight: 700;
}

.btn-close-white {
    filter: invert(1);
}

.match-modal-content {
    text-align: center;
}

.match-header-modal {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.team-info {
    font-weight: 700;
    font-size: 1.2rem;
    flex: 1;
    text-align: center;
}

.team-info.peskitos {
    color: var(--secondary-color);
}

.team-info.rival {
    color: var(--light-color);
}

.vs-badge-modal {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}

.team-logo-modal-container {
    margin: 20px 0;
}

.team-logo-modal {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 50%;
    border: 3px solid rgba(178, 155, 53, 0.5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.match-details-modal {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.detail-item-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.detail-item-modal i {
    color: var(--secondary-color);
    width: 20px;
    text-align: center;
}

/* Responsive para el calendario */
@media (max-width: 768px) {
    .calendar-day {
        min-height: 80px;
        padding: 8px 5px;
    }
    
    .day-number {
        font-size: 0.9rem;
        width: 25px;
        height: 25px;
    }
    
    .team-logo-small {
        width: 25px;
        height: 25px;
    }
    
    .match-time {
        font-size: 0.6rem;
    }
    
    .calendar-day-header {
        padding: 10px 5px;
        font-size: 0.8rem;
    }
    
    .match-header-modal {
        flex-direction: column;
        gap: 10px;
    }
    
    .team-info {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .calendar-day {
        min-height: 60px;
    }
    
    .day-number {
        font-size: 0.8rem;
        width: 20px;
        height: 20px;
    }
    
    .team-logo-small {
        width: 20px;
        height: 20px;
    }
    
    .calendar-controls {
        padding: 15px;
    }
    
    #calendar-month-year {
        font-size: 1.2rem;
    }
}

/* Botones del calendario */
.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--secondary-color);
    color: var(--light-color);
}

.starboy-card {
    background: linear-gradient(145deg, #1a1a1a 0%, #222 100%);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    height: 100%;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.starboy-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(214, 33, 36, 0.3),
        0 0 0 1px rgba(178, 155, 53, 0.2);
    border-color: rgba(178, 155, 53, 0.3);
}

.starboy-card .player-image-container {
    position: relative;
    height: 280px;
    overflow: hidden;
    background: #000;
}

.starboy-card .player-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.4s ease;
    filter: grayscale(0.1) contrast(1.1);
}

.starboy-card:hover .player-image-container img {
    transform: scale(1.08);
    filter: grayscale(0) contrast(1.2);
}

.starboy-card .player-info {
    padding: 25px 20px;
    text-align: center;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.4));
    position: relative;
}

.starboy-card .player-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.starboy-card .player-info h4 {
    margin-bottom: 8px;
    color: var(--light-color);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Estadísticas específicas de Starboy */
.stat-number {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--secondary-color);
    margin: 10px 0;
}

.stat-label {
    color: #aaa;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
}

#starboy .section-title {
    opacity: 1;
    transform: none;
}

/* Footer Rediseñado */
footer {
    background: linear-gradient(135deg, #0a0a0a 0%, #111 100%);
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 10%, rgba(214, 33, 36, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 90%, rgba(178, 155, 53, 0.05) 0%, transparent 50%);
    z-index: 1;
}

footer .container {
    position: relative;
    z-index: 2;
}

/* Brand del footer */
.footer-brand {
    text-align: left;
}

.footer-title {
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 1.8rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-description {
    color: #ccc;
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-item {
    display: flex;
    align-items: center;
    color: #aaa;
    font-size: 0.9rem;
}

.info-item i {
    color: var(--secondary-color);
    margin-right: 10px;
    width: 16px;
    text-align: center;
}

/* Títulos de sección */
.footer-section-title {
    color: var(--light-color);
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* Enlaces del footer */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #aaa;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.footer-links a i {
    margin-right: 8px;
    font-size: 0.7rem;
    color: var(--secondary-color);
    transition: transform 0.3s ease;
}

.footer-links a:hover {
    color: var(--light-color);
    transform: translateX(5px);
}

.footer-links a:hover i {
    transform: translateX(3px);
}

/* Información de contacto */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
}

.contact-item i {
    color: var(--secondary-color);
    margin-right: 12px;
    margin-top: 2px;
    font-size: 1rem;
    width: 16px;
    text-align: center;
}

.contact-item div {
    display: flex;
    flex-direction: column;
}

.contact-item span:first-child {
    color: #aaa;
    font-size: 0.8rem;
    margin-bottom: 2px;
}

.contact-item a, .contact-item span:last-child {
    color: var(--light-color);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--secondary-color);
}

/* Enlaces sociales */
.social-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.social-link {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: #aaa;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.social-link i {
    margin-right: 8px;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.social-link span {
    font-size: 0.85rem;
}

.social-link:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
    color: var(--light-color);
    border-color: rgba(178, 155, 53, 0.2);
}

.social-link.instagram:hover {
    background: linear-gradient(45deg, #E1306C, #F77737);
    color: white;
}

.social-link.whatsapp:hover {
    background: linear-gradient(45deg, #25D366, #128C7E);
    color: white;
}

.social-link.twitter:hover {
    background: linear-gradient(45deg, #1DA1F2, #0d8bd9);
    color: white;
}

.social-link.youtube:hover {
    background: linear-gradient(45deg, #FF0000, #CC0000);
    color: white;
}

/* CTA del footer */
.footer-cta {
    background: linear-gradient(135deg, rgba(214, 33, 36, 0.1), rgba(178, 155, 53, 0.1));
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(178, 155, 53, 0.2);
}

.footer-cta p {
    color: #ccc;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.btn-join {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-join:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(214, 33, 36, 0.4);
}

/* Mapa mejorado */
.map-container-enhanced {
    height: 250px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.map-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(178, 155, 53, 0.3);
    max-width: 200px;
}

.overlay-content h5 {
    color: var(--secondary-color);
    margin-bottom: 5px;
    font-size: 1rem;
}

.overlay-content p {
    color: #ccc;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.btn-directions {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-directions i {
    margin-right: 5px;
}

.btn-directions:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(214, 33, 36, 0.4);
    color: white;
}

/* Divisor */
.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(178, 155, 53, 0.3), transparent);
    margin: 30px 0;
}

/* Copyright */
.copyright {
    color: #666;
    font-size: 0.85rem;
    margin: 0;
}

.footer-legal {
    display: flex;
    gap: 20px;
    justify-content: flex-end;
}

.footer-legal a {
    color: #666;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: var(--secondary-color);
}

/* Botón volver arriba */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(214, 33, 36, 0.4);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(214, 33, 36, 0.6);
}

/* Responsive */
@media (max-width: 992px) {
    .footer-brand {
        text-align: center;
        margin-bottom: 30px;
    }
    
    .footer-info {
        align-items: center;
    }
    
    .social-links {
        grid-template-columns: 1fr;
    }
    
    .map-overlay {
        position: relative;
        top: 0;
        right: 0;
        max-width: 100%;
        margin-top: 15px;
    }
}

@media (max-width: 768px) {
    footer {
        padding: 40px 0 20px !important;
    }
    
    .footer-section-title {
        font-size: 1.1rem;
    }
    
    .footer-title {
        font-size: 1.5rem;
    }
    
    .map-container-enhanced {
        height: 200px;
    }
    
    .footer-legal {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
        margin-top: 10px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 576px) {
    .social-links {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-cta {
        padding: 12px;
    }
    
    .map-container-enhanced {
        height: 180px;
    }
}

/* Preloader */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

body.loaded .loading-screen {
    opacity: 0;
    pointer-events: none;
}

/* Estilos para el header de la sección con la flecha */
.section-header {
    position: relative;
}

.toggle-btn {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(214, 33, 36, 0.3);
}

.toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(214, 33, 36, 0.4);
}

.toggle-btn i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

/* Estado colapsado de la plantilla */
#plantilla-container.collapsed {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
}

#plantilla-container:not(.collapsed) {
    max-height: 5000px;
    opacity: 1;
    transition: max-height 0.8s ease, opacity 0.5s ease;
}

/* Asegurar que las cards tengan transición suave */
.player-card {
    transition: transform 0.4s ease, opacity 0.4s ease;
}

/* Galería del Equipo - Carrusel Personalizado */
#galeria {
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    position: relative;
    overflow: hidden;
}

#galeria::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 80% 20%, rgba(214, 33, 36, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(178, 155, 53, 0.05) 0%, transparent 50%);
    z-index: 1;
}

#galeria .container {
    position: relative;
    z-index: 2;
}

/* Contenedor principal del carrusel */
.custom-carousel-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Contenedor del carrusel */
.custom-carousel {
    position: relative;
    width: 100%;
    height: 500px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    background: linear-gradient(145deg, #1a1a1a 0%, #222 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Pista del carrusel */
.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Elementos del carrusel */
.carousel-item {
    flex: 0 0 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.carousel-item:hover .carousel-image {
    transform: scale(1.05);
}

/* Overlay de información */
.carousel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease;
}

.carousel-item:hover .carousel-overlay {
    transform: translateY(0);
    opacity: 1;
}

.overlay-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--secondary-color);
}

.overlay-description {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
}

/* Controles de navegación */
.carousel-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 10;
}

.carousel-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(214, 33, 36, 0.4);
    position: relative;
    overflow: hidden;
}

.carousel-btn::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 ease;
}

.carousel-btn:hover::before {
    left: 100%;
}

.carousel-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(214, 33, 36, 0.6);
}

.carousel-btn i {
    font-size: 1.5rem;
}

/* Indicadores personalizados */
.custom-indicators {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 30px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.indicator::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    transition: left 0.3s ease;
}

.indicator.active::before {
    left: 0;
}

.indicator.active {
    transform: scale(1.2);
    border-color: rgba(178, 155, 53, 0.5);
}

.indicator:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.3);
}

/* Contador de imágenes */
.image-counter {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 5;
    border: 1px solid rgba(178, 155, 53, 0.3);
}

/* Efectos de brillo en los bordes */
.custom-carousel::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    border-radius: 22px;
    z-index: -1;
    opacity: 0.3;
    filter: blur(5px);
}

/* Animación de entrada para las imágenes */
.carousel-item {
    animation: fadeInScale 0.8s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive */
@media (max-width: 992px) {
    .custom-carousel {
        height: 400px;
    }
    
    .carousel-btn {
        width: 50px;
        height: 50px;
    }
    
    .carousel-btn i {
        font-size: 1.2rem;
    }
    
    .overlay-title {
        font-size: 1.3rem;
    }
    
    .overlay-description {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .custom-carousel {
        height: 350px;
    }
    
    .carousel-controls {
        padding: 0 10px;
    }
    
    .carousel-btn {
        width: 45px;
        height: 45px;
    }
    
    .carousel-overlay {
        padding: 20px;
    }
    
    .overlay-title {
        font-size: 1.1rem;
    }
    
    .overlay-description {
        font-size: 0.85rem;
    }
    
    .custom-indicators {
        margin-top: 25px;
    }
    
    .indicator {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 576px) {
    .custom-carousel {
        height: 300px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
    }
    
    .carousel-btn i {
        font-size: 1rem;
    }
    
    .carousel-overlay {
        padding: 15px;
    }
    
    .overlay-title {
        font-size: 1rem;
    }
    
    .overlay-description {
        font-size: 0.8rem;
    }
    
    .image-counter {
        bottom: 15px;
        right: 15px;
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}


/* Responsive Design */
@media (max-width: 1200px) {
    .dorsal {
        font-size: clamp(5rem, 10vw, 7rem);
    }
}

@media (max-width: 992px) {
    section {
        padding: 60px 0;
    }
    
    .about-image {
        height: 300px;
        margin-bottom: 2rem;
    }
    
    .dorsal {
        font-size: 5rem;
    }
    .player-card {
        margin-bottom: 1.5rem;
    }
    
    .player-info {
        padding: 20px 15px;
    }
    
    .player-info h4 {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    .section-title::after {
        width: 60px;
        height: 3px;
    }
    
    #hero {
        height: 70vh;
        min-height: 500px;
    }
    
    .hero-content h1 {
        font-size: clamp(2.5rem, 10vw, 4rem);
        letter-spacing: 1px;
    }
    
    .hero-content .lead {
        font-size: clamp(1rem, 4vw, 1.3rem);
    }
    
    .hero-badge {
        padding: 10px 20px;
        font-size: 0.8rem;
    }
    
    .hero-content::before {
        width: 60px;
        height: 60px;
        top: -30px;
    }
    
    /* SOBRE NOSOTROS */
    #sobre-nosotros {
        padding: 40px 0;
    }
    
    /* PLANTILLA - CORRECCIONES CRÍTICAS */
    #plantilla {
        padding-bottom: 3rem !important;
        margin-bottom: 2rem !important;
        position: relative;
        z-index: 2;
        overflow: visible !important;
        height: auto !important;
        min-height: auto !important;
    }
    
    #plantilla-container {
        overflow: visible !important;
        height: auto !important;
        max-height: none !important;
        padding-bottom: 1rem;
    }
    
    #plantilla-container.collapsed {
        max-height: 400px !important;
        overflow: hidden !important;
    }
    
    #plantilla-container:not(.collapsed) {
        max-height: none !important;
    }
    
    .player-card {
        margin-bottom: 1.5rem;
        transform: none !important;
        animation: none !important;
        opacity: 1 !important;
    }
    
    .player-card:hover {
        transform: translateY(-8px) scale(1.01);
    }
    
    .player-card:last-child {
        margin-bottom: 2rem !important;
    }
    
    #plantilla-container .col-md-4.col-lg-3 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 1rem;
    }
    
    /* CALENDARIO - CORRECCIONES PARA EVITAR SOLAPAMIENTO */
    #calendario {
        padding-top: 2rem !important;
        margin-top: 0 !important;
        position: relative;
        z-index: 1;
        clear: both;
        overflow: visible !important;
    }
    
    .match-card {
        flex-direction: column;
        text-align: center;
        padding: 15px;
        margin-bottom: 1.5rem;
    }
    
    .team-logo {
        margin-right: 0;
        margin-bottom: 15px;
        width: 80px;
        height: 80px;
    }
    
    .match-details {
        flex-direction: column;
        gap: 8px;
    }
    
    .match-details span {
        justify-content: center;
    }
    
    /* STARBOY */
    #starboy {
        padding: 40px 0;
    }
    
    #starboy .starboy-card {
        transform: none !important;
        margin-bottom: 1.5rem;
    }
    
    #starboy .starboy-card:hover {
        transform: none !important;
    }
    
    #starboy .starboy-card:hover .player-image-container img {
        transform: none !important;
    }
    
    #starboy .starboy-card,
    #starboy .starboy-card .player-image-container img {
        transition: none !important;
    }
    
    /* NAVBAR */
    .navbar-nav .nav-link {
        padding: 8px 15px !important;
        margin: 2px 0;
        text-align: center;
    }
    
    /* ELEMENTOS GENERALES */
    .dorsal {
        font-size: 4rem;
    }
    
    .player-info h4 {
        font-size: 1.1rem;
    }
    
    .map-container {
        height: 250px;
        margin-bottom: 2rem;
    }
    
    /* SECTION HEADER */
    .section-header {
        flex-direction: column;
        text-align: center;
    }
    
    .toggle-btn {
        margin-top: 15px;
        width: 35px;
        height: 35px;
    }
    
    .toggle-btn i {
        font-size: 1rem;
    }
    
    /* CLEARFIX PARA EVITAR SOLAPAMIENTOS */
    section {
        clear: both;
        overflow: visible !important;
    }
    
    #plantilla::after {
        content: '';
        display: block;
        height: 1rem;
        clear: both;
    }
}

@media (max-width: 576px) {
    section {
        padding: 40px 0;
    }
    
    #hero {
        height: 50vh;
        min-height: 400px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content .lead {
        font-size: 1rem;
    }
    
    .about-image {
        height: 250px;
    }
    
    .dorsal {
        font-size: 3.5rem;
    }
    .player-position {
        font-size: 0.8rem;
        padding: 5px 12px;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .match-card {
        margin-bottom: 15px;
    }
    
    .navbar-brand div {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}

/* Utilities para animaciones */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* Scroll personalizado */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-color);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Añade esto al final de tu archivo CSS, en la sección de media queries para móvil */

@media (max-width: 768px) {
    /* Corrección específica para la sección plantilla cuando está colapsada */
    #plantilla {
        position: relative;
        padding: 40px 0 !important;
        min-height: auto !important;
    }
    
    #plantilla-container.collapsed,
    #filtros-container.collapsed {
        max-height: 0 !important;
        opacity: 0;
        overflow: hidden;
        margin: 0 !important;
        padding: 0 !important;
        transform: translateY(-20px);
        transition: all 0.3s ease;
    }
    
    #plantilla-container:not(.collapsed),
    #filtros-container:not(.collapsed) {
        max-height: none !important;
        opacity: 1;
        margin-bottom: 1rem;
        transform: translateY(0);
        transition: all 0.4s ease;
    }
    
    /* Reducir el padding de la sección cuando está colapsada */
    #plantilla.container-collapsed {
        padding: 20px 0 !important;
    }
    
    /* Ajustar el margen inferior del header de sección */
    .section-header {
        margin-bottom: 2rem !important;
    }
    
    /* Asegurar que no hay espacio extra entre elementos */
    .player-col {
        margin-bottom: 1rem;
    }
    
    .player-card {
        margin-bottom: 1rem;
    }
    
    /* Corrección para el contenedor de filtros */
    .filter-container {
        margin-bottom: 1.5rem;
        padding: 15px;
    }
    
    .filtros-wrapper.collapsed {
        margin-bottom: 0;
        height: 0;
    }
}

@media (max-width: 576px) {
    /* Correcciones más específicas para móviles pequeños */
    #plantilla {
        padding: 30px 0 !important;
    }
    
    #plantilla-container.collapsed,
    #filtros-container.collapsed {
        transform: translateY(-15px);
    }
    
    .section-header {
        margin-bottom: 1.5rem !important;
    }
    
    /* Reducir aún más el espacio cuando está colapsado */
    #plantilla.container-collapsed-mobile {
        padding: 15px 0 !important;
        min-height: 100px !important;
    }
}

/* Tabla de Clasificación - VERSIÓN SIMPLIFICADA Y CORREGIDA */
#clasificacion {
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    position: relative;
    overflow: hidden;
    padding: 80px 0;
}

#clasificacion::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 20%, rgba(214, 33, 36, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(178, 155, 53, 0.05) 0%, transparent 50%);
    z-index: 1;
}

#clasificacion .container {
    position: relative;
    z-index: 2;
}

.table-container {
    background: linear-gradient(145deg, #1a1a1a 0%, #222 100%);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    position: relative;
}

.table-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    border-radius: 17px;
    z-index: -1;
    opacity: 0.1;
    filter: blur(5px);
}

/* TABLA PRINCIPAL - ESTILOS CORREGIDOS */
.table-classification {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    color: var(--light-color);
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
}

/* CABECERA DE LA TABLA */
.table-classification thead {
    background: linear-gradient(135deg, rgba(214, 33, 36, 0.15), rgba(178, 155, 53, 0.1));
}

.table-classification th {
    padding: 18px 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    color: var(--secondary-color);
    border: none;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
}

/* DEFINIR ANCHOS ESPECÍFICOS PARA CADA COLUMNA */
.table-classification th:nth-child(1) { width: 8%; }   /* POS */
.table-classification th:nth-child(2) { width: 40%; text-align: left; } /* EQUIPO */
.table-classification th:nth-child(3) { width: 8%; }   /* PJ */
.table-classification th:nth-child(4) { width: 10%; }  /* PTS */
.table-classification th:nth-child(5) { width: 8%; }   /* GF */
.table-classification th:nth-child(6) { width: 8%; }   /* GC */
.table-classification th:nth-child(7) { width: 10%; }  /* DG */

/* CUERPO DE LA TABLA */
.table-classification tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s ease;
}

.table-classification tbody tr:last-child {
    border-bottom: none;
}

.table-classification tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.table-classification td {
    padding: 20px 12px;
    border: none;
    text-align: center;
    vertical-align: middle;
    transition: all 0.3s ease;
}

/* ALINEACIÓN ESPECÍFICA POR COLUMNA */
.table-classification td:nth-child(1) { 
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--light-color);
} /* POS */

.table-classification td:nth-child(2) { 
    text-align: left;
    padding-left: 15px;
} /* EQUIPO */

.table-classification td:nth-child(3) { 
    font-weight: 600;
} /* PJ */

.table-classification td:nth-child(4) { 
    font-weight: 700;
    color: var(--secondary-color);
    font-size: 1.1rem;
} /* PTS */

.table-classification td:nth-child(5) { 
    color: #ccc;
} /* GF */

.table-classification td:nth-child(6) { 
    color: #ccc;
} /* GC */

.table-classification td:nth-child(7) { 
    font-weight: 600;
} /* DG */

/* ESTILOS PARA PESKITOS FC */
.team-peskitos {
    background: linear-gradient(135deg, rgba(178, 155, 53, 0.12), rgba(214, 33, 36, 0.08)) !important;
    border-left: 4px solid var(--secondary-color);
}

.team-peskitos td:first-child {
    font-weight: 800;
    position: relative;
}

.team-peskitos td:first-child::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: linear-gradient(to bottom, var(--secondary-color), var(--primary-color));
    border-radius: 3px;
}

/* INFORMACIÓN DEL EQUIPO */
.team-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.team-logo-table {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 50%;
    border: 2px solid rgba(178, 155, 53, 0.6);
    background: white;
    padding: 3px;
    flex-shrink: 0;
}

.team-name {
    font-weight: 600;
    color: var(--light-color);
    font-size: 1rem;
}

/* POSICIONES DESTACADAS */
.position-1 td:first-child {
    color: #FFD700;
    font-weight: 900;
}

.position-2 td:first-child {
    color: #C0C0C0;
    font-weight: 800;
}

.position-3 td:first-child {
    color: #CD7F32;
    font-weight: 800;
}

/* DIFERENCIA DE GOLES */
.stats-positive {
    color: #10b981 !important;
    font-weight: 700;
}

.stats-negative {
    color: #ef4444 !important;
    font-weight: 700;
}

/* TOGGLE FUNCTIONALITY */
#clasificacion-container {
    transition: all 0.4s ease;
}

#clasificacion-container.collapsed {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

#clasificacion-container:not(.collapsed) {
    max-height: 2000px;
    opacity: 1;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .table-container {
        padding: 20px 15px;
    }
    
    .table-classification th,
    .table-classification td {
        padding: 15px 8px;
        font-size: 0.85rem;
    }
    
    .team-logo-table {
        width: 35px;
        height: 35px;
    }
    
    .team-info {
        gap: 10px;
    }
    
    .team-name {
        font-size: 0.9rem;
    }
    
    /* OCULTAR COLUMNAS EN MÓVIL */
    .table-classification th:nth-child(5),
    .table-classification td:nth-child(5),
    .table-classification th:nth-child(6),
    .table-classification td:nth-child(6),
    .table-classification th:nth-child(7),
    .table-classification td:nth-child(7) {
        display: none;
    }
}

@media (max-width: 576px) {
    .table-container {
        padding: 15px 10px;
    }
    
    .table-classification th,
    .table-classification td {
        padding: 12px 6px;
        font-size: 0.8rem;
    }
    
    .team-logo-table {
        width: 30px;
        height: 30px;
    }
    
    .team-name {
        font-size: 0.85rem;
    }
    
    .table-classification th:nth-child(1) { width: 12%; }
    .table-classification th:nth-child(2) { width: 55%; }
    .table-classification th:nth-child(3) { width: 15%; }
    .table-classification th:nth-child(4) { width: 18%; }
}

/* ANIMACIONES SIMPLIFICADAS */
.table-classification tbody tr {
    animation: fadeInUp 0.6s ease forwards;
}

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

/* Prevenir zoom y desplazamiento no deseado en móvil */
@media (max-width: 768px) {
    body {
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }
    
    html {
        overflow-x: hidden;
        position: relative;
        height: 100%;
    }
    
    /* Prevenir zoom en inputs */
    input, select, textarea {
        font-size: 16px !important;
    }
    
    /* Prevenir selección de texto accidental */
    * {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
    
    /* Permitir selección en elementos que lo necesiten */
    p, h1, h2, h3, h4, h5, h6, span, a {
        -webkit-user-select: text;
        user-select: text;
    }
}

/* Para iOS específicamente */
@supports (-webkit-touch-callout: none) {
    body {
        -webkit-user-drag: none;
    }
}

/* Mejoras para el navbar en móvil */
@media (max-width: 992px) {
    .navbar-collapse {
        background: linear-gradient(135deg, rgba(0, 0, 0, 0.98) 0%, rgba(178, 155, 53, 0.1) 100%);
        backdrop-filter: blur(15px);
        padding: 20px;
        border-radius: 0 0 15px 15px;
        margin-top: 10px;
    }
    
    .navbar-nav .nav-link {
        text-align: center;
        margin: 5px 0;
        padding: 12px 20px !important;
        border-radius: 10px;
        transition: all 0.3s ease;
    }
    
    .navbar-nav .nav-link:hover {
        background: rgba(214, 33, 36, 0.2);
    }
}

/* Asegurar que el z-index sea correcto */
.navbar {
    z-index: 1030;
}

.navbar-collapse {
    z-index: 1020;
}

