/*
Theme Name:  CoolCAD Electronics
Theme URI:   https://coolcadelectronics.com
Author:      Consulting Rebuild
Description: Custom WordPress theme for CoolCAD Electronics — SiC semiconductor company site.
Version:     1.1.0
License:     GNU General Public License v2 or later
Text Domain: coolcad
*/

/* ── Design Tokens ─────────────────────────────────────────────────────────── */
:root {
  /* Brand */
  --cc-dark:        #06142a;
  --cc-dark-mid:    #0d2248;
  --cc-blue:        #1558d6;
  --cc-blue-hover:  #1046b8;
  --cc-sky:         #0ea5e9;
  --cc-white:       #ffffff;

  /* Surfaces */
  --cc-bg:          #f8fafc;
  --cc-surface:     #ffffff;
  --cc-surface-2:   #f1f5f9;

  /* Text */
  --cc-text:        #1e293b;
  --cc-muted:       #64748b;
  --cc-subtle:      #94a3b8;

  /* Borders */
  --cc-border:      #e2e8f0;
  --cc-border-dark: #cbd5e1;

  /* Voltage colour coding */
  --v-650:   #16a34a;   /* green  */
  --v-1200:  #2563eb;   /* blue   */
  --v-1700:  #d97706;   /* amber  */
  --v-3300:  #dc2626;   /* red    */

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(6,20,42,.08), 0 1px 2px rgba(6,20,42,.05);
  --shadow-md:  0 4px 16px rgba(6,20,42,.10), 0 2px 6px rgba(6,20,42,.06);
  --shadow-lg:  0 12px 32px rgba(6,20,42,.14), 0 4px 10px rgba(6,20,42,.08);

  /* Layout */
  --container:  1200px;
  --header-h:   60px; /* mobile single-row height; desktop uses auto */
  --radius:     6px;
  --radius-lg:  12px;

  /* Type */
  --font-sans:  'Open Sans', system-ui, -apple-system, sans-serif;
  --font-head:  'Montserrat', var(--font-sans);
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--cc-text);
  background: var(--cc-white);
}
a  { color: var(--cc-blue); text-decoration: none; }
a:hover { color: var(--cc-blue-hover); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  color: var(--cc-dark);
}
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }

/* ── Layout helpers ────────────────────────────────────────────────────────── */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section    { padding: 80px 0; }
.section--alt  { background: var(--cc-bg); }
.section--dark {
  background: linear-gradient(135deg, var(--cc-dark) 0%, var(--cc-dark-mid) 100%);
  color: var(--cc-white);
}
.section--dark h1,
.section--dark h2,
.section--dark h3 { color: var(--cc-white); }

.section__header { text-align: center; margin-bottom: 56px; }
.section__header h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  margin-bottom: .6rem;
}
.section__header p {
  color: var(--cc-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}
.section__eyebrow {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--cc-sky);
  margin-bottom: .75rem;
}

/* ── Site Header ───────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100; /* below WP admin bar (z-index: 99999) */
  background: var(--cc-dark);
  box-shadow: 0 2px 12px rgba(0,0,0,.4);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
/* Desktop: two-row layout — [logo · search] on top, nav below */
.site-header .container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding-top: 6px;
  padding-bottom: 0;
  gap: 0;
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-bottom: 6px;
}
.site-logo { display: flex; align-items: center; gap: 10px; }
.site-logo img, .custom-logo { height: 33px !important; width: auto !important; max-width: none !important; }
/* Header search */
.header-search form {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  padding: 4px 8px;
  gap: 6px;
}
.header-search input[type="search"] {
  background: none;
  border: none;
  outline: none;
  color: var(--cc-white);
  font-size: .78rem;
  width: 160px;
}
.header-search input[type="search"]::placeholder { color: rgba(255,255,255,.4); }
.header-search button[type="submit"] {
  background: none;
  border: none;
  color: rgba(255,255,255,.55);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  transition: color .15s;
}
.header-search button[type="submit"]:hover { color: var(--cc-white); }
.site-logo span {
  color: var(--cc-white);
  font-family: var(--font-head);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: -.01em;
}

/* ── Primary Nav ───────────────────────────────────────────────────────────── */
/* WP puts class="primary-nav" on the <ul>, so target it directly.
   The <nav> wrapper gets id="site-nav" — use that for width/border. */
#site-nav { width: 100%; border-top: 1px solid rgba(255,255,255,.1); }

/* Main nav <ul> — horizontal row */
ul.primary-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 0;
}
ul.primary-nav > li { position: relative; }

