/**
 * Wolliq — Blog, Archive & Global Fixes
 * blog-and-fixes.css
 *
 * Fixes applied:
 *   1. Blog archive page — full card grid design
 *   2. Blog single post — proper layout with featured image
 *   3. Missing CSS tokens (--sp-5, --sp-7, --sp-9, etc.)
 *   4. Homepage & internal page margin/spacing fixes
 *   5. Mobile-responsive fixes across all pages
 *   6. Pagination styles
 *   7. Page header (dark compact header for inner pages)
 *
 * Load order: after custom.css
 *
 * @package Wolliq
 * @version 1.3.0
 */

/* ============================================================================
   0. MISSING TOKEN PATCHES
   --sp-5 through --sp-32 extras, --shadow-card, --color-light, --color-white,
   --color-muted — referenced in components.css but absent from tokens.css
   ============================================================================ */

:root {
  /* Missing spacing tokens */
  --sp-5:  20px;   /* Gap between compact elements */
  --sp-7:  28px;   /* Card padding intermediate */
  --sp-9:  36px;   /* Medium section gap */
  --sp-10: 40px;   /* Generous gap */
  --sp-11: 44px;   /* Large gap */
  --sp-14: 56px;   /* Pre-hero padding on inner pages */
  --sp-16: 64px;   /* Wide gap */

  /* Missing shadow token */
  --shadow-card: 0 4px 16px rgba(15, 23, 42, 0.08), 0 1px 4px rgba(15, 23, 42, 0.04);
  --shadow-card-hover: 0 12px 32px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(15, 23, 42, 0.06);

  /* Missing colour aliases used in custom.css & components.css */
  --color-light:  #F8FAFC;
  --color-white:  #FFFFFF;
  --color-muted:  #64748B;
}


/* ============================================================================
   1. GLOBAL CONTAINER & SECTION PADDING FIXES
   Addresses margins that look "not good" across all pages.
   Inner pages get correct padding-top to clear the sticky nav.
   ============================================================================ */

/* Sticky nav height is ~68px — main content needs clearance */
body:not(.home) #main-content > :first-child {
  scroll-margin-top: 68px;
}

/* Ensure no double-top-padding on hero sections that follow the nav */
.page-header,
.post-header {
  padding-top: var(--sp-16); /* 64px — same as sp-14+sp-3 */
  padding-bottom: var(--sp-16);
}

@media (min-width: 1024px) {
  .page-header,
  .post-header {
    padding-top: 96px;
    padding-bottom: 96px;
  }
}

/* Breadcrumb strip sits between nav and page header — compact */
.breadcrumb-strip {
  padding-top: var(--sp-3);
  padding-bottom: var(--sp-3);
  background: rgba(15, 23, 42, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Section spacing — make sure sections never collapse into each other */
.section + .section {
  /* Handled by the section's own padding — no margin needed */
}


/* ============================================================================
   2. BLOG ARCHIVE — GRID LAYOUT (archive.php / /blog/)
   The blog page shows posts as individual cards in a responsive grid.
   Each card: thumbnail + category + title + excerpt + author/date row.
   ============================================================================ */

/* ── Section wrapper ─────────────────────────────────────────────────────── */
.blog-archive {
  background-color: var(--color-bg);
  padding-top: var(--sp-12);
  padding-bottom: var(--sp-12);
}

@media (min-width: 1024px) {
  .blog-archive {
    padding-top: var(--sp-20);
    padding-bottom: var(--sp-20);
  }
}

/* ── Card grid: 1-col → 2-col → 3-col ───────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-8);
  margin-bottom: var(--sp-12);
}

@media (min-width: 640px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-6);
  }
}

@media (min-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-6);
  }
}

/* ── Individual blog card ────────────────────────────────────────────────── */
.blog-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    border-color var(--transition-normal),
    box-shadow var(--transition-normal),
    transform var(--transition-normal);
  text-decoration: none;
  color: inherit;
}

.blog-card:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}

/* Thumbnail */
.blog-card__thumbnail {
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #1E3A6E 0%, #2563EB 100%);
  aspect-ratio: 16 / 9;
  position: relative;
  flex-shrink: 0;
}

.blog-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.blog-card:hover .blog-card__image {
  transform: scale(1.03);
}

/* Placeholder gradient when no featured image */
.blog-card__thumbnail-placeholder {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #0F172A 0%, #1E3A6E 60%, #2563EB 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.15);
  font-size: 2.5rem;
}

