:root {
  --azul:    #1a2d4f;
  --azul2:   #2563a8;
  --acento:  #e8a020;
  --rojo:    #d93030;
  --texto:   #444;
  --gris:    #f4f6f9;
  --borde:   #e0e4ea;
  --blanco:  #ffffff;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Barlow', sans-serif; background: var(--gris); color: #333; font-size: 15px; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ── TOPBAR ── */
.topbar {
  background: var(--azul);
  color: rgba(255,255,255,.65);
  font-size: 12px;
  padding: 5px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.topbar-left { display: flex; gap: 16px; }
.topbar-right { display: flex; gap: 14px; }
.topbar a { color: rgba(255,255,255,.7); transition: color .2s; }
.topbar a:hover { color: var(--acento); }

/* ── HEADER ── */
.header {
  background: var(--blanco);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 4px solid var(--azul2);
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}
.logo-txt { font-family: 'Barlow Condensed', sans-serif; font-size: 28px; font-weight: 800; color: var(--azul); }
.logo-txt span { color: var(--azul2); }
.header-slogan { font-size: 12px; color: var(--texto); font-style: italic; }

/* ── BANNER PORTADA ── */
.portada-banner {
  background-image: url('../img/portada.jpg');
  background-size: cover;
  background-position: center 30%;
  height: 220px;
  position: relative;
}
.portada-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(26,45,79,0.82) 0%, rgba(26,45,79,0.4) 60%, rgba(26,45,79,0.1) 100%);
  display: flex;
  align-items: center;
  padding: 0 32px;
}
.portada-texto { max-width: 500px; }
.portada-titulo {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 38px;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  text-shadow: 0 2px 8px rgba(0,0,0,.4);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.portada-subtitulo {
  font-size: 15px;
  color: rgba(255,255,255,.85);
  margin-top: 8px;
  font-style: italic;
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
}
@media (max-width: 768px) {
  .portada-banner { height: 160px; }
  .portada-titulo { font-size: 26px; }
}

/* ── DEPORTES GRID ── */
.deportes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.deporte-card {
  background: var(--azul);
  border-radius: 10px;
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border: 2px solid transparent;
}
.deporte-card:hover { background: var(--azul2); border-color: var(--acento); transform: translateY(-3px); }
.deporte-nombre { font-family: 'Barlow Condensed', sans-serif; font-size: 18px; font-weight: 800; color: #fff; text-transform: uppercase; }
.deporte-total { font-size: 12px; color: rgba(255,255,255,.7); }

/* ── NAV ── */
.nav {
  background: var(--azul);
  display: flex;
  align-items: center;
  overflow-x: auto;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.nav-item {
  color: rgba(255,255,255,.8);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  padding: 13px 18px;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: all .2s;
}
.nav-item:hover, .nav-item.activo { color: #fff; background: rgba(255,255,255,.1); }
.nav-item.activo { border-bottom: 3px solid var(--acento); }
.nav-dropdown { position: relative; }
.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--blanco);
  min-width: 200px;
  box-shadow: 0 6px 20px rgba(0,0,0,.15);
  z-index: 200;
  border-top: 3px solid var(--azul2);
  border-radius: 0 0 6px 6px;
}
.nav-dropdown:hover .dropdown { display: block; }
.dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--azul);
  font-weight: 600;
  border-bottom: 1px solid var(--borde);
  transition: background .2s;
}
.dropdown a:hover { background: var(--gris); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--azul2); flex-shrink: 0; }

/* ── TICKER ── */
.ticker {
  background: var(--azul2);
  color: #fff;
  display: flex;
  overflow: hidden;
  font-size: 12px;
}
.ticker-label {
  background: var(--acento);
  color: var(--azul);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  padding: 6px 14px;
  white-space: nowrap;
  flex-shrink: 0;
}
.ticker-wrap { overflow: hidden; flex: 1; }
.ticker-track {
  display: flex;
  animation: ticker 35s linear infinite;
  white-space: nowrap;
}
.ticker-item { padding: 6px 24px; color: rgba(255,255,255,.9); }
.ticker-item:hover { color: var(--acento); }
@keyframes ticker { 0% { transform: translateX(0) } 100% { transform: translateX(-50%) } }

