/*
Theme Name: MeeBhumiAP Child
Theme URI: https://meebhumiiap.in
Description: GeneratePress child theme for MeeBhumiAP - AP Land Records Guide
Author: MeeBhumiAP
Author URI: https://meebhumiiap.in
Template: generatepress
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: meebhumiiap
Tags: land records, andhra pradesh, meebhoomi, government guide
*/

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
  --primary:       #B45309;   /* warm amber-brown – land/soil */
  --primary-dark:  #92400E;
  --primary-light: #F59E0B;
  --accent:        #15803D;   /* forest green – crops/fields */
  --accent-light:  #22C55E;
  --bg:            #FFFBF5;   /* warm off-white */
  --bg-alt:        #FEF3C7;
  --surface:       #FFFFFF;
  --border:        #E5D9C8;
  --text:          #1C1917;
  --text-muted:    #78716C;
  --text-light:    #A8A29E;
  --radius:        10px;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08);
  --shadow-md:     0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:     0 8px 32px rgba(0,0,0,.13);
  --font-main:     'Hind Guntur', 'Noto Sans Telugu', sans-serif;
  --font-head:     'Tiro Telugu', 'Hind Guntur', sans-serif;
  --transition:    0.22s ease;
}

/* ============================================================
   GOOGLE FONTS IMPORT (in functions.php via wp_enqueue_style)
   ============================================================ */

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font-main);
  background: #E8E4DC;  /* warm grey outside the site box */
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
  margin: 0;
}

/* ── Site wrapper — max-width centered column ── */
#page,
.site {
  max-width: 1200px !important;
  margin: 0 auto !important;
  background: var(--bg);
  box-shadow: 0 0 40px rgba(0,0,0,.15);
  position: relative;
}

/* Header, nav, search bar constrained within site width */
.mbap-site-header,
.mbap-search-bar,
.mbap-nav,
.mbap-footer,
.mbap-footer-bottom {
  max-width: 100% !important;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--primary-dark); text-decoration: underline; }

h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-head);
  color: var(--text);
  line-height: 1.35;
  margin: 0 0 .6em;
}

p { margin: 0 0 1.1em; }

/* ============================================================
   SUPPRESS GP PREMIUM MOBILE NAV — we use our own
   ============================================================ */
.main-navigation,
.nav-float,
.nav-below-header,
.generate-menu-arrow,
#site-navigation,
.sf-menu { display: none !important; }

/* Kill GP's own menu-toggle so it doesn't render at all */
.menu-toggle { display: none !important; }

/* ============================================================
   MBAP TOPBAR
   ============================================================ */
