/**
 * Albirroja Mundial - Estilos Principales
 * Portal Mundialista Paraguayo · FIFA 2026
 * 
 * Design: Editorial deportivo · Limpio · Mobile-first
 * Fonts: Bebas Neue (headlines) + Nunito (body) + JetBrains Mono (scores)
 */

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
  --py-red: #C8102E;
  --py-red-dark: #9B0D23;
  --py-red-light: #E8354D;
  --py-blue: #002B5C;
  --py-blue-dark: #001A3A;
  --py-white: #FFFFFF;
  --py-gold: #C5A55A;
  --py-gold-light: #D4BA7A;
  --py-sky: #4DA8DA;

  --bg-primary: #F5F6F8;
  --bg-section: #FFFFFF;
  --bg-dark: #0D1117;
  --text-primary: #1A1A2E;
  --text-secondary: #4A4A68;
  --text-muted: #8E8EA0;
  --border-light: #E2E8F0;

  --live-red: #FF1744;
  --flash-yellow: #FFC107;
  --success-green: #28A745;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);

  --font-headline: 'Bebas Neue', 'Impact', sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  --mobile-nav-height: 60px;
}

/* ============================================================
   GLOBAL
   ============================================================ */
body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 0;
}

@media (max-width: 991.98px) {
  body { padding-bottom: var(--mobile-nav-height); }
}

a { color: var(--py-red); transition: color 0.2s; }
a:hover { color: var(--py-red-dark); }

img { max-width: 100%; height: auto; }

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.bg-py-red { background-color: var(--py-red) !important; }
.bg-py-blue { background-color: var(--py-blue) !important; }
.bg-py-blue-dark { background-color: var(--py-blue-dark) !important; }
.bg-py-gold { background-color: var(--py-gold) !important; }
.text-py-red { color: var(--py-red) !important; }
.text-py-blue { color: var(--py-blue) !important; }
.text-py-gold { color: var(--py-gold) !important; }
.text-white-75 { color: rgba(255,255,255,0.75) !important; }

.btn-py-red {
  background: var(--py-red); color: white; border: none;
  transition: all 0.25s;
}
.btn-py-red:hover { background: var(--py-red-dark); color: white; transform: translateY(-1px); }

.btn-py-gold {
  background: var(--py-gold); color: var(--py-blue-dark); border: none; font-weight: 700;
  transition: all 0.25s;
}
.btn-py-gold:hover { background: var(--py-gold-light); color: var(--py-blue-dark); transform: translateY(-1px); }

.min-vh-40 { min-height: 40vh; }

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* ============================================================
   NAVBAR
   ============================================================ */
#mainNav {
  background: linear-gradient(135deg, var(--py-red) 0%, var(--py-red-dark) 100%) !important;
  z-index: 1040;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand-main {
  font-family: var(--font-headline);
  font-size: 1.4rem;
  letter-spacing: 3px;
  color: white;
}
.brand-sub {
  font-family: var(--font-headline);
  font-size: 0.75rem;
  letter-spacing: 4px;
  color: var(--py-gold);
}
.brand-flag { font-size: 1.6rem; }

.nav-albirroja { font-weight: 700 !important; }

.nav-link {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 0.5rem 0.75rem !important;
  transition: opacity 0.2s;
}
.nav-link:hover { opacity: 0.85; }
.nav-link.active { border-bottom: 2px solid var(--py-gold); }

/* Live dot */
.live-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--live-red);
  border-radius: 50%;
  animation: pulse-live 1.5s infinite;
  margin-right: 4px;
  vertical-align: middle;
}

.btn-live-pulse {
  background: var(--live-red);
  color: white;
  border: none;
  animation: pulse-live 2s infinite;
}
.btn-live-pulse:hover { background: #E01535; color: white; }

@keyframes pulse-live {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
  background: linear-gradient(135deg, var(--py-red) 0%, var(--py-blue-dark) 60%, var(--py-blue) 100%);
  position: relative;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="0.5"/></svg>') repeat;
  background-size: 80px;
  pointer-events: none;
}

.hero-title {
  font-family: var(--font-headline);
  letter-spacing: 2px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.hero-subtitle { text-shadow: 0 1px 10px rgba(0,0,0,0.2); }

@media (max-width: 767.98px) {
  .hero-title { font-size: 2.2rem; }
  .hero-subtitle { font-size: 1rem; }
  .hero-section .py-5 { padding-top: 2rem !important; padding-bottom: 2rem !important; }
}

/* ============================================================
   COUNTDOWN
   ============================================================ */
.countdown-section {
  background: linear-gradient(90deg, var(--py-blue) 0%, var(--py-blue-dark) 100%);
  border-bottom: 3px solid var(--py-gold);
}

.countdown-display {
  font-family: var(--font-mono);
}

.countdown-unit { text-align: center; }

.countdown-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--py-gold);
  line-height: 1;
  min-width: 60px;
}

