/*
Theme Name:  AllPKTaxes
Theme URI:   https://www.allpktaxes.com
Author:      AllPKTaxes
Description: Lightweight mobile-first theme for allpktaxes.com — Pakistan tax news portal.
Version:     2.0.0
License:     GNU General Public License v2
Text Domain: allpktaxes
*/

/* ============================================================
   VARIABLES
============================================================ */
:root {
  --green:      #1a6b3c;
  --green-dk:   #145530;
  --green-lt:   #e6f4ea;
  --navy:       #0d1b2a;
  --gold:       #d4a017;
  --text:       #1f2937;
  --muted:      #6b7280;
  --border:     #e5e7eb;
  --bg:         #ffffff;
  --surface:    #f9fafb;
  --red:        #c0392b;
  --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
============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  /* KEY FIX: prevent horizontal scroll at root */
  overflow-x: hidden;
  scroll-behavior: smooth;
}

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

/* Every element respects viewport */
img, video, iframe, embed, object, table {
  max-width: 100%;
}
img { display: block; height: auto; }
a  { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; 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; }

/* ============================================================
   BREAKING BAR
============================================================ */
.breaking-bar {
  background: var(--navy);
  padding: 6px 0;
}
.breaking-bar .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: var(--gold);
  color: #000;
  padding: 2px 8px;
  border-radius: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}
.breaking-ticker {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.breaking-ticker a { color: rgba(255,255,255,0.85); }

/* ============================================================
   SITE HEADER  — sticky, mobile-first
============================================================ */
.site-header {
  background: #fff;
  border-bottom: 3px solid var(--green);
  /* STICKY FIX — works on all browsers */
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: var(--shadow);
}
.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: 20px;
  font-weight: 900;
  color: var(--navy);
  line-height: 1;
  white-space: nowrap;
}
.site-title .accent { color: var(--green); }
.site-tagline {
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 2px;
}

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

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

/* ============================================================
   PRIMARY NAV — mobile first (stacked), desktop (row)
============================================================ */
.primary-nav {
  background: var(--green);
}

/* Mobile: menu hidden by default */
#primary-menu {
  display: none;
  flex-direction: column;
  width: 100%;
  max-height: 70vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#primary-menu.is-open {
  display: flex;
}

#primary-menu li {
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
#primary-menu li:last-child { border-bottom: none; }

#primary-menu li a {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.92);
  padding: 13px 16px;
  width: 100%;
}

/* Sub-menu */
.sub-menu {
  display: none;
  flex-direction: column;
  background: rgba(0,0,0,0.2);
}
.sub-menu.is-open { display: flex; }
.sub-menu li { border-bottom: 1px solid rgba(255,255,255,0.07); }
.sub-menu li a { padding: 10px 28px; font-size: 13px; }

/* Sub-menu arrow toggle */
.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.7);
  font-size: 12px;
  background: none;
  border: none;
  cursor: pointer;
}

/* ============================================================
   CATEGORY 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;
  gap: 0;
}
.cat-strip .inner::-webkit-scrollbar { display: none; }
.cat-strip a {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 9px 14px;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.cat-strip a:hover,
.cat-strip a.active {
  color: var(--green);
  border-bottom-color: var(--green);
}

/* ============================================================
   HERO SECTION — full bleed, mobile-first
============================================================ */
.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.15;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(13,27,42,0.97) 55%, rgba(26,107,60,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(--gold);
  color: #000;
  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;
  /* Limit to 3 lines on mobile */
  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 {
  display: inline-block;
  background: var(--green);
  color: #fff !important;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 4px;
  margin-left: 4px;
}

/* ============================================================
   STATS BAR
============================================================ */
.stats-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.stats-inner {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}
.stat-item {
  padding: 10px 16px;
  text-align: center;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat-item:nth-child(2) { border-right: none; }
.stat-item:nth-child(3) { border-bottom: none; }
.stat-item:nth-child(4) { border-right: none; border-bottom: none; }
.stat-item .sv {
  display: block;
  font-family: var(--font-h);
  font-size: 20px;
  font-weight: 900;
  color: var(--green);
  line-height: 1;
}
.stat-item .sl {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 2px;
}

/* ============================================================
   MAIN CONTENT + SIDEBAR LAYOUT — mobile first
============================================================ */
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: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}
.section-head h2 {
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-head h2::before {
  content: '';
  display: block;
  width: 4px;
  height: 20px;
  background: var(--green);
  border-radius: 2px;
  flex-shrink: 0;
}
.section-head a {
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  border: 1px solid var(--green);
  padding: 4px 10px;
  border-radius: 3px;
}

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

.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(-1px);
}
.card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface);
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.article-card:hover .card-thumb img { transform: scale(1.03); }

