/*
Theme Name: UrduPro BBC
Theme URI: https://urdupro.info/
Author: UrduPro
Author URI: https://urdupro.info/
Description: A clean, professional BBC-inspired news theme for UrduPro. White background, bold sans-serif headlines, mosaic hero grid, sticky navigation, fully responsive.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: urdupro-bbc
Requires PHP: 7.4
*/

/* ============ BASE ============ */
:root {
  --bbc-red: #B80000;
  --bbc-darkred: #8F0000;
  --ink: #1a1a1a;
  --grey: #666666;
  --pale-grey: #8a8a8a;
  --hairline: #e0e0e0;
  --paper: #ffffff;
  --wash: #f6f6f6;
  --link: #1a1a1a;
}

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; }

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

.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ============ TOP UTILITY BAR ============ */
.topbar {
  border-bottom: 1px solid var(--hairline);
  background: var(--paper);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px;
}
.bbc-blocks { display: flex; gap: 5px; }
.bbc-blocks .block {
  background: #000; color: #fff;
  font-weight: 800; font-size: 19px; letter-spacing: 1px;
  padding: 6px 10px; line-height: 1;
  display: inline-flex; align-items: center;
}
.topbar-tagline { font-size: 12px; color: var(--grey); margin-top: 4px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.topbar-actions a { font-weight: 600; }
.btn-signin {
  border: 1px solid #000; padding: 6px 16px; border-radius: 2px;
  font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .5px;
}
.btn-signin:hover { background: #000; color: #fff; text-decoration: none; }
.btn-register { color: var(--bbc-red); font-weight: 700; }

/* ============ PRIMARY NAV ============ */
.primary-nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner { display: flex; align-items: center; }
.nav-menu { display: flex; list-style: none; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.nav-menu::-webkit-scrollbar { display: none; }
.nav-menu li { flex-shrink: 0; position: relative; }
.nav-menu > li > a {
  display: block; padding: 13px 14px;
  font-size: 14px; font-weight: 600; color: var(--ink);
  border-bottom: 4px solid transparent;
}
.nav-menu > li > a:hover { border-bottom-color: var(--bbc-red); text-decoration: none; }
.nav-menu > li.current-menu-item > a { border-bottom-color: var(--bbc-red); }
.nav-menu .sub-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 220px;
  background: #fff; border: 1px solid var(--hairline); border-top: 4px solid var(--bbc-red);
  list-style: none; box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 200;
}
.nav-menu li:hover > .sub-menu, .nav-menu li:focus-within > .sub-menu { display: block; }
.nav-menu .sub-menu a { display: block; padding: 10px 16px; font-size: 14px; font-weight: 500; }
.nav-menu .sub-menu a:hover { background: var(--wash); text-decoration: none; }
.hamburger { display: none; background: none; border: none; padding: 12px; cursor: pointer; }
.hamburger span { display: block; width: 22px; height: 2px; background: #000; margin: 5px 0; }
.nav-search { margin-left: auto; padding: 8px 0 8px 12px; }

/* ============ HERO MOSAIC ============ */
.hero { padding: 24px 0 8px; }
.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
}
.hero-lead { grid-column: 1; grid-row: 1 / 3; position: relative; }
.hero-side-a { grid-column: 2; grid-row: 1 / 3; display: flex; flex-direction: column; gap: 16px; }
.hero-side-b { grid-column: 3; grid-row: 1 / 3; display: flex; flex-direction: column; gap: 16px; }
.hero-textrow { grid-column: 1 / 4; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding-top: 8px; border-top: 1px solid var(--hairline); }

.story-card { position: relative; }
.story-card .thumb { position: relative; overflow: hidden; background: #111; }
.story-card .thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .3s ease; }
.story-card:hover .thumb img { transform: scale(1.03); }
.hero-lead .story-card .thumb img { aspect-ratio: 16 / 10; }
.hero-lead .card-body { padding: 16px 0; }
.story-card .kicker {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: var(--bbc-red); margin-bottom: 6px;
}
.story-card h2, .story-card h3 { font-size: 20px; margin-bottom: 8px; }
.hero-lead h2 { font-size: 32px; }
.story-card .summary { font-size: 14px; color: #333; margin-bottom: 8px; }
.hero-lead .summary { font-size: 16px; }
.meta-row { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--grey); }
.meta-row .cat { font-weight: 700; text-transform: uppercase; letter-spacing: .5px; font-size: 11px; color: var(--ink); border-left: 3px solid var(--bbc-red); padding-left: 8px; }
.badge-live {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bbc-red); color: #fff;
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px;
  padding: 3px 8px; border-radius: 2px;
}
.badge-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .35; } }

