/*
Theme Name:  Life In Pakistan
Theme URI:   https://www.lifeinpakistan.net
Author:      Life In Pakistan
Description: Lightweight mobile-first theme for lifeinpakistan.net — Pakistan news & lifestyle portal.
Version:     1.0.0
License:     GNU General Public License v2
Text Domain: lifeinpakistan
*/

/* ============================================================
   VARIABLES
============================================================ */
:root {
  --primary:     #c0392b;
  --primary-dk:  #962d22;
  --primary-lt:  #fdf2f2;
  --navy:        #1a1a2e;
  --navy2:       #16213e;
  --gold:        #f39c12;
  --text:        #1f2937;
  --muted:       #6b7280;
  --border:      #e5e7eb;
  --bg:          #ffffff;
  --surface:     #f9fafb;
  --green:       #27ae60;
  --radius:      6px;
  --shadow:      0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:   0 4px 12px rgba(0,0,0,0.1);
  --max-w:       1180px;
  --font-h:      'Playfair Display', Georgia, serif;
  --font-b:      'DM Sans', system-ui, sans-serif;
}

/* ============================================================
   RESET — mobile overflow prevention first
============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-b);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

img, video, iframe, embed, object {
  max-width: 100%;
  height: auto;
  display: block;
}

a  { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, select, textarea { font-family: inherit; }

/* ============================================================
   LAYOUT
============================================================ */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px;
}

/* ============================================================
   TYPOGRAPHY
============================================================ */
h1, h2, h3, h4, h5 {
  font-family: var(--font-h);
  line-height: 1.2;
  color: var(--navy);
  font-weight: 700;
}
p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

/* ============================================================
   TOP BAR (date + social)
============================================================ */
.top-bar {
  background: var(--navy);
  padding: 5px 0;
  display: none; /* hidden mobile, shown desktop */
}
.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.top-date {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  font-family: var(--font-b);
}
.top-social { display: flex; gap: 10px; }
.top-social a {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  font-family: var(--font-b);
  transition: color 0.15s;
}
.top-social a:hover { color: var(--gold); }

/* ============================================================
   SITE HEADER — sticky, mobile-first
============================================================ */
.site-header {
  background: var(--navy);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  gap: 12px;
}

/* Branding */
.site-branding a {
  display: flex;
  flex-direction: column;
  text-decoration: none;
}
.site-title {
  font-family: var(--font-h);
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  white-space: nowrap;
}
.site-title .accent { color: var(--gold); }
.site-tagline {
  font-size: 9px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 2px;
  display: none; /* shown on desktop */
}

/* Search — hidden mobile */
.header-search { display: none; }

/* Hamburger — always visible on mobile */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 7px;
  background: var(--primary);
  border-radius: 4px;
  flex-shrink: 0;
}
.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
  transform-origin: center;
}
.menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   PRIMARY NAV — mobile first
============================================================ */
.primary-nav {
  background: var(--primary);
}
.nav-wrap { position: relative; }

#primary-menu {
  display: none;
  flex-direction: column;
  width: 100%;
  max-height: 75vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--navy2);
}
#primary-menu.is-open { display: flex; }

#primary-menu > li {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
#primary-menu > li > a {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  padding: 13px 16px;
}
#primary-menu > li > a:hover { color: var(--gold); }

.sub-menu {
  display: none;
  flex-direction: column;
  background: rgba(0,0,0,0.3);
}
.sub-menu.is-open { display: flex; }
.sub-menu li { border-bottom: 1px solid rgba(255,255,255,0.06); }
.sub-menu li a { display: block; padding: 10px 28px; font-size: 13px; color: rgba(255,255,255,0.8); }
.sub-menu li a:hover { color: var(--gold); }

.sub-toggle {
  position: absolute;
  right: 0;
  top: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6);
  font-size: 11px;
  background: none;
  border: none;
  cursor: pointer;
}