/* Body */
.blog-card__body {
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--sp-3);
}

/* Category eyebrow */
.blog-card__category {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.blog-card__category:hover {
  color: #0891B2;
  text-decoration: none;
}

/* Title */
.blog-card__title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: -0.2px;
  line-height: 1.4;
  margin: 0;
}

.blog-card__title-link {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.blog-card__title-link:hover {
  color: var(--color-secondary);
  text-decoration: none;
}

/* Excerpt */
.blog-card__excerpt {
  font-size: var(--text-body-sm);
  color: var(--color-text-muted);
  line-height: var(--lh-body-sm);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* Meta row */
.blog-card__meta {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 12px;
  color: var(--color-text-subtle);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--color-border);
  margin-top: auto;
  flex-wrap: wrap;
}

.blog-card__author a {
  color: var(--color-text-muted);
  font-weight: 500;
  text-decoration: none;
}
.blog-card__author a:hover { color: var(--color-secondary); text-decoration: none; }

.blog-card__meta-sep {
  color: var(--color-border-strong);
}

.blog-card__date {
  color: var(--color-text-subtle);
}

/* ── Empty state ─────────────────────────────────────────────────────────── */
.archive-empty {
  text-align: center;
  padding: var(--sp-20) var(--sp-6);
}

.archive-empty__text {
  font-size: var(--text-body-lg);
  color: var(--color-text-muted);
  margin-bottom: var(--sp-8);
}

/* ── Pagination ──────────────────────────────────────────────────────────── */
.pagination {
  margin-top: var(--sp-12);
}

.pagination .nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--sp-3);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-md);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.pagination .page-numbers:hover {
  border-color: var(--color-secondary);
  color: var(--color-secondary);
  background: var(--secondary-light);
  text-decoration: none;
}

.pagination .page-numbers.current {
  background: var(--color-secondary);
  color: #fff;
  border-color: var(--color-secondary);
}

.pagination .page-numbers.dots {
  border-color: transparent;
  background: transparent;
}

/* ── Archive page header ─────────────────────────────────────────────────── */
.page-header {
  background: var(--color-primary);
  position: relative;
  overflow: hidden;
}

/* Subtle grid overlay on dark headers */
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.page-header__inner {
  position: relative;
}

.page-header__content {
  max-width: 680px;
}

.page-header__title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 700;
  color: #fff;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-top: var(--sp-4);
  margin-bottom: var(--sp-4);
}

.page-header__sub {
  font-size: var(--text-body-lg);
  color: rgba(255, 255, 255, 0.65);
  line-height: var(--lh-body-lg);
  max-width: 560px;
}

.page-header__count {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-top: var(--sp-4);
}


/* ============================================================================
   3. BLOG SINGLE POST — LAYOUT FIXES
   post-header, post hero image, entry-content, post-footer
   ============================================================================ */

/* ── Post header (dark) ──────────────────────────────────────────────────── */
.post-header {
  background: var(--color-primary);
  position: relative;
  overflow: hidden;
}

.post-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.post-header__inner {
  position: relative;
  max-width: 800px;
}

.post-header__category {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
  padding: 5px 14px;
  border-radius: var(--r-pill);
  text-decoration: none;
  margin-bottom: var(--sp-6);
  transition: background var(--transition-fast);
}

.post-header__category:hover {
  background: rgba(6, 182, 212, 0.18);
  text-decoration: none;
}

.post-header__title {
  font-family: var(--font-heading);
  font-size: clamp(26px, 4.5vw, 48px);
  font-weight: 700;
  color: #fff;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: var(--sp-6);
}

.post-header__meta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  flex-wrap: wrap;
}

.post-header__author a,
.post-header__reading-time {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
}

.post-header__author a:hover { color: rgba(255, 255, 255, 0.85); text-decoration: none; }

.post-header__meta-sep {
  color: rgba(255, 255, 255, 0.2);
}

/* ── Featured image band between header and content ─────────────────────── */
.post-hero-image {
  background: var(--color-surface);
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
}

.post-hero-image__inner {
  padding-top: 0;
  padding-bottom: 0;
  max-width: 900px;
  margin: 0 auto;
}

.post-hero-image__img {
  width: 100%;
  display: block;
  border-radius: 0 0 var(--r-xl) var(--r-xl);
  max-height: 480px;
  object-fit: cover;
  object-position: center;
}