.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(--green);
  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(--green); }
.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 */
.article-card.featured {
  border-top: 3px solid var(--green);
}
.article-card.featured .card-title { font-size: 18px; }

/* ============================================================
   SIDEBAR WIDGETS
============================================================ */
.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);
}
.widget-body { padding: 14px 16px; }

.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(--green); }
.cat-widget-list .count {
  font-size: 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 1px 7px;
  border-radius: 10px;
}

.calc-cta {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dk) 100%);
  border: none;
}
.calc-cta .widget-head { background: rgba(0,0,0,0.2); }
.calc-cta .widget-body { text-align: center; }
.calc-cta p { font-size: 13px; color: rgba(255,255,255,0.85); margin-bottom: 12px; line-height: 1.5; }
.calc-cta a {
  display: inline-block;
  background: var(--gold);
  color: #000;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 4px;
}

.articles-list { display: flex; flex-direction: column; gap: 0; }
.list-article {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.list-article:last-child { border-bottom: none; }
.list-thumb {
  width: 72px;
  height: 54px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface);
}
.list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-body { flex: 1; min-width: 0; }
.list-cat { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--green); margin-bottom: 3px; }
.list-title { font-family: var(--font-h); font-size: 13px; font-weight: 700; line-height: 1.3; color: var(--navy); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.list-title a:hover { color: var(--green); }
.list-date { font-size: 11px; color: var(--muted); margin-top: 3px; }

.newsletter-form { margin-top: 8px; }
.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;
  font-family: inherit;
  transition: border-color 0.2s;
}
.newsletter-form input:focus { border-color: var(--green); }
.newsletter-form button {
  width: 100%;
  padding: 9px;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border: none;
  border-radius: 4px;
  font-family: inherit;
}
#newsletter-msg { font-size: 12px; margin-top: 6px; }

/* ============================================================
   SINGLE ARTICLE
============================================================ */
.single-article { max-width: 100%; }

.article-cat-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  background: var(--green-lt);
  color: var(--green);
  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;
}
.article-deck {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.6;
  border-left: 4px solid var(--green);
  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: 5px 10px;
  border-radius: 3px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--surface);
  cursor: pointer;
  font-family: inherit;
}
.share-btn:hover { border-color: var(--green); color: var(--green); }

.article-content {
  font-size: 16px;
  line-height: 1.85;
  color: var(--text);
  /* Prevent long words from breaking layout on mobile */
  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(--green);
}
.article-content h3 { font-size: 17px; margin: 24px 0 8px; }
.article-content a { color: var(--green); 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; }
/* Table wrapper — horizontal scroll on mobile */
.article-content table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  font-size: 13px;
}
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 20px 0;
  border: 1px solid var(--border);
  border-radius: 4px;
}
.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-content blockquote {
  border-left: 4px solid var(--green);
  padding: 12px 16px;
  background: var(--surface);
  margin: 20px 0;
  font-style: italic;
  color: var(--navy);
}
.article-content figure { margin: 20px 0; }
.article-content figcaption { font-size: 12px; color: var(--muted); text-align: center; margin-top: 6px; }

.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);
}
.article-tag:hover { border-color: var(--green); color: var(--green); }

