/* Reset y estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #0a0a23;
    color: #ffffff;
    line-height: 1.6;
}

header {
    background-color: #1a1a3e;
    padding: 1rem 2rem;
    border-bottom: 2px solid #f0c040;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    width: 60px;
    height: auto;
    border-radius: 50%;
    border: 2px solid #f0c040;
}

.team-name {
    font-size: 1.8rem;
    font-weight: bold;
    color: #f0c040;
    letter-spacing: 1px;
}

nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.nav-menu li a:hover {
    color: #f0c040;
}

.hamburger {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    color: #ffffff;
}

/* Secciones */
.section {
    display: none;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section.active {
    display: block;
}

h2 {
    color: #f0c040;
    margin-bottom: 1rem;
    border-bottom: 2px solid #f0c040;
    padding-bottom: 0.5rem;
}

/* Inicio */
.banner {
    position: relative;
    width: 100%;
    height: 400px;
    background: #1a1a3e;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.equipo-foto {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.95;
}

.banner-text {
    text-align: center;
    color: white;
    width: min(720px, 92%);
    margin: 0 auto 2rem;
    padding: 1.25rem 1.5rem;
    border-radius: 18px;
    background: rgba(10, 10, 35, 0.82);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(240, 192, 64, 0.55);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.banner-chip {
    display: inline-block;
    background: linear-gradient(135deg, #f0c040, #ffda77);
    color: #0a0a23;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    margin-bottom: 0.8rem;
    box-shadow: 0 0 15px rgba(240, 192, 64, 0.35);
    animation: pulseChip 2.2s infinite;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.banner-chip:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 0 22px rgba(240, 192, 64, 0.65);
}

.banner-text h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff7d8, #f0c040, #ffd56e);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.banner-text p {
    font-size: 1.35rem;
    font-weight: 600;
    color: #ffffff;
}

@keyframes pulseChip {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(240, 192, 64, 0.32);
    }
    50% {
        transform: scale(1.04);
        box-shadow: 0 0 20px rgba(240, 192, 64, 0.6);
    }
}

.patrocinadores {
    background: #1a1a3e;
    padding: 1.5rem;
    border-radius: 10px;
}

.patrocinadores-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
    justify-content: center;
}

.patrocinador-destacado {
    margin-top: 1rem;
    background: linear-gradient(135deg, rgba(18, 18, 48, 0.95), rgba(34, 34, 78, 0.95));
    border: 1px solid rgba(240, 192, 64, 0.55);
    border-radius: 14px;
    padding: 1.2rem;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.patrocinador-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f0c040, #ffd97a);
    color: #0a0a23;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    margin-bottom: 0.75rem;
}

.patrocinador-info h3 {
    color: #f0c040;
    margin-bottom: 0.5rem;
}

.patrocinador-info p {
    color: #e8e8e8;
    margin-bottom: 0.9rem;
}

.patrocinador-subtitulo {
    font-size: 0.98rem;
    color: #f7f7f7;
}

.patrocinador-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0c040, #ffd978);
    color: #0a0a23;
    text-decoration: none;
    font-weight: 800;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(240, 192, 64, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.patrocinador-link:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 24px rgba(240, 192, 64, 0.48);
}

.horarios-imagen,
.datos-imagen {
    margin: 0 auto 1.5rem;
    overflow: hidden;
    border-radius: 10px;
    background: #111233;
    width: 100%;
    max-width: 860px;
}

.horarios-imagen img,
.datos-imagen img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

#patrocinadores-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
}

.patrocinador-placeholder {
    width: 150px;
    height: 100px;
    background: #2a2a4e;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #f0c040;
    border-radius: 8px;
    color: #888;
}

.patrocinador-item {
    width: 150px;
    height: 100px;
    object-fit: contain;
    border-radius: 8px;
    background: white;
    padding: 5px;
}

