/*
Theme Name: Táctica del Fanático
Theme URI: https://tacticadelfanatico.com
Author: Táctica del Fanático
Author URI: https://tacticadelfanatico.com
Description: Tema deportivo para análisis de fútbol y béisbol. Diseño moderno con soporte para artículos, resultados en vivo y tablas de posiciones.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tactica-del-fanatico
Tags: sports, blog, custom-colors, custom-logo, custom-menu, featured-images, responsive-layout, rtl-language-support
*/

/* ================================================
   TÁCTICA DEL FANÁTICO — WordPress Theme
   ================================================ */

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

/* ------------------------------------------------
   CSS Variables & Reset
   ------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:       #E8002D;
  --primary-dark:  #C4001E;
  --secondary:     #0A0A0A;
  --football:      #00A651;
  --football-bg:   #E6F7EF;
  --baseball:      #1E56A0;
  --baseball-bg:   #E8F0FB;
  --live:          #FF4444;

  --bg:            #F4F5F7;
  --bg-card:       #FFFFFF;
  --bg-header:     #0A0A0A;
  --text-1:        #0D0D0D;
  --text-2:        #374151;
  --text-3:        #6B7280;
  --text-4:        #9CA3AF;
  --border:        #E5E7EB;
  --border-light:  #F3F4F6;

  --shadow-sm:  0 1px 2px rgba(0,0,0,.05);
  --shadow:     0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:  0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.05);
  --shadow-lg:  0 10px 20px rgba(0,0,0,.09), 0 4px 6px rgba(0,0,0,.04);

  --font:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius-sm:  4px;
  --radius:     8px;
  --radius-lg:  12px;
  --transition: 200ms ease;
}

[data-theme="dark"] {
  --bg:           #0D0D12;
  --bg-card:      #16171E;
  --text-1:       #F9FAFB;
  --text-2:       #D1D5DB;
  --text-3:       #9CA3AF;
  --text-4:       #6B7280;
  --border:       #252533;
  --border-light: #1C1D28;
  --shadow:       0 1px 3px rgba(0,0,0,.4);
  --shadow-md:    0 4px 6px rgba(0,0,0,.3);
  --shadow-lg:    0 10px 20px rgba(0,0,0,.35);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-1);
  line-height: 1.5;
  font-size: 15px;
  transition: background var(--transition), color var(--transition);
}

a { color: inherit; text-decoration: none; transition: color var(--transition); }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ------------------------------------------------
   HEADER
   ------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-header);
  box-shadow: 0 2px 20px rgba(0,0,0,.3);
}

.header-top {
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.07);
  padding: 6px 0;
}

.header-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255,255,255,.45);
}

.header-meta-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  background: rgba(255,255,255,.1);
  border-radius: 20px;
  padding: 3px 10px;
  color: rgba(255,255,255,.65);
  font-size: 13px;
  transition: all var(--transition);
}
.theme-toggle:hover { background: rgba(255,255,255,.18); color: #fff; }

.header-main { padding: 12px 0; }

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
}

/* Logo */
.site-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.site-logo img { height: 42px; width: auto; }
.logo-icon { font-size: 26px; line-height: 1; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-title {
  font-size: 10px;
  font-weight: 500;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.logo-subtitle {
  font-size: 19px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -.03em;
}

/* Nav */
.main-nav { display: flex; align-items: center; gap: 2px; flex: 1; }
.main-nav ul { display: flex; align-items: center; gap: 2px; flex: 1; list-style: none; margin: 0; padding: 0; }

.nav-link,
.main-nav ul li a {
  color: rgba(255,255,255,.6);
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 500;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  text-decoration: none;
}
.nav-link:hover, .nav-link.active,
.main-nav ul li a:hover,
.main-nav ul li.current-menu-item > a { color: #fff; background: rgba(255,255,255,.1); }
.main-nav ul li.current-menu-item > a { color: var(--primary); }

.sport-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.sport-dot.football { background: var(--football); }
.sport-dot.baseball { background: var(--baseball); }

/* Search */
.header-actions { margin-left: auto; flex-shrink: 0; }
.search-wrap { position: relative; }
.search-input {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 24px;
  padding: 7px 14px 7px 36px;
  color: #fff;
  font-size: 13px;
  width: 190px;
  transition: all var(--transition);
}
.search-input::placeholder { color: rgba(255,255,255,.38); }
.search-input:focus {
  outline: none;
  background: rgba(255,255,255,.15);
  border-color: rgba(255,255,255,.28);
  width: 240px;
}
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  pointer-events: none;
  opacity: .45;
}

/* ------------------------------------------------
   TICKER
   ------------------------------------------------ */
.ticker-wrap {
  background: var(--primary);
  padding: 7px 0;
  overflow: hidden;
}
.ticker { display: flex; align-items: center; gap: 16px; overflow: hidden; }

.ticker-label {
  background: #fff;
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 3px;
  flex-shrink: 0;
  letter-spacing: .06em;
  animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.55} }

.ticker-content { flex: 1; overflow: hidden; position: relative; }
.ticker-content::before, .ticker-content::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 40px;
  z-index: 1;
}
.ticker-content::before { left: 0; background: linear-gradient(to right, var(--primary), transparent); }
.ticker-content::after  { right: 0; background: linear-gradient(to left, var(--primary), transparent); }

