/* Cricket AI News CMS - Fixed Bulletproof Responsive Stylesheet */

:root {
  --bg-primary: #0f172a;
  --bg-surface: #1e293b;
  --bg-card: #1e293b;
  --border-color: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-color: #10b981;
  --accent-hover: #059669;
  --accent-light: rgba(16, 185, 129, 0.1);
  --header-bg: rgba(15, 23, 42, 0.95);
  --card-radius: 16px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-hover: 0 12px 24px -10px rgba(0, 0, 0, 0.5);
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --accent-color: #059669;
  --accent-hover: #047857;
  --accent-light: rgba(5, 150, 105, 0.08);
  --header-bg: rgba(255, 255, 255, 0.95);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 10px 20px -5px rgba(0, 0, 0, 0.08);
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-family);
  margin: 0;
  padding: 0;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

/* Header & Navigation Bar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 0;
}

.brand-logo {
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.brand-logo span {
  color: var(--accent-color);
}

.nav-link-custom {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 0.9rem;
  border-radius: 20px;
  transition: all 0.2s ease;
}

.nav-link-custom:hover, .nav-link-custom.active {
  color: var(--accent-color);
  background: var(--accent-light);
}

/* Search Bar */
.search-input-group {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 0.25rem 0.5rem 0.25rem 1rem;
  width: 100%;
  max-width: 380px;
}

.search-input-group input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.9rem;
  box-shadow: none !important;
}

.search-input-group input::placeholder {
  color: var(--text-muted);
}

.search-input-group button {
  background: var(--accent-color);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 0.35rem 1rem;
  font-weight: 600;
  font-size: 0.85rem;
}

/* Live Ticker Bar */
.live-ticker-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 0;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow-x: auto;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 0.3rem 0.85rem;
  margin-right: 0.75rem;
}

.badge-live {
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

/* YouTube Style Post Card */
.yt-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

.yt-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-color);
}

.yt-thumbnail-wrapper {
  position: relative;
  width: 100%;
  height: 220px; /* Fixed height for consistent grid */
  overflow: hidden;
  background: var(--bg-surface);
}

.yt-thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.yt-card:hover .yt-thumbnail-img {
  transform: scale(1.04);
}

.yt-duration-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  backdrop-filter: blur(4px);
}