/* Tienda */
.tienda-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.producto-card {
    background: #1a1a3e;
    border: 1px solid rgba(240, 192, 64, 0.45);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.producto-imagen {
    background: #111233;
    padding: 1rem;
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.producto-placeholder {
    width: 100%;
    max-width: 250px;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 2px dashed rgba(240, 192, 64, 0.6);
    border-radius: 12px;
    color: #cfcfcf;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.03);
}

.producto-img {
    width: 100%;
    max-width: 260px;
    height: 100%;
    max-height: 320px;
    object-fit: contain;
    display: block;
    border-radius: 10px;
}

.producto-info {
    padding: 1rem;
}

.producto-info h3 {
    color: #f0c040;
    margin-bottom: 0.6rem;
}

.producto-info p {
    color: #e6e6e6;
    margin-bottom: 1rem;
}

.producto-acciones {
    display: flex;
    justify-content: flex-start;
}

.btn-comprar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0c040, #ffd978);
    color: #0a0a23;
    text-decoration: none;
    font-weight: 800;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 8px 20px rgba(240, 192, 64, 0.28);
}

.btn-comprar:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 24px rgba(240, 192, 64, 0.48);
}

/* Formulario jugador */
.form-jugador {
    background: #1a1a3e;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.form-jugador input, .form-jugador button {
    padding: 0.8rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
}

.form-jugador input[type="text"], 
.form-jugador input[type="number"] {
    flex: 1 1 150px;
    background: #2a2a4e;
    color: white;
    border: 1px solid #444;
}

.form-jugador input[type="file"] {
    background: transparent;
    color: white;
}

.form-jugador button {
    background: #f0c040;
    color: #0a0a23;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.form-jugador button:hover {
    background: #e0b030;
}

/* Role selection modal */
.role-selection {
    position: fixed;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
}

body.role-locked {
    overflow: hidden;
}

.role-card {
    background: #111233;
    border: 2px solid #f0c040;
    padding: 2rem;
    border-radius: 12px;
    width: min(480px, 90%);
    text-align: center;
}

.role-card h2 {
    margin-bottom: 1rem;
    color: #f0c040;
}

.role-card p {
    margin-bottom: 1.5rem;
    color: #ddd;
}

.role-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.role-button {
    padding: 0.9rem 1.4rem;
    border: none;
    border-radius: 8px;
    background: #f0c040;
    color: #0a0a23;
    font-weight: bold;
    cursor: pointer;
}

.role-button.secondary {
    background: #2a2a4e;
    color: #fff;
}

.role-button:hover {
    opacity: 0.9;
}

.admin-button {
    display: none;
    margin-top: 1rem;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 8px;
    background: #f0c040;
    color: #0a0a23;
    font-weight: bold;
    cursor: pointer;
}

.admin-button:hover {
    background: #e0b030;
}

.admin-only {
    display: none;
}

.patrocinador-item-wrapper {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem;
}

.patrocinador-item {
    max-width: 150px;
    max-height: 100px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #444;
    background: #fff;
}

.jugadores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 2rem;
}

.jugador-card {
    background: #1a1a3e;
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    padding-bottom: 1rem;
    border: 1px solid #f0c040;
    min-height: 380px;
}

.jugador-card img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    background: #2a2a4e;
}

