/*
Theme Name: Urdu News Portal
Theme URI: https://example.com
Author: Your Name
Description: Bara Urdu news portal theme — category-wise sections, dropdown menu, breaking news ticker, most-read sidebar aur multi-column footer ke sath. Elementor compatible, RTL native.
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: urdunewsportal
Tags: news, rtl-language-support, custom-logo, custom-menu, translation-ready
*/

/* ==========================================================================
   1. VARIABLES
   ========================================================================== */
:root {
  --primary: #b3141a;      /* accent red */
  --primary-dark: #8a0f14;
  --bg: #ffffff;
  --bg-alt: #f7f7f7;
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --border: #e2e2e2;
  --topbar-bg: #1a1a1a;
  --font-heading: 'Noto Nastaliq Urdu', serif;
  --font-body: 'Noto Naskh Arabic', 'Noto Nastaliq Urdu', serif;
}

* { box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  direction: rtl;
  text-align: right;
  margin: 0;
  line-height: 1.9;
  font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text);
  margin: 0 0 10px;
  line-height: 1.7;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; display: block; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ==========================================================================
   2. TOP BAR
   ========================================================================== */
.top-bar {
  background: var(--topbar-bg);
  color: #ccc;
  font-size: 13px;
}

.top-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px;
  flex-wrap: wrap;
}

.top-bar-links { display: flex; gap: 16px; }
.top-bar-links a { color: #ccc; }
.top-bar-links a:hover { color: var(--primary); }

.top-bar-date { color: #999; }

/* ==========================================================================
   3. HEADER
   ========================================================================== */
.site-header {
  border-bottom: 3px solid var(--primary);
  background: var(--bg);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.site-branding .site-title {
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 700;
  color: var(--primary);
}

.site-branding .site-description {
  color: var(--text-muted);
  font-size: 13px;
  margin: 2px 0 0;
}

.custom-logo { max-height: 65px; }

/* Primary nav with dropdown support */
.main-navigation {
  background: var(--primary);
  position: relative;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  padding: 10px 16px;
  cursor: pointer;
}

.nav-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-menu > li {
  position: relative;
}

.nav-menu > li > a {
  display: block;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  padding: 13px 16px;
  border-left: 1px solid rgba(255,255,255,0.15);
}

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

/* Dropdown (sub-menu) */
.nav-menu ul {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--border);
  border-top: 3px solid var(--primary);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  z-index: 200;
}

.nav-menu li:hover > ul { display: block; }

.nav-menu ul li a {
  display: block;
  padding: 10px 16px;
  color: var(--text);
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}

.nav-menu ul li a:hover { background: var(--bg-alt); color: var(--primary); }

/* ==========================================================================
   4. BREAKING NEWS TICKER
   ========================================================================== */
.breaking-ticker {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.breaking-label {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  padding: 8px 16px;
  flex-shrink: 0;
  font-size: 14px;
}

.breaking-items {
  display: flex;
  gap: 40px;
  padding: 8px 16px;
  white-space: nowrap;
  animation: ticker 30s linear infinite;
}

.breaking-items a { font-size: 14px; }

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

/* ==========================================================================
   5. LAYOUT
   ========================================================================== */
.main-layout {
  display: grid;
  grid-template-columns: 2.4fr 1fr;
  gap: 30px;
  padding: 30px 16px;
}

.section-title {
  font-size: 22px;
  color: var(--primary);
  border-bottom: 3px solid var(--primary);
  padding-bottom: 8px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.section-title .see-more {
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-body);
}

/* ==========================================================================
   6. HERO / LEAD STORY
   ========================================================================== */
.hero-section { margin-bottom: 40px; }

.hero-main {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 20px;
}

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

.hero-overlay {
  position: absolute;
  bottom: 0; right: 0; left: 0;
  padding: 24px;
  background: linear-gradient(to top, rgba(0,0,0,0.88), transparent);
}

.cat-badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 3px;
  margin-bottom: 10px;
}

.hero-title { font-size: 30px; color: #fff; }

.hero-excerpt { color: #ddd; font-size: 15px; max-width: 650px; margin-top: 8px; }

/* ==========================================================================
   7. KHAS KHABRAIN (small grid, text focused)
   ========================================================================== */
.khas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.khas-item h3 {
  font-size: 16px;
  margin: 0;
}

.khas-item {
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border);
}

/* ==========================================================================
   8. CATEGORY BLOCK (repeated per category on homepage)
   ========================================================================== */
.category-block { margin-bottom: 45px; }

.category-block-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 25px;
}

.cat-lead-thumb img { border-radius: 6px; height: 230px; object-fit: cover; margin-bottom: 12px; }

.cat-lead-title { font-size: 21px; }
.cat-lead-title:hover { color: var(--primary); }

.cat-lead-excerpt { color: var(--text-muted); font-size: 14px; }

.cat-meta { font-size: 13px; color: var(--text-muted); margin-top: 8px; }

.cat-list-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

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

.cat-list-thumb { flex-shrink: 0; width: 90px; }
.cat-list-thumb img { border-radius: 4px; height: 65px; object-fit: cover; }

.cat-list-title { font-size: 15px; }
.cat-list-title:hover { color: var(--primary); }

.cat-list-date { font-size: 12px; color: var(--text-muted); display: block; margin-top: 4px; }

/* ==========================================================================
   9. SIDEBAR
   ========================================================================== */
.widget-area .widget {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 18px;
  margin-bottom: 25px;
}

.widget-title {
  font-size: 18px;
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  padding-bottom: 8px;
  margin-bottom: 15px;
}

.widget ul li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}
.widget ul li:last-child { border-bottom: none; }

/* Most read numbered list */
.most-read-list { counter-reset: mr; }

.most-read-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}
.most-read-item:last-child { border-bottom: none; }