.mbap-topbar {
  background: #1C1917;
  padding: 5px 0;
  font-size: .72rem;
  color: #78716C;
  border-bottom: 1px solid #292524;
}
.mbap-topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.mbap-topbar-right { display: flex; gap: 14px; }
.mbap-topbar a { color: #F59E0B !important; text-decoration: none; }

/* ============================================================
   MBAP HEADER
   ============================================================ */
.mbap-site-header {
  background: linear-gradient(90deg, #0D3320, #1B4D2E) !important;
  border-bottom: 5px solid #F59E0B !important;
  box-shadow: 0 3px 14px rgba(0,0,0,.25);
  position: sticky !important;
  top: 0;
  z-index: 600;
}
/* Override GP's own site-header if it still fires */
.site-header {
  background: linear-gradient(90deg, #0D3320, #1B4D2E) !important;
  border-bottom: 5px solid #F59E0B !important;
  box-shadow: 0 3px 14px rgba(0,0,0,.25) !important;
  padding: 0 !important;
}

.mbap-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;  /* push hamburger to far right */
  gap: 12px;
  padding: 16px 16px !important;   /* !important to override GP inside-header */
  min-height: 70px;                /* enforce taller height */
  flex-wrap: nowrap;
}

/* Force GP's inside-header to not interfere */
.site-header .inside-header,
.mbap-site-header .inside-header {
  padding: 0 !important;
  margin: 0 !important;
}

/* Logo gets flex:1 to push hamburger all the way right */
.mbap-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  flex-shrink: 0;
  flex: 1;                         /* takes all available space */
}
.mbap-logo-icon {
  width: 42px; height: 42px; flex-shrink: 0;
  background: linear-gradient(135deg, #F59E0B, #B45309);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 2px 8px rgba(180,83,9,.4);
}
.mbap-logo-text strong {
  color: #fff;
  font-size: 1.2rem;
  display: block;
  font-family: var(--font-head);
  line-height: 1.15;
}
.mbap-logo-text span {
  color: rgba(255,255,255,.5);
  font-size: .6rem;
  display: block;
  margin-top: 2px;
}
@media (min-width: 768px) {
  .mbap-logo-icon  { width: 48px; height: 48px; font-size: 1.4rem; }
  .mbap-logo-text strong { font-size: 1.45rem; }
  .mbap-logo-text span   { font-size: .68rem; }
}

/* ── HEADER SEARCH — desktop only ── */
.mbap-header-search {
  display: none !important;
  flex: 1;
  max-width: 38%;             /* reduced for better balance */
  margin: 0 24px;
}
@media(min-width:1024px){
  .mbap-header-search {
    display: flex !important;  /* show in header on desktop only */
  }
}

/* ── MOBILE SEARCH BAR — mobile only, hidden on desktop ── */
.mbap-mobile-search {
  display: block;   /* visible on mobile */
}
@media(min-width:1024px){
  .mbap-mobile-search { display: none !important; }  /* hidden on desktop */
}

/* ── SEARCH BAR ROW (mobile) ── */
.mbap-search-bar {
  background: #0F4C2A;
  padding: 7px 0;
  border-bottom: 2px solid #166534;
}
.mbap-search-form-full {
  display: flex;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  max-width: 100%;
  margin: 0 auto;
}
@media(min-width:1024px){
  .mbap-search-form-full { max-width: 100%; margin: 0; }
}
.mbap-search-form-full input {
  flex: 1;
  padding: 10px 16px;
  border: none;
  font-size: .88rem;
  font-family: var(--font-main);
  background: #fff;
  color: var(--text);
  outline: none;
  min-width: 0;
}
/* Slightly smaller in header */
.mbap-header-search input { padding: 9px 14px; font-size: .84rem; }
.mbap-search-form-full button {
  background: #F59E0B;
  border: none;
  padding: 10px 16px;
  font-size: .86rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--transition);
  font-family: var(--font-main);
}
.mbap-header-search button { padding: 9px 14px; font-size: .82rem; }
.mbap-search-form-full button:hover { background: #B45309; }
.mbap-search-form input {
  flex: 1;
  padding: 9px 13px;
  border: none;
  font-size: .82rem;
  font-family: var(--font-main);
  background: #fff;
  color: var(--text);
  outline: none;
  min-width: 0;
}
.mbap-search-form button {
  background: #F59E0B;
  border: none;
  padding: 9px 14px;
  font-size: .9rem;
  cursor: pointer;
  color: #fff;
  transition: background var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}
.mbap-search-form button:hover { background: #B45309; }

/* Helpline — desktop only */
.mbap-helpline {
  display: none;
  text-align: right;
  flex-shrink: 0;
}
.mbap-helpline span {
  display: block;
  font-size: .6rem;
  color: rgba(255,255,255,.5);
  letter-spacing: .4px;
  text-transform: uppercase;
}
.mbap-helpline strong a {
  color: #F59E0B !important;
  font-size: 1rem;
  font-family: var(--font-head);
  text-decoration: none;
}
@media (min-width: 1024px) { .mbap-helpline { display: block; } }

/* ── HAMBURGER BUTTON — mobile only, inside header row ── */
.mbap-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px; height: 38px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.25) !important;
  border-radius: 7px;
  padding: 8px;
  cursor: pointer;
  flex-shrink: 0;
}
.mbap-hamburger span {
  display: block;
  width: 18px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all .25s ease;
}
/* Open state */
.mbap-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mbap-hamburger.open span:nth-child(2) { opacity: 0; transform: translateX(-6px); }
.mbap-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
/* Hide on desktop */
@media (min-width: 768px) { .mbap-hamburger { display: none !important; } }

/* ============================================================
   NAVIGATION
   ============================================================ */
.mbap-nav {
  background: #0F4C2A;
  border-bottom: 2px solid #166534;
}
.mbap-nav-menu {
  list-style: none;
  margin: 0; padding: 0;
  /* Mobile: hidden drawer */
  display: none;
  flex-direction: column;
}
.mbap-nav-menu.open { display: flex; }
.mbap-nav-menu li a {
  display: block;
  padding: 12px 18px;
  color: #fff !important;
  font-size: .94rem;
  font-weight: 600;
  text-decoration: none !important;
  border-bottom: 1px solid rgba(255,255,255,.07);
  transition: background var(--transition);
}
.mbap-nav-menu li a:hover,
.mbap-nav-menu li.current-menu-item > a { background: #166534; }
/* Desktop: horizontal */
@media (min-width: 768px) {
  .mbap-nav-menu {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .mbap-nav-menu::-webkit-scrollbar { display: none; }
  .mbap-nav-menu li a {
    padding: 13px 14px;
    border-bottom: none;
    font-size: .88rem;
    white-space: nowrap;
    position: relative;
  }
  .mbap-nav-menu li.current-menu-item > a::after {
    content: '';
    position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 18px; height: 2px;
    background: #F59E0B;
    border-radius: 2px;
  }
}

/* ============================================================
   FIX 2: HERO CARD — hide on mobile, show on desktop
   ============================================================ */
/* Hero card — hidden on all sizes, quick-help cards serve same purpose */
.hero-card { display: none !important; }
.bnw-hero-inner { grid-template-columns: 1fr !important; }

/* ============================================================
   FIX 3: PORTAL CARDS — direct border-top, no CSS variable
   (Safari iOS doesn't support --pc in ::before)
   ============================================================ */
.portal-card::before { display: none !important; } /* kill old ::before */
.portal-card {
  border-top: 3px solid #15803D !important; /* default green */
  transition: all var(--transition);
}
/* Each portal gets its own top border via utility classes */
.portal-card.portal-blue   { border-top-color: #0369A1 !important; }
.portal-card.portal-purple { border-top-color: #7C3AED !important; }
.portal-card.portal-amber  { border-top-color: #B45309 !important; }
.portal-card.portal-red    { border-top-color: #DC2626 !important; }
.portal-card.portal-green  { border-top-color: #15803D !important; }
.portal-card.portal-teal   { border-top-color: #0F766E !important; }
.portal-card.portal-orange { border-top-color: #D97706 !important; }
.portal-card.portal-slate  { border-top-color: #64748B !important; }

/* Portals grid — 2 col mobile, 4 col desktop */
.portals-section .portal-grid,
.portals-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (min-width: 600px)  { .portals-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
@media (min-width: 1024px) { .portals-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; } }

.portal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 12px;
  display: flex; flex-direction: column; gap: 8px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
@media (min-width: 768px) { .portal-card { padding: 20px 16px; gap: 10px; } }
.portal-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.portal-card .p-icon {
  font-size: 1.5rem; margin-bottom: 2px;
}
@media (min-width: 768px) {
  .portal-card .p-icon {
    width: 46px; height: 46px; border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; margin-bottom: 4px;
  }
}
.portal-card h3 { font-size: .82rem; font-family: var(--font-head); line-height: 1.3; margin: 0; }
@media (min-width: 768px) { .portal-card h3 { font-size: .92rem; } }
.portal-card p { font-size: .75rem; color: var(--text-muted); line-height: 1.5; flex: 1; margin: 0; display: none; }
@media (min-width: 768px) { .portal-card p { display: block; } }
.portal-card .p-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.portal-card .p-tag { font-size: .62rem; font-weight: 700; padding: 2px 7px; border-radius: 20px; }
.portal-card .p-link { font-size: .75rem; font-weight: 700; }

/* ============================================================
   FIX 4 + 5: FOOTER — no districts col, 2-col links on mobile
   ============================================================ */
.mbap-footer {
  background: #292524;
  padding: 44px 0 28px;
  color: #D6D3D1;
}

/* Grid: mobile = stack brand then 2-col links */
.mbap-footer-grid {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
@media (min-width: 768px) {
  .mbap-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr; /* brand | links-wrapper */
    gap: 36px;
    align-items: start;
  }
}
@media (min-width: 1024px) {
  .mbap-footer-grid {
    grid-template-columns: 2fr 2fr; /* more balanced on wide */
  }
}

/* Brand */
.mbap-footer-brand h3 {
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.1rem;
  margin-bottom: .5em;
}
.mbap-footer-brand h3 span {
  font-size: .7rem;
  opacity: .45;
  font-family: sans-serif;
  font-weight: 400;
}
.mbap-footer-brand p {
  font-size: .8rem;
  color: #78716C;
  line-height: 1.65;
}
.mbap-footer-disclaimer {
  margin-top: 12px;
  background: rgba(255,255,255,.06);
  border-left: 3px solid #F59E0B;
  padding: 9px 12px;
  font-size: .73rem;
  color: #78716C;
  border-radius: 0 6px 6px 0;
}
.mbap-footer-disclaimer a { color: #F59E0B !important; }
.mbap-wa-btn {
  display: inline-block;
  margin-top: 14px;
  background: #25D366;
  color: #fff !important;
  padding: 7px 16px;
  border-radius: 6px;
  font-size: .8rem;
  text-decoration: none !important;
}

/* Links wrapper — always 2 columns side by side */
.mbap-footer-links-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;   /* side by side on ALL screen sizes */
  gap: 20px;
  align-items: start;
}

.mbap-footer-col h4 {
  color: #fff;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 11px;
}
.mbap-footer-col ul { list-style: none; margin: 0; padding: 0; }
.mbap-footer-col ul li { margin-bottom: 6px; }
.mbap-footer-col ul li a {
  font-size: .78rem;
  color: #78716C;
  text-decoration: none;
  transition: color var(--transition);
}
.mbap-footer-col ul li a:hover { color: #F59E0B; }

.mbap-footer-helpline {
  margin-top: 16px;
  padding: 10px 12px;
  background: rgba(255,255,255,.05);
  border-radius: 8px;
}
.mbap-footer-helpline span {
  display: block;
  font-size: .65rem;
  color: #78716C;
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 3px;
}
.mbap-footer-helpline a {
  color: #F59E0B !important;
  font-size: 1.2rem;
  font-weight: 800;
  font-family: var(--font-head);
  text-decoration: none;
}

.mbap-footer-bottom {
  background: #1C1917;
  text-align: center;
  padding: 13px 0;
  font-size: .73rem;
  color: #57534E;
  border-top: 1px solid #292524;
}
.mbap-footer-bottom a { color: #F59E0B !important; }


/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}
.section-pad { padding: 60px 0; }
.section-pad-sm { padding: 40px 0; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none !important;
}
.btn-primary {
  background: var(--primary);
  color: #fff !important;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline {
  background: transparent;
  color: var(--primary) !important;
  border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff !important; }
.btn-sm { padding: 8px 16px; font-size: .85rem; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .5px;
}
.badge-amber { background: var(--bg-alt); color: var(--primary-dark); }
.badge-green { background: #DCFCE7; color: #166534; }

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--primary-dark);
  margin-bottom: .3em;
}
.section-title span { color: var(--accent); }
.section-subtitle { color: var(--text-muted); font-size: 1rem; margin-bottom: 1.8em; }

/* ============================================================
   HERO SECTION
   ============================================================ */
.bnw-hero {
  /* Real paddy image set via inline style in front-page.php
     Fallback gradient shown until image loads */
  background:
    linear-gradient(
      to bottom,
      #0A1F12              0%,
      #0D3320             20%,
      #1B4D2E             42%,
      #1B4D2E             58%,   /* holds dark longer — covers button area */
      rgba(15,40,22,.75)  68%,
      rgba(8,20,10,.35)   82%,
      rgba(0,0,0,.08)     94%,
      rgba(0,0,0,0)      100%
    ),
    #1B4D2E;
  position: relative;
  overflow: hidden;
  padding: 32px 0 28px;   /* mobile */
}
@media(min-width:768px){
  .bnw-hero { padding: 28px 0 28px; }  /* desktop - balanced padding */
}
.bnw-hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 85% 8%, rgba(255,200,50,.1) 0%, transparent 35%);
  pointer-events: none; z-index: 0;
}
.bnw-hero .container { position: relative; z-index: 2; }
.bnw-hero-text { min-width: 0; width: 100%; }
.bnw-hero-inner { display: grid; grid-template-columns: 1fr minmax(0, 320px); gap: 28px; align-items: center; }

.bnw-hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  color: #FEF3C7;
  padding: 4px 12px; border-radius: 20px;
  font-size: .74rem; font-weight: 600;
  margin-bottom: 12px;           /* reduced from 18px */
  backdrop-filter: blur(4px);
}
.bnw-hero-badge .dot { width:7px;height:7px;border-radius:50%;background:var(--accent-light);animation:pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1}50%{opacity:.4} }

.bnw-hero h1 {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  color: #fff;
  margin-bottom: .35em;
  line-height: 1.45;        /* increased for Telugu characters */
  padding-top: .15em;       /* prevents top character clipping */
}
.bnw-hero h1 em { font-style: normal; color: var(--primary-light); }
.bnw-hero p { color: rgba(255,255,255,.82); font-size: .95rem; margin-bottom: 1.2em; }

.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Hero stats — hidden on mobile, visible on tablet+ */
.hero-stats {
  display: none;               /* hidden mobile */
  gap: 24px; margin-top: 20px;
  padding-top: 18px; border-top: 1px solid rgba(255,255,255,.15);
}
@media(min-width:600px){
  .hero-stats { display: flex; }
}
.hero-stat { text-align: center; }
.hero-stat strong { display: block; font-size: 1.3rem; color: var(--primary-light); line-height: 1.1; }
.hero-stat span { font-size: .72rem; color: rgba(255,255,255,.65); }

/* Hero card (right side) */
.hero-card {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 16px;
  padding: 20px;
  backdrop-filter: blur(8px);
  min-width: 0;         /* prevent grid blowout */
  overflow: hidden;
}
.hero-card h3 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.hero-service-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hero-service-links li a {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff !important;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: .88rem; font-weight: 600;
  transition: all var(--transition);
  text-decoration: none !important;
}
.hero-service-links li a:hover { background: rgba(255,255,255,.22); transform: translateX(4px); }
.hero-service-links li a .icon { font-size: 1.1rem; }

/* ============================================================
   ALERT / NOTICE BAR
   ============================================================ */
.notice-bar {
  background: var(--bg-alt);
  border-bottom: 2px solid var(--primary-light);
  padding: 10px 0;
}
.notice-bar .container { display: flex; align-items: center; gap: 10px; font-size: .88rem; }
.notice-bar strong { color: var(--primary-dark); }
.notice-bar .notice-icon { font-size: 1.1rem; }

/* ============================================================
   SERVICE CARDS GRID
   ============================================================ */
.services-section { background: var(--bg); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.service-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.service-card:hover::before { transform: scaleX(1); }
.service-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--primary-light);
}
.service-card .card-icon {
  width: 52px; height: 52px;
  background: var(--bg-alt);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 14px;
}
.service-card h3 { font-size: 1.05rem; margin-bottom: .4em; }
.service-card p { font-size: .88rem; color: var(--text-muted); margin-bottom: 14px; line-height: 1.55; }
.service-card .card-link {
  font-size: .85rem; font-weight: 700;
  color: var(--primary) !important;
  display: inline-flex; align-items: center; gap: 4px;
}
.service-card .card-link:hover { gap: 8px; }

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how-section { background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%); }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px; position: relative;
}
.steps-grid::before {
  content: '';
  position: absolute;
  top: 36px; left: 12%; right: 12%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-light), var(--accent-light));
  z-index: 0;
}
.step-card {
  text-align: center; position: relative; z-index: 1;
}
.step-number {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 1.5rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 4px 16px rgba(180,83,9,.3);
  border: 4px solid var(--bg-alt);
}
.step-card h4 { font-size: .95rem; margin-bottom: .3em; }
.step-card p { font-size: .82rem; color: var(--text-muted); }

/* ============================================================
   DISTRICT QUICK LINKS
   ============================================================ */
.district-section { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.district-grid {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.district-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text) !important;
  transition: all var(--transition);
  text-decoration: none !important;
}
.district-pill:hover {
  background: var(--primary); color: #fff !important;
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* ============================================================
   LATEST GUIDES (BLOG LOOP)
   ============================================================ */
.guides-section { background: var(--bg); }
.guides-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.guide-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.guide-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.guide-card-thumb {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  height: 140px;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  position: relative; overflow: hidden;
}
.guide-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.guide-card-thumb .thumb-icon {
  position: absolute;
  font-size: 3.5rem; opacity: .35;
}
.guide-card-body { padding: 18px; }
.guide-card-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.guide-card-meta .cat {
  font-size: .72rem; font-weight: 700; color: var(--primary);
  background: var(--bg-alt); padding: 2px 8px; border-radius: 4px;
}
.guide-card-meta .date { font-size: .75rem; color: var(--text-light); }
.guide-card h3 { font-size: .97rem; line-height: 1.4; margin-bottom: .4em; }
.guide-card h3 a { color: var(--text) !important; }
.guide-card h3 a:hover { color: var(--primary) !important; text-decoration: none !important; }
.guide-card p { font-size: .83rem; color: var(--text-muted); margin-bottom: 12px; }
.guide-card-footer { display: flex; align-items: center; justify-content: space-between; }
.read-time { font-size: .75rem; color: var(--text-light); }

/* ============================================================
   FAQ SECTION
   ============================================================ */
.faq-section { background: var(--bg-alt); }
.faq-wrap { max-width: 800px; margin: 0 auto; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-question {
  width: 100%; text-align: left;
  padding: 18px 20px;
  background: transparent; border: none;
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer;
  font-size: .97rem; font-weight: 700;
  color: var(--text);
  font-family: var(--font-head);
  gap: 12px;
}
.faq-question .faq-icon {
  width: 28px; height: 28px;
  background: var(--bg-alt);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--primary);
  flex-shrink: 0;
  transition: transform var(--transition);
}
.faq-item.open .faq-icon { transform: rotate(45deg); background: var(--primary); color: #fff; }
.faq-answer {
  max-height: 0; overflow: hidden;
  transition: max-height 0.35s ease, padding 0.25s ease;
  padding: 0 20px;
  font-size: .9rem; color: var(--text-muted); line-height: 1.7;
}
.faq-item.open .faq-answer { max-height: 400px; padding: 0 20px 18px; }

/* ============================================================
   ADSENSE PLACEHOLDERS / AD ZONES
   ============================================================ */
/* ── AD ZONES — placeholder hidden, real ads show when code added ── */
.ad-zone {
  margin: 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
/* Hide the dashed placeholder box — only show if no real ad inside */
.ad-zone:not(:has(ins)):not(:has(script)) {
  display: none !important;
}
/* Fallback for browsers not supporting :has() — hide all placeholders */
.ad-zone { display: none; }
/* Real AdSense ins tags re-show the container */
.ad-zone:has(ins) { display: block; }

/* Keep size classes for when ads load */
.ad-leaderboard { min-height: 90px; }
.ad-rectangle   { min-height: 250px; max-width: 336px; margin: 0 auto; }
.ad-sidebar     { min-height: 250px; }

/* ============================================================
   SIDEBAR WIDGETS
   ============================================================ */
.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 22px;
  overflow: hidden;
}
.widget .widget-title, .widget_title {
  background: var(--primary-dark);
  color: #fff !important;
  padding: 12px 18px !important;
  font-size: .9rem !important;
  margin: 0 0 0 0 !important;
  border: none !important;
  font-family: var(--font-head);
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li {
  border-bottom: 1px solid var(--border);
}
.widget ul li:last-child { border-bottom: none; }
.widget ul li a {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  font-size: .88rem; color: var(--text) !important;
  transition: all var(--transition);
}
.widget ul li a:hover {
  background: var(--bg);
  color: var(--primary) !important;
  padding-left: 22px;
  text-decoration: none !important;
}
.widget ul li a::before { content: '→'; color: var(--primary-light); font-size: .8rem; }

/* Sticky sidebar widget */
.sticky-ad-widget { position: sticky; top: 20px; }

/* ============================================================
   SINGLE POST / ARTICLE PAGE
   ============================================================ */
.entry-content {
  font-size: 1rem;
  line-height: 1.85;
  color: #292524;
}
.entry-content h2 {
  font-size: 1.45rem;
  color: var(--primary-dark);
  margin: 1.8em 0 .6em;
  padding-bottom: .4em;
  border-bottom: 2px solid var(--border);
}
.entry-content h3 {
  font-size: 1.15rem;
  color: var(--text);
  margin: 1.4em 0 .5em;
}
.entry-content ul, .entry-content ol {
  padding-left: 1.5em;
  margin-bottom: 1em;
}
.entry-content li { margin-bottom: .35em; }
.entry-content table {
  width: 100%; border-collapse: collapse;
  margin: 1.2em 0;
  font-size: .9rem;
}
.entry-content th {
  background: var(--primary-dark);
  color: #fff;
  padding: 10px 14px; text-align: left;
}
.entry-content td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
}
.entry-content tr:nth-child(even) td { background: var(--bg); }

/* Step boxes inside content */
.step-box {
  display: flex; gap: 14px;
  align-items: flex-start;
  background: var(--bg);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 18px;
  margin: 16px 0;
}
.step-box .step-num {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-weight: 800; font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.step-box .step-body { font-size: .93rem; }
.step-box .step-body strong { display: block; margin-bottom: .2em; }

/* Info box / callout */
.info-box {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 18px 0;
  font-size: .92rem;
}
.info-box.warning { background: #FFFBEB; border-color: #FDE68A; }
.info-box.success { background: #F0FDF4; border-color: #BBF7D0; }
.info-box .box-title {
  font-weight: 700; margin-bottom: .3em;
  display: flex; align-items: center; gap: 6px;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.bnw-breadcrumb {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  font-size: .82rem;
  color: var(--text-muted);
}
.bnw-breadcrumb a { color: var(--primary) !important; }
.bnw-breadcrumb .sep { margin: 0 6px; opacity: .5; }

/* ============================================================
   CATEGORY / ARCHIVE PAGE
   ============================================================ */
.archive-header {
  background: linear-gradient(135deg, #0F4C2A 0%, #166534 100%);
  color: #fff; padding: 48px 0;
  margin-bottom: 36px;
  border-bottom: 3px solid var(--accent-light);
}
.archive-header h1 { color: #fff; font-size: 2rem; }
.archive-header p { color: rgba(255,255,255,.8); margin: 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.bnw-footer-widgets {
  background: #292524;
  padding: 48px 0 28px;
  color: #D6D3D1;
}
.footer-widgets-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
}
.footer-brand h3 { color: #fff; margin-bottom: .6em; font-size: 1.2rem; }
.footer-brand p { font-size: .85rem; line-height: 1.65; opacity: .75; }
.footer-disclaimer {
  margin-top: 14px;
  background: rgba(255,255,255,.07);
  border-left: 3px solid var(--primary-light);
  padding: 10px 14px;
  font-size: .78rem; color: #A8A29E; border-radius: 0 6px 6px 0;
}
.footer-col h4 { color: #fff; font-size: .88rem; margin-bottom: 12px; text-transform: uppercase; letter-spacing: .5px; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 6px; }
.footer-links a { font-size: .83rem; color: #A8A29E !important; transition: color var(--transition); }
.footer-links a:hover { color: var(--primary-light) !important; text-decoration: none !important; }
.footer-bottom {
  background: #1C1917;
  text-align: center; padding: 16px 0;
  font-size: .8rem; color: #78716C;
  border-top: 1px solid #292524;
}
.footer-bottom a { color: var(--primary-light) !important; }

/* ============================================================
   BACK TO TOP
   ============================================================ */
#back-to-top {
  position: fixed; bottom: 24px; right: 24px;
  width: 44px; height: 44px;
  background: var(--primary);
  color: #fff; border: none;
  border-radius: 50%;
  font-size: 1.1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none;
  transition: all var(--transition);
  z-index: 999;
}
#back-to-top.visible { opacity: 1; pointer-events: auto; }
#back-to-top:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .guides-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid::before { display: none; }
  .bnw-hero-inner { grid-template-columns: 1fr; }
  .hero-card { display: none; }
  .footer-widgets-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .services-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .guides-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .section-pad { padding: 32px 0; }
  .bnw-hero { padding: 28px 0 32px; }  /* mobile balanced */
  .bnw-hero h1 { font-size: 1.4rem; }
  .bnw-hero p  { font-size: .88rem; margin-bottom: 1em; }
  .hero-actions .btn { padding: 10px 18px; font-size: .85rem; }
  .footer-widgets-grid { grid-template-columns: 1fr; gap: 24px; }
  .widget-area { padding: 0; margin-top: 28px; }
}

@media (max-width: 480px) {
  .services-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { justify-content: center; }
  .district-grid { gap: 6px; }
  .district-pill { font-size: .78rem; padding: 6px 10px; }
  .ad-leaderboard { min-height: 60px; }
}

/* ============================================================
   GOOGLE DISCOVER OPTIMIZATIONS
   (Large featured images, clear structure)
   ============================================================ */
.entry-header .post-thumbnail {
  width: 100%; aspect-ratio: 16/9;
  overflow: hidden; border-radius: var(--radius);
  margin-bottom: 20px;
}
.entry-header .post-thumbnail img {
  width: 100%; height: 100%; object-fit: cover;
}

/* Make sure post titles are large enough for Discover */
.entry-title {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem) !important;
  line-height: 1.3 !important;
  color: var(--primary-dark) !important;
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  .ad-zone, .widget-area, #back-to-top,
  .bnw-hero, .main-navigation { display: none !important; }
  .entry-content { font-size: 12pt; }
}

/* ============================================================
   ADDITIONAL STYLES — From All-Pages Update
   ============================================================ */

/* ── Archive header (coloured, gradient) ── */
.archive-header {
  background: linear-gradient(135deg, #0F4C2A 0%, #166534 100%);
  color: #fff; padding: 48px 0;
  margin-bottom: 0;
  border-bottom: 3px solid var(--accent-light);
  position: relative; overflow: hidden;
}
.archive-header::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 85% 15%, rgba(255,200,50,.15) 0%, transparent 45%);
  pointer-events: none;
}
.archive-header h1 { color: #fff !important; font-size: clamp(1.5rem,3vw,2.1rem); }
.archive-header p  { color: rgba(255,255,255,.78); font-size: .9rem; max-width: 600px; margin: .4em 0 0; }
.arch-tag {
  display: inline-block;
  background: rgba(255,255,255,.15); color: #fff;
  padding: 4px 12px; border-radius: 20px;
  font-size: .72rem; font-weight: 600;
  border: 1px solid rgba(255,255,255,.25);
  margin-right: 6px; margin-top: 12px;
}

/* ── Guide row list (service pages) ── */
.guide-row {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  box-shadow: var(--shadow-sm); transition: all var(--transition); cursor: pointer;
}
.guide-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--primary-light); }
.gr-icon { width: 46px; height: 46px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.gr-body { flex: 1; min-width: 0; }
.gr-body h3 { font-size: .92rem; margin-bottom: .2em; line-height: 1.3; font-family: var(--font-head); }
.gr-body p { font-size: .78rem; color: var(--text-muted); line-height: 1.45; margin: 0; }
.gr-arr { font-size: 1.1rem; color: var(--text-light); flex-shrink: 0; transition: all var(--transition); }
.guide-row:hover .gr-arr { color: var(--primary); transform: translateX(3px); }

/* ── District grid ── */
.district-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media(min-width:600px)  { .district-grid { grid-template-columns: repeat(3,1fr); gap: 12px; } }
@media(min-width:768px)  { .district-grid { grid-template-columns: repeat(4,1fr); gap: 14px; } }
@media(min-width:1024px) { .district-grid { grid-template-columns: repeat(5,1fr); gap: 16px; } }

.dist-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 12px; text-align: center;
  box-shadow: var(--shadow-sm); transition: all var(--transition); cursor: pointer;
  position: relative; overflow: hidden;
}
.dist-card::before {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform var(--transition);
}
.dist-card:hover::before { transform: scaleX(1); }
.dist-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--accent-light); }
.dist-card .d-icon { font-size: 1.5rem; margin-bottom: 7px; display: block; }
.dist-card h3 { font-size: .82rem; font-family: var(--font-head); color: var(--text); line-height: 1.3; margin-bottom: .25em; }
.dist-card p { font-size: .7rem; color: var(--text-muted); }

/* ── Guides archive (horizontal card layout) ── */
.guides-archive { display: flex; flex-direction: column; gap: 14px; }
.ga-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: all var(--transition);
  display: flex; flex-direction: column;
}
@media(min-width:600px) { .ga-card { flex-direction: row; } }
.ga-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--primary-light); }
.ga-thumb {
  height: 130px; display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: rgba(255,255,255,.18); flex-shrink: 0;
}
@media(min-width:600px) { .ga-thumb { width: 160px; height: auto; } }
.ga-body { padding: 14px 16px; flex: 1; }
.ga-meta { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }
.ga-cat { font-size: .67rem; font-weight: 700; color: var(--primary); background: var(--bg-alt); padding: 2px 7px; border-radius: 4px; }
.ga-date { font-size: .68rem; color: var(--text-light); }
.ga-card h3 { font-size: .95rem; font-family: var(--font-head); line-height: 1.38; margin-bottom: .35em; }
.ga-card h3 a { color: var(--text); transition: color var(--transition); }
.ga-card h3 a:hover { color: var(--primary); }
.ga-card p { font-size: .78rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 10px; }
.ga-foot { display: flex; align-items: center; justify-content: space-between; }
.ga-time { font-size: .68rem; color: var(--text-light); }

/* ── Filter chips (archive) ── */
.filter-chips {
  display: flex; gap: 7px; overflow-x: auto;
  padding: 12px 0; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.filter-chips::-webkit-scrollbar { display: none; }
.fchip {
  flex-shrink: 0; padding: 6px 14px; border-radius: 20px;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); font-size: .76rem; font-weight: 600; cursor: pointer;
  transition: all var(--transition);
}
.fchip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.fchip:hover:not(.active) { border-color: var(--primary); color: var(--primary); }

/* ── Pagination ── */
.pagination { display: flex; gap: 6px; align-items: center; justify-content: center; padding: 20px 0 0; }
.pgbtn {
  width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-size: .82rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all var(--transition);
}
.pgbtn.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.pgbtn.arr { width: auto; padding: 0 12px; font-size: .78rem; }
.pgbtn:hover:not(.on) { background: var(--bg); }

/* ── Article improvements ── */
.article-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
}
.art-meta-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.art-cat { font-size: .68rem; font-weight: 700; background: var(--bg-alt); color: var(--primary-dark); padding: 3px 9px; border-radius: 4px; }
.art-date,.art-time { font-size: .7rem; color: var(--text-light); }
.art-h1 { font-family: var(--font-head); font-size: clamp(1.3rem,3.5vw,1.9rem); color: var(--primary-dark); line-height: 1.28; margin-bottom: .4em; }
.art-excerpt { font-size: .88rem; color: var(--text-muted); line-height: 1.65; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }

.share-strip { display: flex; gap: 8px; padding: 14px 18px; background: var(--bg); border-top: 1px solid var(--border); }
.share-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 10px; border-radius: 8px; font-size: .78rem; font-weight: 700; font-family: var(--font-main); border: none; cursor: pointer; }
.share-wa { background: #25D366; color: #fff; }
.share-fb { background: #1877F2; color: #fff; }
.share-cp { background: var(--bg-alt); color: var(--primary-dark); }

.related-posts { padding: 18px; }
@media(min-width:768px) { .related-posts { padding: 24px 28px; } }
.related-posts h3 { font-family: var(--font-head); font-size: 1rem; color: var(--primary-dark); margin-bottom: 12px; }
.rel-grid { display: flex; flex-direction: column; gap: 8px; }
@media(min-width:600px) { .rel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } }
.rel-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; transition: all var(--transition); cursor: pointer; }
.rel-card:hover { border-color: var(--primary-light); transform: translateX(3px); }
.rel-icon { width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.rel-card span { font-size: .82rem; font-weight: 600; color: var(--text); line-height: 1.3; }

/* ── About page ── */
.about-hero { background: linear-gradient(135deg, #0D3320, #1B4D2E); padding: 48px 0; color: #fff; }
.about-hero h1 { font-family: var(--font-head); font-size: clamp(1.6rem,3vw,2.1rem); color: #fff; margin-bottom: .35em; }
.about-hero p { color: rgba(255,255,255,.78); font-size: .9rem; line-height: 1.6; max-width: 580px; }
.stat-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
@media(min-width:600px) { .stat-cards { grid-template-columns: repeat(4,1fr); } }
.stat-card { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius); padding: 14px; text-align: center; }
.stat-card strong { display: block; font-size: 1.4rem; color: var(--primary-light); font-family: var(--font-head); margin-bottom: .2em; }
.stat-card span { font-size: .72rem; color: rgba(255,255,255,.65); }
.about-grid { display: flex; flex-direction: column; gap: 20px; }
@media(min-width:768px) { .about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; } }
.about-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.about-box h3 { font-family: var(--font-head); font-size: 1.05rem; color: var(--primary-dark); margin-bottom: .6em; display: flex; align-items: center; gap: 8px; }
.about-box p { font-size: .85rem; color: var(--text-muted); line-height: 1.72; }
.about-box ul { list-style: none; margin-top: 10px; }
.about-box ul li { font-size: .83rem; color: var(--text-muted); padding: 5px 0; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 6px; }
.about-box ul li:last-child { border-bottom: none; }
.about-box ul li::before { content: '✓'; color: var(--accent); font-weight: 700; flex-shrink: 0; }

/* ── Mobile responsive updates ── */
@media(max-width:767px) {
  .widget-area { padding: 0; margin-top: 24px; }
  .archive-header { padding: 32px 0 24px; }
  .content-area { padding: 0; }
  .ga-card { flex-direction: column; }
  .ga-thumb { height: 130px; width: 100% !important; }
  .share-strip .share-fb { display: none; }
}

/* ============================================================
   REVISED HOMEPAGE — New Layout CSS
   ============================================================ */

/* Notice bar */
.mbap-notice{background:var(--bg-alt);border-bottom:2px solid var(--primary-light);padding:8px 0;font-size:.8rem}
.mbap-notice-inner{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.mbap-notice a{color:var(--primary);font-weight:700}
.mbap-notice-x{background:none;border:none;color:var(--text-muted);font-size:.85rem;cursor:pointer;flex-shrink:0;padding:0}

/* Ad strip */
.mbap-ad-strip{padding:6px 0 2px}

/* Section base */
.mbap-section{padding:22px 0}
@media(min-width:768px){.mbap-section{padding:30px 0}}
.mbap-section-amber{background:var(--bg)}
.mbap-section-green{background:#F0F7F3;border-top:1px solid #D1FAE5;border-bottom:1px solid #D1FAE5}

.mbap-section-head{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:.8em;flex-wrap:wrap;gap:8px}
.mbap-section-title{font-family:var(--font-head);font-size:1.15rem;color:var(--primary-dark);margin-bottom:.15em;line-height:1.3}
.mbap-section-title span{color:var(--accent)}
@media(min-width:768px){.mbap-section-title{font-size:1.55rem}}
.mbap-section-sub{font-size:.8rem;color:var(--text-muted);margin:0}
.mbap-see-all{font-size:.82rem;font-weight:700;color:var(--primary);border:1.5px solid var(--primary);padding:6px 14px;border-radius:6px;white-space:nowrap;transition:all var(--transition)}
.mbap-see-all:hover{background:var(--primary);color:#fff!important}

/* ── COMPACT CARDS GRID ── */
.mbap-compact-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
}
@media(min-width:600px){.mbap-compact-grid{gap:12px}}
@media(min-width:1024px){.mbap-compact-grid{gap:14px}}
.mbap-compact-grid-4{grid-template-columns:repeat(2,1fr)}
@media(min-width:480px){.mbap-compact-grid-4{grid-template-columns:repeat(4,1fr)}}
@media(min-width:768px){.mbap-compact-grid-4{grid-template-columns:repeat(4,1fr);gap:14px}}

.mbap-compact-card{
  display:flex;flex-direction:column;align-items:center;
  text-align:center;
  background:var(--surface);
  border:1.5px solid var(--border);
  border-radius:var(--radius);
  padding:16px 10px 14px;
  text-decoration:none!important;
  transition:all var(--transition);
  position:relative;
  overflow:hidden;
  box-shadow:var(--shadow-sm);
  cursor:pointer;
}
/* Amber top line for service cards */
.mbap-section-amber .mbap-compact-card{border-top:3px solid var(--primary-light)}
.mbap-compact-card:hover{transform:translateY(-3px);box-shadow:var(--shadow-md);border-color:var(--primary-light)}
@media(min-width:768px){.mbap-compact-card{padding:20px 14px 16px}}

.mbap-cc-icon{font-size:1.6rem;margin-bottom:7px;display:block;line-height:1}
@media(min-width:768px){.mbap-cc-icon{font-size:2rem}}
.mbap-cc-title{font-size:.78rem;font-weight:700;color:var(--text);font-family:var(--font-head);display:block;line-height:1.3;margin-bottom:3px}
@media(min-width:768px){.mbap-cc-title{font-size:.88rem}}
.mbap-cc-sub{font-size:.65rem;color:var(--text-muted);display:block;line-height:1.3}
@media(min-width:768px){.mbap-cc-sub{font-size:.72rem}}

/* Hot indicator */
.mbap-hot{border-top-color:var(--primary)!important}
.mbap-hot-dot{
  position:absolute;top:8px;right:8px;
  width:7px;height:7px;border-radius:50%;
  background:var(--primary);
  animation:pulse 2s infinite;
}

/* Portal card colour top borders */
.mbap-portal-card.portal-blue   {border-top-color:#0369A1!important}
.mbap-portal-card.portal-purple {border-top-color:#7C3AED!important}
.mbap-portal-card.portal-amber  {border-top-color:#B45309!important}
.mbap-portal-card.portal-red    {border-top-color:#DC2626!important}
.mbap-portal-card.portal-green  {border-top-color:#15803D!important}
.mbap-portal-card.portal-teal   {border-top-color:#0F766E!important}
.mbap-portal-card.portal-orange {border-top-color:#D97706!important}
.mbap-portal-card.portal-slate  {border-top-color:#64748B!important}
/* Portal cards: green top on hover */
.mbap-section-green .mbap-compact-card{border-top:3px solid #D1FAE5}

/* ── 2-COLUMN LAYOUT ── */
.mbap-two-col-wrap{background:var(--bg);padding:20px 0 40px}
@media(min-width:768px){.mbap-two-col-wrap{padding:28px 0 48px}}
.mbap-two-col{
  display:flex;
  flex-direction:column;
  gap:32px;
}
@media(min-width:1024px){
  .mbap-two-col{
    display:grid;
    grid-template-columns:1fr 290px;
    gap:32px;
    align-items:start;
  }
}
.mbap-main-col{display:flex;flex-direction:column;gap:0;min-width:0}

/* ── FAQ SECTIONS ── */
.mbap-faq-section{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:22px 18px;
  margin-bottom:24px;
  box-shadow:var(--shadow-sm);
}
@media(min-width:768px){.mbap-faq-section{padding:28px 24px}}
.mbap-faq-amber{border-top:4px solid var(--primary-light)}
.mbap-faq-green{border-top:4px solid var(--accent-light)}
.mbap-faq-title{
  font-family:var(--font-head);
  font-size:1.05rem;
  color:var(--primary-dark);
  margin-bottom:16px;
  padding-bottom:12px;
  border-bottom:1px solid var(--border);
}
@media(min-width:768px){.mbap-faq-title{font-size:1.2rem}}

/* ── ARTICLES SECTION ── */
.mbap-articles-section{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:22px 18px;
  box-shadow:var(--shadow-sm);
}
@media(min-width:768px){.mbap-articles-section{padding:28px 24px}}
.mbap-articles-head{
  display:flex;align-items:center;justify-content:space-between;
  margin-bottom:16px;padding-bottom:14px;border-bottom:1px solid var(--border);
  flex-wrap:wrap;gap:8px;
}

/* Category tabs */
.mbap-tabs{
  display:flex;gap:6px;overflow-x:auto;
  padding-bottom:8px;margin-bottom:16px;
  -webkit-overflow-scrolling:touch;scrollbar-width:none;
  border-bottom:1px solid var(--border);
}
.mbap-tabs::-webkit-scrollbar{display:none}
.mbap-tab{
  flex-shrink:0;
  padding:6px 14px;border-radius:20px;
  background:var(--bg);border:1px solid var(--border);
  color:var(--text);font-size:.76rem;font-weight:600;
  cursor:pointer;transition:all var(--transition);white-space:nowrap;
}
.mbap-tab.active{background:var(--primary);color:#fff;border-color:var(--primary)}
.mbap-tab:hover:not(.active){border-color:var(--primary);color:var(--primary)}

/* Articles grid */
.mbap-articles-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}
@media(min-width:480px){.mbap-articles-grid{grid-template-columns:1fr 1fr;gap:14px}}
@media(min-width:900px){.mbap-articles-grid{grid-template-columns:repeat(3,1fr)}}

.mbap-article-card{border-radius:var(--radius);overflow:hidden;border:1px solid var(--border);background:var(--surface);box-shadow:var(--shadow-sm);transition:all var(--transition)}
.mbap-article-card:hover{transform:translateY(-2px);box-shadow:var(--shadow-md);border-color:var(--primary-light)}
.mbap-article-link{display:flex;flex-direction:column;text-decoration:none!important;height:100%}
.mbap-article-thumb{
  height:110px;
  display:flex;align-items:center;justify-content:center;
  font-size:2.2rem;color:rgba(255,255,255,.2);
  overflow:hidden;flex-shrink:0;
}
.mbap-article-thumb img{width:100%;height:100%;object-fit:cover}
.mbap-article-body{padding:12px;display:flex;flex-direction:column;flex:1}
.mbap-article-meta{display:flex;align-items:center;gap:6px;margin-bottom:5px;flex-wrap:wrap}
.mbap-article-cat{font-size:.65rem;font-weight:700;color:var(--primary);background:var(--bg-alt);padding:2px 7px;border-radius:4px}
.mbap-article-date{font-size:.65rem;color:var(--text-light)}
.mbap-article-title{font-size:.85rem;font-family:var(--font-head);line-height:1.35;color:var(--text);margin-bottom:8px;flex:1}
.mbap-article-foot{display:flex;align-items:center;justify-content:space-between;margin-top:auto}
.mbap-article-time{font-size:.65rem;color:var(--text-light)}
.mbap-read-btn{font-size:.72rem;font-weight:700;color:var(--primary);background:var(--bg-alt);padding:4px 10px;border-radius:5px}
.mbap-article-card:hover .mbap-read-btn{background:var(--primary);color:#fff}

.mbap-no-posts{text-align:center;padding:40px 0;color:var(--text-muted);font-size:.9rem}

/* Load more */
.mbap-load-more-wrap{text-align:center;margin-top:20px;padding-top:16px;border-top:1px solid var(--border)}
.mbap-load-more{
  background:transparent;border:2px solid var(--primary);
  color:var(--primary);font-size:.88rem;font-weight:700;
  padding:11px 28px;border-radius:var(--radius);
  cursor:pointer;transition:all var(--transition);font-family:var(--font-main);
}
.mbap-load-more:hover{background:var(--primary);color:#fff}

/* ── SIDEBAR ── */
.mbap-sidebar{display:flex;flex-direction:column;gap:18px}
@media(min-width:1024px){.mbap-sticky-ad{position:sticky;top:80px}}

.mbap-sidebar-widget{
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius);overflow:hidden;
  box-shadow:var(--shadow-sm);
}
.mbap-widget-title{
  background:var(--primary-dark);color:#fff;
  padding:11px 16px;font-size:.82rem;font-weight:700;
  font-family:var(--font-head);
}

/* District links */
.mbap-dist-list{
  display:flex;flex-wrap:wrap;gap:5px;
  padding:12px;
}
.mbap-dist-link{
  font-size:.72rem;font-weight:600;
  background:var(--bg);border:1px solid var(--border);
  border-radius:5px;padding:4px 8px;
  color:var(--text)!important;text-decoration:none!important;
  transition:all var(--transition);white-space:nowrap;
}
.mbap-dist-link:hover{background:var(--primary);color:#fff!important;border-color:var(--primary)}

/* Sidebar recent posts */
.mbap-sidebar-post{
  display:flex;align-items:flex-start;gap:9px;
  padding:10px 14px;border-bottom:1px solid var(--border);
  text-decoration:none!important;transition:background var(--transition);
}
.mbap-sidebar-post:last-child{border-bottom:none}
.mbap-sidebar-post:hover{background:var(--bg)}
.mbap-sp-icon{font-size:1.2rem;flex-shrink:0;margin-top:1px}
.mbap-sp-body{display:flex;flex-direction:column;gap:2px;min-width:0}
.mbap-sp-cat{font-size:.63rem;font-weight:700;color:var(--primary);background:var(--bg-alt);padding:1px 6px;border-radius:3px;align-self:flex-start}
.mbap-sp-title{font-size:.8rem;font-weight:600;color:var(--text);line-height:1.35;font-family:var(--font-head)}
.mbap-sp-date{font-size:.65rem;color:var(--text-light)}

/* ── Mobile: districts horizontal scroll in sidebar becomes grid ── */
@media(max-width:1023px){
  .mbap-dist-list{
    display:flex;flex-wrap:nowrap;overflow-x:auto;
    padding:10px 12px;gap:6px;
    -webkit-overflow-scrolling:touch;scrollbar-width:none;
  }
  .mbap-dist-list::-webkit-scrollbar{display:none}
  .mbap-dist-link{flex-shrink:0}
}

/* ── FAQ Read Full Guide link ── */
.mbap-faq-read-more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--primary) !important;
  background: var(--bg-alt);
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid var(--primary-light);
  text-decoration: none !important;
  transition: all var(--transition);
}
.mbap-faq-read-more:hover {
  background: var(--primary);
  color: #fff !important;
  border-color: var(--primary);
}

/* ── Header height increase on desktop ── */
@media(min-width:768px) {
  .mbap-header-inner { padding: 20px 24px; }
  .mbap-logo-icon { width: 52px; height: 52px; font-size: 1.5rem; }
}

/* ── Search bar full width on mobile ── */
@media(max-width:767px) {
  .mbap-search-form-full { max-width: 100%; }
  .mbap-search-form-full input { font-size: .82rem; padding: 10px 13px; }
  .mbap-search-form-full button { padding: 10px 13px; font-size: .82rem; }
}

/* ── SERVICE PAGE HERO ── */
.svc-page-hero {
  padding: 32px 0 28px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
@media(min-width:768px){.svc-page-hero{padding:44px 0 36px}}
.svc-page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 85% 10%, rgba(255,200,50,.12) 0%, transparent 45%);
  pointer-events: none;
}
.svc-page-hero .container { position: relative; z-index: 1; }
.svc-page-hero-inner {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}
.svc-page-icon {
  font-size: 2rem;         /* matches calculator card icon */
  flex-shrink: 0;
  line-height: 1;
  margin-top: 4px;
}
@media(min-width:768px){
  .svc-page-icon { font-size: 2.4rem; }
}
.svc-page-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.svc-page-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 3vw, 2rem);
  color: #fff;
  margin-bottom: .3em;
  line-height: 1.25;
}
.svc-page-hero p {
  color: rgba(255,255,255,.8);
  font-size: .9rem;
  line-height: 1.6;
  margin: 0;
}

/* Service related section head */
.svc-related-section { margin-top: 28px; }
.svc-related-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 8px;
}

/* District active link */
.mbap-dist-link.active {
  background: var(--accent) !important;
  color: #fff !important;
  border-color: var(--accent) !important;
}

/* Content grid — mobile first */
.mbap-content-grid {
  display: grid;
  grid-template-columns: 1fr;   /* mobile: single col always */
  gap: 24px;
  align-items: start;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}
@media(min-width:1024px){
  .mbap-content-grid {
    grid-template-columns: 1fr 290px;  /* desktop only: content + sidebar */
    gap: 28px;
  }
}
/* Extra safety — force single col below 1024px */
@media(max-width:1023px) {
  .mbap-content-grid {
    grid-template-columns: 1fr !important;
    overflow: hidden !important;
  }
  .mbap-content-grid > * {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden;
  }
}

/* ── HERO QUICK HELP CARDS — 5 cards ── */
.hero-quickhelp {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 16px 0 18px;
  min-width: 0;
  width: 100%;
}
.hero-quickhelp .hqh-card:last-child {
  grid-column: 1 / -1;
}
@media(min-width:600px){
  .hero-quickhelp { grid-template-columns: 1fr 1fr 1fr; }
  .hero-quickhelp .hqh-card:last-child { grid-column: auto; }
}
@media(min-width:900px){
  .hero-quickhelp {
    grid-template-columns: repeat(5, minmax(0,1fr));  /* minmax(0,1fr) prevents overflow */
    gap: 8px;
    overflow: hidden;
  }
  .hero-quickhelp .hqh-card:last-child { grid-column: auto; }
}

.hqh-card {
  display: flex;
  align-items: center;           /* vertically center content */
  gap: 8px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 9px;
  padding: 10px 11px;            /* mobile padding */
  text-decoration: none !important;
  transition: all .2s;
  backdrop-filter: blur(4px);
}
@media(min-width:900px){
  .hqh-card { padding: 4px 8px; gap: 5px; }
  .hqh-icon { font-size: .85rem; }
  .hqh-problem {
    font-size: .7rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .hqh-link { font-size: .62rem; line-height: 1.2; }
  .hqh-body { gap: 1px; }
}
.hqh-card:hover {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.38);
  transform: translateY(-2px);
}
.hqh-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  line-height: 1;
}
@media(min-width:900px){
  .hqh-icon { font-size: 1rem; }  /* smaller icon on desktop */
}
.hqh-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.hqh-problem {
  font-size: .74rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  font-family: var(--font-head);
  display: block;
}
.hqh-link {
  font-size: .67rem;
  color: #F59E0B;
  font-weight: 600;
  display: block;
  line-height: 1.25;
}
@media(min-width:768px){
  .hqh-problem { font-size: .78rem; }
  .hqh-link    { font-size: .7rem; }
}

/* ── HERO SEO SUBTITLE ── */
.hero-subtitle {
  font-size: .72rem;
  color: rgba(255,255,255,.5);
  margin: 10px 0 12px;          /* increased top gap from h1 */
  letter-spacing: .3px;
  font-family: var(--font-main);
  padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,.12); /* subtle separator */
}

/* ── SEO INTRO INFO BOX ── */
.mbap-seo-intro {
  background: var(--bg-alt);
  border-bottom: 2px solid var(--primary-light);
  border-top: none;
  padding: 14px 0;
}
.mbap-seo-intro .seo-intro-inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 16px;
}
.mbap-seo-intro .seo-intro-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.mbap-seo-intro p {
  font-size: .84rem;
  color: var(--text);
  line-height: 1.72;
  margin: 0;
}
.mbap-seo-intro a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}
.mbap-seo-intro a:hover {
  text-decoration: underline;
}
.mbap-seo-intro strong {
  color: var(--primary-dark);
}

/* ============================================================
   DESKTOP LAYOUT FIX — Force full-width block sections
   Prevents GP from applying flex/float to our sections
   ============================================================ */
.bnw-hero,
.mbap-seo-intro,
.mbap-ad-strip,
.mbap-section,
.mbap-section-amber,
.mbap-section-green,
.mbap-two-col-wrap {
  display: block !important;
  width: 100% !important;
  float: none !important;
  clear: both;
}

/* Ensure container is always full width */
.container {
  width: 100% !important;
  max-width: var(--maxw) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
}

/* Two-col grid — only grid on 1024px+ */
@media(min-width:1024px) {
  .mbap-two-col {
    display: grid !important;
    grid-template-columns: 1fr 290px !important;
    gap: 32px !important;
    align-items: start !important;
  }
}

/* Compact grid — always 3 col on desktop */
@media(min-width:768px) {
  .mbap-compact-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .mbap-compact-grid-4 {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

/* ============================================================
   CALCULATOR STYLES
   ============================================================ */
.mbap-calc-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin: 0 0 24px;
}
.mbap-calc-head {
  background: linear-gradient(135deg, #0D3320, #1B4D2E);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.mbap-calc-icon {
  font-size: 2rem;
  flex-shrink: 0;
}
.mbap-calc-head h3 {
  color: #fff !important;
  font-size: 1rem;
  margin: 0 0 3px;
  font-family: var(--font-head);
}
.mbap-calc-head p {
  color: rgba(255,255,255,.7);
  font-size: .78rem;
  margin: 0;
}
.mbap-calc-body {
  padding: 20px;
}
.mbap-calc-row {
  margin-bottom: 14px;
}
.mbap-calc-row label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
}
.mbap-calc-row input,
.mbap-calc-row select {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .88rem;
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}
.mbap-calc-row input:focus,
.mbap-calc-row select:focus {
  border-color: var(--primary-light);
}
.mbap-radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  width: 100%;
}
.mbap-radio-group label {
  display: flex;
  align-items: flex-start;   /* top align for multi-line text */
  gap: 10px;
  font-size: .84rem;
  font-weight: 400;
  color: var(--text);
  cursor: pointer;
  margin: 0;
  width: 100%;
  line-height: 1.5;
  padding: 8px 12px;         /* tap-friendly padding */
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-sizing: border-box;
  transition: background var(--transition);
}
.mbap-radio-group label:hover {
  background: var(--bg-alt);
  border-color: var(--primary-light);
}
.mbap-radio-group input[type="radio"] {
  flex-shrink: 0;            /* prevent radio from shrinking */
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}
.mbap-radio-group label span {
  flex: 1;
  min-width: 0;              /* allow text to wrap */
  word-break: break-word;
}
.mbap-calc-btn {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: .92rem;
  font-weight: 700;
  font-family: var(--font-main);
  cursor: pointer;
  transition: background var(--transition);
  margin-top: 4px;
}
.mbap-calc-btn:hover { background: var(--primary-dark); }

/* Results */
.mbap-calc-result {
  margin-top: 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.mbap-calc-result-title {
  background: var(--primary-dark);
  color: #fff;
  padding: 10px 16px;
  font-size: .82rem;
  font-weight: 700;
  font-family: var(--font-head);
}
.mbap-calc-result-grid { padding: 4px 0; }
.cr-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 16px;
  font-size: .84rem;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.cr-row:last-child { border-bottom: none; }
.cr-row span:first-child { color: var(--text-muted); }
.cr-row span:last-child { font-weight: 700; color: var(--text); text-align: right; }
.cr-total {
  background: var(--bg-alt);
  border-top: 2px solid var(--primary-light) !important;
}
.cr-total span:last-child { color: var(--primary-dark); font-size: .92rem; }
.mbap-calc-disclaimer {
  padding: 10px 16px;
  font-size: .75rem;
  color: var(--text-muted);
  background: #FFFBEB;
  border-top: 1px solid #FDE68A;
  line-height: 1.5;
}
.mbap-calc-disclaimer a { color: var(--primary); }

/* Eligibility results */
.calc-eligible, .calc-ineligible {
  padding: 20px 16px;
  text-align: center;
  font-size: .88rem;
}
.calc-eligible { background: #F0FDF4; color: #166534; }
.calc-ineligible { background: #FEF2F2; color: #DC2626; }
.calc-eligible strong, .calc-ineligible strong { font-size: 1rem; display: block; margin-bottom: 6px; }

/* ── SIDEBAR CALC WIDGET ── */
.mbap-calc-sidebar-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.mbap-calc-sidebar-widget .widget-title-bar {
  background: #B45309;
  color: #fff;
  padding: 11px 16px;
  font-size: .82rem;
  font-weight: 700;
  font-family: var(--font-head);
  display: flex;
  align-items: center;
  gap: 7px;
}

/* Mini area converter in sidebar */
.mbap-mini-calc {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.mbap-mini-calc label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
  display: block;
  margin-bottom: 5px;
}
.mbap-mini-calc-row {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}
.mbap-mini-calc input,
.mbap-mini-calc select {
  flex: 1;
  padding: 7px 9px;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  font-size: .78rem;
  font-family: var(--font-main);
  background: var(--bg);
  min-width: 0;
  outline: none;
}
.mbap-mini-calc button {
  width: 100%;
  padding: 8px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 7px;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-main);
}
.mbap-mini-result {
  margin-top: 8px;
  font-size: .78rem;
  color: var(--text);
  background: var(--bg-alt);
  border-radius: 6px;
  padding: 8px 10px;
  display: none;
  line-height: 1.6;
}

/* Calc links list in sidebar */
.mbap-calc-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.mbap-calc-links li {
  border-bottom: 1px solid var(--border);
}
.mbap-calc-links li:last-child { border-bottom: none; }
.mbap-calc-links li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: .82rem;
  color: var(--text);
  text-decoration: none;
  transition: all var(--transition);
}
.mbap-calc-links li a:hover {
  background: var(--bg);
  color: var(--primary);
  padding-left: 20px;
}
.mbap-calc-links .calc-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

/* ── AdSense Slot Styling ── */
.mbap-ad-slot {
  text-align: center;
  overflow: hidden;
  margin: 12px 0;
}
.mbap-ad-leaderboard { min-height: 90px; }
.mbap-ad-sidebar_top,
.mbap-ad-sidebar_sticky { min-height: 250px; }
.mbap-ad-mid_article,
.mbap-ad-after_title { min-height: 90px; }
.mbap-before-footer-ad {
  padding: 16px 0 8px;
  text-align: center;
}

/* ============================================================
   MOBILE FLOATING CALCULATOR BUTTON
   Only visible on mobile (max-width:1023px)
   ============================================================ */
.mbap-float-calc {
  display: none;  /* hidden on desktop */
}
@media(max-width:1023px) {
  .mbap-float-calc {
    display: block;
    position: fixed;
    bottom: 80px;      /* above bottom nav if present */
    right: 16px;
    z-index: 999;
  }
}

/* Floating button */
.mbap-float-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(180,83,9,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  position: relative;
  z-index: 2;
}
.mbap-float-btn:hover,
.mbap-float-btn.open {
  background: var(--primary-dark);
  transform: scale(1.08);
}

/* Popup menu */
.mbap-float-menu {
  position: absolute;
  bottom: 62px;
  right: 0;
  width: 280px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  overflow: hidden;
  display: none;
  z-index: 1;
}
.mbap-float-menu.open { display: block; }

.mbap-float-menu-title {
  background: var(--primary-dark);
  color: #fff;
  padding: 10px 14px;
  font-size: .82rem;
  font-weight: 700;
  font-family: var(--font-head);
}

.mbap-float-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  text-decoration: none !important;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  color: var(--text) !important;
}
.mbap-float-link:last-child { border-bottom: none; }
.mbap-float-link:hover { background: var(--bg); }
.mbap-float-link > span { font-size: 1.3rem; flex-shrink: 0; }
.mbap-float-link div { display: flex; flex-direction: column; gap: 1px; }
.mbap-float-link strong { font-size: .82rem; color: var(--text); display: block; }
.mbap-float-link small { font-size: .7rem; color: var(--text-muted); }

/* ============================================================
   SITEMAP PAGE — Responsive
   ============================================================ */
.sitemap-grid {
  display: grid;
  grid-template-columns: 1fr;   /* single col mobile */
  gap: 16px;
  margin-top: 12px;
}
@media(min-width:600px) {
  .sitemap-grid { grid-template-columns: 1fr 1fr; gap: 18px; }
}
@media(min-width:900px) {
  .sitemap-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

.sm-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.sm-head {
  background: var(--primary-dark);
  color: #fff;
  padding: 10px 16px;
  font-size: .82rem;
  font-weight: 700;
  font-family: var(--font-head);
}
.sm-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sm-section ul li {
  border-bottom: 1px solid var(--border);
}
.sm-section ul li:last-child { border-bottom: none; }
.sm-section ul li a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  font-size: .82rem;
  color: var(--text);
  text-decoration: none;
  transition: all var(--transition);
  line-height: 1.4;
}
.sm-section ul li a::before {
  content: '→';
  color: var(--primary-light);
  font-size: .72rem;
  flex-shrink: 0;
}
.sm-section ul li a:hover {
  background: var(--bg);
  color: var(--primary);
  padding-left: 18px;
}

/* Mobile touch-friendly tap targets */
@media(max-width:599px) {
  .sm-section ul li a { padding: 11px 14px; font-size: .85rem; }
  .sm-head { font-size: .85rem; padding: 12px 16px; }
}

/* ── STICKY WRAP ── */
.mbap-sticky-wrap {
  position: sticky;
  top: 0;
  z-index: 600;
  box-shadow: 0 3px 16px rgba(0,0,0,.22);
}

/* ── Helpline — remove from header ── */
.mbap-helpline { display: none !important; }

/* ── Header inner — logo + search + hamburger ── */
@media(min-width:1024px){
  .mbap-header-inner { gap: 0; }
  .mbap-logo { flex-shrink: 0; margin-right: 16px; }
}

/* ── Mobile search bar fix ── */
@media(max-width:1023px){
  .mbap-search-form-full { max-width: 100%; }
  .mbap-search-form-full input { font-size: 16px !important; padding: 7px 12px; }
  .mbap-search-form-full button { padding: 7px 13px; font-size: .82rem; }
}

/* ── District & Service pages mobile fixes ── */
@media(max-width:1023px) {
  /* Tables scroll horizontally instead of overflow */
  .svc-page-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
  /* Inner grids collapse to single col */
  .svc-page-content [style*="grid-template-columns:1fr 1fr"],
  .svc-page-content [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  /* District info card full width */
  .mbap-dist-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 10px;
  }
  /* Step boxes full width */
  .step-box {
    width: 100%;
    box-sizing: border-box;
  }
  /* Service hero inner */
  .svc-page-hero-inner {
    flex-direction: column;
    gap: 10px;
  }
  .svc-page-icon { font-size: 1.6rem !important; }
}

/* District service links grid */
.dist-svc-grid {
  display: grid;
  grid-template-columns: 1fr;   /* single col on mobile */
  gap: 8px;
}
@media(min-width:480px){
  .dist-svc-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Safari Mobile Zoom Fix ──
   Safari auto-zooms when input font-size < 16px
   Setting all inputs to 16px prevents this behaviour ── */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  input[type="search"],
  input[type="text"],
  input[type="number"],
  input[type="email"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Specifically fix search inputs */
.mbap-search-form-full input,
.mbap-header-search input,
.mbap-mini-calc input,
.mbap-mini-calc select,
.mbap-calc-row input,
.mbap-calc-row select {
  font-size: 16px !important;
}

/* ── WordPress Admin Bar Fix ──
   When logged in, WP admin bar is 32px (desktop) or 46px (mobile)
   Sticky header must account for this offset ── */
.admin-bar .mbap-sticky-wrap {
  top: 32px !important;
}
@media screen and (max-width: 782px) {
  .admin-bar .mbap-sticky-wrap {
    top: 46px !important;
  }
}
/* When admin bar is hidden on mobile scroll */
@media screen and (max-width: 600px) {
  .admin-bar .mbap-sticky-wrap {
    top: 0 !important;
  }
}

/* ── Calculator Hero Layout ── */
.calc-hero-wrap {
  text-align: center;
}
.calc-hero-row1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.calc-hero-icon {
  font-size: 1.5rem;
  line-height: 1;
}
.calc-hero-wrap h1 {
  text-align: center;
  margin-bottom: .3em;
}
.calc-hero-wrap p {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

/* ── NO POSTS BEAUTIFUL STATE ── */
.mbap-no-posts-wrap {
  text-align: center;
  padding: 40px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.mbap-no-posts-icon {
  font-size: 3.5rem;
  margin-bottom: 14px;
  line-height: 1;
}
.mbap-no-posts-wrap h2 {
  font-family: var(--font-head);
  color: var(--primary-dark);
  font-size: 1.3rem;
  margin-bottom: .4em;
}
.mbap-no-posts-wrap > p {
  color: var(--text-muted);
  font-size: .88rem;
  margin-bottom: 24px;
  line-height: 1.6;
}

/* Coming soon topic cards */
.mbap-coming-soon-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 auto;
  max-width: 600px;
  text-align: left;
}
@media(min-width:600px){
  .mbap-coming-soon-grid { grid-template-columns: repeat(3,1fr); }
}
.mbap-coming-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  text-decoration: none !important;
  transition: all var(--transition);
  border-top: 3px solid var(--primary-light);
}
.mbap-coming-card:hover {
  background: var(--bg-alt);
  border-top-color: var(--primary);
  transform: translateY(-2px);
}
.mbap-coming-card .mbap-cc-icon { font-size: 1.4rem; }
.mbap-coming-card .mbap-cc-title {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font-head);
}
.mbap-coming-card .mbap-cc-sub {
  font-size: .72rem;
  color: var(--text-muted);
  line-height: 1.4;
}
