/* ============================================
   COGNITOR — Style 2 Modern Design System
   Brand: primary #0787d9 · navy #00294B · accent #cf5800
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Colors */
  --color-primary: #0787d9;
  --color-primary-hover: #0a5f96;
  --color-primary-light: rgba(7, 135, 217, 0.08);
  --color-primary-ghost: rgba(7, 135, 217, 0.04);
  --color-accent: #cf5800;
  --color-accent-hover: #b34c00;
  --color-accent-light: rgba(207, 88, 0, 0.1);
  --color-navy: #00294b;
  --color-navy-800: #05335c;
  --color-dark: #14203a;
  --color-body: #55606c;
  --color-muted: #7a838b;
  --color-bg: #FFFFFF;
  --color-section: #eef4f8;
  --color-border: #e4ebf1;
  --color-success: #02a95c;

  /* Typography */
  --font-heading: 'Gilmer', 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'DM Sans', 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout */
  --max-width: 1280px;
  --container-padding-desktop: 40px;
  --container-padding-tablet: 32px;
  --container-padding-mobile: 20px;
  --section-gap: 90px;
  --section-gap-mobile: 80px;

  /* Border Radius */
  --radius-button: 999px;
  --radius-card: 22px;
  --radius-image: 16px;
  --radius-form: 12px;

  /* Shadows (navy-tinted, matches brand ink rather than pure black) */
  --shadow-sm: 0 2px 8px rgba(20, 32, 58, 0.06);
  --shadow-md: 0 12px 34px rgba(20, 32, 58, 0.10);
  --shadow-lg: 0 30px 70px rgba(20, 32, 58, 0.16);
  --shadow-xl: 0 40px 90px rgba(20, 32, 58, 0.20);

  /* Transitions */
  --transition-fast: 200ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;

  /* Z-index scale */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-body);
  background: var(--color-bg);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-image);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-hover);
}

/* --- Focus Styles (Accessibility) --- */
:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-dark);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.9rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.85rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }
h4 { font-size: clamp(1.1rem, 1.8vw, 1.35rem); }
h5 { font-size: 1.15rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
  max-width: 75ch;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-primary);
  margin-bottom: 16px;
}

.section-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
}

.section-title {
  margin-bottom: 20px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--color-muted);
  max-width: 600px;
  line-height: 1.7;
}

/* --- Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding-desktop);
}

.container-narrow {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--container-padding-desktop);
}

/* --- Section Spacing --- */
.section {
  padding: var(--section-gap) 0;
}

.section-alt {
  background: var(--color-section);
}

.section-dark {
  background: var(--color-navy);
  color: rgba(255, 255, 255, 0.85);
}

.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: #FFFFFF;
}

/* --- Grid System --- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.grid-2-uneven {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  padding: 16px 32px;
  border: 2px solid transparent;
  border-radius: var(--radius-button);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--color-primary);
  color: #FFFFFF !important;
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 32, 39, 0.25);
}

.btn-secondary {
  background: transparent;
  color: var(--color-dark) !important;
  border-color: var(--color-dark);
}

.btn-secondary:hover {
  background: var(--color-dark);
  color: #FFFFFF !important;
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--color-dark) !important;
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--color-primary-light);
  color: var(--color-primary) !important;
  transform: translateY(-2px);
}

.btn-outline-primary {
  background: transparent;
  color: var(--color-primary) !important;
  border-color: var(--color-primary);
}

.btn-outline-primary:hover {
  background: var(--color-primary);
  color: #FFFFFF !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 32, 39, 0.25);
}

.btn-light {
  background: #FFFFFF;
  color: var(--color-dark) !important;
  border-color: #FFFFFF;
}

.btn-light:hover {
  background: var(--color-section);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.btn-outline-light {
  background: transparent;
  color: #FFFFFF !important;
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #FFFFFF;
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--color-accent);
  color: #FFFFFF !important;
  border-color: var(--color-accent);
  box-shadow: 0 8px 20px rgba(207, 88, 0, 0.30);
}

.btn-accent:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(207, 88, 0, 0.4);
}

.btn-sm {
  padding: 12px 24px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 20px 40px;
  font-size: 1.05rem;
}

.btn-icon {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
}

/* --- Cards --- */
.card {
  background: var(--color-bg);
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  padding: 40px;
  transition: all var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-alt {
  background: var(--color-section);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 40px;
  transition: all var(--transition-base);
}

.card-alt:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--color-primary);
  font-size: 1.5rem;
  transition: all var(--transition-base);
}

