/*
Theme Name: SportsPulse
Theme URI: https://dailyagahi.com/
Author: Daily Agahi
Author URI: https://dailyagahi.com/
Description: A high-performance, fully responsive WordPress theme designed for live sports streaming, scores, and news websites. Features include a live ticker bar, live scores strip, hero featured section, magazine-style post grid, trending sidebar, newsletter widget, and full Customizer support. Built with SEO and speed in mind.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sportspulse
Tags: blog, news, entertainment, custom-colors, custom-logo, custom-menu, featured-images, footer-widgets, full-width-template, one-column, two-columns, theme-options, threaded-comments, translation-ready
*/

/* ─── CSS Reset & Variables ─── */
:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: #1a2235;
  --bg-card-hover: #1f2a40;
  --accent-color: #00e676;
  --accent-red: #ff3d3d;
  --accent-blue: #3b82f6;
  --accent-amber: #ffc107;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: #1e293b;
  --radius: 12px;
  --radius-sm: 8px;
  --font-display: 'Oswald', sans-serif;
  --font-body: 'Source Sans 3', sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

.container { max-width: 1320px; margin: 0 auto; padding: 0 24px; }

/* ─── Ticker Bar ─── */
.ticker-bar {
  background: var(--accent-color);
  color: var(--bg-primary);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  overflow: hidden;
  white-space: nowrap;
  padding: 6px 0;
  position: relative;
  z-index: 100;
}
.ticker-content { display: inline-block; animation: ticker 30s linear infinite; }
@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.live-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--accent-red);
  border-radius: 50%;
  margin: 0 8px;
  animation: pulse-dot 1.5s infinite;
  vertical-align: middle;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

/* ─── Header ─── */
.site-header {
  background: rgba(10, 14, 23, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 99;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.site-logo {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-icon {
  width: 34px; height: 34px;
  background: var(--accent-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--bg-primary);
  font-weight: 700;
}
.site-logo img { max-height: 40px; width: auto; }

/* Navigation */
.main-nav ul { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.25s;
}
.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a {
  color: var(--accent-color);
  background: rgba(0, 230, 118, 0.08);
}
.main-nav .sub-menu {
  display: none;
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 0;
  min-width: 200px;
  top: 100%;
  z-index: 100;
}
.main-nav li:hover > .sub-menu { display: block; }
.main-nav .sub-menu a {
  display: block;
  padding: 8px 20px;
  font-size: 13px;
}

.header-actions { display: flex; align-items: center; gap: 12px; }
.search-toggle,
.mobile-menu-toggle {
  width: 40px; height: 40px;
  border: 1px solid var(--border-color);
  background: transparent;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
}
.search-toggle:hover { border-color: var(--accent-color); color: var(--accent-color); }
.mobile-menu-toggle { display: none; font-size: 22px; color: var(--text-primary); }

/* Mobile menu */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 23, 0.98);
  z-index: 200;
  padding: 80px 24px 24px;
  overflow-y: auto;
}
.mobile-nav.active { display: block; }
.mobile-nav ul { display: flex; flex-direction: column; gap: 4px; }
.mobile-nav a {
  display: block;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}
.mobile-nav-close {
  position: absolute;
  top: 20px; right: 24px;
  width: 40px; height: 40px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* Search Overlay */
.search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 23, 0.95);
  z-index: 200;
  align-items: flex-start;
  justify-content: center;
  padding-top: 20vh;
}
.search-overlay.active { display: flex; }
.search-overlay form {
  width: 90%;
  max-width: 600px;
}
.search-overlay input[type="search"] {
  width: 100%;
  background: var(--bg-card);
  border: 2px solid var(--accent-color);
  border-radius: var(--radius);
  padding: 20px 24px;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 22px;
  outline: none;
}
.search-overlay .close-search {
  position: absolute;
  top: 30px; right: 30px;
  background: transparent; border: none;
  color: var(--text-primary);
  font-size: 32px;
  cursor: pointer;
}