.ticker-inner {
  display: flex;
  gap: 32px;
  white-space: nowrap;
  animation: scroll 45s linear infinite;
  padding: 0 32px;
}
.ticker-inner:hover { animation-play-state: paused; }
@keyframes scroll { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #fff;
  font-size: 12.5px;
  font-weight: 500;
}
.ticker-item .t-score {
  background: rgba(255,255,255,.2);
  padding: 1px 8px;
  border-radius: 3px;
  font-weight: 800;
}

/* ------------------------------------------------
   MAIN
   ------------------------------------------------ */
.main-content { padding: 32px 0 48px; }

/* ------------------------------------------------
   HERO
   ------------------------------------------------ */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 14px;
  margin-bottom: 36px;
}

.hero-main {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/9;
  cursor: pointer;
}
.hero-main:hover .hero-bg-img { transform: scale(1.04); }

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms ease;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.25) 55%, transparent 100%);
}

.hero-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 24px;
}

.sport-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 10px;
}
.sport-badge.football { background: var(--football); color: #fff; }
.sport-badge.baseball { background: var(--baseball); color: #fff; }
.sport-badge.sm { padding: 2px 7px; font-size: 9.5px; margin-bottom: 6px; }

.hero-title {
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 10px;
  letter-spacing: -.025em;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  color: rgba(255,255,255,.6);
  font-size: 11.5px;
}

.hero-sidebar { display: flex; flex-direction: column; gap: 14px; }

.side-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  flex: 1;
  cursor: pointer;
  min-height: 120px;
}
.side-card:hover .side-bg { transform: scale(1.05); }

.side-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms ease;
}

.side-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.82) 0%, rgba(0,0,0,.15) 65%, transparent 100%);
}

.side-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 14px;
}

.side-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
}

/* ------------------------------------------------
   CONTENT LAYOUT
   ------------------------------------------------ */
.content-layout {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 32px;
  align-items: start;
}

/* ------------------------------------------------
   SECTION HEADER
   ------------------------------------------------ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--border);
  position: relative;
}
.section-header::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 52px; height: 2px;
  background: var(--primary);
}
.section-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.filter-tabs { display: flex; gap: 4px; }
.filter-tab {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all var(--transition);
  cursor: pointer;
}
.filter-tab.active, .filter-tab:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ------------------------------------------------
   ARTICLES GRID
   ------------------------------------------------ */
.articles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 20px;
}

.article-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}
.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.card-img {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}
.card-img-inner {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}
.article-card:hover .card-img-inner { transform: scale(1.05); }

