/*
Theme Name: JustNews24
Theme URI: https://justnews24.com
Author: JustNews24 Team
Description: A modern, ultra-responsive, SEO-optimized news and media portal WordPress theme with Breaking News ticker, Featured Grid, and clean typography.
Version: 2.0
Text Domain: justnews24
*/

:root {
  --primary: #d32f2f;
  --primary-dark: #b71c1c;
  --accent: #ff9800;
  --dark: #121212;
  --dark-surface: #1e1e1e;
  --text-main: #212529;
  --text-muted: #6c757d;
  --bg-light: #f4f6f8;
  --card-bg: #ffffff;
  --border-color: #e9ecef;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 6px 18px rgba(0,0,0,0.09);
  --radius: 8px;
  --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-light);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary);
}

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

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

/* --- Top Bar --- */
.top-bar {
  background-color: var(--dark);
  color: #adb5bd;
  font-size: 0.82rem;
  padding: 8px 0;
  border-bottom: 1px solid #2d2d2d;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.live-badge {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  animation: pulse 1.5s infinite;
}

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

/* --- Main Header --- */
.site-header {
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-branding {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
}

.logo-area h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--dark);
}

.logo-area h1 span {
  color: var(--primary);
}

.logo-area p {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.header-ad-banner {
  background: #f1f3f5;
  border: 1px dashed #ced4da;
  padding: 10px 25px;
  border-radius: 4px;
  font-size: 0.8rem;
  color: #868e96;
  display: none;
}

@media(min-width: 768px) {
  .header-ad-banner { display: block; }
}

/* --- Navigation Bar --- */
.main-nav {
  background: var(--primary);
}

.main-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
}

.main-nav li a {
  display: block;
  padding: 12px 16px;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.92rem;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-radius: 4px;
  white-space: nowrap;
}

.main-nav li a:hover,
.main-nav li.current-menu-item a {
  background-color: var(--primary-dark);
  color: #fff;
}

/* --- Ticker Bar --- */
.ticker-bar {
  background: #fff;
  border-bottom: 1px solid var(--border-color);
  padding: 8px 0;
  margin-bottom: 24px;
}

.ticker-inner {
  display: flex;
  align-items: center;
  gap: 15px;
}

.ticker-label {
  background: #212529;
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.ticker-headline {
  font-size: 0.88rem;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Content Layout --- */
.content-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  margin-bottom: 50px;
}

@media(min-width: 992px) {
  .content-wrapper {
    grid-template-columns: 2.6fr 1.1fr;
  }
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 8px;
  position: relative;
}

.section-heading h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--dark);
  position: relative;
}

.section-heading h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 50px;
  height: 3px;
  background-color: var(--primary);
}

/* --- Featured Lead News Section --- */
.featured-news-card {
  position: relative;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 25px;
}

.featured-img-wrap {
  position: relative;
  max-height: 400px;
  overflow: hidden;
}

.featured-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.featured-news-card:hover .featured-img-wrap img {
  transform: scale(1.03);
}

.featured-content {
  padding: 24px;
}

.category-tag {
  display: inline-block;
  background-color: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 3px;
  margin-bottom: 10px;
}

.featured-content h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 12px;
}

/* --- News Grid --- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.news-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.news-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: #e9ecef;
}

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

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

.news-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-body h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 8px 0 10px 0;
}

.news-body h3 a {
  color: var(--dark);
}

.news-body h3 a:hover {
  color: var(--primary);
}

.meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.excerpt {
  font-size: 0.88rem;
  color: #495057;
  line-height: 1.55;
  margin-bottom: 15px;
  flex-grow: 1;
}

.read-more-btn {
  align-self: flex-start;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
}

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

.sidebar-widget {
  background: var(--card-bg);
  padding: 22px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 8px;
  margin-bottom: 16px;
  color: var(--dark);
}

.popular-list {
  list-style: none;
}

.popular-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.popular-item:last-child {
  border-bottom: none;
}

.popular-num {
  font-size: 1.4rem;
  font-weight: 900;
  color: #dee2e6;
  line-height: 1;
  min-width: 25px;
}

.popular-title {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.3;
}

/* --- Footer --- */
.site-footer {
  background-color: var(--dark);
  color: #adb5bd;
  padding: 45px 0 20px 0;
  margin-top: 40px;
  border-top: 4px solid var(--primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-col h4 {
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 15px;
  position: relative;
  padding-bottom: 6px;
}

.footer-col p {
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer-bottom {
  text-align: center;
  font-size: 0.82rem;
  padding-top: 20px;
  border-top: 1px solid #2d2d2d;
  color: #6c757d;
}