/* ============================================================
   CATEGORY TABS STRIP
============================================================ */
.cat-strip {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.cat-strip .inner {
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex-wrap: nowrap;
}
.cat-strip .inner::-webkit-scrollbar { display: none; }
.cat-strip a {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 9px 13px;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s;
}
.cat-strip a:hover,
.cat-strip a.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ============================================================
   BREAKING BAR
============================================================ */
.breaking-bar {
  background: var(--primary);
  padding: 6px 0;
  overflow: hidden;
}
.breaking-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}
.breaking-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  background: #fff;
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}
.breaking-text {
  font-size: 12px;
  color: rgba(255,255,255,0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.breaking-text a { color: #fff; }

/* ============================================================
   HERO SECTION — full bleed
============================================================ */
.hero-section {
  position: relative;
  background: var(--navy);
  overflow: hidden;
  min-height: 260px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.2;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26,26,46,0.97) 55%, rgba(192,57,43,0.3) 100%);
}
.hero-section .container { position: relative; z-index: 2; }
.hero-inner { padding: 32px 0; }

.hero-cat {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: var(--primary);
  color: #fff;
  padding: 3px 8px;
  border-radius: 2px;
  margin-bottom: 12px;
}
.hero-title {
  font-family: var(--font-h);
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 10px;
}
.hero-title a { color: #fff; }
.hero-title a:hover { color: var(--gold); }
.hero-excerpt {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}
.hero-read-btn {
  background: var(--primary);
  color: #fff !important;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 4px;
  margin-left: 4px;
  display: inline-block;
  transition: background 0.2s;
}
.hero-read-btn:hover { background: var(--primary-dk) !important; }

/* ============================================================
   STATS BAR — 2x2 grid on mobile
============================================================ */
.stats-bar {
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.stats-inner {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}
.stat-item {
  padding: 10px 12px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.stat-item:nth-child(2) { border-right: none; }
.stat-item:nth-child(3), .stat-item:nth-child(4) { border-bottom: none; }
.stat-item:nth-child(4) { border-right: none; }
.stat-item .sv {
  display: block;
  font-family: var(--font-h);
  font-size: 18px;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
}
.stat-item .sl {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 2px;
}

/* ============================================================
   MAIN LAYOUT — mobile: stacked, desktop: sidebar
============================================================ */
main { width: 100%; }

.content-wrap {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 24px 0 48px;
}
.main-content { width: 100%; min-width: 0; }
.sidebar      { width: 100%; }

/* ============================================================
   SECTION HEADING
============================================================ */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--border);
  position: relative;
}
.section-head::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 60px;
  height: 3px;
  background: var(--primary);
}
.section-head h2 {
  font-size: 18px;
  font-family: var(--font-h);
  color: var(--navy);
}
.section-head a {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 4px 10px;
  border-radius: 3px;
  transition: all 0.15s;
}
.section-head a:hover { background: var(--primary); color: #fff; }

/* ============================================================
   ARTICLE CARDS — mobile: 1 col
============================================================ */
.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.article-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}
.article-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface);
  flex-shrink: 0;
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.article-card:hover .card-thumb img { transform: scale(1.04); }

.card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.card-cat {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 6px;
}
.card-title {
  font-family: var(--font-h);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--navy);
  margin-bottom: 8px;
  flex: 1;
}
.card-title a:hover { color: var(--primary); }
.card-excerpt {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}
.card-meta {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 6px;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.card-meta .sep { color: var(--border); }

/* Featured card — full width, horizontal layout */
.article-card.featured {
  border-top: 3px solid var(--primary);
}
.article-card.featured .card-title { font-size: 18px; }

/* ============================================================
   CATEGORY BOXES — homepage section
============================================================ */
.cat-boxes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.cat-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  transition: box-shadow 0.2s, transform 0.2s;
  border-top: 3px solid var(--primary);
}
.cat-box:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.cat-box .icon { font-size: 26px; margin-bottom: 8px; }
.cat-box h3 { font-size: 13px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.cat-box p  { font-size: 11px; color: var(--muted); margin: 0; }

/* ============================================================
   SIDEBAR
============================================================ */
.sidebar-widget {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}
.widget-head {
  background: var(--navy);
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  font-family: var(--font-b);
}
.widget-body { padding: 14px 16px; }

/* Popular posts widget */
.popular-list { display: flex; flex-direction: column; gap: 0; }
.popular-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.popular-item:last-child { border-bottom: none; }
.popular-num {
  font-family: var(--font-h);
  font-size: 22px;
  font-weight: 900;
  color: var(--border);
  line-height: 1;
  flex-shrink: 0;
  width: 24px;
  margin-top: 2px;
}
.popular-thumb {
  width: 64px;
  height: 48px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface);
}
.popular-thumb img { width: 100%; height: 100%; object-fit: cover; }
.popular-body { flex: 1; min-width: 0; }
.popular-title {
  font-family: var(--font-h);
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.popular-title a:hover { color: var(--primary); }
.popular-date { font-size: 11px; color: var(--muted); margin-top: 3px; }

/* Categories widget */
.cat-widget-list { display: flex; flex-direction: column; }
.cat-widget-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s;
}
.cat-widget-list a:last-child { border-bottom: none; }
.cat-widget-list a:hover { color: var(--primary); }
.cat-widget-list .count {
  font-size: 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 1px 7px;
  border-radius: 10px;
}