.card-sport-badge {
  position: absolute;
  top: 10px; left: 10px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.card-sport-badge.football { background: var(--football); color: #fff; }
.card-sport-badge.baseball { background: var(--baseball); color: #fff; }

.card-body {
  padding: 14px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-category {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 6px;
}

.card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.4;
  letter-spacing: -.01em;
  margin-bottom: 8px;
  flex: 1;
  transition: color var(--transition);
}
.article-card:hover .card-title { color: var(--primary); }

.card-excerpt {
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.55;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-4);
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
  margin-top: auto;
}
.card-author { font-weight: 600; color: var(--text-3); }
.card-stats { display: flex; gap: 10px; }

.btn-loadmore {
  display: block;
  width: 100%;
  padding: 11px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 600;
  text-align: center;
  transition: all var(--transition);
  cursor: pointer;
}
.btn-loadmore:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* WordPress pagination */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 24px; }
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  transition: all var(--transition);
}
.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ------------------------------------------------
   SIDEBAR / WIDGETS
   ------------------------------------------------ */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: sticky;
  top: 130px;
}

.widget {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  margin-bottom: 22px;
}

.widget-title {
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: -.01em;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.widget .widget-title {
  margin: 0;
}

/* WP widget inner content */
.widget ul { padding: 8px 0; }
.widget ul li a {
  display: block;
  padding: 8px 18px;
  font-size: 13px;
  color: var(--text-2);
  border-bottom: 1px solid var(--border-light);
  transition: all var(--transition);
}
.widget ul li:last-child a { border-bottom: none; }
.widget ul li a:hover { color: var(--primary); padding-left: 24px; }

/* ------------------------------------------------
   SINGLE ARTICLE
   ------------------------------------------------ */
.article-page { padding: 36px 0 60px; }

.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

.article-hero {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/7;
  margin-bottom: 28px;
}
.article-hero-img, .post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-header { margin-bottom: 28px; }
.article-header .sport-badge { margin-bottom: 12px; }
.article-h1, .entry-title {
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -.03em;
  margin-bottom: 16px;
  color: var(--text-1);
}
.article-byline {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--text-3);
  font-size: 13px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.byline-author { font-weight: 700; color: var(--text-1); }

.article-body, .entry-content {
  line-height: 1.8;
  color: var(--text-2);
  font-size: 16px;
}
.article-body h2, .entry-content h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-1);
  margin: 32px 0 14px;
  letter-spacing: -.02em;
}
.article-body h3, .entry-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
  margin: 24px 0 10px;
}
.article-body p, .entry-content p { margin-bottom: 18px; }
.article-body ul, .article-body ol,
.entry-content ul, .entry-content ol { margin: 14px 0 18px 24px; }
.article-body li, .entry-content li { margin-bottom: 6px; }
.article-body blockquote, .entry-content blockquote {
  border-left: 3px solid var(--primary);
  padding: 12px 20px;
  margin: 24px 0;
  color: var(--text-3);
  font-style: italic;
  background: var(--bg);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.article-body img, .entry-content img {
  border-radius: var(--radius);
  margin: 20px 0;
  width: 100%;
}
.article-body strong, .entry-content strong { color: var(--text-1); }

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  margin-bottom: 24px;
  transition: color var(--transition);
}
.back-link:hover { color: var(--primary); }

/* Share */
.article-share {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.share-label { font-size: 13px; font-weight: 600; color: var(--text-3); }
.share-btn {
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-2);
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.share-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Related articles in sidebar */
.article-sidebar { position: sticky; top: 130px; }
.aside-widget {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  margin-bottom: 22px;
}
.aside-widget-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -.01em;
}

.related-card {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition);
  text-decoration: none;
  color: inherit;
}
.related-card:hover { background: var(--bg); }
.related-card:last-child { border-bottom: none; }
.related-thumb {
  width: 64px;
  height: 52px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  overflow: hidden;
}
.related-thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-title { font-size: 12.5px; font-weight: 600; line-height: 1.4; color: var(--text-1); }
.related-meta { font-size: 11px; color: var(--text-4); margin-top: 4px; }

/* ------------------------------------------------
   LIVE DOT
   ------------------------------------------------ */
.live-dot {
  width: 8px; height: 8px;
  background: var(--live);
  border-radius: 50%;
  flex-shrink: 0;
  animation: livePulse 1.6s ease-in-out infinite;
  display: inline-block;
}
@keyframes livePulse { 0%,100%{transform:scale(1);opacity:1} 50%{transform:scale(1.35);opacity:.6} }