.primary-nav a {
  display: block;
  padding: 6px 10px;
  color: rgba(255,255,255,.82);
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-radius: var(--radius);
  transition: background .15s, color .15s;
  white-space: nowrap;
  position: relative;
}
.primary-nav a::after {
  content: '';
  position: absolute;
  bottom: 3px; left: 10px; right: 10px;
  height: 2px;
  background: var(--cc-sky);
  transform: scaleX(0);
  transition: transform .2s ease;
  border-radius: 2px;
}
.primary-nav a:hover::after,
.primary-nav .current-menu-item > a::after { transform: scaleX(1); }

.primary-nav a:hover,
.primary-nav .current-menu-item > a {
  color: var(--cc-white);
  background: rgba(255,255,255,.08);
  text-decoration: none;
}

/* Dropdown */
.primary-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 210px;
  background: var(--cc-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--cc-border);
  padding: 8px;
  padding-top: 14px;
  flex-direction: column;
  gap: 2px;
}
.primary-nav li:hover > .sub-menu,
.primary-nav li:focus-within > .sub-menu { display: flex; }

.primary-nav .sub-menu a {
  color: var(--cc-text);
  font-size: .82rem;
  padding: 8px 12px;
  border-radius: var(--radius);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}
.primary-nav .sub-menu a::after { display: none; }
.primary-nav .sub-menu a:hover { background: var(--cc-bg); color: var(--cc-blue); }

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: 1.5px solid rgba(255,255,255,.35);
  border-radius: var(--radius);
  padding: 7px 10px;
  cursor: pointer;
  color: var(--cc-white);
  gap: 4px;
  flex-direction: column;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: currentColor; transition: .2s; }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: clamp(540px, 70vh, 820px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--cc-dark);
  padding: 80px 0 64px;
}
/* Gradient overlay — stays dark edge-to-edge */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(150deg,
      rgba(6,20,42,.97) 0%,
      rgba(13,34,72,.82) 50%,
      rgba(6,20,42,.90) 100%);
  z-index: 1;
}
/* Animated shimmer accent */
.hero::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14,165,233,.15) 0%, transparent 70%);
  z-index: 0;
}
.hero .container { position: relative; z-index: 2; display: flex; align-items: flex-start; }
.hero__inner { max-width: 548px; }
.hero__eyebrow {
  display: inline-block;
  background: rgba(14,165,233,.15);
  border: 1px solid rgba(14,165,233,.35);
  color: var(--cc-sky);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 5px 14px 5px 0;
  border-radius: 20px;
  margin-bottom: 1.25rem;
}
.hero__inner h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  color: var(--cc-white);
  margin-bottom: 1.1rem;
  line-height: 1.1;
  text-wrap: balance;
}
.hero__inner p {
  font-size: 1.1rem;
  color: rgba(255,255,255,.8);
  margin-bottom: 2rem;
  max-width: 560px;
  line-height: 1.7;
}
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Stats strip inside hero */
.hero__stats {
  display: flex;
  gap: 24px;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,.12);
  flex-wrap: nowrap;
  align-items: flex-start;
}
.hero__stat strong {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--cc-sky);
  font-family: var(--font-head);
  line-height: 1;
  margin-bottom: .2rem;
}
.hero__stat span { font-size: .8rem; color: rgba(255,255,255,.65); text-transform: uppercase; letter-spacing: .06em; }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 26px;
  border-radius: 40px;
  font-family: var(--font-head);
  font-size: .825rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  cursor: pointer;
  transition: background .18s, transform .15s, box-shadow .18s;
  border: 2px solid transparent;
  text-decoration: none !important;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--cc-blue);
  color: var(--cc-white);
  border-color: var(--cc-blue);
  box-shadow: 0 4px 14px rgba(21,88,214,.35);
}
.btn-primary:hover {
  background: var(--cc-blue-hover);
  border-color: var(--cc-blue-hover);
  color: var(--cc-white);
  box-shadow: 0 6px 20px rgba(21,88,214,.45);
}

.btn-outline-light {
  background: transparent;
  color: var(--cc-white);
  border-color: rgba(255,255,255,.5);
}
.btn-outline-light:hover {
  background: rgba(255,255,255,.1);
  border-color: var(--cc-white);
  color: var(--cc-white);
}

.btn-sky {
  background: var(--cc-sky);
  color: var(--cc-dark);
  border-color: var(--cc-dark);
}
.btn-sky:hover {
  background: #38bdf8;
  border-color: var(--cc-dark);
  color: var(--cc-dark);
}

.btn-outline {
  background: transparent;
  color: var(--cc-blue);
  border-color: var(--cc-blue);
}
.btn-outline:hover {
  background: var(--cc-blue);
  color: var(--cc-white);
}