/* Newsletter */
.newsletter-form { margin-top: 8px; }
.newsletter-form p { font-size: 13px; color: var(--muted); margin-bottom: 10px; line-height: 1.5; }
.newsletter-form input {
  width: 100%;
  padding: 9px 12px;
  font-size: 13px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  outline: none;
  margin-bottom: 8px;
  transition: border-color 0.2s;
  font-family: inherit;
}
.newsletter-form input:focus { border-color: var(--primary); }
.newsletter-form button {
  width: 100%;
  padding: 9px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}
.newsletter-form button:hover { background: var(--primary-dk); }
#newsletter-msg { font-size: 12px; margin-top: 6px; }

/* ============================================================
   SINGLE ARTICLE
============================================================ */
.article-cat-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  background: var(--primary-lt);
  color: var(--primary);
  padding: 3px 10px;
  border-radius: 2px;
  margin-bottom: 12px;
}
.article-headline {
  font-family: var(--font-h);
  font-size: clamp(20px, 5vw, 32px);
  font-weight: 900;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 12px;
  /* Prevent long titles breaking layout */
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.article-deck {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.6;
  border-left: 4px solid var(--primary);
  padding-left: 12px;
  margin-bottom: 16px;
}
.article-byline {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
}
.article-byline strong { color: var(--text); }

.share-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.share-btn {
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 3px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--surface);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.share-btn:hover { border-color: var(--primary); color: var(--primary); }

.article-content {
  font-size: 16px;
  line-height: 1.85;
  color: var(--text);
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}
.article-content p { margin-bottom: 18px; }
.article-content h2 {
  font-family: var(--font-h);
  font-size: 20px;
  color: var(--navy);
  margin: 32px 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--primary);
}
.article-content h3 { font-size: 17px; margin: 24px 0 8px; }
.article-content a { color: var(--primary); text-decoration: underline; }
.article-content ul, .article-content ol { padding-left: 20px; margin-bottom: 18px; }
.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }
.article-content li { margin-bottom: 5px; }
.article-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 12px 16px;
  background: var(--primary-lt);
  margin: 20px 0;
  font-style: italic;
  color: var(--navy);
  border-radius: 0 4px 4px 0;
}
.article-content figure { margin: 20px 0; }
.article-content figcaption { font-size: 12px; color: var(--muted); text-align: center; margin-top: 6px; }
/* Table — scrollable on mobile */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 20px 0;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.article-content table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 0; }
.article-content th { background: var(--navy); color: #fff; padding: 9px 12px; text-align: left; font-size: 12px; }
.article-content td { padding: 8px 12px; border-bottom: 1px solid var(--border); }
.article-content tr:nth-child(even) td { background: var(--surface); }

.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border); }
.article-tag {
  font-size: 12px;
  padding: 4px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--muted);
  transition: all 0.15s;
}
.article-tag:hover { border-color: var(--primary); color: var(--primary); }

/* ============================================================
   BREADCRUMB
============================================================ */
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  align-items: center;
}
.breadcrumb a { color: var(--primary); }
.breadcrumb .sep { color: var(--border); }

/* ============================================================
   PAGINATION
============================================================ */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  padding: 24px 0;
}
.pagination a, .pagination span {
  font-size: 13px;
  font-weight: 600;
  padding: 7px 12px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  transition: all 0.15s;
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ============================================================
   FOOTER
============================================================ */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  margin-top: 40px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding: 36px 0 28px;
}
.footer-brand .site-title { font-size: 20px; }
.footer-brand p { font-size: 13px; color: rgba(255,255,255,0.55); line-height: 1.6; margin-top: 8px; max-width: 300px; }

.footer-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.footer-col h4 {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
  font-family: var(--font-b);
}
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col ul li a { font-size: 13px; color: rgba(255,255,255,0.6); transition: color 0.15s; }
.footer-col ul li a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 14px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.footer-bottom p { font-size: 12px; color: rgba(255,255,255,0.4); margin: 0; }
.footer-bottom a { color: var(--gold); }

