@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;800&family=Barlow:wght@400;500;600&display=swap');

:root {
  --azul-oscuro: #1a2d4f;
  --azul-medio:  #2563a8;
  --azul-claro:  #3b82c4;
  --acento:      #e8a020;
  --rojo:        #d93030;
  --gris-claro:  #f0f4f8;
  --gris-borde:  #dde5ee;
  --gris-texto:  #5a6b7d;
  --blanco:      #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Barlow', sans-serif; background: var(--gris-claro); color: #222; }
a { text-decoration: none; color: inherit; }

/* ===== TOP BAR ===== */
.topbar { background: var(--azul-oscuro); color: rgba(255,255,255,0.65); font-size: 11px; padding: 5px 24px; display: flex; justify-content: space-between; }
.topbar-right { display: flex; gap: 16px; }
.topbar-right a { color: rgba(255,255,255,0.65); font-size: 11px; }
.topbar-right a:hover { color: var(--acento); }

/* ===== HEADER ===== */
.header { background: var(--azul-oscuro); padding: 12px 24px; display: flex; justify-content: space-between; align-items: center; border-bottom: 3px solid var(--acento); }
.btn-login { background: var(--acento); color: var(--azul-oscuro); font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 13px; padding: 8px 18px; border: none; border-radius: 4px; cursor: pointer; letter-spacing: 0.5px; text-transform: uppercase; }
.btn-login:hover { background: #f5b830; }

/* ===== NAV ===== */
.nav { background: var(--azul-medio); padding: 0 24px; display: flex; align-items: stretch; }
.nav-item { color: white; font-family: 'Barlow Condensed', sans-serif; font-size: 14px; font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase; padding: 12px 16px; cursor: pointer; border-bottom: 3px solid transparent; display: flex; align-items: center; gap: 5px; position: relative; }
.nav-item:hover, .nav-item.active { border-bottom-color: var(--acento); background: rgba(0,0,0,0.15); color: var(--acento); }
.arrow { font-size: 9px; opacity: 0.7; }
.dropdown-parent:hover .dropdown { display: block; }
.dropdown { display: none; position: absolute; top: 100%; left: 0; background: var(--azul-oscuro); min-width: 210px; z-index: 999; border-top: 2px solid var(--acento); }
.dropdown a { display: flex; align-items: center; gap: 8px; padding: 10px 16px; color: rgba(255,255,255,0.85); font-size: 13px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.dropdown a:hover { background: var(--azul-medio); color: white; }
.sport-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--acento); flex-shrink: 0; }

/* ===== TICKER ===== */
.ticker { background: var(--rojo); display: flex; align-items: center; overflow: hidden; }
.ticker-label { background: var(--azul-oscuro); color: white; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 11px; padding: 7px 14px; letter-spacing: 1px; white-space: nowrap; flex-shrink: 0; }
.ticker-overflow { overflow: hidden; flex: 1; }
.ticker-track { display: flex; gap: 40px; animation: ticker 28s linear infinite; padding: 7px 20px; }
.ticker-track span { color: white; font-size: 12px; white-space: nowrap; }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ===== LAYOUT PRINCIPAL ===== */
.contenedor { max-width: 1100px; margin: 24px auto; padding: 0 16px; display: grid; grid-template-columns: 1fr 290px; gap: 22px; }
.contenido-principal { }
.sidebar { display: flex; flex-direction: column; gap: 18px; }

/* ===== HERO ===== */
.hero-post { border-radius: 8px; overflow: hidden; background: var(--azul-oscuro); position: relative; min-height: 360px; display: flex; flex-direction: column; justify-content: flex-end; }
.hero-img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.hero-placeholder { position: absolute; inset: 0; background: linear-gradient(135deg, var(--azul-oscuro), var(--azul-medio)); }
.hero-overlay { position: relative; background: linear-gradient(transparent, rgba(10,18,32,0.97)); padding: 22px; }
.hero-cat { background: var(--rojo); color: white; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; padding: 3px 10px; border-radius: 3px; display: inline-block; margin-bottom: 8px; }
.hero-titulo { font-family: 'Barlow Condensed', sans-serif; font-size: 26px; font-weight: 800; color: white; line-height: 1.2; margin-bottom: 8px; }
.hero-meta { font-size: 11px; color: rgba(255,255,255,0.5); display: flex; gap: 14px; }
.hero-titulo a { color: white; }
.hero-titulo a:hover { color: var(--acento); }

/* ===== GRID NOTICIAS ===== */
.grid-noticias { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.noticia-card { background: white; border-radius: 6px; overflow: hidden; border: 1px solid var(--gris-borde); transition: transform 0.2s; }
.noticia-card:hover { transform: translateY(-2px); }
.noticia-card-img { height: 120px; background: linear-gradient(135deg, var(--azul-medio), var(--azul-oscuro)); overflow: hidden; }
.noticia-card-img img { width: 100%; height: 100%; object-fit: cover; }
.noticia-card-body { padding: 12px; }
.noticia-card-cat { font-size: 10px; font-weight: 700; color: var(--azul-medio); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.noticia-card-titulo { font-family: 'Barlow Condensed', sans-serif; font-size: 15px; font-weight: 700; color: var(--azul-oscuro); line-height: 1.3; }
.noticia-card-titulo a { color: var(--azul-oscuro); }
.noticia-card-titulo a:hover { color: var(--azul-medio); }
.noticia-card-fecha { font-size: 10px; color: var(--gris-texto); margin-top: 6px; }

/* ===== SIDEBAR WIDGETS ===== */
.widget { background: white; border-radius: 8px; overflow: hidden; border: 1px solid var(--gris-borde); }
.widget-header { background: var(--azul-oscuro); color: white; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; padding: 10px 14px; border-left: 4px solid var(--acento); }
.widget-body { padding: 12px; }

.deporte-link { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--gris-claro); cursor: pointer; }
.deporte-link:last-child { border-bottom: none; }
.deporte-icon { width: 34px; height: 34px; border-radius: 6px; background: var(--gris-claro); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.deporte-nombre { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 14px; color: var(--azul-oscuro); text-transform: uppercase; }
.deporte-count { margin-left: auto; font-size: 11px; color: var(--gris-texto); background: var(--gris-claro); padding: 2px 8px; border-radius: 10px; }

.comp-item { padding: 9px 0; border-bottom: 1px solid var(--gris-claro); }
.comp-item:last-child { border-bottom: none; }
.comp-nombre { font-size: 13px; font-weight: 600; color: var(--azul-oscuro); }
.comp-deporte { font-size: 11px; color: var(--gris-texto); }
.badge { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px; margin-top: 3px; }
.badge-activa { background: #e8f5e9; color: #2e7d32; }
.badge-proxima { background: #fff3e0; color: #e65100; }
.badge-finalizada { background: #f3e5f5; color: #6a1b9a; }

/* ===== POST COMPLETO ===== */
.post-contenido { background: white; border-radius: 8px; padding: 28px; border: 1px solid var(--gris-borde); }
.post-contenido h1 { font-family: 'Barlow Condensed', sans-serif; font-size: 32px; font-weight: 800; color: var(--azul-oscuro); line-height: 1.2; margin-bottom: 12px; }
.post-img-principal { width: 100%; max-height: 400px; object-fit: cover; border-radius: 6px; margin: 16px 0; }
.post-texto { font-size: 16px; line-height: 1.8; color: #333; }
.post-texto p { margin-bottom: 16px; }

/* ===== FORMULARIOS ADMIN ===== */
.admin-form { background: white; border-radius: 8px; padding: 28px; border: 1px solid var(--gris-borde); max-width: 800px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: 13px; color: var(--azul-oscuro); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 10px 14px; border: 1px solid var(--gris-borde); border-radius: 5px; font-size: 14px; font-family: 'Barlow', sans-serif; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: var(--azul-medio); }
.form-group textarea { min-height: 180px; resize: vertical; }
.btn-primary { background: var(--azul-medio); color: white; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 14px; padding: 10px 24px; border: none; border-radius: 5px; cursor: pointer; text-transform: uppercase; letter-spacing: 0.5px; }
.btn-primary:hover { background: var(--azul-oscuro); }
.btn-danger { background: var(--rojo); color: white; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 13px; padding: 7px 16px; border: none; border-radius: 4px; cursor: pointer; }
.btn-secondary { background: var(--gris-claro); color: var(--azul-oscuro); font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 13px; padding: 7px 16px; border: 1px solid var(--gris-borde); border-radius: 4px; cursor: pointer; }

/* ===== ADMIN PANEL ===== */
.admin-wrapper { display: flex; min-height: 100vh; }
.admin-sidebar { width: 220px; background: var(--azul-oscuro); flex-shrink: 0; }
.admin-sidebar-header { padding: 20px 16px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.admin-sidebar-header span { font-family: 'Barlow Condensed', sans-serif; font-size: 16px; font-weight: 700; color: white; }
.admin-menu a { display: block; padding: 12px 20px; color: rgba(255,255,255,0.75); font-size: 13px; font-weight: 500; border-left: 3px solid transparent; }
.admin-menu a:hover, .admin-menu a.active { background: rgba(255,255,255,0.07); color: white; border-left-color: var(--acento); }
.admin-main { flex: 1; padding: 28px; background: var(--gris-claro); }
.admin-titulo { font-family: 'Barlow Condensed', sans-serif; font-size: 26px; font-weight: 800; color: var(--azul-oscuro); margin-bottom: 22px; }
.tabla-admin { width: 100%; background: white; border-radius: 8px; overflow: hidden; border: 1px solid var(--gris-borde); border-collapse: collapse; }
.tabla-admin th { background: var(--azul-oscuro); color: white; padding: 10px 14px; font-size: 12px; text-align: left; font-weight: 600; letter-spacing: 0.5px; }
.tabla-admin td { padding: 10px 14px; font-size: 13px; border-bottom: 1px solid var(--gris-claro); }
.tabla-admin tr:hover td { background: var(--gris-claro); }
.alerta { padding: 10px 16px; border-radius: 5px; font-size: 13px; margin-bottom: 16px; }
.alerta-ok { background: #e8f5e9; color: #2e7d32; border-left: 4px solid #2e7d32; }
.alerta-error { background: #fce4ec; color: #c62828; border-left: 4px solid #c62828; }

/* ===== CONTACTO ===== */
.contacto-wrap { max-width: 600px; margin: 30px auto; }

/* ===== FOOTER ===== */
.footer { background: var(--azul-oscuro); color: rgba(255,255,255,0.5); padding: 20px; text-align: center; margin-top: 40px; }
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-logo { font-family: 'Barlow Condensed', sans-serif; font-size: 20px; font-weight: 800; color: white; margin-bottom: 6px; }
.footer-logo span { color: var(--acento); }
.footer p { font-size: 12px; margin-bottom: 10px; }
.footer-links { display: flex; justify-content: center; gap: 20px; }
.footer-links a { color: rgba(255,255,255,0.5); font-size: 12px; }
.footer-links a:hover { color: var(--acento); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .contenedor { grid-template-columns: 1fr; }
  .grid-noticias { grid-template-columns: 1fr; }
  .nav { flex-wrap: wrap; }
  .admin-wrapper { flex-direction: column; }
  .admin-sidebar { width: 100%; }
}