/* ─── Hero Section ─── */
.hero-section {
  background: linear-gradient(135deg, #0a0e17 0%, #0f1a2e 50%, #0a1628 100%);
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0, 230, 118, 0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  padding: 48px 0 56px;
  position: relative;
  z-index: 1;
}
.hero-featured {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 420px;
}
.hero-featured img {
  width: 100%; height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
.hero-featured-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(10,14,23,0.95) 0%, rgba(10,14,23,0.3) 50%, transparent 100%);
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-red);
  color: white;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 5px 12px;
  border-radius: 4px;
  width: fit-content;
  margin-bottom: 16px;
}
.live-badge::before {
  content: '';
  width: 7px; height: 7px;
  background: white;
  border-radius: 50%;
  animation: pulse-dot 1.2s infinite;
}
.cat-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent-color);
  background: rgba(0, 230, 118, 0.12);
  padding: 4px 12px;
  border-radius: 4px;
  width: fit-content;
}
.hero-featured-overlay h2 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.15;
  margin: 12px 0;
}
.hero-featured-overlay p {
  color: var(--text-secondary);
  font-size: 15px;
  max-width: 500px;
}
.hero-sidebar { display: flex; flex-direction: column; gap: 16px; }
.hero-sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  grid-template-columns: 140px 1fr;
  transition: all 0.3s;
}
.hero-sidebar-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(0, 230, 118, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(0, 230, 118, 0.15);
}
.hero-sidebar-card img { width: 100%; height: 100%; min-height: 110px; object-fit: cover; }
.hero-sidebar-card .card-content { padding: 16px; display: flex; flex-direction: column; justify-content: center; }
.hero-sidebar-card h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.25;
  margin-top: 8px;
}
.hero-sidebar-card .meta { color: var(--text-muted); font-size: 12px; margin-top: 6px; }

/* ─── Scores Strip ─── */
.scores-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 20px 0;
  overflow-x: auto;
}
.scores-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.scores-header h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex; align-items: center; gap: 10px;
}
.live-indicator {
  width: 10px; height: 10px;
  background: var(--accent-red);
  border-radius: 50%;
  animation: pulse-dot 1.2s infinite;
  display: inline-block;
}
.scores-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}
.score-card {
  flex: 0 0 220px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px;
  transition: all 0.3s;
}
.score-card:hover {
  border-color: rgba(0, 230, 118, 0.3);
  box-shadow: 0 0 20px rgba(0, 230, 118, 0.15);
}
.score-league {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent-color);
  margin-bottom: 10px;
  display: flex; align-items: center; justify-content: space-between;
}
.score-time {
  color: var(--accent-red);
  display: flex; align-items: center; gap: 4px;
}
.score-time::before {
  content: '';
  width: 5px; height: 5px;
  background: var(--accent-red);
  border-radius: 50%;
  animation: pulse-dot 1.2s infinite;
}
.score-team {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
}
.score-team-name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
}
.score-team-score {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-color);
}
.score-divider { width: 100%; height: 1px; background: var(--border-color); }

/* ─── Content Layout ─── */
.site-main-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 40px;
  padding: 48px 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-color);
}
.section-header h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex; align-items: center; gap: 10px;
}
.section-header h2::before {
  content: '';
  width: 4px; height: 24px;
  background: var(--accent-color);
  border-radius: 2px;
}