/* ── LAYOUT ── */
.wrap {
  max-width: 1140px;
  margin: 24px auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
}
.main { min-width: 0; }
.sidebar { min-width: 0; }
.wrap-full {
  max-width: 1140px;
  margin: 24px auto;
  padding: 0 16px;
}
@media (max-width: 768px) {
  .wrap { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

/* ── CARDS NOTICIAS ── */
.grid-noticias { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.noticia-card {
  background: var(--blanco);
  border-radius: 10px;
  border: 1px solid var(--borde);
  overflow: hidden;
  transition: all .25s;
  display: flex;
  flex-direction: column;
}
.noticia-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.12); transform: translateY(-3px); }
.noticia-img {
  height: 180px;
  background: var(--gris);
  overflow: hidden;
  position: relative;
}
.noticia-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.noticia-card:hover .noticia-img img { transform: scale(1.05); }
.noticia-cat {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--azul2);
  color: #fff;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: .5px;
}
.noticia-cat.fb { background: #1877f2; }
.noticia-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.noticia-titulo {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--azul);
  line-height: 1.25;
  margin-bottom: 8px;
}
.noticia-titulo a:hover { color: var(--azul2); }
.noticia-meta { font-size: 11px; color: var(--texto); margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; }
.noticia-resumen { font-size: 13px; color: var(--texto); line-height: 1.5; margin-bottom: 8px; }

/* ── NOTICIA DESTACADA ── */
.noticia-hero {
  background: var(--blanco);
  border-radius: 10px;
  border: 1px solid var(--borde);
  overflow: hidden;
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 320px;
}
.noticia-hero-img { overflow: hidden; }
.noticia-hero-img img { width: 100%; height: 100%; object-fit: cover; }
.noticia-hero-body { padding: 28px; display: flex; flex-direction: column; justify-content: center; }
.noticia-hero-cat { font-family: 'Barlow Condensed', sans-serif; font-size: 12px; font-weight: 800; color: var(--azul2); text-transform: uppercase; margin-bottom: 10px; }
.noticia-hero-titulo { font-family: 'Barlow Condensed', sans-serif; font-size: 28px; font-weight: 800; color: var(--azul); line-height: 1.2; margin-bottom: 12px; }
.noticia-hero-titulo a:hover { color: var(--azul2); }
.noticia-hero-resumen { font-size: 14px; color: var(--texto); line-height: 1.6; margin-bottom: 16px; }
@media (max-width: 768px) { .noticia-hero { grid-template-columns: 1fr; } }

/* ── SECCIÓN TÍTULO ── */
.sec-titulo {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--azul);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--acento);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sec-titulo a { font-size: 13px; color: var(--azul2); font-weight: 600; text-transform: none; }