/* ============================================================
   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;
  align-items: center;
}
.breadcrumb a { color: var(--green); }
.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);
}
.pagination a:hover { border-color: var(--green); color: var(--green); }
.pagination .current { background: var(--green); border-color: var(--green); 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 { color: #fff; font-size: 20px; }
.footer-brand .site-title .accent { color: var(--gold); }
.footer-brand p { font-size: 13px; color: rgba(255,255,255,0.55); line-height: 1.6; margin-top: 8px; }
.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-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.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); }

/* ============================================================
   CALCULATOR TEMPLATE
============================================================ */
.calc-hero {
  background: var(--navy);
  padding: 36px 0 28px;
  text-align: center;
  color: #fff;
}
.calc-hero h1 { color: #fff; font-size: clamp(22px,5vw,34px); margin-bottom: 8px; }
.calc-hero p { font-size: 14px; color: rgba(255,255,255,0.7); }
.calc-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0; }
.calc-tab {
  font-size: 13px; font-weight: 600; padding: 8px 14px;
  border: 1.5px solid var(--border); border-radius: 4px;
  color: var(--muted); background: var(--bg); cursor: pointer;
  font-family: inherit; transition: all 0.15s;
}
.calc-tab.active, .calc-tab:hover { background: var(--green); border-color: var(--green); color: #fff; }
.calc-panel { display: none; }
.calc-panel.active { display: block; }
.calc-box {
  background: var(--bg); border: 1px solid var(--border);
  border-top: 3px solid var(--green); border-radius: var(--radius);
  padding: 20px 16px; max-width: 520px;
}
.calc-box h3 { font-size: 17px; margin-bottom: 16px; }
.calc-label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text); margin: 14px 0 5px;
}
.calc-label:first-of-type { margin-top: 0; }
.calc-input, .calc-select {
  width: 100%; padding: 9px 12px; font-size: 14px;
  border: 1.5px solid var(--border); border-radius: 4px;
  outline: none; background: var(--surface); color: var(--text);
  font-family: inherit; transition: border-color 0.2s;
}
.calc-input:focus, .calc-select:focus { border-color: var(--green); }
.calc-btn {
  margin-top: 16px; width: 100%; padding: 11px;
  background: var(--green); color: #fff; font-size: 14px;
  font-weight: 700; border: none; border-radius: 4px;
  font-family: inherit; cursor: pointer;
}
.calc-result {
  margin-top: 16px; padding: 16px;
  background: var(--green-lt); border: 1px solid rgba(26,107,60,0.2);
  border-left: 4px solid var(--green); border-radius: 0 4px 4px 0;
  display: none;
}
.calc-result.show { display: block; }
.calc-result h4 { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--green); margin-bottom: 10px; font-family: var(--font-b); }
.result-row { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; border-bottom: 1px solid rgba(26,107,60,0.1); }
.result-row:last-child { border-bottom: none; font-weight: 700; font-size: 15px; color: var(--navy); }
.result-row .rl { color: var(--muted); }
.calc-note { margin-top: 16px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; font-size: 12px; color: var(--muted); }

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

/* 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-caption { max-width: 100%; }
.wp-block-image img { border-radius: var(--radius); }

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

  .header-inner { height: 64px; }
  .site-title { font-size: 24px; }
  .site-tagline { display: block; }

  /* Show search, hide hamburger on desktop */
  .header-search {
    display: block;
    flex: 1;
    max-width: 320px;
  }
  .header-search form {
    display: flex;
    border: 1.5px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.2s;
  }
  .header-search form:focus-within { border-color: var(--green); }
  .header-search input {
    flex: 1;
    padding: 8px 12px;
    font-size: 13px;
    border: none;
    outline: none;
    background: var(--surface);
    font-family: inherit;
  }
  .header-search button {
    padding: 8px 14px;
    background: var(--green);
    color: #fff;
    border: none;
    font-size: 14px;
    cursor: pointer;
  }

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

  /* Desktop 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; border-bottom: 1px solid rgba(255,255,255,0.06); }

  /* 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: 32px; }
  .hero-excerpt { font-size: 15px; -webkit-line-clamp: 4; }
  .hero-meta { font-size: 13px; }

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

  /* Article grid */
  .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; }

  /* 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 content */
  .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: 38px; }
}

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