/* ─── Post Cards ─── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s;
}
.post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 230, 118, 0.25);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3), 0 0 20px rgba(0, 230, 118, 0.15);
}
.post-card .post-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.post-card .post-thumb-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #1a2235, #0f1a2e);
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
}
.post-card-body { padding: 20px; }
.post-card-body .cat-badge { margin-bottom: 10px; }
.post-card-body h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.3;
  margin-bottom: 10px;
  transition: color 0.25s;
}
.post-card:hover h3 { color: var(--accent-color); }
.post-card-body .excerpt {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
}
.post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 12px;
}

/* ─── Sidebar Widgets ─── */
.sidebar .widget {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 32px;
}
.sidebar .widget-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
  display: flex; align-items: center; gap: 8px;
}
.sidebar .widget-title::before {
  content: '';
  width: 4px; height: 18px;
  background: var(--accent-color);
  border-radius: 2px;
}
.sidebar .widget ul li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}
.sidebar .widget ul li:last-child { border-bottom: none; }
.sidebar .widget ul li a {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-primary);
  transition: color 0.25s;
}
.sidebar .widget ul li a:hover { color: var(--accent-color); }

/* ─── Pagination ─── */
.pagination,
.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 40px;
}
.page-numbers {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: all 0.25s;
}
.page-numbers:hover { border-color: var(--accent-color); color: var(--accent-color); }
.page-numbers.current {
  background: var(--accent-color);
  color: var(--bg-primary);
  border-color: var(--accent-color);
}

/* ─── Single Post ─── */
.single-post-header { padding: 48px 0 24px; }
.single-post-header .cat-badge { margin-bottom: 16px; }
.single-post-header h1 {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.15;
  margin-bottom: 16px;
}
.single-post-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--text-muted);
  font-size: 14px;
}
.single-post-content {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-secondary);
}
.single-post-content h2, .single-post-content h3, .single-post-content h4 {
  font-family: var(--font-display);
  color: var(--text-primary);
  text-transform: uppercase;
  margin: 32px 0 16px;
}
.single-post-content p { margin-bottom: 20px; }
.single-post-content img { border-radius: var(--radius-sm); margin: 24px 0; }
.single-post-content a { color: var(--accent-color); text-decoration: underline; }
.single-post-content blockquote {
  border-left: 4px solid var(--accent-color);
  padding: 16px 24px;
  margin: 24px 0;
  background: rgba(0, 230, 118, 0.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ─── Comments ─── */
.comments-area { margin-top: 48px; padding-top: 32px; border-top: 2px solid var(--border-color); }
.comments-area .comment-form input,
.comments-area .comment-form textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: var(--font-body);
  margin-bottom: 12px;
}
.comments-area .comment-form input[type="submit"] {
  background: var(--accent-color);
  color: var(--bg-primary);
  border: none;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  width: auto;
  padding: 12px 32px;
}

/* ─── Footer ─── */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding-top: 56px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-brand p { color: var(--text-secondary); font-size: 14px; line-height: 1.6; margin-top: 16px; max-width: 300px; }
.footer-socials { display: flex; gap: 10px; margin-top: 20px; }
.footer-socials a {
  width: 40px; height: 40px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  font-size: 16px;
  transition: all 0.25s;
}
.footer-socials a:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  background: rgba(0, 230, 118, 0.08);
}
.footer-col h4 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: var(--text-secondary); font-size: 14px; transition: color 0.25s; }
.footer-col ul li a:hover { color: var(--accent-color); }
.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 13px;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .site-main-layout { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-featured { min-height: 350px; }
  .hero-sidebar { display: grid; grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .main-nav { display: none; }
  .mobile-menu-toggle { display: flex; }
  .hero-featured { min-height: 280px; }
  .hero-featured-overlay h2 { font-size: 24px; }
  .hero-sidebar { grid-template-columns: 1fr; }
  .hero-sidebar-card { grid-template-columns: 100px 1fr; }
  .posts-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
  .single-post-header h1 { font-size: 28px; }
}
@media (max-width: 480px) {
  .header-inner { height: 56px; }
  .site-logo { font-size: 20px; }
  .logo-icon { width: 28px; height: 28px; font-size: 13px; }
  .hero-featured { min-height: 220px; }
  .hero-featured-overlay h2 { font-size: 20px; }
  .single-post-header h1 { font-size: 22px; }
}

/* ─── Animations ─── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.post-card { animation: fadeInUp 0.5s ease forwards; }