/* ============================================================
   UTILITY
============================================================ */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.text-primary { color: var(--primary); }
.text-muted { color: var(--muted); }

/* WordPress core */
.alignleft  { float: left; margin: 0 16px 10px 0; max-width: 50%; }
.alignright { float: right; margin: 0 0 10px 16px; max-width: 50%; }
.aligncenter { display: block; margin: 0 auto 10px; }
.wp-block-image img { border-radius: var(--radius); max-width: 100%; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 12px; color: var(--muted); text-align: center; margin-top: 6px; }

/* ============================================================
   DESKTOP — min-width: 768px
============================================================ */
@media (min-width: 768px) {

  /* Top bar */
  .top-bar { display: block; }

  /* Header */
  .header-inner { height: 64px; }
  .site-title { font-size: 22px; }
  .site-tagline { display: block; }

  /* Show search */
  .header-search {
    display: block;
    flex: 1;
    max-width: 300px;
  }
  .header-search form {
    display: flex;
    border: 1.5px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.2s;
  }
  .header-search form:focus-within { border-color: var(--gold); }
  .header-search input {
    flex: 1;
    padding: 8px 12px;
    font-size: 13px;
    border: none;
    outline: none;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-family: inherit;
  }
  .header-search input::placeholder { color: rgba(255,255,255,0.5); }
  .header-search button {
    padding: 8px 14px;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
  }
  .header-search button:hover { background: var(--primary-dk); }

  /* Desktop nav: show horizontal */
  .menu-toggle { display: none !important; }
  #primary-menu {
    display: flex !important;
    flex-direction: row !important;
    max-height: none;
    overflow: visible;
    background: transparent;
  }
  #primary-menu > li { border-bottom: none; position: relative; }
  #primary-menu > li > a { padding: 11px 14px; font-size: 13px; white-space: nowrap; }
  #primary-menu > li > a:hover { background: rgba(255,255,255,0.15); }
  .sub-toggle { display: none; }

  /* Dropdown */
  .sub-menu {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--navy);
    min-width: 200px;
    border-top: 2px solid var(--gold);
    box-shadow: var(--shadow-md);
    z-index: 500;
    flex-direction: column;
  }
  #primary-menu > li:hover > .sub-menu { display: flex !important; }
  .sub-menu li a { padding: 9px 16px; font-size: 12px; }

  /* Layout */
  .content-wrap {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 32px;
    padding: 32px 0 56px;
  }
  .sidebar { position: sticky; top: 72px; }

  /* Hero */
  .hero-section { min-height: 360px; }
  .hero-inner { padding: 48px 0; max-width: 580px; }
  .hero-title { font-size: 30px; }
  .hero-excerpt { font-size: 15px; -webkit-line-clamp: 4; }

  /* Stats bar */
  .stats-inner { grid-template-columns: repeat(4, 1fr); }
  .stat-item { border-bottom: none; padding: 14px 20px; }
  .stat-item:nth-child(2) { border-right: 1px solid rgba(255,255,255,0.06); }
  .stat-item:nth-child(4) { border-right: none; }
  .stat-item .sv { font-size: 22px; }

  /* Cards */
  .articles-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .article-card.featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .article-card.featured .card-title { font-size: 20px; }
  .article-card.featured .card-excerpt { -webkit-line-clamp: 3; }

  /* Cat boxes */
  .cat-boxes { grid-template-columns: repeat(4, 1fr); gap: 16px; }

  /* Footer */
  .footer-top { grid-template-columns: 2fr 3fr; gap: 40px; padding: 44px 0 32px; }
  .footer-cols { grid-template-columns: repeat(3, 1fr); }
  .footer-bottom { flex-direction: row; justify-content: space-between; }

  /* Article */
  .article-headline { font-size: clamp(24px, 3.5vw, 34px); }
  .article-content { font-size: 17px; }
  .article-content h2 { font-size: 22px; }
}

@media (min-width: 1024px) {
  .articles-grid { grid-template-columns: repeat(3, 1fr); }
  .content-wrap { grid-template-columns: 1fr 300px; gap: 40px; }
  .hero-title { font-size: 36px; }
}

/* ============================================================
   PRINT
============================================================ */
@media print {
  .site-header, .primary-nav, .breaking-bar, .top-bar,
  .sidebar, .site-footer, .share-bar, .cat-strip { display: none !important; }
  .content-wrap { display: block; }
}