.most-read-num {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  min-width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.most-read-title { font-size: 14px; }
.most-read-title:hover { color: var(--primary); }
.most-read-date { font-size: 12px; color: var(--text-muted); display: block; margin-top: 3px; }

/* Quick info widgets (petrol/gold/prayer/weather) */
.quick-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.quick-info-item {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}

.quick-info-item:hover { border-color: var(--primary); color: var(--primary); }

/* ==========================================================================
   10. OPINION SECTION (text only, no images)
   ========================================================================== */
.opinion-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 30px;
}

.opinion-item {
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
}

.opinion-item h3 { font-size: 16px; }
.opinion-item .cat-meta { margin-top: 4px; }

/* ==========================================================================
   11. SINGLE POST / PAGE
   ========================================================================== */
.single-post-header { margin-bottom: 20px; }
.single-title { font-size: 28px; }

.post-meta {
  color: var(--text-muted);
  font-size: 13px;
  margin: 10px 0 20px;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}

.single-thumb img { border-radius: 6px; margin-bottom: 20px; max-height: 420px; width: 100%; object-fit: cover; }

.entry-content { font-size: 17px; }
.entry-content p { margin-bottom: 18px; }
.entry-content blockquote {
  border-right: 4px solid var(--primary);
  padding: 10px 20px;
  background: var(--bg-alt);
  margin: 20px 0;
  color: var(--text-muted);
}
.entry-content a { color: var(--primary); text-decoration: underline; }

/* ==========================================================================
   12. NEWS GRID (archive/search/index)
   ========================================================================== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.news-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.news-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.08); }
.card-thumb img { height: 160px; object-fit: cover; }
.card-body { padding: 14px; }
.card-title { font-size: 16px; }
.card-date { font-size: 12px; color: var(--text-muted); }

/* ==========================================================================
   13. FOOTER (multi-column)
   ========================================================================== */
.site-footer {
  background: var(--topbar-bg);
  color: #ccc;
  margin-top: 40px;
  padding-top: 35px;
}

.footer-about { max-width: 320px; font-size: 14px; color: #aaa; }
.footer-social { display: flex; gap: 10px; margin-top: 12px; }
.footer-social a {
  width: 32px; height: 32px;
  border: 1px solid #444;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #ccc; font-size: 13px;
}
.footer-social a:hover { border-color: var(--primary); color: var(--primary); }

.footer-widgets {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 25px;
  padding-bottom: 30px;
  border-bottom: 1px solid #333;
}

.footer-widget-title {
  color: #fff;
  font-size: 15px;
  border-bottom: 1px solid #444;
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.footer-widget ul li { border-bottom: none; padding: 4px 0; }
.footer-widget a { color: #aaa; font-size: 14px; }
.footer-widget a:hover { color: var(--primary); }

.footer-menu {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  padding: 15px 0;
}
.footer-menu a { color: #aaa; font-size: 13px; }
.footer-menu a:hover { color: var(--primary); }

.site-info {
  text-align: center;
  padding: 15px 0;
  font-size: 13px;
  color: #888;
  border-top: 1px solid #333;
}

/* ==========================================================================
   14. RESPONSIVE
   ========================================================================== */
@media (max-width: 960px) {
  .main-layout { grid-template-columns: 1fr; }
  .category-block-inner { grid-template-columns: 1fr; }
  .khas-grid { grid-template-columns: repeat(2, 1fr); }
  .opinion-list { grid-template-columns: 1fr; }
  .footer-widgets { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .menu-toggle { display: inline-block; }
  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
  }
  .nav-menu.show { display: flex; }
  .nav-menu ul { position: static; box-shadow: none; border: none; }
  .news-grid, .khas-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 22px; }
  .hero-main img { height: 220px; }
  .footer-widgets { grid-template-columns: 1fr; }
  .top-bar-links { gap: 10px; font-size: 12px; }
}