/* ── Post content body ───────────────────────────────────────────────────── */
.post-single {
  background: var(--color-surface);
  padding-top: var(--sp-12);
  padding-bottom: var(--sp-12);
}

@media (min-width: 1024px) {
  .post-single {
    padding-top: var(--sp-20);
    padding-bottom: var(--sp-20);
  }
}

.post-single__inner {
  max-width: 760px;
  margin: 0 auto;
}

/* Rich text content from the block editor */
.entry-content {
  font-size: var(--text-body);
  line-height: var(--lh-body);
  color: var(--color-text);
}

.entry-content h2 {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.5px;
  line-height: 1.25;
  margin-top: 2.5em;
  margin-bottom: 0.6em;
}

.entry-content h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: -0.2px;
  line-height: 1.35;
  margin-top: 2em;
  margin-bottom: 0.5em;
}

.entry-content h4 {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 600;
  color: var(--color-text);
  margin-top: 1.75em;
  margin-bottom: 0.4em;
}

.entry-content p {
  margin-bottom: 1.5em;
  font-size: var(--text-body);
  line-height: 1.75;
  color: var(--color-text);
}

.entry-content p:last-child { margin-bottom: 0; }

.entry-content a {
  color: var(--color-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.entry-content a:hover { color: #1D4ED8; }

.entry-content ul,
.entry-content ol {
  list-style: revert;
  padding-left: 1.5em;
  margin-bottom: 1.5em;
}

.entry-content li {
  margin-bottom: 0.5em;
  font-size: var(--text-body);
  line-height: 1.65;
  color: var(--color-text);
}

.entry-content strong { font-weight: 600; color: var(--color-primary); }
.entry-content em { font-style: italic; }

.entry-content blockquote {
  border-left: 4px solid var(--color-secondary);
  background: var(--secondary-light);
  margin: 2em 0;
  padding: var(--sp-6) var(--sp-8);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
}

.entry-content blockquote p {
  font-size: var(--text-body-lg);
  font-style: italic;
  color: var(--color-primary);
  margin-bottom: 0;
  line-height: 1.65;
}

.entry-content pre,
.entry-content code {
  font-family: 'Courier New', Courier, monospace;
  background: var(--color-surface-2);
  border-radius: var(--r-sm);
  font-size: 14px;
}

.entry-content code {
  padding: 2px 6px;
  color: var(--color-primary);
}

.entry-content pre {
  padding: var(--sp-6);
  overflow-x: auto;
  margin-bottom: 1.5em;
}

.entry-content img {
  border-radius: var(--r-lg);
  max-width: 100%;
  height: auto;
  margin: 1.5em 0;
}

.entry-content hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2.5em 0;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5em;
  font-size: var(--text-body-sm);
  overflow-x: auto;
  display: block;
}

.entry-content th,
.entry-content td {
  padding: var(--sp-3) var(--sp-4);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.entry-content th {
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-bg);
  border-bottom-width: 2px;
  border-bottom-color: var(--color-border-strong);
}


/* ============================================================================
   4. HOMEPAGE FIXES
   Spacing issues between sections, stat numbers, service grid on mobile
   ============================================================================ */

/* Ensure the hero accent line at top */
.section--hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-accent), var(--color-secondary), transparent);
  pointer-events: none;
}

/* Section headers — fix spacing when eyebrow + h2 are stacked */
.section__header {
  margin-bottom: var(--sp-12);
}

.section__header .eyebrow {
  margin-bottom: var(--sp-4);
}

/* Stats band on homepage — clamp numbers so they never break layout */
.stats-band__number {
  font-size: clamp(28px, 5vw, 48px);
}

/* Service card grid — fix equal heights */
.service-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
}

@media (min-width: 640px) {
  .service-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .service-card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Inline CTA strip — fix overlap with sections on mobile */
.inline-cta-section {
  padding: var(--sp-9) 0;
}

/* Homepage blog preview — fix the "no thumbnail" placeholder */
.blog-preview__card-image-placeholder {
  background: linear-gradient(135deg, #1E3A6E 0%, #2563EB 100%);
}


/* ============================================================================
   5. INTERNAL PAGE FIXES — ABOUT, SOLUTIONS, INDUSTRIES, CONTACT
   ============================================================================ */

/* About page — team grid */
.about-team__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-6);
}