.jugador-card .nombre {
    font-weight: bold;
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

.jugador-card .dorsal {
    background: #f0c040;
    color: #0a0a23;
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    margin: 0.3rem 0;
}

.jugador-card .posicion {
    color: #aaa;
}

/* Editable content */
.editable-content {
    background: #1a1a3e;
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px dashed #f0c040;
    min-height: 200px;
}

.section-description {
    color: #d2d2d2;
    margin: 0.75rem 0 1.5rem;
    line-height: 1.5;
    max-width: 900px;
}

.ubicacion-cancha {
    background: linear-gradient(135deg, rgba(26, 26, 62, 0.95), rgba(37, 37, 86, 0.9));
    border: 1px solid rgba(240, 192, 64, 0.65);
    border-radius: 14px;
    padding: 1rem 1.2rem;
    margin: 0 0 1.25rem;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.ubicacion-cancha p {
    color: #f0f0f0;
}

.ubicacion-cancha a,
.noticia-location a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #0a0a23;
    background: linear-gradient(135deg, #f0c040, #ffdd7b);
    text-decoration: none;
    font-weight: 800;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    box-shadow: 0 6px 16px rgba(240, 192, 64, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ubicacion-cancha a:hover,
.noticia-location a:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 22px rgba(240, 192, 64, 0.45);
}

.noticias-list {
    display: grid;
    gap: 1rem;
}

.noticia-item {
    background: #1a1a3e;
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid #333;
}

.noticia-carrusel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow: hidden;
}

.noticia-carrusel-header {
    text-align: center;
}

.noticia-carrusel-header h3 {
    color: #f0c040;
    margin: 0.7rem 0 0.4rem;
    font-size: 1.35rem;
}

.noticia-carrusel-header p {
    color: #e4e4e4;
    margin: 0;
}

.carrusel-viewport {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(135deg, #111233, #262751);
    border: 1px solid rgba(240, 192, 64, 0.35);
    max-width: 760px;
    margin: 0 auto;
    width: 100%;
}

.carrusel-track {
    display: flex;
    transition: transform 0.45s ease;
}

.carrusel-slide {
    position: relative;
    min-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.6rem;
}

.carrusel-slide img {
    width: 100%;
    max-height: 320px;
    object-fit: contain;
    border-radius: 12px;
    display: block;
    background: #ffffff;
}

.carrusel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: rgba(10, 10, 35, 0.75);
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s ease, transform 0.2s ease;
}

.carrusel-btn:hover {
    background: rgba(240, 192, 64, 0.95);
    color: #0a0a23;
    transform: translateY(-50%) scale(1.05);
}

.carrusel-btn.prev {
    left: 0.8rem;
}

.carrusel-btn.next {
    right: 0.8rem;
}

.carrusel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.carrusel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.carrusel-dot.active {
    background: #f0c040;
    transform: scale(1.15);
}

.noticia-imagen {
    width: 100%;
    min-height: 220px;
    background: linear-gradient(135deg, #111233, #262751);
    border-radius: 10px;
    padding: 0.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.countdown-block {
    margin-top: 1rem;
    padding: 0.7rem 0.9rem;
    background: rgba(10, 10, 35, 0.88);
    border: 1px solid rgba(240, 192, 64, 0.25);
    border-radius: 12px;
}

.countdown-title,
.countdown-subtitle {
    color: #f0c040;
    font-weight: 700;
    font-size: 0.85rem;
    line-height: 1.25;
}

.countdown-timer {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    margin-top: 0.2rem;
}

.noticia-imagen img {
    width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: contain;
    border-radius: 10px;
    display: block;
    background: #ffffff;
}

.noticia-imagen-full img {
    max-height: none;
    height: auto;
    object-fit: cover;
}

.noticia-galeria {
    display: grid;
    grid-template-columns: 1.1fr 1fr 0.9fr;
    gap: 1rem;
    align-items: center;
}

.noticia-galeria-imagenes {
    display: flex;
    align-items: center;
    justify-content: center;
}

.noticia-galeria-imagenes img {
    width: 100%;
    height: auto;
    max-height: 360px;
    object-fit: contain;
    border-radius: 10px;
    background: #ffffff;
}

.noticia-card-compact {
    display: grid;
    grid-template-columns: minmax(180px, 240px) 1fr;
    gap: 1rem;
    align-items: center;
}

.noticia-card-media {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem;
    background: linear-gradient(135deg, #111233, #262751);
    border-radius: 12px;
    min-height: 180px;
}

.noticia-card-media img {
    width: 100%;
    height: 100%;
    max-height: 220px;
    object-fit: contain;
    border-radius: 10px;
    display: block;
    background: #ffffff;
}

.noticia-card-content h3 {
    color: #f0c040;
    margin-bottom: 0.45rem;
}

.noticia-card-content p {
    color: #e6e6e6;
    margin: 0;
}

    @media (max-width: 768px) {
        .noticia-galeria {
            grid-template-columns: 1fr;
        }

        .noticia-galeria-imagenes,
        .noticia-imagen {
            width: 100%;
        }

        .noticia-imagen,
        .noticia-galeria-imagenes {
            min-height: 220px;
        }

        .noticia-imagen img {
            width: 100%;
            height: auto;
            max-height: none;
        }

        .noticia-imagen-full img {
            max-height: none;
            width: 100%;
            height: auto;
            object-fit: contain;
        }

        .noticia-galeria-imagenes img {
            max-height: 260px;
        }

        .noticia-card-compact {
            grid-template-columns: 1fr;
        }

        .noticia-card-media {
            min-height: 160px;
        }

        .noticia-card-media img {
            max-height: 190px;
        }
    }
.noticia-location a {
    margin-top: 0.2rem;
}


.editable-content ul, .editable-content table {
    margin: 1rem 0;
}

.editable-content table {
    width: 100%;
    border-collapse: collapse;
}

.editable-content th, .editable-content td {
    padding: 0.5rem;
    border: 1px solid #444;
    text-align: left;
}

.editable-content th {
    background: #f0c040;
    color: #0a0a23;
}

/* Footer */
footer {
    background: #1a1a3e;
    text-align: center;
    padding: 1rem;
    border-top: 2px solid #f0c040;
    margin-top: 2rem;
}

.social-links {
    margin-top: 0.75rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-links a {
    color: #ffffff;
    text-decoration: none;
    padding: 0.55rem 0.9rem;
    background: #0a0a23;
    border: 1px solid #f0c040;
    border-radius: 8px;
    transition: background 0.3s, color 0.3s;
}

.social-links a:hover {
    background: #f0c040;
    color: #0a0a23;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        padding: 0.75rem 1rem;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        background: #1a1a3e;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        padding: 1rem 0;
        border-bottom: 2px solid #f0c040;
        z-index: 1500;
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
        padding: 0.75rem 0;
    }

    .nav-menu li a {
        font-size: 1rem;
    }

    .hamburger {
        display: block;
    }

    .header-container {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .logo-container {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .logo-container .team-name {
        font-size: 1.4rem;
    }

    .banner {
        height: 320px;
    }

    .banner-text {
        width: 100%;
        padding: 1rem;
    }

    .banner-text h1 {
        font-size: 2.2rem;
    }

    .banner-text p {
        font-size: 1.1rem;
    }

    .patrocinadores {
        padding: 1rem;
    }

    #patrocinadores-container {
        flex-direction: column;
        align-items: center;
    }

    .patrocinador-item-wrapper {
        width: 100%;
        justify-content: center;
    }

    .patrocinador-item {
        max-width: 100%;
        height: auto;
    }

    .form-jugador {
        flex-direction: column;
        align-items: stretch;
    }

    .form-jugador input[type="text"],
    .form-jugador input[type="number"],
    .form-jugador input[type="file"],
    .form-jugador button,
    .admin-button {
        width: 100%;
    }

    .form-jugador input[type="text"],
    .form-jugador input[type="number"] {
        flex: 1 1 auto;
    }

    #lista-jugadores {
        display: block;
        width: 100%;
    }

    .jugadores-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .jugador-card {
        min-height: auto;
        margin-bottom: 1.5rem;
        border-radius: 12px;
    }

    .jugador-card img {
        width: 100%;
        height: auto;
        min-height: 260px;
    }

    .logo {
        width: 50px;
    }

    .team-name {
        font-size: 1.3rem;
    }

    .admin-button {
        width: 100%;
    }

    .role-card {
        width: 100%;
        margin: 1rem;
    }

    .section {
        padding: 1rem;
    }

    .noticia-destacada {
        grid-template-columns: 1fr;
    }

    .noticia-imagen img {
        max-height: 240px;
    }

    .carrusel-slide img {
        max-height: 220px;
    }

    .carrusel-caption {
        left: 0.7rem;
        right: 0.7rem;
        bottom: 0.7rem;
        border-radius: 12px;
    }

    .horarios-imagen,
    .datos-imagen {
        max-width: 100%;
        width: 100%;
    }
}