/* ------------------------------------------------
   FOOTER
   ------------------------------------------------ */
.site-footer {
  background: #060609;
  color: rgba(255,255,255,.65);
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 48px 0 36px;
}
.footer-brand .logo-title  { color: rgba(255,255,255,.35); }
.footer-brand .logo-subtitle { font-size: 17px; }
.footer-desc {
  font-size: 13px;
  line-height: 1.65;
  margin-top: 14px;
  color: rgba(255,255,255,.4);
  max-width: 260px;
}
.footer-col h4, .footer-col .widget-title {
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: rgba(255,255,255,.85) !important;
  margin-bottom: 14px;
  background: none !important;
  border: none !important;
  padding: 0 !important;
}
.footer-col ul { display: flex; flex-direction: column; gap: 9px; list-style: none; }
.footer-col li a { font-size: 13px; color: rgba(255,255,255,.45); transition: color var(--transition); }
.footer-col li a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.07);
  padding: 18px 0;
  font-size: 12px;
  color: rgba(255,255,255,.25);
  text-align: center;
}

/* ------------------------------------------------
   GRADIENT PLACEHOLDERS
   ------------------------------------------------ */
.grad-football { background: linear-gradient(135deg, #0a4c2a 0%, #1a6b3a 100%); }
.grad-baseball { background: linear-gradient(135deg, #0a2040 0%, #1a3f6e 100%); }
.grad-default  { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); }

/* ------------------------------------------------
   TOAST NOTIFICATION
   ------------------------------------------------ */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--secondary);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 300;
  transform: translateY(20px);
  opacity: 0;
  transition: all 300ms ease;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: #16a34a; }
.toast.error   { background: #dc2626; }

/* ------------------------------------------------
   BACK TO TOP
   ------------------------------------------------ */
.back-to-top {
  position: fixed;
  bottom: 28px;
  left: 28px;
  width: 40px; height: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: all var(--transition);
  z-index: 150;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ------------------------------------------------
   ANIMATIONS
   ------------------------------------------------ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 400ms ease forwards; }

/* ------------------------------------------------
   GUTENBERG BLOCKS COMPATIBILITY
   ------------------------------------------------ */
.wp-block-image img { border-radius: var(--radius); }
.wp-block-quote {
  border-left: 3px solid var(--primary);
  padding: 12px 20px;
  margin: 24px 0;
  color: var(--text-3);
  font-style: italic;
  background: var(--bg);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.wp-block-pullquote { border-color: var(--primary); }
.wp-block-button__link {
  background: var(--primary) !important;
  border-radius: var(--radius) !important;
}
.wp-block-separator { border-color: var(--border); }

/* Woocommerce placeholder if needed */
.wc-block-components-button { background: var(--primary); }

/* ------------------------------------------------
   SPORT CATEGORY COLORS
   ------------------------------------------------ */
.cat-futbol .card-sport-badge,
.cat-football .card-sport-badge { background: var(--football); color: #fff; }
.cat-beisbol .card-sport-badge,
.cat-baseball .card-sport-badge { background: var(--baseball); color: #fff; }

/* ------------------------------------------------
   RESPONSIVE
   ------------------------------------------------ */
@media (max-width: 1024px) {
  .hero-section { grid-template-columns: 1fr; }
  .hero-sidebar { flex-direction: row; height: 180px; }
  .content-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; gap: 12px; }
  .main-nav, .main-nav ul { order: 3; flex-wrap: wrap; width: 100%; justify-content: center; gap: 2px; }
  .articles-grid { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: 1fr; }
  .hero-sidebar { flex-direction: column; height: auto; }
  .side-card { aspect-ratio: 16/7; }
  .footer-grid { grid-template-columns: 1fr; }
  .search-input { width: 140px; }
  .search-input:focus { width: 170px; }
}

@media (max-width: 480px) {
  .header-meta { display: none; }
  .logo-subtitle { font-size: 16px; }
}