@media (min-width: 768px) {
  .about-team__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .about-team__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Solutions page — service content blocks */
.solutions-page .section + .section {
  border-top: 0;
}

/* Contact page — form not too wide on desktop */
.contact-form__wrapper {
  max-width: 900px;
  margin: 0 auto;
}

/* Industries grid — fix 1-col on mobile */
.industry-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
}

@media (min-width: 640px) {
  .industry-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .industry-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}


/* ============================================================================
   6. MOBILE FIXES — all breakpoints ≤ 767px
   Section 12.1: mobile-first. Never hide content on mobile that's on desktop.
   ============================================================================ */

@media (max-width: 767px) {

  /* Nav — ensure logo and CTA fit on small screens */
  .site-nav__logo {
    font-size: 18px;
  }

  /* Hero — scale down the display headline */
  .display,
  .hero__title {
    font-size: clamp(28px, 8vw, 44px);
    letter-spacing: -1px;
  }

  .hero__sub {
    font-size: 16px;
  }

  /* Hero actions — stack buttons vertically */
  .hero__actions {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-3);
  }

  .hero__actions .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  /* Hero trust signals — wrap onto 2 columns */
  .hero__trust {
    flex-wrap: wrap;
    gap: var(--sp-3);
  }

  .hero__trust-sep {
    display: none;
  }

  /* Section headers — smaller H2 */
  .section__title {
    font-size: 24px;
    letter-spacing: -0.5px;
  }

  /* Why Wolliq — 1 column on mobile */
  .why-wolliq__grid {
    grid-template-columns: 1fr;
  }

  /* How It Works — stack steps vertically */
  .how-it-works__steps {
    flex-direction: column;
    gap: var(--sp-8);
  }

  .how-it-works__connector {
    display: none;
  }

  /* Stats band — 2 columns on mobile */
  .stats-band__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-6);
  }

  /* Testimonials — single card on mobile */
  .testimonials-slider {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .testimonials-slider::-webkit-scrollbar { display: none; }

  .testimonial-card {
    scroll-snap-align: start;
    min-width: 280px;
  }

  /* Industry cards — 1 column */
  .industry-cards-grid {
    grid-template-columns: 1fr;
  }

  /* Page header — tighter on mobile */
  .page-header,
  .post-header {
    padding-top: var(--sp-12);
    padding-bottom: var(--sp-12);
  }

  .page-header__title,
  .post-header__title {
    font-size: clamp(22px, 7vw, 36px);
    letter-spacing: -0.5px;
  }

  /* Blog grid — single column */
  .blog-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-6);
  }

  /* Blog card — ensure readable card height */
  .blog-card__body {
    padding: var(--sp-5);
  }

  /* Blog card excerpt — fewer lines on mobile */
  .blog-card__excerpt {
    -webkit-line-clamp: 2;
  }

  /* Entry content — tighter heading sizes */
  .entry-content h2 { font-size: 22px; }
  .entry-content h3 { font-size: 18px; }

  /* Breadcrumb — no overflow */
  .breadcrumb__list {
    flex-wrap: wrap;
    gap: var(--sp-2);
  }

  /* CTA banner — stack content vertically */
  .cta-banner__inner {
    flex-direction: column;
    gap: var(--sp-8);
    text-align: center;
  }

  .cta-banner__actions {
    align-items: center;
    width: 100%;
  }

  .cta-banner__actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* Footer — single column */
  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
  }

  /* Contact form sidebar — hide on mobile or stack */
  .contact-form__layout {
    grid-template-columns: 1fr;
  }

  .contact-form__sidebar {
    border-radius: var(--r-xl) var(--r-xl) 0 0;
  }

  /* Booking section steps — 1 column */
  .booking-steps__grid {
    grid-template-columns: 1fr;
  }

  /* Solutions archive — cards go to 1 column */
  .solutions-archive__grid {
    grid-template-columns: 1fr;
  }

  /* Service delivery list — 1 column */
  .service-deliverables__list {
    grid-template-columns: 1fr;
  }

  /* Inline CTA — stack */
  .inline-cta__inner {
    flex-direction: column;
    gap: var(--sp-6);
    text-align: center;
  }

  .inline-cta__btn {
    width: 100%;
    justify-content: center;
  }

}