.btn-sm { padding: 7px 18px; font-size: .75rem; border-radius: 30px; }

/* ── Cards ─────────────────────────────────────────────────────────────────── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }

.card {
  background: var(--cc-white);
  border: 1px solid var(--cc-border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .22s, transform .22s, border-color .22s;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
/* Push any trailing button paragraph to the bottom of the card, centred */
.card > p:last-child { margin-top: auto; padding-top: .75rem; text-align: center; }
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cc-blue), var(--cc-sky));
  opacity: 0;
  transition: opacity .22s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--cc-border-dark); }
.card:hover::before { opacity: 1; }

.card--dark {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.1);
}
.card--dark:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); }
.card--dark::before { background: linear-gradient(90deg, var(--cc-sky), var(--cc-blue)); }

.card__icon { font-size: 2.25rem; margin-bottom: 16px; line-height: 1; }
.card__title { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; }
.card--dark .card__title { color: var(--cc-white); }
.card__body { font-size: .9rem; color: var(--cc-muted); line-height: 1.65; }
.card--dark .card__body { color: rgba(255,255,255,.65); }

/* ── Page Hero (inner pages) ───────────────────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--cc-dark) 0%, var(--cc-dark-mid) 100%);
  padding: 5px 0;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute;
  right: -5%;
  top: -50%;
  width: 40vw;
  height: 40vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14,165,233,.1) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero__breadcrumb {
  font-size: .78rem;
  color: rgba(255,255,255,.5);
  margin-bottom: 0;
  line-height: 1.4;
}
.page-hero__breadcrumb a { color: var(--cc-sky); }
.page-hero__breadcrumb a:hover { text-decoration: underline; }
.page-hero h1 {
  color: var(--cc-white);
  font-size: clamp(1.75rem, 3.5vw, 2.6rem);
  margin-bottom: .5rem;
  line-height: 1.15;
  text-wrap: balance;
}
.page-hero p { color: rgba(255,255,255,.7); max-width: 600px; font-size: 1.05rem; margin: 0; }

/* ── Breadcrumb (visual) ───────────────────────────────────────────────────── */
.breadcrumb { font-size: .82rem; color: var(--cc-muted); padding: 12px 0 0; }
.breadcrumb a { color: var(--cc-blue); }
.breadcrumb span { margin: 0 6px; color: var(--cc-subtle); }

/* ── Content Area ──────────────────────────────────────────────────────────── */
.site-content { padding: 56px 0 72px; }

/* Fix scraped content — downgrade all heading levels inside entry-content */
.entry-content > * + * { margin-top: .75rem; }
.entry-content h1 { font-size: 1.8rem; margin-top: 2rem; }
.entry-content h2 { font-size: 1.45rem; margin-top: 1.75rem; padding-bottom: .4rem; border-bottom: 2px solid var(--cc-border); }
.entry-content h3 { font-size: 1.2rem; margin-top: 1.5rem; color: var(--cc-blue); }
.entry-content h4 { font-size: 1.05rem; margin-top: 1.25rem; }
.entry-content p  { margin-bottom: .9rem; }
.entry-content ul, .entry-content ol { margin-bottom: 1rem; }
.entry-content img { border-radius: var(--radius-lg); margin: 1.25rem 0; box-shadow: var(--shadow-sm); }
.entry-content a  { color: var(--cc-blue); text-decoration: underline; }

/* ── Product Tables ────────────────────────────────────────────────────────── */
.product-section { margin-bottom: 32px; margin-top: 0; }
.product-section > h2 {
  font-size: 1.45rem;
  color: var(--cc-dark);
  margin-bottom: 4px;
  padding-bottom: 6px;
  border-bottom: 3px solid var(--cc-blue);
  display: inline-block;
}
.product-section > p { color: var(--cc-muted); margin-bottom: 6px; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); border: 1px solid var(--cc-border); margin-bottom: 1rem; }

.product-table { width: 100%; border-collapse: collapse; font-size: .75rem; background: var(--cc-white); }

.product-table thead tr { background: var(--cc-dark); }
.product-table th {
  color: var(--cc-white);
  padding: 7px 10px;
  text-align: left;
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: normal;
  vertical-align: bottom;
  line-height: 1.3;
}
.product-table td { padding: 6px 10px; border-bottom: 1px solid var(--cc-border); vertical-align: middle; white-space: nowrap; }
.product-table tbody tr:hover { background: var(--cc-bg); }
.product-table tbody tr:last-child td { border-bottom: none; }
/* Center all columns except the first (Part Number) */
.product-table th:not(:first-child),
.product-table td:not(:first-child) { text-align: center; }
/* Table action buttons — match badge style */
.product-table .btn-sm {
  padding: 4px 10px !important;
  font-size: .68rem !important;
  background: var(--cc-bg) !important;
  color: var(--cc-dark) !important;
  border: 1px solid var(--cc-blue) !important;
  border-radius: 20px !important;
  box-shadow: none !important;
  font-weight: 600;
}
.product-table .btn-sm:hover {
  background: var(--cc-blue) !important;
  color: var(--cc-white) !important;
  text-decoration: none;
}