.text-card { padding: 4px 0; }
.text-card h3 { font-size: 17px; margin-bottom: 6px; }
.text-card .summary { font-size: 13px; color: #333; margin-bottom: 6px; }

/* ============ SECTIONS ============ */
.section { padding: 28px 0 8px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 20px; padding-bottom: 10px;
}
.section-title {
  font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px;
  position: relative; padding-left: 0;
}
.section-title::before { content: ""; display: inline-block; width: 4px; height: 16px; background: var(--bbc-red); margin-right: 10px; vertical-align: -2px; }
.section-more { font-size: 13px; font-weight: 600; color: var(--bbc-red); }
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card-grid .story-card h3 { font-size: 17px; }
.card-grid .story-card .summary { font-size: 13px; }

/* ============ LATEST LIST ============ */
.latest-list { list-style: none; }
.latest-list li { padding: 14px 0; border-bottom: 1px solid var(--hairline); display: flex; gap: 16px; }
.latest-list .thumb { flex: 0 0 160px; }
.latest-list .thumb img { aspect-ratio: 16/9; object-fit: cover; }
.latest-list h3 { font-size: 18px; margin-bottom: 6px; }
.latest-list .summary { font-size: 13px; color: #333; }

/* ============ SINGLE POST ============ */
.single-wrap { max-width: 800px; margin: 0 auto; padding: 24px 16px 40px; }
.breadcrumb { font-size: 13px; color: var(--grey); margin-bottom: 12px; }
.breadcrumb a { font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--bbc-red); font-size: 12px; }
.single-title { font-size: 34px; line-height: 1.2; margin-bottom: 12px; }
.single-meta { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--grey); margin-bottom: 20px; flex-wrap: wrap; }
.single-meta .byline { font-weight: 700; color: var(--ink); }
.single-featured { margin: 0 0 24px; }
.single-featured img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.single-featured figcaption { font-size: 12px; color: var(--grey); padding-top: 8px; border-bottom: 1px solid var(--hairline); padding-bottom: 12px; }
.entry-content { font-size: 17px; line-height: 1.75; color: #222; }
.entry-content p { margin-bottom: 1.2em; }
.entry-content h2 { font-size: 24px; margin: 1.6em 0 .7em; }
.entry-content h3 { font-size: 20px; margin: 1.4em 0 .6em; }
.entry-content ul, .entry-content ol { margin: 0 0 1.2em 1.4em; }
.entry-content blockquote { border-left: 4px solid var(--bbc-red); padding: 8px 0 8px 20px; margin: 1.4em 0; font-size: 19px; font-weight: 600; color: #111; }
.entry-content img { border-radius: 4px; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 15px; }
.entry-content th, .entry-content td { border: 1px solid var(--hairline); padding: 10px 12px; text-align: left; }
.entry-content th { background: var(--wash); font-weight: 700; }
.post-tags { margin: 28px 0; font-size: 13px; }
.post-tags a { display: inline-block; border: 1px solid var(--hairline); padding: 5px 12px; margin: 0 8px 8px 0; border-radius: 20px; font-weight: 600; }
.post-tags a:hover { border-color: #000; text-decoration: none; }

/* Author box */
.author-box {
  display: flex; gap: 18px; align-items: flex-start;
  border: 1px solid var(--hairline); border-top: 4px solid var(--bbc-red);
  padding: 22px; margin: 32px 0; background: var(--wash);
}
.author-box .avatar img { border-radius: 50%; }
.author-box .author-name { font-weight: 800; font-size: 16px; margin-bottom: 4px; }
.author-box .author-role { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--bbc-red); font-weight: 700; margin-bottom: 8px; }
.author-box p { font-size: 14px; color: #444; }

/* Related posts */
.related { margin: 36px 0; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* ============ ARCHIVE / SEARCH ============ */
.archive-head { padding: 28px 0 8px; border-bottom: 1px solid var(--hairline); margin-bottom: 24px; }
.archive-head h1 { font-size: 30px; }
.archive-head .desc { color: var(--grey); font-size: 14px; margin-top: 6px; }
.pagination { display: flex; gap: 8px; justify-content: center; margin: 32px 0; flex-wrap: wrap; }
.pagination .page-numbers { border: 1px solid var(--hairline); padding: 8px 14px; font-weight: 600; font-size: 14px; }
.pagination .page-numbers.current { background: #000; color: #fff; border-color: #000; }
.pagination a.page-numbers:hover { border-color: #000; text-decoration: none; }

/* ============ SIDEBAR / WIDGETS ============ */
.content-sidebar { display: grid; grid-template-columns: 1fr 300px; gap: 32px; }
.widget { margin-bottom: 32px; }
.widget-title { font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; border-bottom: 1px solid var(--hairline); padding-bottom: 10px; margin-bottom: 16px; }
.widget ul { list-style: none; }
.widget li { padding: 8px 0; border-bottom: 1px solid var(--hairline); font-size: 14px; }

/* ============ FOOTER ============ */
.site-footer { border-top: 1px solid var(--hairline); margin-top: 48px; padding: 36px 0 24px; background: var(--paper); }
.footer-logo { margin-bottom: 20px; }
.footer-nav { margin-bottom: 20px; }
.footer-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 14px; font-weight: 600; }
.footer-social { margin-bottom: 20px; display: flex; gap: 16px; font-size: 14px; font-weight: 700; }
.footer-social a { color: var(--bbc-red); }
.footer-legal { font-size: 12px; color: var(--grey); border-top: 1px solid var(--hairline); padding-top: 16px; display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: space-between; }
.footer-legal ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; }

/* ============ 404 ============ */
.error-404 { text-align: center; padding: 80px 16px; }
.error-404 h1 { font-size: 72px; font-weight: 800; }
.error-404 p { color: var(--grey); margin: 12px 0 24px; }
.btn { display: inline-block; background: var(--bbc-red); color: #fff; padding: 12px 28px; font-weight: 700; border-radius: 2px; }
.btn:hover { background: var(--bbc-darkred); color: #fff; text-decoration: none; }

/* Search form */
.search-form { display: flex; }
.search-form input[type="search"] { border: 1px solid var(--hairline); padding: 8px 12px; font-size: 14px; width: 200px; }
.search-form button { background: #000; color: #fff; border: none; padding: 8px 14px; cursor: pointer; font-weight: 700; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr 1fr; }
  .hero-lead { grid-column: 1 / 3; grid-row: 1; }
  .hero-side-a { grid-column: 1; grid-row: 2; }
  .hero-side-b { grid-column: 2; grid-row: 2; }
  .hero-textrow { grid-column: 1 / 3; grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .hamburger { display: block; }
  .nav-menu {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; flex-direction: column; border-bottom: 2px solid #000;
    max-height: 70vh; overflow-y: auto;
  }
  .nav-menu.open { display: flex; }
  .nav-menu .sub-menu { position: static; border: none; box-shadow: none; }
  .nav-search { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-lead, .hero-side-a, .hero-side-b { grid-column: 1; grid-row: auto; }
  .hero-textrow { grid-column: 1; grid-template-columns: 1fr; }
  .hero-lead h2 { font-size: 24px; }
  .card-grid, .related-grid { grid-template-columns: 1fr; }
  .content-sidebar { grid-template-columns: 1fr; }
  .single-title { font-size: 26px; }
  .entry-content { font-size: 16px; }
  .latest-list li { flex-direction: column; }
  .latest-list .thumb { flex: none; }
  .topbar-tagline { display: none; }
}
