/*
Theme Name: Keonhaca Sport
Theme URI: https://keonhacai.systems
Author: Keonhaca Systems
Author URI: https://keonhacai.systems
Description: Giao dien web thể thao cao cap cho nguoi dung Tieng Viet - Keonhaca Sport Theme
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: keonhaca-sport
Tags: vietnam, sports, football, news, dark-theme, responsive
*/

/* ================================
   CSS Variables - Color System
================================ */
:root {
  --primary-red: #D32F2F;
  --primary-yellow: #FFD600;
  --accent-gold: #FFC107;
  --bg-dark: #0a0a0f;
  --bg-card: #12121a;
  --bg-card-hover: #1a1a25;
  --bg-header: rgba(10,10,15,0.95);
  --text-primary: #FFFFFF;
  --text-secondary: #B0B0C0;
  --text-muted: #6B6B7B;
  --border-color: #1e1e2e;
  --gradient-red: linear-gradient(135deg, #D32F2F, #B71C1C);
  --gradient-gold: linear-gradient(135deg, #FFD600, #FFC107);
  --gradient-dark: linear-gradient(180deg, #0a0a0f 0%, #12121a 100%);
  --shadow-card: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 30px rgba(211,47,47,0.3);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

/* ================================
   Reset & Base Styles
================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--primary-yellow);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-gold);
}

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

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ================================
   Typography
================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

/* ================================
   Layout Containers
================================ */
.site-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.main-content {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 30px;
  padding: 40px 0;
}

@media (max-width: 1024px) {
  .main-content {
    grid-template-columns: 1fr;
  }
}

/* ================================
   Header & Navigation
================================ */
.site-header {
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(20px);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-logo h1 {
  font-size: 1.8rem;
  font-weight: 800;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-icon {
  width: 48px;
  height: 48px;
  background: var(--gradient-red);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-links li a {
  display: block;
  padding: 10px 18px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-links li a:hover,
.nav-links li.current-menu-item a {
  color: var(--primary-yellow);
  background: rgba(255,214,0,0.08);
}

.nav-links li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--primary-yellow);
  transition: width var(--transition-normal);
}

.nav-links li a:hover::after,
.nav-links li.current-menu-item a::after {
  width: 60%;
}

/* ================================
   Hero Section - Front Page
================================ */
.hero-section {
  background: var(--gradient-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 40px;
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: flex-end;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.4;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,10,15,0.95) 0%, rgba(10,10,15,0.3) 60%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 40px;
  width: 100%;
}

.hero-category {
  display: inline-block;
  background: var(--primary-red);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 15px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hero-title a {
  color: white;
}

.hero-title a:hover {
  color: var(--primary-yellow);
}

.hero-meta {
  display: flex;
  gap: 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.hero-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gradient-gold);
  color: #111;
  padding: 12px 28px;
  border-radius: 30px;
  font-weight: 700;
  margin-top: 20px;
  transition: all var(--transition-fast);
}

.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255,214,0,0.4);
  color: #111;
}

/* ================================
   Card Styles
================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

.post-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  border: 1px solid var(--border-color);
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card);
  border-color: rgba(255,214,0,0.2);
}

.card-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.post-card:hover .card-thumb img {
  transform: scale(1.05);
}

.card-category {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary-red);
  color: white;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.card-body {
  padding: 20px;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.4;
}

.card-title a {
  color: var(--text-primary);
}

.card-title a:hover {
  color: var(--primary-yellow);
}

.card-excerpt {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
}

.card-meta .author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-meta .date {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ================================
   Sidebar Widgets
================================ */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.widget {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border-color);
}

.widget-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--primary-red);
  display: flex;
  align-items: center;
  gap: 10px;
}

.widget-title::before {
  content: '';
  width: 4px;
  height: 24px;
  background: var(--gradient-gold);
  border-radius: 2px;
}

.widget-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.widget-list li {
  display: flex;
  gap: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}

.widget-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.widget-thumb {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.widget-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.widget-info h4 {
  font-size: 0.95rem;
  margin-bottom: 6px;
  line-height: 1.4;
}

.widget-info h4 a {
  color: var(--text-primary);
}

.widget-info h4 a:hover {
  color: var(--primary-yellow);
}

.widget-info .meta {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ================================
   Footer
================================ */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 30px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.footer-brand h3 {
  font-size: 1.8rem;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 15px;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.footer-col h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--primary-yellow);
}

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col ul li a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-col ul li a:hover {
  color: var(--primary-yellow);
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ================================
   Article / Single Post
================================ */
.article-header {
  padding: 40px 0 30px;
}

.article-category {
  display: inline-block;
  background: var(--primary-red);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 15px;
}

.article-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 20px;
}

.article-meta {
  display: flex;
  gap: 25px;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--border-color);
}

.article-featured-img {
  margin-bottom: 30px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.article-featured-img img {
  width: 100%;
  height: auto;
}

.article-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.article-content h2, .article-content h3 {
  margin: 2rem 0 1rem;
  color: var(--text-primary);
}

.article-content p {
  margin-bottom: 1.5rem;
}

.article-content blockquote {
  background: var(--bg-card);
  border-left: 4px solid var(--primary-yellow);
  padding: 25px 30px;
  margin: 2rem 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--primary-yellow);
}

/* ================================
   Buttons & CTA
================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gradient-red);
  color: white;
  padding: 14px 32px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1rem;
  transition: all var(--transition-fast);
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
  color: white;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--primary-yellow);
  padding: 14px 32px;
  border-radius: 30px;
  font-weight: 700;
  border: 2px solid var(--primary-yellow);
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background: var(--primary-yellow);
  color: #111;
}

/* ================================
   Section Headers
================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border-color);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::before {
  content: '';
  width: 5px;
  height: 28px;
  background: var(--gradient-red);
  border-radius: 3px;
}

.section-link {
  color: var(--primary-yellow);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ================================
   Match Score Widget
================================ */
.match-widget {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border-color);
  margin-bottom: 30px;
}