/* ── SIDEBAR ── */
.sidebar-box { background: var(--blanco); border-radius: 8px; border: 1px solid var(--borde); overflow: hidden; margin-bottom: 18px; }
.sidebar-titulo { background: var(--azul); color: #fff; font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 14px; text-transform: uppercase; padding: 10px 14px; letter-spacing: .5px; }
.sidebar-item { padding: 10px 14px; border-bottom: 1px solid var(--borde); font-size: 13px; display: flex; gap: 10px; }
.sidebar-item:last-child { border-bottom: none; }
.sidebar-item-img { width: 60px; height: 50px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.sidebar-item-titulo { font-family: 'Barlow Condensed', sans-serif; font-size: 14px; font-weight: 700; color: var(--azul); line-height: 1.3; }
.sidebar-item-fecha { font-size: 11px; color: var(--texto); margin-top: 3px; }
.cat-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--gris);
  border: 1px solid var(--borde);
  font-size: 12px;
  font-weight: 700;
  color: var(--azul);
  margin: 4px;
  transition: all .2s;
}
.cat-badge:hover { background: var(--azul2); color: #fff; border-color: var(--azul2); }

/* ── FILTROS ── */
.filtros-bar {
  background: var(--azul);
  padding: 10px 16px;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.fil-btn {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 4px;
  color: rgba(255,255,255,.8);
  border: 1px solid rgba(255,255,255,.2);
  transition: all .2s;
}
.fil-btn:hover, .fil-btn.activo { background: var(--acento); color: var(--azul); border-color: var(--acento); }

/* ── POST DETALLE ── */
.post-wrap { max-width: 860px; margin: 0 auto; }
.post-header { margin-bottom: 20px; }
.post-cat-label { font-family: 'Barlow Condensed', sans-serif; font-size: 12px; font-weight: 800; color: var(--azul2); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.post-titulo { font-family: 'Barlow Condensed', sans-serif; font-size: 34px; font-weight: 800; color: var(--azul); line-height: 1.2; margin-bottom: 12px; }
.post-meta { font-size: 12px; color: var(--texto); display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.post-img { width: 100%; border-radius: 8px; margin-bottom: 20px; max-height: 480px; object-fit: cover; }
.post-contenido { font-size: 16px; line-height: 1.8; color: #333; }
.post-contenido p { margin-bottom: 16px; }
.post-contenido h2, .post-contenido h3 { font-family: 'Barlow Condensed', sans-serif; color: var(--azul); margin: 20px 0 10px; }

/* ── FORMS ── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--azul); margin-bottom: 5px; }
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--borde);
  border-radius: 6px;
  font-size: 14px;
  font-family: 'Barlow', sans-serif;
  transition: border-color .2s;
}
.form-control:focus { outline: none; border-color: var(--azul2); box-shadow: 0 0 0 3px rgba(37,99,168,.1); }
.btn-primary {
  background: var(--azul2);
  color: #fff;
  padding: 10px 24px;
  border: none;
  border-radius: 6px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}
.btn-primary:hover { background: var(--azul); }
.btn-outline {
  background: transparent;
  color: var(--azul2);
  padding: 9px 20px;
  border: 1px solid var(--azul2);
  border-radius: 6px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
}
.btn-outline:hover { background: var(--azul2); color: #fff; }
.btn-danger { background: var(--rojo); color: #fff; padding: 8px 16px; border: none; border-radius: 6px; font-size: 13px; cursor: pointer; }

/* ── ADMIN ── */
.admin-wrap { max-width: 1100px; margin: 0 auto; padding: 20px 16px; }
.admin-header { background: var(--azul); color: #fff; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; }
.admin-titulo { font-family: 'Barlow Condensed', sans-serif; font-size: 22px; font-weight: 800; }
.admin-card { background: var(--blanco); border-radius: 10px; border: 1px solid var(--borde); padding: 20px; margin-bottom: 16px; }
.admin-card-titulo { font-family: 'Barlow Condensed', sans-serif; font-size: 18px; font-weight: 800; color: var(--azul); margin-bottom: 14px; padding-bottom: 8px; border-bottom: 2px solid var(--borde); }
.admin-nav { background: var(--azul); padding: 0 20px; display: flex; gap: 0; }
.admin-nav a { color: rgba(255,255,255,.75); font-family: 'Barlow Condensed', sans-serif; font-size: 14px; font-weight: 700; text-transform: uppercase; padding: 12px 16px; display: block; transition: all .2s; }
.admin-nav a:hover, .admin-nav a.activo { color: #fff; background: rgba(255,255,255,.1); border-bottom: 3px solid var(--acento); }
table { width: 100%; border-collapse: collapse; }
table th { background: var(--azul); color: #fff; padding: 10px 14px; font-family: 'Barlow Condensed', sans-serif; font-size: 13px; font-weight: 700; text-transform: uppercase; text-align: left; }
table td { padding: 10px 14px; border-bottom: 1px solid var(--borde); font-size: 13px; vertical-align: middle; }
table tbody tr:hover { background: #f8f9ff; }
.badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; display: inline-block; }
.b-publicado { background: #e8f5e9; color: #2e7d32; }
.b-borrador { background: #fff3e0; color: #e65100; }
.b-fb { background: #e3f2fd; color: #1565c0; }

/* ── FOOTER ── */
.footer { background: var(--azul); color: rgba(255,255,255,.7); margin-top: 40px; }
.footer-inner { max-width: 1140px; margin: 0 auto; padding: 32px 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-titulo { font-family: 'Barlow Condensed', sans-serif; font-size: 14px; font-weight: 800; text-transform: uppercase; color: #fff; letter-spacing: .5px; margin-bottom: 4px; }
.footer-col a { font-size: 13px; color: rgba(255,255,255,.65); transition: color .2s; }
.footer-col a:hover { color: var(--acento); }
.social-link { display: flex; align-items: center; gap: 8px; }
.social-ico { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; }
.fb-ico { background: #1877f2; color: #fff; }
.footer-copy { background: rgba(0,0,0,.2); text-align: center; padding: 12px; font-size: 12px; color: rgba(255,255,255,.5); }
@media (max-width: 768px) { .footer-inner { grid-template-columns: 1fr; } }

/* ── PAGINACIÓN ── */
.paginacion { display: flex; gap: 6px; justify-content: center; margin-top: 24px; }
.paginacion a, .paginacion span {
  padding: 8px 14px;
  border-radius: 6px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 15px;
  font-weight: 700;
  border: 1px solid var(--borde);
  background: var(--blanco);
  color: var(--azul);
  transition: all .2s;
}
.paginacion a:hover { background: var(--azul2); color: #fff; border-color: var(--azul2); }
.paginacion span.actual { background: var(--azul2); color: #fff; border-color: var(--azul2); }

/* ── VISITAS ── */
.visitas-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--texto);
  background: var(--gris);
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid var(--borde);
  font-weight: 600;
}
.visitas-badge-card {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: #fff;
  background: rgba(0,0,0,0.5);
  padding: 3px 8px;
  border-radius: 20px;
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-weight: 700;
}