.card:hover .card-icon {
  background: var(--color-primary);
  color: #FFFFFF;
}

/* Icon base sizing — icon() ships inline SVGs with no width/height, so
   without this they fall back to an unconstrained/huge browser default
   (this was the cause of the giant arrow icon on /services/). */
.icon {
  width: 1.25em;
  height: 1.25em;
  display: inline-block;
  vertical-align: middle;
  flex: none;
}
.card-icon .icon { width: 28px; height: 28px; }
.pill .icon { width: 1em; height: 1em; }
.section-label .icon { width: 1em; height: 1em; }

.card h3 {
  margin-bottom: 12px;
}

.card p {
  color: var(--color-muted);
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* --- Calculator Tables (Business Planning Tools) --- */
.calc-card {
  background: var(--color-bg);
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  padding: 40px;
}

.calc-card h2:first-child,
.calc-card h3:first-child {
  margin-top: 0;
}

.calc-table-wrap {
  overflow-x: auto;
  margin: 24px 0;
}

.calc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.calc-table th,
.calc-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: middle;
}

.calc-table th {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-dark);
  white-space: nowrap;
}

.calc-table .calc-label {
  color: var(--color-dark);
}

.calc-table tr.calc-total td {
  font-weight: 700;
}

.calc-table input[type="text"],
.calc-table input[type="number"] {
  width: 100%;
  min-width: 90px;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--color-dark);
  background: var(--color-bg);
}

.calc-table input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.calc-table input:disabled {
  background: var(--color-section);
  color: var(--color-muted);
  font-weight: 600;
}

.calc-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--color-section);
  border-radius: var(--radius-form);
  padding: 16px 20px;
  color: var(--color-muted);
  font-size: 0.9rem;
  margin-top: 24px;
}

.calc-note .icon {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: var(--color-primary);
}

.calc-months .calc-table-wrap {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-form);
}

/* Shrink-to-fit, like the original tool: the table always stays within the
   viewport (no horizontal scroll) by letting every month column narrow as
   needed — the label column wraps onto a second line instead of forcing
   the table wider than the page. */
.calc-months .calc-table {
  width: 100%;
  table-layout: auto;
}

.calc-months .calc-table th,
.calc-months .calc-table td {
  padding: 3px 4px;
}

.calc-months .calc-table th:first-child,
.calc-months .calc-table td:first-child {
  white-space: normal;
}

.calc-months .calc-table input {
  width: 100%;
  min-width: 0;
  padding: 4px 2px;
  font-size: 0.78rem;
  text-align: center;
}

@media (max-width: 900px) {
  .calc-card-wide { padding: 24px; }
}

@media (max-width: 480px) {
  .calc-card-wide { padding: 16px; }
}

/* --- Tags --- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: 20px;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.tag-primary {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.tag-success {
  background: rgba(47, 179, 68, 0.1);
  color: var(--color-success);
}

.tag-dark {
  background: rgba(17, 17, 17, 0.08);
  color: var(--color-dark);
}

/* --- Sticky header wrapper (topbar + navbar stick together) --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
}

/* --- Navigation --- */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: all var(--transition-base);
}

.navbar.scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-dark);
  text-decoration: none;
}

.navbar-logo img {
  border-radius: 0;
}

.navbar-logo span {
  color: var(--color-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-dark);
  text-decoration: none;
  transition: color var(--transition-fast);
  position: relative;
  padding: 4px 0;
  cursor: pointer;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width var(--transition-base);
  border-radius: 1px;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a.btn::after {
  display: none;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-primary);
}

.nav-links .btn {
  padding: 10px 24px;
  font-size: 0.85rem;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-dark);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.nav-hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-hamburger.active span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Dropdown --- */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 8px;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-lg);
  list-style: none;
  margin-top: 12px;
}

.dropdown:hover .dropdown-menu,
.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(0%) translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  white-space: nowrap;
}

