* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Arial, sans-serif; }
body { background-color: #f4f6f9; color: #333; }

/* HEADER */
header { background: #0b192c; color: white; padding: 12px 8%; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 1000; }
.logo-container { display: flex; align-items: center; gap: 12px; }
.logo-img { width: 40px; height: 40px; background: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #0b192c; font-weight: bold; }
nav { display: flex; gap: 20px; align-items: center; }
nav a { color: #dcdcdc; text-decoration: none; font-size: 0.9rem; font-weight: 500; }
nav a:hover, nav a.active { color: #0084ff; }
.social-header { display: flex; gap: 12px; font-size: 1rem; color: #fff; }

/* HERO SECTION - CARRUSEL */
.hero { position: relative; height: 480px; color: white; display: flex; align-items: center; padding: 0 8%; overflow: hidden; }

/* Slides del carrusel (imágenes de fondo) */
.hero-slides { position: absolute; inset: 0; z-index: 0; }
.hero-slide { position: absolute; inset: 0; background-size: cover; background-position: center; background-repeat: no-repeat; opacity: 0; transition: opacity 1s ease-in-out; }
.hero-slide.active { opacity: 1; z-index: 1; }
/* Slide de fallback cuando no hay imágenes en BD */
.hero-slide-fallback { background-image: linear-gradient(to right, rgba(11,25,44,0.85) 40%, rgba(11,25,44,0.3)), url('https://picsum.photos/1400/600'); }

/* Overlay semitransparente sobre las imágenes */
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to right, rgba(11,25,44,0.78) 35%, rgba(11,25,44,0.35) 100%); z-index: 1; }

/* Controles del carrusel */
.hero-controls { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 3; }
.hero-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.45); border: 2px solid rgba(255,255,255,0.7); cursor: pointer; transition: background 0.3s, transform 0.3s; }
.hero-dot.active { background: #0084ff; transform: scale(1.3); border-color: #0084ff; }
.hero-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; background: rgba(255,255,255,0.15); border: none; color: white; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; display: flex; align-items: center; justify-content: center; transition: background 0.3s; backdrop-filter: blur(4px); user-select: none; }
.hero-arrow:hover { background: rgba(0,132,255,0.7); }
.hero-arrow-prev { left: 15px; }
.hero-arrow-next { right: 15px; }
.hero-content { max-width: 550px; position: relative; z-index: 2; }
.hero-tag { font-size: 0.8rem; letter-spacing: 2px; text-transform: uppercase; color: #a0aec0; margin-bottom: 10px; font-weight: 600; }
.hero h1 { font-size: 2.8rem; font-weight: 800; line-height: 1.1; margin-bottom: 15px; }
.hero h1 span { color: #0084ff; }
.hero p { font-size: 0.95rem; color: #d0dbe5; margin-bottom: 25px; line-height: 1.5; }
.btn-primary { background: #0084ff; color: white; border: none; padding: 12px 24px; border-radius: 6px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; }

/* PILARES */
.features-bar { background: white; margin: -30px 8% 40px; border-radius: 10px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); display: grid; grid-template-columns: repeat(5, 1fr); padding: 20px 10px; position: relative; z-index: 10; }
.feature-item { display: flex; align-items: center; gap: 12px; padding: 0 15px; border-right: 1px solid #eee; }
.feature-item:last-child { border-right: none; }
.feature-icon { font-size: 1.5rem; color: #0084ff; }
.feature-text h5 { font-size: 0.9rem; color: #0b192c; }
.feature-text p { font-size: 0.75rem; color: #777; }

/* MAIN GRID 3 COLUMNAS */
.main-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 25px; padding: 0 8%; margin-bottom: 40px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.section-title { font-size: 1.3rem; color: #0b192c; font-weight: 700; }
.link-more { color: #0084ff; font-size: 0.8rem; text-decoration: none; font-weight: 600; }

/* COLUMNA NOTICIAS */
.news-card { display: flex; gap: 12px; margin-bottom: 15px; background: white; padding: 12px; border-radius: 8px; box-shadow: 0 2px 6px rgba(0,0,0,0.03); }
.media-box { width: 110px; height: 85px; border-radius: 6px; overflow: hidden; background: #000; flex-shrink: 0; cursor: pointer; position: relative; }
.media-box img, .media-box video { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-info .date { font-size: 0.7rem; color: #999; font-weight: 600; text-transform: uppercase; }
.news-info h4 { font-size: 0.85rem; color: #0b192c; margin: 2px 0 4px; line-height: 1.2; }
.news-info p { font-size: 0.75rem; color: #666; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* COLUMNA PARTIDOS */
.match-card { background: white; border-radius: 8px; overflow: hidden; margin-bottom: 15px; box-shadow: 0 2px 6px rgba(0,0,0,0.03); border: 1px solid #eaeaea; }
.match-header { background: #0084ff; color: white; font-size: 0.75rem; font-weight: 600; text-align: center; padding: 6px; }
.match-body { padding: 15px; display: flex; justify-content: space-around; align-items: center; }
.team { text-align: center; font-size: 0.8rem; font-weight: 700; color: #0b192c; }
.team-icon { width: 35px; height: 35px; background: #f0f4f8; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 5px; color: #0084ff; }
.vs { font-size: 0.75rem; font-weight: 700; color: #aaa; }
.match-footer { text-align: center; font-size: 0.75rem; color: #666; border-top: 1px dashed #eee; padding: 8px; background: #fafafa; }

/* COLUMNA CATEGORIAS */
.cat-item { display: flex; align-items: center; justify-content: space-between; background: white; padding: 10px 12px; border-radius: 8px; margin-bottom: 10px; box-shadow: 0 2px 6px rgba(0,0,0,0.03); text-decoration: none; color: inherit; }
.cat-left { display: flex; align-items: center; gap: 12px; }
.cat-img { width: 45px; height: 45px; border-radius: 6px; background: #0084ff; color: white; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.cat-title { font-size: 0.85rem; font-weight: 700; color: #0b192c; }
.cat-sub { font-size: 0.7rem; color: #888; }
.cat-arrow { color: #0084ff; font-size: 0.9rem; }
.category-group { margin-bottom: 14px; }
.category-players { background: #fff; border-radius: 8px; padding: 12px; margin-top: -5px; box-shadow: 0 2px 6px rgba(0,0,0,0.03); }
.category-player { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #eee; }
.category-player:last-child { border-bottom: 0; }
.category-player img, .player-placeholder { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: #eef4fa; color: #0084ff; display: flex; align-items: center; justify-content: center; flex: 0 0 38px; }
.category-player-name { font-size: .82rem; font-weight: 700; color: #0b192c; }
.category-player-position { font-size: .72rem; color: #888; }
.category-count { color: #888; font-size: .7rem; }

/* SECCION SECUNDARIA */
.secondary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; padding: 0 8%; margin-bottom: 40px; }
.about-card { background: white; padding: 25px; border-radius: 8px; box-shadow: 0 2px 6px rgba(0,0,0,0.03); }
.about-card p { font-size: 0.85rem; color: #555; line-height: 1.6; margin-bottom: 15px; }

.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gallery-grid img { width: 100%; height: 85px; object-fit: cover; border-radius: 6px; }

/* MODAL / VISOR DE IMAGENES Y VIDEOS EN GRANDE */
.modal-visor { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.9); justify-content: center; align-items: center; }
.modal-visor-content { max-width: 90%; max-height: 85vh; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.5); }
.modal-close { position: absolute; top: 20px; right: 35px; color: #fff; font-size: 40px; font-weight: bold; cursor: pointer; }

/* FOOTER / CTA */
.cta-banner { background: #0084ff; color: white; padding: 25px 8%; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; }
footer { background: #0b192c; color: #a0aec0; padding: 40px 8% 20px; font-size: 0.85rem; }
.footer-cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 30px; }
.footer-cols h5 { color: white; margin-bottom: 12px; font-size: 0.95rem; }
.footer-bottom { border-top: 1px solid #1e2d42; padding-top: 20px; display: flex; justify-content: space-between; font-size: 0.75rem; flex-wrap: wrap; gap: 10px; }

/* RESPONSIVE */
@media (max-width: 992px) {
    .features-bar { grid-template-columns: repeat(3, 1fr); gap: 15px; padding: 20px; }
    .feature-item { border-right: none; padding: 10px 0; }
    .main-grid { grid-template-columns: 1fr 1fr; }
    .secondary-grid { grid-template-columns: 1fr; }
    .footer-cols { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    header { flex-direction: column; gap: 15px; padding: 15px 5%; }
    nav { flex-wrap: wrap; justify-content: center; }
    .hero { height: auto; min-height: 380px; padding: 60px 5%; text-align: center; }
    .hero-content { margin: 0 auto; }
    .hero-arrow { display: none; }
    .features-bar { grid-template-columns: 1fr; margin-top: 20px; margin-left: 5%; margin-right: 5%; }
    .main-grid { grid-template-columns: 1fr; padding: 0 5%; }
    .secondary-grid { padding: 0 5%; }
    .cta-banner { padding: 25px 5%; text-align: center; justify-content: center; }
    footer { padding: 40px 5% 20px; }
    .footer-cols { grid-template-columns: 1fr; text-align: center; }
}