.yt-category-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent-color);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.yt-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.yt-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.yt-card-summary {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

.yt-card-meta {
  margin-top: auto;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* Featured Large Banner Card */
.featured-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  overflow: hidden;
  margin-bottom: 2.5rem;
  transition: border-color 0.2s ease;
}

.featured-hero-card:hover {
  border-color: var(--accent-color);
}

.hero-img-container {
  width: 100%;
  height: 380px;
  overflow: hidden;
  position: relative;
  background: var(--bg-surface);
}

.hero-img-main {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content-box {
  padding: 1.5rem;
  background: var(--bg-card);
}

/* Medium Style Single Reader View */
.reader-container {
  max-width: 820px;
  margin: 0 auto;
}

.reader-header {
  margin-bottom: 2rem;
}

.reader-title {
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.reader-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.article-body {
  font-size: 1.15rem;
  line-height: 1.85;
  color: var(--text-primary);
}

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

.article-body h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.article-body h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.article-body blockquote {
  border-left: 4px solid var(--accent-color);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--bg-surface);
  border-radius: 0 12px 12px 0;
  font-style: italic;
}

/* Clean Sidebar */
.clean-sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  padding: 1.5rem;
  margin-bottom: 1.75rem;
}

.widget-heading {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Footer */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 3.5rem 0 2rem 0;
  margin-top: 5rem;
}

/* Modern newsroom homepage */
.fw-black { font-weight: 900; letter-spacing: -0.04em; }
.accent-text { color: var(--accent-color); }
.home-shell { position: relative; overflow: hidden; }
.home-hero { position: relative; padding: 2rem; border: 1px solid var(--border-color); border-radius: 28px; background: radial-gradient(circle at 85% 15%, rgba(16,185,129,.18), transparent 34%), linear-gradient(135deg, var(--bg-card), var(--bg-surface)); box-shadow: 0 25px 70px rgba(0,0,0,.18); }
.home-hero-glow { position:absolute; width:320px; height:320px; right:-120px; bottom:-180px; background:var(--accent-color); opacity:.07; filter:blur(40px); border-radius:50%; }
.eyebrow-pill { display:inline-flex; align-items:center; gap:.5rem; padding:.45rem .8rem; border:1px solid rgba(16,185,129,.28); border-radius:999px; color:var(--text-secondary); background:var(--accent-light); font-size:.78rem; font-weight:800; text-transform:uppercase; letter-spacing:.06em; }
.live-dot { width:8px; height:8px; border-radius:50%; background:#ef4444; box-shadow:0 0 0 5px rgba(239,68,68,.12); }
.hero-lead { max-width:650px; color:var(--text-secondary); font-size:1.08rem; }
.hero-stats { display:flex; flex-wrap:wrap; gap:1.5rem; }
.hero-stats div { display:flex; flex-direction:column; gap:.05rem; }
.hero-stats strong { font-size:1.25rem; color:var(--text-primary); }
.hero-stats span { font-size:.75rem; color:var(--text-muted); text-transform:uppercase; letter-spacing:.05em; }
.hero-feature-card { display:block; overflow:hidden; border:1px solid var(--border-color); border-radius:22px; background:rgba(15,23,42,.35); transition:transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.hero-feature-card:hover { transform:translateY(-5px); border-color:var(--accent-color); box-shadow:0 18px 50px rgba(0,0,0,.22); }
.hero-feature-media { position:relative; aspect-ratio:16/10; overflow:hidden; background:var(--bg-surface); }
.hero-feature-media img { width:100%; height:100%; object-fit:cover; transition:transform .45s ease; }
.hero-feature-card:hover .hero-feature-media img { transform:scale(1.04); }
.hero-feature-label { position:absolute; top:14px; left:14px; padding:.45rem .7rem; border-radius:999px; background:rgba(15,23,42,.84); color:#fff; font-size:.72rem; font-weight:800; backdrop-filter:blur(10px); }
.hero-feature-body { padding:1.1rem 1.15rem 1.2rem; }
.hero-feature-body h2 { margin:.35rem 0 .45rem; color:var(--text-primary); font-size:1.25rem; line-height:1.3; font-weight:850; }
.hero-feature-body p { color:var(--text-secondary); font-size:.9rem; margin-bottom:.7rem; }
.empty-hero-card { padding:4rem 2rem; text-align:center; border:1px dashed var(--border-color); border-radius:22px; color:var(--text-secondary); }
.empty-hero-card i { font-size:3rem; color:var(--accent-color); }
.topic-strip { padding:.85rem 0; }
.topic-label { color:var(--text-muted); font-size:.75rem; text-transform:uppercase; font-weight:900; letter-spacing:.08em; margin-right:.25rem; }
.topic-chip { white-space:nowrap; border:1px solid var(--border-color); border-radius:999px; padding:.45rem .8rem; background:var(--bg-card); color:var(--text-secondary); font-size:.82rem; font-weight:700; transition:all .2s ease; }
.topic-chip:hover { color:var(--text-primary); border-color:var(--accent-color); background:var(--accent-light); }
.section-heading { display:flex; align-items:end; justify-content:space-between; gap:1rem; }
.section-kicker { display:block; color:var(--accent-color); text-transform:uppercase; font-size:.68rem; letter-spacing:.12em; font-weight:900; margin-bottom:.2rem; }
.section-heading h2 { margin:0; font-size:1.55rem; font-weight:850; color:var(--text-primary); }
.section-link { color:var(--text-secondary); font-size:.82rem; font-weight:800; white-space:nowrap; }
.section-link:hover { color:var(--accent-color); }
.news-card { display:flex; flex-direction:column; height:100%; overflow:hidden; border:1px solid var(--border-color); border-radius:18px; background:var(--bg-card); transition:transform .22s ease, border-color .22s ease, box-shadow .22s ease; }
.news-card:hover { transform:translateY(-4px); border-color:var(--accent-color); box-shadow:var(--shadow-hover); }
.news-card-media { position:relative; aspect-ratio:16/9; overflow:hidden; background:var(--bg-surface); }
.news-card-media img { width:100%; height:100%; object-fit:cover; transition:transform .35s ease; }
.news-card:hover .news-card-media img { transform:scale(1.045); }
.news-card-category, .news-card-time { position:absolute; top:10px; padding:.3rem .55rem; border-radius:999px; color:#fff; background:rgba(15,23,42,.8); backdrop-filter:blur(8px); font-size:.67rem; font-weight:850; }
.news-card-category { left:10px; }
.news-card-time { right:10px; }
.news-card-body { padding:1rem; display:flex; flex-direction:column; flex:1; }
.news-card-body h3 { font-size:1rem; line-height:1.4; margin:0 0 .45rem; font-weight:800; color:var(--text-primary); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.news-card-body p { font-size:.83rem; color:var(--text-secondary); margin:0 0 .8rem; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.news-card-meta { margin-top:auto; display:flex; justify-content:space-between; color:var(--text-muted); font-size:.72rem; }
.home-sidebar-widget { background:var(--bg-card); border:1px solid var(--border-color); border-radius:18px; padding:1rem; }
.widget-title-row { padding:.25rem .25rem .7rem; border-bottom:1px solid var(--border-color); }
.widget-title-row h3 { font-size:1rem; font-weight:850; margin:0; }
.trend-item { display:grid; grid-template-columns:40px 1fr; gap:.75rem; padding:.85rem .25rem; border-bottom:1px solid var(--border-color); }
.trend-item:last-child { border-bottom:0; }
.trend-rank { color:var(--accent-color); font-size:1.2rem; font-weight:900; }
.trend-item strong { display:block; color:var(--text-primary); font-size:.82rem; line-height:1.35; }
.trend-item small { display:block; margin-top:.25rem; color:var(--text-muted); font-size:.68rem; }
@media (max-width: 767.98px) {
  .home-hero { padding:1.15rem; border-radius:20px; }
  .home-hero h1 { font-size:2.35rem; }
  .hero-stats { gap:1rem; }
  .section-heading h2 { font-size:1.25rem; }
}