.dropdown-menu a::after {
  display: none;
}

.dropdown-menu a:hover {
  background: var(--color-primary-ghost);
  color: var(--color-primary);
}

/* --- Footer --- */
.footer {
  background: var(--color-navy);
  color: rgba(255, 255, 255, 0.7);
  padding: 0 0 0 0;
}

/* The container wrapping footer-grid (Explore/Client Resources/Contact
   columns) — not the accreditation bar's own .container above it. */
.footer-columns {
  margin-top: 20px;
}

.footer-badge-logo {
  border-radius: 8 px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-brand p {
  font-size: 0.9rem;
  max-width: 320px;
  margin-top: 16px;
}

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background var(--transition-fast);
}

.footer-social a:hover {
  background: var(--color-primary);
}

.footer-social svg {
  width: 18px;
  height: 18px;
}

.footer h4 {
  color: #FFFFFF;
  font-size: 1rem;
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: #FFFFFF;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 24px 0;
  margin-top: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.82rem;
}

.footer-bottom-links {
  display: flex;
  gap: 24px;
}

.footer-bottom-links a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-bottom-links a:hover {
  color: #FFFFFF;
}

/* --- Hero Sections --- */
.hero {
  padding: 90px 0 90px;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 640px;
}

.hero h1 {
  margin-bottom: 24px;
}

.hero p {
  font-size: 1.15rem;
  color: var(--color-muted);
  margin-bottom: 36px;
  max-width: 540px;
}

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

.hero-image {
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-xl);
}

/* --- Stats --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--color-dark);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--color-muted);
}

/* --- Features --- */
.feature-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  list-style: none;
  margin-top: 24px;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.92rem;
  color: var(--color-body);
}

.feature-list li::before {
  content: '✓';
  color: var(--color-success);
  font-weight: 700;
  flex-shrink: 0;
}

/* --- Testimonials --- */
.testimonial-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 40px;
  position: relative;
}

.testimonial-card::before {
  content: '"';
  font-family: var(--font-heading);
  font-size: 4rem;
  line-height: 1;
  color: var(--color-primary);
  opacity: 0.2;
  position: absolute;
  top: 20px;
  right: 32px;
}

.testimonial-text {
  font-size: 1rem;
  color: var(--color-body);
  line-height: 1.8;
  margin-bottom: 24px;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 16px;
}

.testimonial-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-primary);
  font-size: 1.1rem;
}

.testimonial-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-dark);
}

.testimonial-role {
  font-size: 0.82rem;
  color: var(--color-muted);
}

.stars {
  display: flex;
  gap: 2px;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.stars svg {
  width: 18px;
  height: 18px;
}

/* --- Team --- */
.team-card {
  text-align: center;
  text-decoration: none;
  display: block;
  color: inherit;
}

.team-card-photo {
  border-radius: var(--radius-card);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--color-section);
  margin-bottom: 18px;
}

.team-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-dark);
}

.team-card-role {
  color: var(--color-primary);
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 2px;
}

.team-card-quals {
  color: var(--color-muted);
  font-size: 0.8rem;
  margin-top: 2px;
}

.team-bio-photo {
  border-radius: var(--radius-card);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--color-section);
  max-width: 320px;
}

.team-bio-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Hero grid (homepage) — asymmetric 1.05fr/.95fr, matches the
   original home-modern.php design exactly rather than a plain 50/50
   .grid-2 split. --- */
.hero-grid-modern {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid-modern { grid-template-columns: 1fr; }
}

/* --- Slider (testimonials/blog carousels) --- */
.slider { position: relative; }
.slider-viewport { overflow: hidden; }
.slider-track { display: flex; transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.slider-slide { min-width: 100%; padding: 0.4rem; box-sizing: border-box; }
.slider-controls { display: flex; gap: 0.6rem; justify-content: center; margin-top: 1.6rem; }
.slider-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-dark);
  display: grid;
  place-items: center;
  transition: all var(--transition-fast);
}
.slider-btn:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); transform: translateY(-2px); }
.slider-btn svg { width: 20px; height: 20px; }
.slider-btn[data-prev] svg { transform: rotate(180deg); }

/* --- CTA Sections --- */
.cta-section {
  padding: 100px 0;
  text-align: center;
  background: linear-gradient(120deg, var(--color-navy), var(--color-primary-hover));
  color: rgba(255, 255, 255, 0.85);
}

.cta-band {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, var(--color-navy), var(--color-primary-hover));
  color: #dbe8f3;
  border-radius: var(--radius-card);
  padding: clamp(2.2rem, 5vw, 3.6rem);
}

.cta-band h2 { color: #fff; }
.cta-band p { color: #cfe0ef; }
.cta-band .btn-row { margin-top: 1.6rem; display: flex; gap: 1rem; flex-wrap: wrap; }
@media (max-width: 700px) { .cta-band .btn-row { justify-content: flex-start !important; } }

.cta-section h2 {
  color: #FFFFFF;
  margin-bottom: 16px;
}

.cta-section p {
  max-width: 560px;
  margin: 0 auto 36px;
  color: rgba(255, 255, 255, 0.65);
}

/* --- Pricing / Packages --- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.pricing-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 48px 40px;
  text-align: center;
  transition: all var(--transition-base);
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.pricing-card.featured {
  border-color: var(--color-primary);
  position: relative;
}

.pricing-card.featured::before {
  content: 'Most Popular';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: #FFFFFF;
  padding: 6px 20px;
  border-radius: 20px;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
}

.pricing-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 8px;
}

.pricing-price {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 4px;
}

.pricing-period {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-bottom: 32px;
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 36px;
}

.pricing-features li {
  padding: 10px 0;
  font-size: 0.9rem;
  color: var(--color-body);
  display: flex;
  align-items: center;
  gap: 12px;
}

.pricing-features li::before {
  content: '✓';
  color: var(--color-success);
  font-weight: 700;
}

/* --- Accordion / FAQ --- */
.accordion {
  max-width: 800px;
  margin: 0 auto;
}

.accordion-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  margin-bottom: 12px;
  overflow: hidden;
  scroll-margin-top: 110px; /* keeps the sticky header from covering a deep-linked item */
}

.accordion-header {
  padding: 20px 28px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background var(--transition-fast);
  background: var(--color-bg);
  border: none;
  width: 100%;
  text-align: left;
}

.accordion-header:hover {
  background: var(--color-section);
}

.accordion-header::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--color-primary);
  transition: transform var(--transition-base);
}

.accordion-item.active .accordion-header::after {
  transform: rotate(45deg);
}

.accordion-body {
  padding: 0 28px;
  max-height: 0;
  overflow: hidden;
  transition: all var(--transition-base);
}

.accordion-item.active .accordion-body {
  padding: 0 28px 24px;
  max-height: 600px;
}

.accordion-body p {
  font-size: 0.92rem;
  color: var(--color-muted);
  margin-bottom: 0;
}

/* --- Forms --- */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--color-dark);
  margin-bottom: 8px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-form);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-dark);
  background: var(--color-bg);
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-muted);
}

/* --- Timeline --- */
.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
}

.timeline-item {
  position: relative;
  padding-bottom: 40px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -31px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 3px solid var(--color-bg);
  box-shadow: 0 0 0 2px var(--color-primary);
}

.timeline-year {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--color-primary);
  margin-bottom: 6px;
}

.timeline-text {
  font-size: 0.95rem;
  color: var(--color-body);
}

.timeline-text strong {
  color: var(--color-dark);
}

/* --- Roadmap --- */
.roadmap-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.roadmap-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 32px;
  transition: all var(--transition-base);
}

.roadmap-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.roadmap-card.completed {
  border-left: 4px solid var(--color-success);
}

.roadmap-card.in-progress {
  border-left: 4px solid var(--color-primary);
}

.roadmap-card.planned {
  border-left: 4px solid var(--color-muted);
}

.roadmap-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.roadmap-status .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.roadmap-status.completed { color: var(--color-success); }
.roadmap-status.completed .dot { background: var(--color-success); }
.roadmap-status.in-progress { color: var(--color-primary); }
.roadmap-status.in-progress .dot { background: var(--color-primary); }
.roadmap-status.planned { color: var(--color-muted); }
.roadmap-status.planned .dot { background: var(--color-muted); }

.roadmap-card h4 {
  margin-bottom: 8px;
}

.roadmap-card p {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-bottom: 12px;
}

.roadmap-date {
  font-size: 0.8rem;
  color: var(--color-muted);
}

/* --- Contact --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.contact-info-card {
  background: var(--color-section);
  border-radius: var(--radius-card);
  padding: 40px;
  margin-bottom: 20px;
}

.contact-info-card h4 {
  margin-bottom: 16px;
}

.contact-info-card p {
  font-size: 0.92rem;
  color: var(--color-muted);
  margin-bottom: 6px;
}

.contact-info-card .phone-link {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-dark);
}

/* --- Page Header --- */
.page-header {
  position: relative;
  overflow: hidden;
  padding: 70px 0 70px;
  background: var(--color-navy);
  color: #c8d6e4;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../assets/images/illustrations/pattern-grid.svg');
  background-size: 44px;
  opacity: 0.14;
  pointer-events: none;
}

.page-header > * { position: relative; }

.page-header h1 {
  margin-bottom: 12px;
  color: #fff;
  max-width: 20ch;
}

.page-header p {
  font-size: 1.1rem;
  color: #bcd0e2;
  max-width: 600px;
}

/* TEMP (client approval): orange page-header on all inner pages. Delete this block to revert to navy. */
/*.page-header { background: #b34c00; }*/
/*.page-header p { color: #fff; }*/

/* --- Breadcrumb --- */
.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.85rem;
  color: #90aac2;
  margin-bottom: 20px;
  font-family: var(--font-heading);
}

.breadcrumb a {
  color: #bcd0e2;
  text-decoration: none;
}

.breadcrumb a:hover {
  color: #fff;
}

.breadcrumb span {
  color: #fff;
}

/* --- Logo Cloud --- */
.logo-cloud {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
  padding: 40px 0;
}

.logo-cloud-item {
  opacity: 0.4;
  transition: opacity var(--transition-base);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--color-dark);
  letter-spacing: 0.04em;
}

.logo-cloud-item:hover {
  opacity: 0.7;
}

/* --- Integrations --- */
.integration-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.integration-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-dark);
  transition: all var(--transition-fast);
}

.integration-item:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.integration-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--color-section);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--color-muted);
}

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.stagger-children.visible > *:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0s; }
.stagger-children.visible > *:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.3s; }
.stagger-children.visible > *:nth-child(5) { opacity: 1; transform: translateY(0); transition-delay: 0.4s; }
.stagger-children.visible > *:nth-child(6) { opacity: 1; transform: translateY(0); transition-delay: 0.5s; }
.stagger-children.visible > *:nth-child(7) { opacity: 1; transform: translateY(0); transition-delay: 0.6s; }
.stagger-children.visible > *:nth-child(8) { opacity: 1; transform: translateY(0); transition-delay: 0.7s; }
.stagger-children.visible > *:nth-child(9) { opacity: 1; transform: translateY(0); transition-delay: 0.8s; }
.stagger-children.visible > *:nth-child(10) { opacity: 1; transform: translateY(0); transition-delay: 0.9s; }

/* --- Page Specific: Solutions --- */
.solution-hero-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--color-primary);
  font-size: 2rem;
}

/* --- Counter Animation --- */
.counter-value {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--color-dark);
  line-height: 1;
}

/* --- Back to Top --- */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all var(--transition-base);
  z-index: var(--z-overlay);
  box-shadow: var(--shadow-md);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--color-primary-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .grid-2 { gap: 40px; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .integration-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root {
    --container-padding-desktop: 20px;
    --section-gap: 80px;
  }

  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--color-bg);
    flex-direction: column;
    padding: 24px 20px;
    gap: 16px;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    align-items: flex-start;
  }

  .nav-hamburger {
    display: flex;
  }

  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .grid-2-uneven { grid-template-columns: 1fr; }

  .hero { padding: 120px 0 60px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; text-align: center; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .stat-value { font-size: 2rem; }

  .contact-grid { gap: 32px; }
  .pricing-grid { max-width: 100%; }

  .roadmap-grid { grid-template-columns: 1fr; }
  .feature-list { grid-template-columns: 1fr; }
  .integration-grid { grid-template-columns: 1fr; }

  .page-header { padding: 110px 0 40px; }

  .logo-cloud { gap: 24px; }
  .logo-cloud-item { font-size: 1.1rem; }

  .testimonial-card { padding: 28px; }
  .card { padding: 28px; }

  .dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border: none;
    padding: 0 0 0 20px;
    margin-top: 0;
    display: none;
    background: transparent;
    max-width: 100%;
  }

  .dropdown-menu a {
    white-space: normal;
  }

  .dropdown-menu.show {
    display: block;
  }

  .dropdown > a {
    display: flex;
    align-items: center;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-value { font-size: 1.8rem; }
  .btn { width: 100%; text-align: center; }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
}

/* --- Selection --- */
::selection {
  background: var(--color-primary);
  color: #FFFFFF;
}

/* --- Skip Link (Accessibility) --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--color-primary);
  color: #FFFFFF;
  padding: 12px 20px;
  z-index: 9999;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
}

.skip-link:focus {
  top: 16px;
}

/* --- Tabs --- */
.tabs {
  display: flex;
  gap: 4px;
  border-radius: 12px;
  background: var(--color-section);
  padding: 4px;
  margin-bottom: 40px;
  overflow-x: auto;
}

.tab-btn {
  padding: 10px 24px;
  border-radius: 10px;
  border: none;
  background: transparent;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--color-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--color-dark);
}

.tab-btn.active {
  background: var(--color-bg);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Dividers --- */
.divider {
  height: 1px;
  background: var(--color-border);
  margin: 0;
  border: none;
}

/* --- Misc Utilities --- */
.text-center { text-align: center; }
.text-primary { color: var(--color-primary); }
.mx-auto { margin-left: auto; margin-right: auto; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ============================================
   COGNITOR — Style 2 Modern additions
   Topbar, dark hero, resource list, misc components
   ============================================ */

/* --- Topbar (contact strip above the sticky nav) --- */
.topbar {
  background: var(--color-navy);
  color: #a9c0d6;
  font-size: 0.85rem;
}

.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 8px var(--container-padding-desktop);
  flex-wrap: wrap;
}

.topbar a { color: #dbe7f2; }
.topbar a:hover { color: #fff; }

.topbar-contact {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.topbar-contact span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.topbar-social {
  display: flex;
  gap: 12px;
}

.topbar-social svg { width: 15px; height: 15px; }

@media (max-width: 680px) { .topbar-hide-sm { display: none !important; } }

/* --- Pill / badge (short inline label) --- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-button);
  background: var(--color-primary-light);
  color: var(--color-primary-hover);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.8rem;
}

/* --- Gradient text (headline highlight) --- */
.gradient-text {
  background: linear-gradient(120deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --- Dark hero variant (homepage) --- */
.hero-dark {
  background: var(--color-navy);
  color: #c8d6e4;
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 7vw, 6rem);
}

.hero-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../assets/images/illustrations/pattern-grid.svg');
  background-size: 44px;
  opacity: 0.14;
  pointer-events: none;
}

.hero-dark > .container { position: relative; }
.hero-dark h1 { color: #fff; }
.hero-dark p { color: #bcd0e2; }
.hero-dark .hero-trust { color: #9db4c9; }
.hero-dark .hero-trust strong { color: #fff; }

.glass-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-card);
  overflow: hidden;
  margin-top: 24px;
}

.glass-stats-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 24px;
}

.glass-stats-num {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2.1rem;
  color: #fff;
}

.glass-stats-num .u { color: var(--color-accent); }

.glass-stats-label {
  color: #9db4c9;
  font-size: 0.88rem;
  margin-top: 4px;
}

/* --- Resource list (Downloadable Forms / Tax Tables / Useful Links / New Business Kit) --- */
.res-list { display: grid; gap: 14px; }

.res-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-form);
  background: var(--color-bg);
  transition: border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.res-item:hover {
  border-color: var(--color-primary);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.res-item-icon {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.res-item-icon svg { width: 22px; height: 22px; }

.res-item-label {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-dark);
}

.res-item-ext {
  margin-left: auto;
  color: var(--color-muted);
  width: 18px;
  height: 18px;
  flex: none;
}

/* --- Blog Content Typography --- */
.blog-content { font-size:1.05rem; line-height:1.8; color:var(--color-dark); }

.blog-content p { margin-bottom:1.5rem; }

.blog-content h2 { margin-top:3rem; margin-bottom:1rem; font-size:1.6rem; font-weight:700; }
.blog-content h3 { margin-top:2rem; margin-bottom:0.85rem; font-size:1.3rem; font-weight:600; }
.blog-content h4 { margin-top:1.5rem; margin-bottom:0.6rem; font-size:1.1rem; font-weight:600; }
.blog-content h5, .blog-content h6 { margin-top:1.2rem; margin-bottom:0.4rem; font-weight:600; }

.blog-content ul,
.blog-content ol { margin-bottom:1.5rem; padding-left:1.8rem; }
.blog-content li { margin-bottom:0.4rem; }
.blog-content ul ul,
.blog-content ol ol { margin-bottom:0; }

.blog-content blockquote {
  margin:1.5rem 0; padding:1rem 1.5rem; border-left:4px solid var(--color-primary);
  background:var(--color-section); font-style:italic; border-radius:0 var(--radius-card) var(--radius-card) 0;
}
.blog-content blockquote p:last-child { margin-bottom:0; }

.blog-content a { color:var(--color-primary); text-decoration:underline; }
.blog-content a:hover { text-decoration:none; }

.blog-content strong { font-weight:700; }
.blog-content em { font-style:italic; }

.blog-content img {
  max-width:100%; height:auto; display:block; margin:2rem auto; border-radius:var(--radius-image);
}
.blog-content img.align-left { float:left; margin:0.5rem 1.5rem 1rem 0; }
.blog-content img.align-right { float:right; margin:0.5rem 0 1rem 1.5rem; }
.blog-content img.align-center { display:block; margin:2rem auto; float:none; }

/* Images aligned with the editor's own alignment buttons come out as an inline
   "float:right/left" with no spacing (and, inside a <figure>, margin:auto = 0
   on a float), so the text touched the image. Give them the same gap as the
   align-left/right classes above; selectors are strong enough to win over
   ".blog-content figure img". Un-float on small screens so text is not squeezed. */
.blog-content img[style*="float: right"], .blog-content img[style*="float:right"],
.blog-content figure img[style*="float: right"], .blog-content figure img[style*="float:right"] { margin:0.5rem 0 1rem 1.5rem; }
.blog-content img[style*="float: left"], .blog-content img[style*="float:left"],
.blog-content figure img[style*="float: left"], .blog-content figure img[style*="float:left"] { margin:0.5rem 1.5rem 1rem 0; }
.blog-content figure.align-right { float:right; max-width:50%; margin:0.5rem 0 1rem 1.5rem; }
.blog-content figure.align-left { float:left; max-width:50%; margin:0.5rem 1.5rem 1rem 0; }
@media (max-width:600px) {
  .blog-content img.align-left, .blog-content img.align-right,
  .blog-content img[style*="float"], .blog-content figure.align-left, .blog-content figure.align-right { float:none !important; display:block; margin:1rem auto; max-width:100%; }
}


/* Tax E-news story anchors (see core/services/tax-news-service.php) — zero-height jump targets; 150px = sticky header (112px) + breathing room so the story heading is never hidden. */
.blog-content a.tn-anchor { display:block; height:0; scroll-margin-top:110px; }
.blog-content table { width:100%; border-collapse:collapse; margin:1.5rem 0; font-size:0.92rem; overflow-x:auto; display:block; }
.blog-content table th,
.blog-content table td { border:1px solid var(--color-border); padding:0.6rem 0.8rem; text-align:left; }
.blog-content table th { background:var(--color-section); font-weight:600; }

/* A figure shrink-wraps its image, so the caption sits under the image and wraps
   inside the image's width (width:0 + min-width:100% = the caption takes the
   figure's width without making the figure wider). */
.blog-content figure { width:fit-content; max-width:100%; margin:2rem auto; text-align:center; }
.blog-content figure img { display:block; margin:0 auto 0.5rem; max-width:100%; height:auto; border-radius:var(--radius-image); }
.blog-content figcaption { width:0; min-width:100%; box-sizing:border-box; font-size:0.85rem; color:var(--color-muted); font-style:italic; margin-top:0.4rem; }

/* Aligned image with a caption: when the float sits on the <img> inside the figure
   (Media Manager "align-right" class, or the editor's inline float) the image leaves
   the figure and the caption wraps beside it. Float the whole figure instead and keep
   the image inside it. Newer posts put "align-*" on the <figure> itself (rules above). */
.blog-content figure > img.align-left, .blog-content figure > img.align-right,
.blog-content figure > img[style*="float"] { float:none !important; margin:0 auto 0.5rem; }
.blog-content figure:has(> img.align-right), .blog-content figure:has(> img[style*="float: right"]), .blog-content figure:has(> img[style*="float:right"]) { float:right; max-width:50%; margin:0.5rem 0 1rem 1.5rem; }
.blog-content figure:has(> img.align-left), .blog-content figure:has(> img[style*="float: left"]), .blog-content figure:has(> img[style*="float:left"]) { float:left; max-width:50%; margin:0.5rem 1.5rem 1rem 0; }
@media (max-width:600px) {
  .blog-content figure:has(> img.align-left), .blog-content figure:has(> img.align-right), .blog-content figure:has(> img[style*="float"]) { float:none; max-width:100%; margin:1rem auto; }
}

.blog-content pre,
.blog-content code { font-family:monospace; font-size:0.9rem; background:var(--color-section); border-radius:4px; }
.blog-content code { padding:0.15rem 0.4rem; }
.blog-content pre { padding:1rem; overflow-x:auto; margin-bottom:1.5rem; }
.blog-content pre code { padding:0; background:transparent; }

.size-small { width:300px; max-width:100%; }
.size-medium { width:600px; max-width:100%; }
.size-large { width:900px; max-width:100%; }

/* Table of Contents — opt-in per post (see "Show Table of Contents" in the blog editor).
   Only shown once the viewport is wide enough to have a real left gutter
   outside the 800px content column. `float:left` + a negative margin pulls
   it into that gutter without reserving vertical space (so it doesn't push
   the article down); `position:sticky` (not `fixed`) keeps it scoped to
   `.container` — its own containing block — so it can only stick while the
   article itself is on screen, and scrolls away before the hero above or
   the footer below ever come into view. Hidden below that width; there's
   no room in the gutter to place it without recreating the overlap this
   replaced. */
.toc { display:none; }

@media (min-width: 1360px) {
  .toc {
    display:block;
    float:left;
    position:sticky;
    top:120px;
    width:200px;
    margin-left:-240px;
    z-index:5;
    background:var(--color-section);
    border:1px solid var(--color-border);
    border-radius:var(--radius-card);
    padding:1.25rem 1.5rem;
    box-sizing:border-box;
  }
}
.toc-title { margin:0 0 0.6rem; font-weight:700; font-size:0.95rem; }
.toc-list { list-style:none; margin:0; padding:0; }
.toc-item { margin:0.35rem 0; }
.toc-item a { color:var(--color-primary); text-decoration:none; }
.toc-item a:hover { text-decoration:underline; }
.toc-item.toc-level-3 { padding-left:1.25rem; font-size:0.92rem; }

/* Accordion blocks inserted via the blog editor's TinyMCE accordion plugin
   (native <details>/<summary> — expand/collapse needs no JS, only styling) */
.blog-content .mce-accordion {
  border:1px solid var(--color-border);
  border-radius:var(--radius-card);
  margin-bottom:1rem;
  overflow:hidden;
}
.blog-content .mce-accordion-summary {
  display:flex;
  align-items:center;
  gap:0.6rem;
  padding:0.85rem 1.25rem;
  font-weight:600;
  cursor:pointer;
  background:var(--color-section);
  list-style:none;
}
.blog-content .mce-accordion-summary::-webkit-details-marker { display:none; }
.blog-content .mce-accordion-summary::before {
  content:'+';
  display:inline-block;
  width:1em;
  color:var(--color-primary);
  font-weight:700;
}
.blog-content .mce-accordion[open] > .mce-accordion-summary::before { content:'\2212'; }
.blog-content .mce-accordion-body { padding:1rem 1.25rem; }
.blog-content .mce-accordion-body > *:last-child { margin-bottom:0; }