.product-table .part-number {
  font-weight: 700;
  font-family: monospace;
  font-size: .8rem;
  color: var(--cc-dark);
}

/* Voltage badges */
.v-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.6;
}
.v-badge--650  { background: #dcfce7; color: #15803d; }
.v-badge--1200 { background: #dbeafe; color: #1d4ed8; }
.v-badge--1700 { background: #fef3c7; color: #b45309; }
.v-badge--3300 { background: #fee2e2; color: #b91c1c; }

/* ── Products page layout ──────────────────────────────────────────────────── */
.products-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: start;
  padding-top: 40px;
  padding-bottom: 60px;
}
/* Sticky accordion sidebar */
.pnav {
  position: sticky;
  top: 90px;
  background: var(--cc-surface);
  border: 1px solid var(--cc-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.pnav__header {
  background: var(--cc-dark);
  color: var(--cc-white);
  font-family: var(--font-head);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 10px 16px;
}
.pnav__group { border-bottom: 1px solid var(--cc-border); }
.pnav__group:last-child { border-bottom: none; }
.pnav__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  padding: 10px 16px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--cc-text);
  cursor: pointer;
  text-align: left;
  transition: background .15s, color .15s;
}
.pnav__toggle:hover { background: var(--cc-bg); color: var(--cc-blue); }
.pnav__chevron { flex-shrink: 0; transition: transform .2s ease; }
.pnav__group.is-open .pnav__chevron { transform: rotate(180deg); }
.pnav__sub {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
}
.pnav__group.is-open .pnav__sub { max-height: 300px; }
.pnav__sub li { border-top: 1px solid var(--cc-border); }
.pnav__sub a {
  display: block;
  padding: 8px 16px 8px 24px;
  font-size: .78rem;
  color: var(--cc-muted);
  transition: color .15s, background .15s;
}
.pnav__sub a:hover { color: var(--cc-blue); background: var(--cc-bg); text-decoration: none; }

/* ── Two-column split ──────────────────────────────────────────────────────── */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split--reverse { }
.split__img img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); width: 100%; }
.split__text h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); margin-bottom: 1rem; }
.split__text p  { color: var(--cc-muted); margin-bottom: .9rem; }

/* ── Comparison table (SiC vs Si, GEO-friendly) ────────────────────────────── */
.compare-table { width: 100%; border-collapse: collapse; font-size: .9rem; margin: 1.5rem 0; }
.compare-table th { background: var(--cc-dark); color: #fff; padding: 11px 16px; text-align: left; }
.compare-table th:first-child { border-radius: var(--radius) 0 0 0; }
.compare-table th:last-child  { border-radius: 0 var(--radius) 0 0; }
.compare-table td { padding: 10px 16px; border-bottom: 1px solid var(--cc-border); }
.compare-table tbody tr:nth-child(even) { background: var(--cc-bg); }
.compare-table .win  { color: #15803d; font-weight: 700; }
.compare-table .lose { color: var(--cc-muted); }

/* ── FAQ (GEO answer targets) ──────────────────────────────────────────────── */
.faq { max-width: 820px; margin: 0 auto; }
.faq__item { border-bottom: 1px solid var(--cc-border); padding: 20px 0; }
.faq__item:last-child { border-bottom: none; }
.faq__q {
  font-weight: 700;
  font-size: 1rem;
  color: var(--cc-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  list-style: none;
}
.faq__q::after { content: '+'; font-size: 1.4rem; font-weight: 300; color: var(--cc-blue); flex-shrink: 0; line-height: 1; margin-top: .1rem; }
.faq__item[open] .faq__q::after { content: '−'; }
.faq__a { padding-top: 10px; color: var(--cc-muted); line-height: 1.7; font-size: .95rem; }

/* ── Keyring / partner logos ───────────────────────────────────────────────── */
.partners {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
  padding: 32px 0;
  border-top: 1px solid var(--cc-border);
  border-bottom: 1px solid var(--cc-border);
}
.partners__label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--cc-subtle); }
.partners a { color: var(--cc-muted); font-weight: 700; font-size: .95rem; transition: color .15s; }
.partners a:hover { color: var(--cc-blue); text-decoration: none; }

/* ── CTA strip ─────────────────────────────────────────────────────────────── */
.cta-strip {
  background: linear-gradient(135deg, var(--cc-blue) 0%, #1046b8 100%);
  padding: 64px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-strip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.cta-strip > * { position: relative; z-index: 1; }
.cta-strip h2 { color: #fff; font-size: clamp(1.5rem, 2.5vw, 2.1rem); margin-bottom: .75rem; }
.cta-strip p  { color: rgba(255,255,255,.82); max-width: 520px; margin: 0 auto 1.75rem; font-size: 1.05rem; }
.cta-strip .btn-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── News cards ─────────────────────────────────────────────────────────────── */
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }
.post-card { border: 1px solid var(--cc-border); border-radius: var(--radius-lg); overflow: hidden; background: var(--cc-white); transition: box-shadow .22s, transform .22s; }
.post-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.post-card__img { height: 200px; overflow: hidden; }
.post-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.post-card:hover .post-card__img img { transform: scale(1.04); }
.post-card__body { padding: 22px; }
.post-card__meta  { font-size: .78rem; color: var(--cc-muted); margin-bottom: .35rem; }
.post-card__title { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; line-height: 1.35; }
.post-card__title a { color: var(--cc-dark); }
.post-card__title a:hover { color: var(--cc-blue); text-decoration: none; }
.post-card__excerpt { font-size: .875rem; color: var(--cc-muted); }

/* ── Contact ─────────────────────────────────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 56px; align-items: start; }
.contact-info h3 { margin-bottom: .75rem; }
.contact-info p  { color: var(--cc-muted); margin-bottom: .6rem; font-size: .95rem; }
.contact-detail { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 1rem; }
.contact-detail strong { color: var(--cc-dark); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; display: block; }
.contact-detail span  { color: var(--cc-muted); font-size: .95rem; }

/* ── Site Footer ─────────────────────────────────────────────────────────────── */
.site-footer { background: var(--cc-dark); color: rgba(255,255,255,.65); padding: 64px 0 28px; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 28px;
}
.footer-col h4 {
  color: var(--cc-white);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 2px solid rgba(14,165,233,.4);
  display: inline-block;
  line-height: 1;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 1px; line-height: 1.4; }
.footer-col a { color: rgba(255,255,255,.55); font-size: .875rem; transition: color .15s; line-height: 1.4; }
.footer-col a:hover { color: var(--cc-white); text-decoration: none; }
.footer-col p { font-size: .875rem; line-height: 1.7; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .8rem;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255,255,255,.4);
}
.footer-bottom a { color: rgba(255,255,255,.4); }
.footer-bottom a:hover { color: rgba(255,255,255,.7); }

/* ── Utilities ───────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  background: var(--cc-bg);
  border: 1px solid var(--cc-border);
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--cc-text);
}
.text-center { text-align: center; }
.text-muted   { color: var(--cc-muted); }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.75rem; }
.mb-2 { margin-bottom: 1rem; }
.gap-2 { gap: 1rem; }

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid   { grid-template-columns: 1fr 1fr; }
  .contact-grid  { grid-template-columns: 1fr; }
  .split         { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  /* Mobile: revert header-top to single-row — logo left, hamburger right */
  .site-header .container {
    flex-direction: column;
    padding-top: 0;
  }
  .header-top {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    padding-bottom: 0;
  }
  .site-logo { padding-bottom: 0; }
  .header-search { display: none; }

  .nav-toggle { display: flex; }

  /* Mobile: hide nav, show as full-width dropdown when toggled */
  ul.primary-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--cc-dark);
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 12px 0 24px;
    z-index: 999;
    flex-direction: column;
    justify-content: initial;
    gap: 0;
  }
  #site-nav.is-open ul.primary-nav { display: flex; }
  .primary-nav a   { padding: 10px 24px; border-radius: 0; }
  .primary-nav a::after { display: none; }

  .primary-nav .sub-menu {
    position: static;
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: rgba(255,255,255,.05);
    padding: 0;
    display: flex !important;
    flex-direction: column;
  }
  .primary-nav .sub-menu a { color: rgba(255,255,255,.7); padding-left: 40px; }

  .hero { min-height: 420px; padding: 60px 0 48px; }
  .hero__stats { gap: 24px; }
  .section { padding: 56px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .hero__actions { flex-direction: column; align-items: flex-start; }
  .split { gap: 32px; }
}

/* ── WordPress Admin Bar offset ──────────────────────────────────────────────
   When logged in, WP adds a 32px fixed admin bar. Adjust sticky header's
   top value so it doesn't hide behind it. */
body.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
}