/* ── Tablet fixes (768px–1023px) ─────────────────────────────────────────── */
@media (min-width: 768px) and (max-width: 1023px) {

  .stats-band__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .industry-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .site-footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-form__layout {
    grid-template-columns: 1fr;
  }

  /* Reduce hero display size */
  .display,
  .hero__title {
    font-size: clamp(36px, 6vw, 52px);
  }

}


/* ============================================================================
   7. HEADER ACCENT TOP LINE (dark sections that need the gradient top border)
   ============================================================================ */

.section--dark.section--hero,
.page-header,
.post-header {
  border-top: 2px solid transparent;
  background-image: linear-gradient(var(--color-primary), var(--color-primary)),
    linear-gradient(90deg, transparent, var(--color-accent), var(--color-secondary), transparent);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

/* Simpler fallback for browsers that don't support background-clip: border-box */
@supports not (background-clip: border-box) {
  .section--dark.section--hero::after,
  .page-header::after,
  .post-header::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-accent), var(--color-secondary), transparent);
  }
}


/* ============================================================================
   8. SOCIAL PROOF BAR — LOGO MARQUEE FIX
   ============================================================================ */

.social-proof-bar {
  overflow: hidden;
}

.social-proof-bar__track {
  display: flex;
  gap: var(--sp-12);
  align-items: center;
}

@media (max-width: 767px) {
  .social-proof-bar__track {
    gap: var(--sp-8);
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: var(--sp-2);
  }

  .social-proof-bar__track::-webkit-scrollbar { display: none; }

  .social-proof-bar__logo {
    flex-shrink: 0;
  }
}


/* ============================================================================
   9. BREADCRUMB STRIP FIX
   ============================================================================ */

.breadcrumb {
  background: rgba(15, 23, 42, 0.95);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.breadcrumb__list {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.breadcrumb__item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
}

.breadcrumb__link {
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.breadcrumb__link:hover {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.breadcrumb__sep {
  color: rgba(255, 255, 255, 0.2);
  font-size: 11px;
}

.breadcrumb__current {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}


/* ============================================================================
   10. GLOBAL BUTTON MOBILE FIX
   Ensure buttons don't overflow their containers on narrow screens
   ============================================================================ */

@media (max-width: 479px) {
  .btn {
    padding-left: var(--sp-4);
    padding-right: var(--sp-4);
    font-size: 14px;
  }

  .btn--lg {
    padding: 12px var(--sp-6);
    font-size: 15px;
  }
}


/* ============================================================================
   11. RESULTS / TESTIMONIALS PAGE FIX
   ============================================================================ */

.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
}

@media (min-width: 640px) {
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}


/* ============================================================================
   12. NOINDEX FIX NOTICE — Remove this CSS when noindex is resolved
   meta-robots is currently set to noindex, nofollow on all pages.
   This is a WordPress Reading Settings issue: Settings > Reading >
   "Discourage search engines from indexing this site" must be unchecked.
   ============================================================================ */



/* ============================================================================
   FIX 1: REMOVE GRADIENT BORDER ACCENT LINE (img_6)
   The background-clip border trick produces an ugly light-blue line.
   Revert to a simple pseudo-element accent at the very top only on hero.
   Page headers and post headers get no accent line (cleaner look).
   ============================================================================ */

.section--dark.section--hero,
.page-header,
.post-header {
  border-top: none !important;
  background-image: none !important;
  background-origin: initial !important;
  background-clip: initial !important;
}

@supports not (background-clip: border-box) {
  .section--dark.section--hero::after,
  .page-header::after,
  .post-header::after {
    display: none !important;
  }
}

/* Also remove the ::before grid + accent combo that bleeds the border */
.section--hero::before {
  /* Keep grid texture — but NO top border */
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}


/* ============================================================================
   FIX 2: INDUSTRY CARDS SECTION MARGINS (img_2)
   The industry cards section on homepage has too much left padding, causing
   the cards to appear left-aligned with excessive white space on right.
   ============================================================================ */

/* Industry section — ensure cards span full container width */
.industry-section .container,
[class*="industry"] .industry-cards,
.industry-grid-section .container {
  padding-left: var(--gutter-mobile);
  padding-right: var(--gutter-mobile);
}

@media (min-width: 768px) {
  .industry-section .container,
  [class*="industry"] .industry-cards,
  .industry-grid-section .container {
    padding-left: var(--gutter-tablet);
    padding-right: var(--gutter-tablet);
  }
}

@media (min-width: 1280px) {
  .industry-section .container,
  [class*="industry"] .industry-cards,
  .industry-grid-section .container {
    padding-left: var(--gutter-desktop);
    padding-right: var(--gutter-desktop);
  }
}

/* Industry card icon placeholder fix — make sure icons show correctly */
.industry-cards__card-icon,
.industry-grid__card-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-light);
  color: #0E7490;
  margin-bottom: var(--sp-6);
}

/* Fix the blank square icon placeholders (img_2 shows empty □ boxes) */
.industry-cards__card-icon svg,
.industry-grid__card-icon svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}


/* ============================================================================
   FIX 3: SERVICE CARD HIGHLIGHT — EQUAL STYLING (img_4)
   The first card (index 0) gets --highlight class making it blue/gradient.
   This looks inconsistent. Remove the special treatment so all cards match.
   ============================================================================ */

.service-grid__card--highlight {
  border-color: var(--color-border) !important;
  background: var(--color-surface) !important;
}

.service-grid__card--highlight .service-grid__card-icon {
  background-color: var(--secondary-light) !important;
  color: var(--color-secondary) !important;
}

/* On hover, apply accent treatment uniformly to ALL cards */
.service-grid__card:hover {
  border-color: var(--secondary-mid);
  box-shadow: var(--shadow-card-hover);
}

.service-grid__card:hover .service-grid__card-icon {
  background-color: var(--color-secondary);
  color: var(--color-surface);
  transition: background-color var(--transition-normal), color var(--transition-normal);
}


/* ============================================================================
   FIX 4: HOW IT WORKS — EMPTY RIGHT SIDE ON PROCESS SECTION (img_5)
   The 3-column numbered steps grid has step 3 description text being cut off
   on the right. Fix: ensure step content doesn't overflow and wraps properly.
   ============================================================================ */

.how-it-works__step-desc {
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.how-it-works__step-content {
  width: 100%;
  min-width: 0; /* Critical — prevents grid blowout */
}

.how-it-works__step {
  min-width: 0; /* Critical for grid overflow fix */
  overflow: hidden;
}

/* Also ensure the section container doesn't clip */
.how-it-works__steps {
  overflow: visible;
}


/* ============================================================================
   FIX 5: INDUSTRY SINGLE PAGE — HERO, CHALLENGES, SOLUTIONS
   New single-wolliq_industry.php template components
   ============================================================================ */

/* Industry hero */
.industry-hero {
  background: var(--color-primary);
  padding-top: 80px;
  padding-bottom: 80px;
  position: relative;
  overflow: hidden;
}

.industry-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

@media (min-width: 1024px) {
  .industry-hero {
    padding-top: 100px;
    padding-bottom: 100px;
  }
}

.industry-hero__inner {
  position: relative;
}

.industry-hero__content {
  max-width: 720px;
}

.industry-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 700;
  color: #fff;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-top: var(--sp-4);
  margin-bottom: var(--sp-6);
}

.industry-hero__sub {
  font-size: var(--text-body-lg);
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.7;
  max-width: 580px;
  margin-bottom: var(--sp-8);
}

.industry-hero__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-8);
}

.industry-hero__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-4);
  max-width: 480px;
  margin-top: var(--sp-8);
}

@media (min-width: 640px) {
  .industry-hero__stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.industry-hero__stat {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-4);
  text-align: center;
}

.industry-hero__stat-num {
  display: block;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: var(--sp-1);
}

.industry-hero__stat-label {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.4;
}

/* Challenges grid */
.industry-challenges__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
  margin-top: var(--sp-8);
}

@media (min-width: 768px) {
  .industry-challenges__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.industry-challenge__card {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  padding: var(--sp-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-xl);
}

.industry-challenge__icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.industry-challenge__title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--sp-2);
}

.industry-challenge__desc {
  font-size: var(--text-body-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Solutions grid */
.industry-solutions__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
  margin-top: var(--sp-8);
}

@media (min-width: 768px) {
  .industry-solutions__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.industry-solution__card {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  padding: var(--sp-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-xl);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.industry-solution__card:hover {
  border-color: var(--secondary-mid);
  box-shadow: var(--shadow-card);
}

.industry-solution__num {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--secondary-light);
  -webkit-text-stroke: 1.5px var(--color-secondary);
  flex-shrink: 0;
  line-height: 1;
  width: 44px;
  text-align: center;
}

.industry-solution__title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--sp-2);
}

.industry-solution__desc {
  font-size: var(--text-body-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}


/* ============================================================================
   FIX 6: SOLUTIONS PILLAR PARENT PAGES (img_3)
   CSS for the new template-solutions-hub.php
   ============================================================================ */

/* Pillar services grid */
.pillar-services__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
  margin-top: var(--sp-8);
}

@media (min-width: 640px) {
  .pillar-services__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Individual service card (clickable full card) */
.pillar-service__card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-7);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-xl);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.pillar-service__card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--color-secondary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-normal);
}

.pillar-service__card:hover {
  border-color: var(--secondary-mid);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
  text-decoration: none;
}

.pillar-service__card:hover::after {
  transform: scaleX(1);
}

.pillar-service__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

.pillar-service__card:hover .pillar-service__icon {
  background-color: var(--color-secondary) !important;
  color: #fff !important;
}

.pillar-service__title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: -0.2px;
  margin: 0;
}

.pillar-service__desc {
  font-size: var(--text-body-sm);
  color: var(--color-text-muted);
  line-height: 1.65;
  flex: 1;
}

.pillar-service__link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-secondary);
  margin-top: auto;
  transition: gap var(--transition-fast);
}

.pillar-service__card:hover .pillar-service__link {
  gap: var(--sp-3);
}

/* Benefits two-column layout */
.pillar-benefits__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-12);
  align-items: start;
}

@media (min-width: 768px) {
  .pillar-benefits__inner {
    grid-template-columns: 1fr 1.4fr;
  }
}

.pillar-benefits__list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.pillar-benefit__item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-size: 15px;
  color: var(--color-text);
  font-weight: 500;
  line-height: 1.5;
}

.pillar-benefit__check {
  flex-shrink: 0;
  margin-top: 1px;
}


/* ============================================================================
   FIX 7: AUTO-ROUTE PILLAR PAGES in theme-setup
   (CSS for is-solutions-hub-page body class)
   ============================================================================ */

.is-solutions-hub-page .page-header {
  padding-top: 80px;
  padding-bottom: 80px;
}


/* ============================================================================
   FIX 8: PROCESS STEPS — SECTION RIGHT SIDE VISUAL (img_5)
   Add a sticky CTA/stat panel alongside the process on service pages to
   fill the white space. Applied via JS/PHP — CSS handles the layout.
   ============================================================================ */

/* Two-column process layout for service pillar pages */
.section--process-two-col .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-12);
}

@media (min-width: 1024px) {
  .section--process-two-col .container {
    grid-template-columns: 1.4fr 1fr;
    align-items: start;
  }
}

.process-sidebar {
  background: var(--color-primary);
  border-radius: var(--r-2xl);
  padding: var(--sp-8);
}

.process-sidebar__eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--sp-4);
}

.process-sidebar__title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.4px;
  line-height: 1.3;
  margin-bottom: var(--sp-4);
}

.process-sidebar__sub {
  font-size: var(--text-body-sm);
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.65;
  margin-bottom: var(--sp-8);
}

.process-sidebar__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
  margin-bottom: var(--sp-8);
}

.process-sidebar__stat {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  text-align: center;
}

.process-sidebar__stat-num {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--color-accent);
  display: block;
  margin-bottom: 4px;
}

.process-sidebar__stat-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}


/* ============================================================================
   FIX 9: HOMEPAGE SERVICE SECTION MARGINS (img_2 - spacing between cards)
   ============================================================================ */

/* Ensure service grid section has correct symmetric gutters */
.services-section .container,
.service-cards-section .container {
  max-width: var(--container-max);
}

/* Service grid - fix 3+2 layout breaking on mid sizes */
.service-grid {
  display: grid;
  gap: var(--sp-6);
}

@media (min-width: 640px) {
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .service-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  .service-grid__card:nth-child(1) { grid-column: 1 / span 2; }
  .service-grid__card:nth-child(2) { grid-column: 3 / span 2; }
  .service-grid__card:nth-child(3) { grid-column: 5 / span 2; }
  .service-grid__card:nth-child(4) { grid-column: 2 / span 2; }
  .service-grid__card:nth-child(5) { grid-column: 4 / span 2; }
}


/* ============================================================================
   FIX 10: MOBILE — INDUSTRY HERO ACTIONS STACK
   ============================================================================ */