.countdown-label {
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
}

.countdown-separator {
  font-size: 2rem;
  color: rgba(255,255,255,0.3);
  align-self: flex-start;
  padding-top: 0.3rem;
}

@media (max-width: 575.98px) {
  .countdown-number { font-size: 1.8rem; min-width: 45px; }
  .countdown-separator { font-size: 1.4rem; }
}

/* ============================================================
   SECTION TITLES
   ============================================================ */
.section-title {
  font-family: var(--font-headline);
  font-size: 1.5rem;
  letter-spacing: 1px;
  color: var(--text-primary);
}

/* ============================================================
   MATCH CARDS
   ============================================================ */
.match-card { border-radius: 12px; transition: transform 0.2s; }
.match-card:hover { transform: translateY(-2px); }
.match-card-py { border-left: 4px solid var(--py-red) !important; }

.team-flag { display: block; }
.team-name { font-size: 0.85rem; }

.score-display { min-width: 70px; }
.score-number {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
}
.score-vs {
  font-family: var(--font-headline);
  font-size: 1.2rem;
  color: var(--text-muted);
  letter-spacing: 2px;
}

.live-badge { animation: pulse-live 1.5s infinite; }

/* ============================================================
   NEWS CARDS
   ============================================================ */
.news-card {
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}
.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.news-card-img {
  height: 180px;
  object-fit: cover;
  transition: transform 0.4s;
}
.news-card:hover .news-card-img { transform: scale(1.05); }

.card-img-link {
  overflow: hidden;
  display: block;
  position: relative;
}

.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.7rem;
}

.card-category {
  font-size: 0.7rem;
  letter-spacing: 1px;
}

.card-title a:hover { color: var(--py-red) !important; }

/* ============================================================
   FLASH SECTION
   ============================================================ */
.flash-item { transition: background 0.2s; }
.flash-item:hover { background: rgba(200, 16, 46, 0.03); }
.flash-time { min-width: 45px; font-family: var(--font-mono); font-size: 0.8rem; }
.flash-title:hover { color: var(--py-red) !important; }

/* ============================================================
   BANNERS
   ============================================================ */
.banner-slot { max-width: 100%; overflow: hidden; }
.banner-img { max-height: 120px; }

@media (max-width: 767.98px) {
  .banner-header-970x90 { display: none; }
}
@media (min-width: 768px) {
  .banner-mobile-320x50 { display: none; }
}

/* ============================================================
   MOBILE BOTTOM NAV
   ============================================================ */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--mobile-nav-height);
  background: white;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1050;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 6px 0;
  transition: color 0.2s;
  flex: 1;
}
.mobile-nav-item i { font-size: 1.3rem; margin-bottom: 2px; }
.mobile-nav-item .nav-flag { font-size: 1.3rem; margin-bottom: 2px; }
.mobile-nav-item.active { color: var(--py-red); }
.mobile-nav-item:hover { color: var(--py-red); }

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.breadcrumb { font-size: 0.8rem; }
.breadcrumb-item a { color: var(--py-red); text-decoration: none; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer a:hover { color: white !important; }

/* ============================================================
   SEARCH OFFCANVAS
   ============================================================ */
#searchOffcanvas .offcanvas-body {
  padding-top: 1rem;
}

/* ============================================================
   ADMIN PANEL ADJUSTMENTS
   ============================================================ */
.admin-sidebar { min-height: calc(100vh - 56px); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeInUp 0.5s ease-out forwards;
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .mobile-bottom-nav,
  #mainNav,
  .topbar,
  .banner-slot,
  .site-footer { display: none !important; }
  body { padding-bottom: 0; }
}