.match-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.team {
  text-align: center;
  flex: 1;
}

.team-logo {
  width: 60px;
  height: 60px;
  background: var(--bg-card-hover);
  border-radius: 50%;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.team-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.match-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 20px;
  background: var(--bg-dark);
  border-radius: var(--radius-md);
  margin-bottom: 15px;
}

.score {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--primary-yellow);
}

.score-divider {
  font-size: 2rem;
  color: var(--text-muted);
}

.match-info {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.match-league {
  color: var(--primary-red);
  font-weight: 700;
  margin-bottom: 5px;
}

/* ================================
   Live Score Ticker
================================ */
.live-ticker {
  background: linear-gradient(90deg, var(--primary-red), #B71C1C);
  padding: 12px 0;
  overflow: hidden;
}

.ticker-content {
  display: flex;
  gap: 40px;
  animation: ticker-scroll 30s linear infinite;
  white-space: nowrap;
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
}

.ticker-item .live-dot {
  width: 8px;
  height: 8px;
  background: var(--primary-yellow);
  border-radius: 50%;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ================================
   Pagination
================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 50px;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-weight: 600;
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.pagination a:hover,
.pagination .current {
  background: var(--primary-red);
  color: white;
  border-color: var(--primary-red);
}

/* ================================
   Responsive Utilities
================================ */
@media (max-width: 768px) {
  .hero-title {
    font-size: 1.8rem;
  }
  
  .nav-links {
    display: none;
  }
  
  .main-content {
    padding: 20px 0;
  }
  
  .article-title {
    font-size: 1.6rem;
  }
}

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

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

/* ================================
   Utilities
================================ */
.text-red { color: var(--primary-red); }
.text-yellow { color: var(--primary-yellow); }
.text-gold { color: var(--accent-gold); }
.text-muted { color: var(--text-muted); }

.bg-red { background: var(--primary-red); }
.bg-yellow { background: var(--primary-yellow); }
.bg-card { background: var(--bg-card); }

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }