/* =============================================================
   iwork Theme (v1) — modern spin-off of Prism for 1733CMS.
   Same markup & PHP class names as Prism; refreshed visual
   system (blue/coral brand, Sora type, grid-lit dark hero).
   Accent is driven by --red / --black so the CMS
   theme_color_light / theme_color_dark settings still work:
     theme_color_light = #2b59ff   theme_color_dark = #14151a
   ============================================================= */

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

:root {
  --red:         #2b59ff;   /* accent — overridable by CMS theme_color_light */
  --red-dark:    #1e3fd0;
  --red-soft:    #eef2ff;
  --coral:       #ff5a3c;   /* secondary highlight (ratings, spark) */
  --black:       #14151a;   /* overridable by CMS theme_color_dark */
  --charcoal:    #1b1c22;
  --ink:         #23242b;
  --mid:         #55565f;
  --muted:       #6b6d75;
  --subtle:      #9a9ca4;
  --faint:       #b7b9c0;
  --border:      #ecedf1;
  --border-mid:  #dfe1e6;
  --bg:          #f6f7f9;
  --bg-alt:      #f0f1f4;
  --bg-card:     #ffffff;
  --white:       #ffffff;
  --max-w:       1280px;
  --font-head:   'Sora', system-ui, sans-serif;
  --font-ui:     'Sora', system-ui, sans-serif;
  --mono:        'JetBrains Mono', ui-monospace, monospace;
  --radius:      16px;
  --radius-sm:   11px;
  --radius-pill: 999px;
  --shadow-sm:   0 1px 2px rgba(20,21,26,.05), 0 2px 6px rgba(20,21,26,.04);
  --shadow-md:   0 22px 44px rgba(20,21,26,.12), 0 4px 10px rgba(20,21,26,.06);
  --shadow-lg:   0 30px 60px rgba(20,21,26,.16);
  --transition:  .22s cubic-bezier(.4,0,.2,1);
  --transition-bounce: .28s cubic-bezier(.34,1.4,.64,1);
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }
img { display: block; max-width: 100%; height: auto; }
.wrapper { max-width: var(--max-w); margin: 0 auto; padding: 0 34px; }

/* ---------- Reading Progress Bar ---------- */
#reading-progress {
  position: fixed; top: 0; left: 0; width: 0%; height: 3px;
  background: var(--red); z-index: 9999;
  transition: width .08s linear; border-radius: 0 3px 3px 0;
  box-shadow: 0 0 12px rgba(43,89,255,.55); pointer-events: none;
}

/* ---------- Top Bar ---------- */
.top-bar {
  background: var(--black); padding: 9px 34px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; color: #c7cad2; letter-spacing: .06em;
}
.top-bar .top-bar-right {
  font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: #7f9bff; font-size: 10.5px;
}
.top-bar a { transition: color var(--transition); }
.top-bar a:hover { color: var(--white); }

/* ---------- Site Header ---------- */
.site-header {
  background: var(--black); border-bottom: 1px solid rgba(255,255,255,.08);
  position: relative; top: 0; z-index: 100;
}
body.has-sticky-header .site-header { position: sticky; top: 0; }
.site-header-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 34px;
  height: 76px; display: flex; align-items: center;
  justify-content: space-between; gap: 24px; width: 100%; position: relative;
}
.site-logo { display: flex; align-items: center; height: 46px; }
.site-logo img { height: 46px; width: auto; display: block; }
.site-logo .logo-text {
  font-family: var(--font-head); font-size: 26px; font-weight: 800;
  letter-spacing: -.04em; color: var(--white); line-height: 1;
}
.site-logo .logo-text span { color: var(--red); }

/* Primary Nav — pill hover */
.primary-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.primary-nav a {
  font-family: var(--font-ui); font-size: 14px; font-weight: 500;
  color: #e6e7ea; padding: 9px 15px; border-radius: var(--radius-pill);
  transition: color var(--transition), background var(--transition);
}
.primary-nav a:hover { background: var(--white); color: var(--black); }
.primary-nav a.active { background: var(--red); color: var(--white); }
.primary-nav a.nav-cta {
  margin-left: 12px; background: var(--red); color: var(--white);
  padding: 11px 22px; font-weight: 600;
}
.primary-nav a.nav-cta:hover { background: var(--red-dark); color: var(--white); transform: translateY(-2px); }

.hamburger { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 4px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--white); border-radius: 2px; transition: transform .3s; }

/* ---------- Search Toggle / Dropdown ---------- */
.header-actions { display: flex; align-items: center; gap: 10px; }
.search-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 16px; border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--radius-pill); background: rgba(255,255,255,.07);
  color: #c7cad2; cursor: pointer; font-family: var(--font-ui);
  font-size: 13px; font-weight: 500; flex-shrink: 0;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.search-toggle:hover, .search-toggle.active { background: var(--white); border-color: var(--white); color: var(--black); }
.search-toggle-icon { width: 15px; height: 15px; }
.search-dropdown {
  position: absolute; top: 100%; right: 0; width: 380px; z-index: 98;
  background: var(--white); border: 1px solid var(--border); border-top: none;
  border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow-md);
  opacity: 0; transform: translateY(-8px); pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.search-dropdown.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.search-dropdown-form { display: flex; align-items: center; gap: 10px; padding: 16px; }
.search-dropdown-input {
  flex: 1; height: 46px; padding: 0 18px; border: 1px solid var(--border);
  border-radius: var(--radius-pill); font-family: var(--font-ui); font-size: 15px;
  color: var(--black); background: var(--bg); outline: none; -webkit-appearance: none;
  transition: border-color var(--transition), background var(--transition);
}
.search-dropdown-input:focus { border-color: var(--red); background: var(--white); }
.search-dropdown-btn {
  height: 46px; padding: 0 22px; background: var(--red); color: var(--white);
  font-family: var(--font-ui); font-size: 13px; font-weight: 600; letter-spacing: .04em;
  border: none; border-radius: var(--radius-pill); cursor: pointer; white-space: nowrap;
  transition: background var(--transition); flex-shrink: 0;
}
.search-dropdown-btn:hover { background: var(--red-dark); }
.search-page-form { display: flex; gap: 10px; padding: 24px 0 8px; }
.search-page-input { flex: 1; height: 50px; padding: 0 20px; border: 1px solid var(--border); border-radius: var(--radius-pill); font-family: var(--font-ui); font-size: 15px; color: var(--black); background: var(--white); outline: none; -webkit-appearance: none; transition: border-color var(--transition); }
.search-page-input:focus { border-color: var(--red); }
.search-page-btn { height: 50px; padding: 0 30px; background: var(--red); color: var(--white); font-family: var(--font-ui); font-size: 13px; font-weight: 600; letter-spacing: .04em; border: none; border-radius: var(--radius-pill); cursor: pointer; white-space: nowrap; transition: background var(--transition); flex-shrink: 0; }
.search-page-btn:hover { background: var(--red-dark); }

/* ============================================================
   Homepage Hero — grid-lit dark banner (block: hero)
   ============================================================ */
.site-hero {
  position: relative; display: block; width: 100%; overflow: hidden; isolation: isolate;
  background: radial-gradient(130% 120% at 12% 0%, #1d2547 0%, #14151a 46%, #0f1014 100%);
}
.site-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(120% 100% at 20% 0%, #000 0%, transparent 70%);
          mask-image: radial-gradient(120% 100% at 20% 0%, #000 0%, transparent 70%);
}
.site-hero::after {
  content: ''; position: absolute; right: -140px; top: -120px; width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(43,89,255,.40), transparent 65%); pointer-events: none;
}
.site-hero-video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.site-hero-inner { position: relative; z-index: 2; display: flex; align-items: center; min-height: 560px; }
.site-hero-text-box { max-width: var(--max-w); margin: 0 auto; width: 100%; padding: 92px 34px; }
.site-hero-title {
  font-family: var(--font-head); font-size: clamp(38px, 4.6vw, 60px); font-weight: 800;
  line-height: 1.02; letter-spacing: -.035em; color: var(--white);
  margin: 0 0 22px; max-width: 900px; text-wrap: balance;
}
.site-hero-title em { font-style: normal; color: var(--red); }
.site-hero-subtitle { font-family: var(--font-ui); font-size: clamp(16px, 1.6vw, 19px); font-weight: 400; color: rgba(255,255,255,.74); line-height: 1.6; margin: 0 0 8px; max-width: 560px; }
.site-hero-custom-text { font-family: var(--font-head); font-size: clamp(24px, 3vw, 34px); font-weight: 700; color: var(--white); line-height: 1.15; letter-spacing: -.02em; }
.site-hero-rule { width: 46px; height: 3px; background: var(--red); border-radius: 2px; margin: 18px 0 0; }
.site-hero-cta {
  display: inline-flex; align-items: center; gap: 9px; background: var(--red);
  color: var(--white); font-weight: 600; font-size: 15px; padding: 15px 28px;
  border-radius: var(--radius-pill); margin-top: 26px; transition: gap var(--transition), background var(--transition), transform var(--transition);
}
a.site-hero { display: block; text-decoration: none; color: inherit; }
a.site-hero.site-hero--linked:hover .site-hero-cta { gap: 15px; background: var(--red-dark); }

/* ---------- Index / Archive Section Bar ---------- */
.index-hero { background: var(--white); border-bottom: 1px solid var(--border); padding: 22px 0; }
.index-hero .wrapper { display: flex; align-items: center; gap: 16px; }
.index-hero-accent { width: 6px; height: 40px; background: var(--red); border-radius: 3px; flex-shrink: 0; }
.index-hero-title { font-family: var(--font-head); font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -.02em; color: var(--black); line-height: 1; }
.index-hero-sub { font-size: 12px; color: var(--subtle); margin-top: 4px; font-weight: 500; }
.index-hero-line { flex: 1; height: 1px; background: var(--border); }
.index-hero-back { font-size: 13px; font-weight: 500; color: var(--muted); transition: color var(--transition); white-space: nowrap; }
.index-hero-back:hover { color: var(--red); }

/* ============================================================
   Post Listing (block: latest_posts / featured_posts)
   ============================================================ */
.post-listing { padding: 24px 0 16px; display: flex; flex-direction: column; gap: 16px; }
.post-row { display: grid; grid-template-columns: 300px 1fr; background: var(--bg-card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-sm); align-items: stretch; transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition); }
.post-row:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); border-color: var(--border-mid); }
.post-row-image { display: block; position: relative; overflow: hidden; height: 100%; min-height: 200px; background: var(--bg-alt); }
.post-row-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.4,0,.2,1); }
.post-row:hover .post-row-image img { transform: scale(1.05); }
.post-row-cat-strip { position: absolute; bottom: 12px; left: 12px; background: var(--black); padding: 6px 12px; border-radius: var(--radius-pill); pointer-events: none; }
.post-row-cat-strip span { font-size: 9.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--white); }
.post-row-image-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--bg-alt); color: var(--subtle); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.post-row-content { padding: 22px 26px; display: flex; flex-direction: column; justify-content: center; gap: 9px; min-height: 200px; }
.post-row-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--subtle); }
.post-row-meta strong { color: var(--mid); font-weight: 600; }
.post-row-meta .meta-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); flex-shrink: 0; }
.post-row-title { font-family: var(--font-head); font-size: clamp(20px, 2.2vw, 25px); font-weight: 700; letter-spacing: -.02em; color: var(--black); line-height: 1.15; }
.post-row-title a { transition: color var(--transition); }
.post-row-title a:hover, .post-row:hover .post-row-title a { color: var(--red); }
.post-row-excerpt { font-size: 14.5px; color: var(--muted); line-height: 1.6; min-height: 3em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-row-readmore { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--red); align-self: flex-start; margin-top: 2px; transition: gap var(--transition); }
.post-row-readmore::after { content: '→'; transition: transform var(--transition); }
.post-row:hover .post-row-readmore, .post-row-readmore:hover { gap: 11px; }
.no-posts { font-size: 15px; color: var(--muted); padding: 72px 24px; text-align: center; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); }
.post-listing--grid_3col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; padding: 24px 0 16px; }
.post-listing--grid_3col .post-row { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
.post-listing--grid_3col .post-row-image { height: 200px; min-height: 0; }
.post-listing--grid_3col .post-row-content { justify-content: flex-start; padding: 18px 20px 22px; min-height: 0; }
.post-listing--grid_3col .post-row-readmore { margin-top: auto; }
.post-listing--grid_3col .post-row-title { font-size: clamp(16px, 1.5vw, 19px); }
.post-listing--grid_3col .post-row-excerpt { -webkit-line-clamp: 3; }
.post-listing--card_grid .post-row { grid-template-columns: 2fr 3fr; }
.post-listing--card_grid .post-row-image { min-height: 280px; }
.post-rank { font-family: var(--font-head); font-size: 2rem !important; font-weight: 800 !important; color: var(--red) !important; display: flex; align-items: center; justify-content: center; min-width: 2.5rem !important; }

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: center; align-items: center; gap: 7px; padding: 34px 0 54px; flex-wrap: wrap; }
.page-btn { font-family: var(--font-ui); font-size: 13px; font-weight: 600; color: var(--muted); background: var(--white); border: 1px solid var(--border); padding: 9px 15px; border-radius: var(--radius-sm); min-width: 40px; text-align: center; transition: all var(--transition), transform var(--transition-bounce); }
.page-btn:hover { border-color: var(--red); color: var(--red); transform: translateY(-2px); }
.page-btn.active { background: var(--red); color: var(--white); border-color: var(--red); pointer-events: none; }
.page-dots { color: var(--subtle); padding: 0 4px; }
.load-more-wrap { display: none; text-align: center; padding: 24px 0 48px; }
.load-more-btn { font-family: var(--font-ui); font-size: 14px; font-weight: 600; color: var(--white); background: var(--red); border: none; padding: 15px 48px; border-radius: var(--radius-pill); cursor: pointer; transition: all var(--transition); }
.load-more-btn:hover { background: var(--red-dark); }
@media (max-width: 768px) { .pagination { display: none; } .load-more-wrap { display: block; } }

/* ============================================================
   Section scaffolding (block-shell / headings)
   ============================================================ */
.block-shell { width: 100%; margin: 2.5rem auto; box-sizing: border-box; }
.block-shell .block-inner { margin-left: auto; margin-right: auto; }
.section-heading { font-family: var(--font-head); font-size: clamp(24px, 3vw, 30px); font-weight: 800; letter-spacing: -.02em; color: var(--black); text-align: center; margin: 0 auto 1.5rem; }
.iw-sec { padding: 86px 0; }
.iw-band { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.iw-sec-head { max-width: 660px; margin: 0 auto 52px; text-align: center; }
.iw-eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin-bottom: 14px; }
.iw-sec-title { font-family: var(--font-head); font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; letter-spacing: -.03em; color: var(--black); line-height: 1.08; text-wrap: balance; }
.iw-sec-desc { font-size: 17px; color: var(--muted); line-height: 1.65; margin-top: 16px; }

/* ---------- Stat strip (custom_html_3col) ---------- */
.iw-stat-strip { background: var(--white); border-bottom: 1px solid var(--border); }
.iw-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); max-width: var(--max-w); margin: 0 auto; }
.iw-stat { padding: 34px 30px; text-align: center; border-right: 1px solid var(--border); }
.iw-stat:last-child { border-right: none; }
.iw-stat-n { font-family: var(--font-head); font-size: clamp(30px, 3.4vw, 42px); font-weight: 800; letter-spacing: -.03em; color: var(--black); line-height: 1; }
.iw-stat-n span { color: var(--red); }
.iw-stat-l { font-size: 13px; color: var(--muted); margin-top: 8px; font-weight: 500; }

/* ---------- Service cards (custom_html_3col) ---------- */
.iw-svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.iw-svc-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px 28px; box-shadow: var(--shadow-sm); transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition); }
.iw-svc-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--border-mid); }
.iw-svc-ic { width: 54px; height: 54px; border-radius: 14px; background: var(--red-soft); color: var(--red); display: flex; align-items: center; justify-content: center; margin-bottom: 20px; transition: background var(--transition), color var(--transition); }
.iw-svc-card:hover .iw-svc-ic { background: var(--red); color: #fff; }
.iw-svc-card h3 { font-family: var(--font-head); font-size: 20px; font-weight: 700; letter-spacing: -.02em; color: var(--black); margin-bottom: 10px; }
.iw-svc-card p { font-size: 14.5px; color: var(--muted); line-height: 1.65; }
.iw-svc-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 18px; font-size: 13.5px; font-weight: 600; color: var(--red); }

/* ---------- Pricing tiers (custom_html_3col) ---------- */
.iw-price-tier { display: flex; flex-direction: column; }
.iw-price-tier.featured { border-color: var(--red); box-shadow: 0 22px 44px rgba(43,89,255,.16); }
.iw-price-label { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.iw-price-tier.featured .iw-price-label { color: var(--red); }
.iw-price-n { font-family: var(--font-head); font-weight: 800; font-size: 36px; letter-spacing: -.03em; color: var(--black); }
.iw-price-n small { font-size: 15px; font-weight: 500; color: var(--subtle); }
.iw-price-list { list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--mid); margin: 12px 0 0; }

/* ---------- Portfolio grid (slider: portfolio) ---------- */
.iw-pf-filters { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 38px; }
.iw-pf-chip { font-size: 13px; font-weight: 600; padding: 9px 18px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: #fff; color: var(--mid); cursor: pointer; transition: all var(--transition); }
.iw-pf-chip:hover { border-color: var(--red); color: var(--red); }
.iw-pf-chip.active { background: var(--black); color: #fff; border-color: var(--black); }
.iw-pf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.iw-pf-item { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: transform var(--transition), box-shadow var(--transition); }
.iw-pf-item:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.iw-pf-shot { aspect-ratio: 4/3; position: relative; overflow: hidden; }
.iw-pf-shot img { width: 100%; height: 100%; object-fit: cover; }
.iw-pf-body { padding: 20px 22px; background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.iw-pf-body h4 { font-family: var(--font-head); font-size: 17px; font-weight: 700; color: var(--black); letter-spacing: -.01em; }
.iw-pf-cat { font-size: 12px; color: var(--muted); margin-top: 3px; }
.iw-pf-go { width: 38px; height: 38px; border-radius: 50%; background: var(--red-soft); color: var(--red); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background var(--transition), color var(--transition); }
.iw-pf-item:hover .iw-pf-go { background: var(--red); color: #fff; }

/* ---------- Testimonials (slider: testimonial) ---------- */
.iw-tst-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.iw-tst-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px 28px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.iw-tst-stars { color: var(--coral); font-size: 15px; letter-spacing: 2px; margin-bottom: 16px; }
.iw-tst-q { font-size: 16px; line-height: 1.65; color: var(--ink); flex: 1; }
.iw-tst-who { display: flex; align-items: center; gap: 13px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); }
.iw-tst-av { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, #3b57d6, #7d5bff); flex-shrink: 0; object-fit: cover; }
.iw-tst-who .nm { font-family: var(--font-head); font-weight: 700; font-size: 15px; color: var(--black); }
.iw-tst-who .rl { font-size: 12.5px; color: var(--muted); }

/* ============================================================
   Reusable blocks — image_text & cta_banner (Prism-compatible)
   ============================================================ */
.reusable-block .image-text-copy h2 { font-family: var(--font-head); font-weight: 800; letter-spacing: -.02em; color: var(--black); }
.image-text-img img { border-radius: var(--radius); box-shadow: var(--shadow-md); }
.image-text-block .wrapper { padding: 86px 34px; }
.cta-banner-block { background: radial-gradient(120% 140% at 85% 0%, #1d2547 0%, #14151a 55%); color: var(--white); }
.cta-banner-headline { font-family: var(--font-head); font-weight: 800; letter-spacing: -.02em; }
.cta-banner-block .btn-cta { background: var(--red) !important; color: var(--white) !important; }
.cta-banner-block .btn-cta:hover { background: var(--red-dark) !important; }

/* image_text feature list helper (for deep-dive rows) */
.iw-it-list { display: flex; flex-direction: column; gap: 20px; margin-top: 28px; }
.iw-it-row { display: flex; gap: 16px; }
.iw-it-ic { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; background: var(--red-soft); color: var(--red); display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-weight: 800; }
.iw-it-row h4 { font-family: var(--font-head); font-size: 17px; font-weight: 700; color: var(--black); margin-bottom: 5px; }
.iw-it-row p { font-size: 14.5px; color: var(--muted); line-height: 1.6; }

/* ---------- Buttons ---------- */
.btn, .btn-primary { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-ui); font-weight: 600; font-size: 15px; padding: 15px 28px; border-radius: var(--radius-pill); text-decoration: none; background: var(--red); color: var(--white); border: none; cursor: pointer; transition: background var(--transition), transform var(--transition-bounce); }
.btn:hover, .btn-primary:hover { background: var(--red-dark); transform: translateY(-2px); color: var(--white); }
.btn-ghost { background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,.24); }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.06); color: #fff; }
.btn-light { background: #fff; color: var(--black); }
.btn-cta { display: inline-block; padding: .8rem 2rem; border-radius: var(--radius-pill); font-weight: 600; text-decoration: none; transition: transform var(--transition-bounce), opacity var(--transition); }
.btn-cta:hover { transform: translateY(-2px); opacity: .92; }

/* ---------- Category strip ---------- */
.category-strip-items { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; padding: .5rem 0 1rem; }
.category-strip-items a { display: inline-block; padding: .5rem 1rem; background: var(--bg-alt); border-radius: var(--radius-pill); font-size: .9rem; font-weight: 600; color: var(--ink); transition: background var(--transition), color var(--transition); }
.category-strip-items a:hover { background: var(--red); color: var(--white); }

/* ---------- Newsletter block ---------- */
.newsletter-block { text-align: center; background: var(--black); color: var(--white); padding: 3rem 2rem; border-radius: var(--radius); max-width: 760px; margin: 0 auto; position: relative; overflow: hidden; }
.newsletter-block::after { content: ''; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; background: radial-gradient(circle, rgba(43,89,255,.35), transparent 70%); pointer-events: none; }
.newsletter-block h2 { position: relative; margin: 0 0 1rem; font-size: clamp(24px, 3vw, 30px); font-weight: 800; letter-spacing: -.02em; }
.newsletter-block .btn-cta { position: relative; display: inline-block; background: var(--red); color: var(--white); text-decoration: none; padding: .8rem 2rem; border-radius: var(--radius-pill); font-weight: 600; margin-top: .5rem; transition: background var(--transition), transform var(--transition-bounce); }
.newsletter-block .btn-cta:hover { background: var(--red-dark); transform: scale(1.03); }
.custom-html-block { text-align: left; }

/* ---------- Custom Layout Builder Blocks ---------- */
.custom-block-section { width: 100%; box-sizing: border-box; padding: 3rem 0; }
.custom-block-section .custom-block-inner { margin-left: auto; margin-right: auto; }
.custom-block-section .custom-block-grid { display: grid; gap: 2rem; align-items: start; }
.custom-block-section .custom-block-grid--1 { grid-template-columns: minmax(0, 1fr); }
.custom-block-section .custom-block-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.custom-block-section .custom-block-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.custom-block-col { min-width: 0; word-wrap: break-word; }
@media (max-width: 900px) { .custom-block-section .custom-block-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .custom-block-section .custom-block-grid--2, .custom-block-section .custom-block-grid--3 { grid-template-columns: minmax(0, 1fr); } }

/* ============================================================
   CTA + inline Contact form (block: cta_banner + contact-form)
   ============================================================ */
.iw-contact-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 34px; }
.iw-contact-card h3 { font-family: var(--font-head); font-size: 21px; font-weight: 800; letter-spacing: -.02em; color: var(--black); margin-bottom: 6px; }
.iw-contact-card .cc-sub { font-size: 14px; color: var(--muted); margin-bottom: 22px; }

/* ---------- Contact / comment forms ---------- */
.contact-form { display: flex; flex-direction: column; gap: 1.1rem; max-width: 640px; }
.contact-form .field, .comment-form .field { display: flex; flex-direction: column; gap: .5rem; }
.contact-form label, .comment-form label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.contact-form input, .contact-form textarea, .contact-form select,
.comment-form input, .comment-form textarea {
  font-family: var(--font-ui); font-size: 15px; color: var(--black); background: var(--white);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 13px 16px; outline: none;
  transition: border-color var(--transition), box-shadow var(--transition); -webkit-appearance: none;
}
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus,
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(43,89,255,.12); }
.contact-form textarea, .comment-form textarea { min-height: 160px; resize: vertical; }
.contact-form button, .comment-form button { align-self: flex-start; font-family: var(--font-ui); font-weight: 600; font-size: 14px; background: var(--red); color: var(--white); border: none; padding: 14px 34px; border-radius: var(--radius-pill); cursor: pointer; transition: background var(--transition), transform var(--transition-bounce); }
.contact-form button:hover, .comment-form button:hover { background: var(--red-dark); transform: translateY(-2px); }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-alert, .comment-alert { padding: 14px 18px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 1.25rem; }
.contact-alert.is-success, .comment-alert.is-success { background: #ecfdf3; border: 1px solid #abefc6; color: #067647; }
.contact-alert.is-error, .comment-alert.is-error { background: var(--red-soft); border: 1px solid #c9d4ff; color: var(--red-dark); }

/* ============================================================
   Article page (single.php)
   ============================================================ */
.hero-wrap { background: var(--charcoal); position: relative; overflow: hidden; }
.hero-wrap img { width: 100%; max-height: 560px; object-fit: cover; }
.hero-caption { position: absolute; bottom: 12px; right: 16px; font-size: 11px; color: rgba(255,255,255,.5); font-style: italic; }
.page-layout { padding: 44px 0 64px; }
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12.5px; color: var(--subtle); margin-bottom: 20px; }
.breadcrumb a { color: var(--muted); font-weight: 500; transition: color var(--transition); }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb-sep { color: var(--faint); }
.article-title { font-family: var(--font-head); font-size: clamp(30px, 4.4vw, 48px); font-weight: 800; line-height: 1.05; color: var(--black); margin-bottom: 18px; letter-spacing: -.03em; text-wrap: balance; }
.byline { font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 14px 0; margin-bottom: 30px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.byline-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.byline-meta strong { color: var(--black); font-weight: 600; }
.byline a { color: var(--red); font-weight: 600; }
.byline .meta-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }
.share-buttons { display: flex; align-items: center; gap: 7px; }
.share-label { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--subtle); }
.share-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--white); color: var(--mid); cursor: pointer; font-size: 13px; font-weight: 700; transition: all var(--transition), transform var(--transition-bounce); }
.share-btn:hover { transform: translateY(-2px); }
.share-facebook:hover { background: #1877f2; border-color: #1877f2; color: #fff; }
.share-twitter:hover { background: var(--black); border-color: var(--black); color: #fff; }
.share-linkedin:hover { background: #0a66c2; border-color: #0a66c2; color: #fff; }
.share-copy:hover { background: var(--red); border-color: var(--red); color: #fff; }
.top-answer { font-size: 18px; line-height: 1.65; color: var(--black); background: var(--red-soft); border-left: 4px solid var(--red); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 18px 22px; margin: 0 0 30px; font-weight: 500; }
.article-body p { font-family: var(--font-ui); margin-bottom: 1.4em; font-size: 18px; color: #33343b; line-height: 1.85; }
.article-body h2 { font-family: var(--font-head); font-size: clamp(24px, 3vw, 30px); font-weight: 800; letter-spacing: -.02em; margin: 1.5em 0 .5em; color: var(--black); }
.article-body h3 { font-family: var(--font-head); font-size: clamp(20px, 2.2vw, 23px); font-weight: 700; margin: 1.4em 0 .5em; color: var(--black); }
.article-body strong { color: var(--black); font-weight: 700; }
.article-body a { color: var(--red); text-decoration: underline; text-decoration-color: rgba(43,89,255,.35); text-underline-offset: 3px; transition: text-decoration-color var(--transition); }
.article-body a:hover { text-decoration-color: var(--red); }
.article-body ul, .article-body ol { font-family: var(--font-ui); margin: 0 0 1.4em 1.5em; font-size: 18px; color: #33343b; line-height: 1.75; }
.article-body li { margin-bottom: .5em; }
.article-body blockquote { border-left: 4px solid var(--red); margin: 1.7em 0; padding: 18px 26px; background: var(--red-soft); font-style: italic; color: var(--mid); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 19px; line-height: 1.6; }
.article-body img { width: 100%; border-radius: var(--radius); margin: 28px 0; }
.article-body iframe { display: block; width: 100%; max-width: 100%; aspect-ratio: 16/9; height: auto; border: 0; border-radius: var(--radius); margin: 28px 0; }
.section-title { font-family: var(--font-head); font-size: 24px; font-weight: 800; letter-spacing: -.01em; color: var(--black); margin-bottom: 22px; display: flex; align-items: center; gap: 12px; }
.section-title::before { content: ''; display: block; width: 5px; height: 24px; background: var(--red); border-radius: 3px; flex-shrink: 0; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.related-card { background: var(--bg-card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition); }
.related-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--border-mid); }
.related-card-img-wrap { position: relative; overflow: hidden; height: 175px; background: var(--bg-alt); }
.related-card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s cubic-bezier(.4,0,.2,1); }
.related-card:hover .related-card-img-wrap img { transform: scale(1.05); }
.related-card-body { padding: 16px 18px 18px; }
.related-card h4 { font-family: var(--font-head); font-size: 16px; font-weight: 700; line-height: 1.2; margin-bottom: 8px; color: var(--black); transition: color var(--transition); }
.related-card:hover h4 { color: var(--red); }
.author-card { margin: 40px 0 0; padding: 24px 28px; background: var(--bg-card); border: 1px solid var(--border); border-left: 4px solid var(--red); border-radius: 0 var(--radius) var(--radius) 0; }
.archive-header { display: flex; align-items: flex-start; gap: 1.75rem; padding: 2.5rem 0 1.75rem; }
.archive-header-image { width: 116px; height: 116px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 3px solid var(--white); box-shadow: var(--shadow-sm); }
.archive-header-title { font-family: var(--font-head); margin: 0 0 .5rem; font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -.02em; color: var(--black); }
.archive-header-description { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.6; max-width: 640px; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--black); padding: 60px 34px 26px; margin-top: 24px; }
.footer-inner { max-width: var(--max-w); margin: 0 auto; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 44px; padding-bottom: 38px; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-logo { margin-bottom: 14px; }
.footer-logo img { height: 38px; width: auto; }
.footer-logo .logo-text { font-family: var(--font-head); font-size: 34px; font-weight: 800; letter-spacing: -.04em; color: var(--white); line-height: 1; }
.footer-logo .logo-text span { color: var(--red); }
.footer-about p { font-size: 13.5px; line-height: 1.75; color: #8b8d96; max-width: 300px; margin-top: 16px; }
.footer-col h4 { font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--red); margin-bottom: 16px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a { font-size: 13.5px; color: #c7cad2; transition: color var(--transition), padding-left var(--transition); display: inline-block; }
.footer-col ul li a:hover { color: var(--white); padding-left: 4px; }
.footer-social { display: flex; gap: 8px; flex-wrap: wrap; }
.social-chip { padding: 7px 14px; border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius-pill); font-size: 12px; font-weight: 500; color: #c7cad2; transition: all var(--transition), transform var(--transition-bounce); }
.social-chip:hover { border-color: var(--red); color: var(--white); background: var(--red); transform: translateY(-2px); }
.footer-network { max-width: var(--max-w); margin: 0 auto; padding: 16px 0; border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 13px; }
.footer-network-label { color: var(--subtle); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: 11px; }
.footer-network a { color: #c7cad2; font-weight: 500; transition: color var(--transition); }
.footer-network a:hover { color: var(--red); }
.footer-bottom { max-width: var(--max-w); margin: 22px auto 0; display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; color: var(--subtle); flex-wrap: wrap; gap: 8px; }
.footer-bottom a { color: var(--subtle); transition: color var(--transition); }
.footer-bottom a:hover { color: var(--red); }

/* ---------- Cookie consent ---------- */
.cookie-consent { position: fixed; left: 20px; right: 20px; bottom: 20px; z-index: 9998; max-width: 560px; margin: 0 auto; background: var(--black); color: #e6e7ea; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.cookie-consent[hidden] { display: none; }
.cookie-consent__inner { display: flex; align-items: center; gap: 18px; padding: 18px 22px; flex-wrap: wrap; }
.cookie-consent__text { font-size: 13px; line-height: 1.6; color: #c7cad2; flex: 1; min-width: 220px; margin: 0; }
.cookie-consent__text a { color: var(--red); font-weight: 600; }
.cookie-consent__actions { display: flex; gap: 10px; }
.cookie-consent__btn { font-family: var(--font-ui); font-weight: 600; font-size: 13px; padding: 10px 20px; border-radius: var(--radius-pill); border: 1px solid transparent; cursor: pointer; transition: all var(--transition); }
.cookie-consent__btn--accept { background: var(--red); color: var(--white); }
.cookie-consent__btn--accept:hover { background: var(--red-dark); }
.cookie-consent__btn--decline { background: transparent; color: #c7cad2; border-color: rgba(255,255,255,.2); }

/* ---------- CMS Slider — iwork colors ---------- */
.cms-slider { width: 100%; max-width: 100%; --swiper-navigation-color: var(--white); --swiper-pagination-color: var(--red); --slider-progress-fill: var(--red); --slider-feature-bg: var(--black); }
.cms-slider--featured_posts .cms-slider__title { font-family: var(--font-head); font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.05; font-weight: 800; letter-spacing: -.03em; color: var(--white); }
.cms-slider--featured_posts .cms-slider__read-more { display: inline-block; padding: 12px 24px; background: var(--red); color: var(--white); border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; }
.cms-slider--featured_posts .cms-slider__read-more:hover { background: var(--red-dark); }

/* ---------- Focus ---------- */
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .post-row { grid-template-columns: 260px 1fr; }
  .post-listing--grid_3col { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-about { grid-column: 1 / -1; }
  .iw-svc-grid, .iw-pf-grid, .iw-tst-grid { grid-template-columns: 1fr 1fr; }
  .iw-stat-grid { grid-template-columns: 1fr 1fr; }
  .iw-stat:nth-child(2n) { border-right: none; }
}
@media (max-width: 640px) {
  .site-hero-inner { min-height: 440px; }
  .site-hero-text-box { padding: 64px 18px; }
  .site-header-inner { padding: 0 18px; height: 62px; gap: 12px; }
  .primary-nav { display: none; flex-direction: column; position: fixed; top: 62px; left: 0; right: 0; background: var(--white); border-top: 1px solid var(--border); padding: 12px 18px 16px; box-shadow: var(--shadow-md); z-index: 99; gap: 4px; }
  .primary-nav.open { display: flex; }
  .primary-nav a { border-radius: var(--radius-sm); color: var(--black); }
  .primary-nav a.nav-cta { margin-left: 0; color: var(--white); }
  .hamburger { display: flex; }
  .wrapper { padding: 0 16px; }
  .post-row { grid-template-columns: 1fr; }
  .post-row-image { height: 200px; min-height: 0; }
  .related-grid, .iw-svc-grid, .iw-pf-grid, .iw-tst-grid, .iw-stat-grid { grid-template-columns: 1fr; }
  .iw-stat { border-right: none; border-bottom: 1px solid var(--border); }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .iw-sec { padding: 56px 0; }
}
