/*
Theme Name: Naya Ujala Broadcast RTL
Theme URI: https://www.nayaujala.com/
Author: OpenAI
Author URI: https://www.nayaujala.com/
Description: Modern news WordPress theme inspired by TV news layouts with custom homepage sections, breaking ticker, social buttons, widgets, and responsive design.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: nayaujala-broadcast
*/

:root {
  --accent: #c5161d;
  --dark: #111111;
  --light: #ffffff;
  --muted: #6b7280;
  --border: #e5e7eb;
  --bg: #f5f5f5;
  --soft: #f9fafb;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: #111827;
  direction: rtl;
  text-align: right;
  font-family: "Noto Nastaliq Urdu","Jameel Noori Nastaleeq","Noto Sans Arabic",serif;
  line-height: 1.8;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { margin: 0; padding: 0; }
.container { width: min(1220px, 94%); margin: 0 auto; }

.topbar {
  background: var(--dark);
  color: #fff;
  font-size: 14px;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
}
.topbar-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.live-badge {
  background: var(--accent);
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
}
.social-links {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.social-links a {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #fff;
  color: var(--dark);
  border: 1px solid var(--border);
  transition: all .2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
}
.social-links a:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-1px);
}
.social-links svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.branding {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
}
.logo-wrap img {
  max-height: 70px;
  width: auto;
}
.brand-text {
  min-width: 0;
}
.site-title {
  margin: 0;
  font-size: 34px;
  line-height: 1.2;
  font-weight: 800;
}
.site-title a { color: inherit; }
.site-tagline {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}
.header-search {
  min-width: 260px;
}
.search-form {
  display: flex;
  gap: 8px;
}
.search-form input[type="search"] {
  width: 100%;
  padding: 11px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  text-align: right;
}
.search-form button {
  padding: 11px 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.navbar {
  background: var(--accent);
  color: #fff;
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.primary-menu {
  display: flex;
  list-style: none;
  flex-wrap: wrap;
}
.primary-menu > li > a {
  display: block;
  color: #fff;
  padding: 14px 16px;
  font-weight: 700;
}
.primary-menu > li > a:hover {
  background: rgba(255,255,255,.12);
}
.menu-fallback {
  padding: 14px 0;
  color: #fff;
  font-weight: 700;
}

.ticker {
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.ticker-inner {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  align-items: center;
  padding: 12px 0;
}
.ticker-label {
  background: var(--accent);
  color: #fff;
  text-align: center;
  padding: 10px 12px;
  border-radius: 6px;
  font-weight: 700;
}
.ticker-items {
  display: flex;
  gap: 18px;
  overflow: auto;
  white-space: nowrap;
  scrollbar-width: thin;
}
.ticker-items a {
  color: #111827;
  font-weight: 700;
}

.content-wrap {
  padding: 28px 0 0;
}
.main-grid {
  display: grid;
  grid-template-columns: minmax(0,2fr) 340px;
  gap: 28px;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0,1.4fr) minmax(0,1fr);
  gap: 20px;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.entry-content-wrap {
  padding: 16px;
}
.entry-meta {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}
.hero-main .entry-title {
  font-size: 36px;
  line-height: 1.25;
  margin: 0 0 10px;
}
.entry-title {
  margin: 0 0 8px;
  line-height: 1.35;
}
.entry-title a { color: inherit; }
.hero-side-list,
.widget-list,
.footer-list {
  list-style: none;
}
.hero-side-list li,
.widget-list li,
.footer-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.hero-side-list li:last-child,
.widget-list li:last-child,
.footer-list li:last-child {
  border-bottom: none;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 28px 0 14px;
  border-bottom: 3px solid var(--accent);
}
.section-title h2 {
  margin: 0;
  padding-bottom: 10px;
  font-size: 24px;
}
.section-title a {
  color: var(--accent);
  font-weight: 700;
  padding-bottom: 10px;
}
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 18px;
}
.news-card .entry-title {
  font-size: 21px;
}

.sidebar .widget,
.footer-widget-block {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
}
.widget-title {
  margin: 0 0 12px;
  font-size: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
}
.archive-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 20px;
}
.single-post {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
}
.single-post .entry-title {
  font-size: 40px;
  line-height: 1.2;
  margin: 0 0 12px;
}
.entry-content img { margin: 18px auto; }
.entry-content p { margin: 0 0 14px; }
.pagination-wrap {
  margin-top: 22px;
}

.site-footer {
  margin-top: 36px;
  background: var(--dark);
  color: #fff;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 26px;
  padding: 34px 0;
}
.site-footer .widget-title {
  border-bottom-color: var(--accent);
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 14px 0;
  font-size: 14px;
  color: rgba(255,255,255,.86);
  text-align: center;
}

.comments-area ol {
  padding-right: 18px;
}
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

body.ltr .site-title,
body.ltr .site-tagline,
body.ltr .entry-title,
body.ltr .entry-content,
body.ltr p,
body.ltr li,
body.ltr .search-form input {
  text-align: left;
}

body.rtl .site-title,
body.rtl .site-tagline,
body.rtl .entry-title,
body.rtl .entry-content,
body.rtl p,
body.rtl li,
body.rtl .search-form input {
  text-align: right;
}

@media (max-width: 991px) {
  .branding {
    grid-template-columns: 1fr;
  }
  .topbar-inner,
  .navbar-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .ticker-inner,
  .main-grid,
  .hero-grid,
  .news-grid,
  .archive-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .header-search {
    width: 100%;
    min-width: 0;
  }
  .hero-main .entry-title,
  .single-post .entry-title {
    font-size: 30px;
  }
}

@media (max-width: 640px) {
  .primary-menu > li > a {
    padding: 12px 12px;
  }
  .site-title {
    font-size: 28px;
  }
}