@media (max-width: 767px) {
  .industry-hero__actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .industry-hero__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .industry-hero__stats {
    grid-template-columns: repeat(2, 1fr);
    max-width: 100%;
  }

  .pillar-services__grid {
    grid-template-columns: 1fr;
  }

  .pillar-benefits__inner {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
  }

  .industry-challenges__grid,
  .industry-solutions__grid {
    grid-template-columns: 1fr;
  }
}



/* ============================================================================
   HOMEPAGE SERVICE CARDS — 3-PILLAR LAYOUT
   When show_pillars_only=true, we show exactly 3 cards in a clean 3-col grid.
   Override the 3+2 desktop grid with a straight 3-col equal layout.
   ============================================================================ */

/* 3-card pillar grid: equal 3 columns on desktop */
.service-grid__cards--pillar-mode {
  grid-template-columns: repeat(3, 1fr) !important;
}

.service-grid__cards--pillar-mode .service-grid__card {
  grid-column: auto !important; /* Override nth-child positioning */
}

/* Apply pillar mode styling when 3 or fewer cards in the grid */
.service-grid__cards:has(.service-grid__card:nth-child(3):last-child) {
  grid-template-columns: repeat(3, 1fr) !important;
}

.service-grid__cards:has(.service-grid__card:nth-child(3):last-child) .service-grid__card {
  grid-column: auto !important;
}

/* Mobile-first: always 1 column */
@media (max-width: 639px) {
  .service-grid__cards {
    grid-template-columns: 1fr !important;
  }

  .service-grid__cards .service-grid__card {
    grid-column: auto !important;
  }
}

/* Tablet: 2 columns */
@media (min-width: 640px) and (max-width: 1023px) {
  .service-grid__cards:has(.service-grid__card:nth-child(3):last-child) {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}


/* ============================================================================
   HOMEPAGE INDUSTRIES SECTION — FULL-WIDTH LAYOUT FIX
   The section__header was limited to 680px which made the section look
   lopsided. Industries section gets a wider header.
   ============================================================================ */

.industry-grid .section__header {
  max-width: 100%;
  text-align: left;
  margin-left: 0;
  margin-right: 0;
}

.industry-grid .section__title {
  max-width: 560px;
}

.industry-grid .section__sub {
  max-width: 560px;
}

/* ============================================================================
   NAV DROPDOWN — DARK THEME ADDITIONAL FIXES
   ============================================================================ */

/* Dropdown eyebrow on featured panel */
.site-nav__dropdown-featured .eyebrow {
  color: var(--color-accent) !important;
}

/* All link arrow in dropdown */
.site-nav__dropdown-all-link:hover {
  color: #fff !important;
}

/* Dropdown pillar title border separator */
.site-nav__dropdown-col {
  padding-top: var(--sp-2);
}

/* Mobile nav pillars - ensure correct colors on mobile */
.site-nav__mobile-pillar-title {
  color: rgba(255, 255, 255, 0.5) !important;
}

.site-nav__mobile-sub a {
  color: rgba(255, 255, 255, 0.7) !important;
}

.site-nav__mobile-sub a:hover {
  color: #fff !important;
}

/* ============================================================================
   SERVICE CARD HOVER — Remove blue highlight from first card
   All cards now identical on rest state
   ============================================================================ */

.service-grid__card--highlight {
  background: var(--color-surface) !important;
  border-color: var(--color-border) !important;
  background-image: none !important;
}

.service-grid__card--highlight .service-grid__card-icon {
  background-color: var(--secondary-light) !important;
  color: var(--color-secondary) !important;
}

/* ============================================================================
   SERVICE + INDUSTRY CARDS — MOBILE RESPONSIVE GRID
   ============================================================================ */

@media (max-width: 767px) {
  .service-grid__cards {
    grid-template-columns: 1fr !important;
    gap: var(--sp-4);
  }

  .service-grid__card {
    grid-column: auto !important;
    padding: var(--sp-6);
  }

  .industry-grid__cards {
    grid-template-columns: 1fr !important;
    gap: var(--sp-4);
  }

  .industry-grid .section__header {
    text-align: center;
    margin: 0 auto;
    max-width: 100%;
  }

  .industry-grid .section__title,
  .industry-grid .section__sub {
    max-width: 100%;
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .service-grid__cards {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: var(--sp-5);
  }

  .service-grid__card {
    grid-column: auto !important;
  }

  .industry-grid__cards {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
