/**
 * Technical SEO page-only extras.
 * Loaded only when seo.extra_css points here (TechnicalSeoThemeHtmlSeeder).
 * All selectors are scoped to body.page-techseo / .techseo-theme-page —
 * does not change other service pages. Keeps the existing live design language.
 */
body.page-techseo .techseo-theme-page.theme-html-root {
  /* namespace hook — intentional no visual reset */
}

/* Preserve theme section rhythm without overriding shared KodRank chrome */
body.page-techseo .techseo-theme-page .sec-paper,
body.page-techseo .techseo-theme-page .sec-mist,
body.page-techseo .techseo-theme-page .sec-ink {
  position: relative;
}

/* Hero trust badges already styled by shared DM hero — match homepage space under CTAs */
body.page-techseo .hero-badges.hero-trust,
body.page-techseo .hero-trust.hero-badges {
  margin-top: 1.25rem;
}

html body.page-techseo.page-service .hero .hero-badges,
html body.page-techseo.page-service .hero .hero-trust,
html body.page-techseo.page-service .hero .hero-badges.hero-trust {
  margin-top: clamp(40px, 4.5vw, 64px) !important;
  margin-bottom: clamp(36px, 5vw, 64px) !important;
  padding-top: clamp(26px, 3vw, 36px) !important;
}
html body.page-techseo.page-service .hero {
  padding-bottom: clamp(48px, 7vh, 88px) !important;
}
html body.page-techseo.page-service .hero .hero-copy,
html body.page-techseo.page-service .hero .hero-grid {
  padding-bottom: 0 !important;
}

/* #services cards: dark tiles (beats shared paper .svc-card lock) */
html body.page-techseo.page-service .techseo-theme-page #services .svc-card,
html body.page-techseo.page-service .techseo-theme-page.webdev-ref #services .svc-card,
html body.page-techseo.page-service .techseo-theme-page #services .svc-grid > .svc-card,
html body.page-techseo.page-service .webdev-ref #services .svc-card {
  background: var(--ink-2, #0f2a33) !important;
  border: 1px solid var(--line-dark, rgba(244, 122, 31, 0.16)) !important;
  color: #b7cbd2 !important;
}
html body.page-techseo.page-service .techseo-theme-page #services .svc-card h3,
html body.page-techseo.page-service .techseo-theme-page.webdev-ref #services .svc-card h3,
html body.page-techseo.page-service .webdev-ref #services .svc-card h3 {
  color: #fff !important;
}
html body.page-techseo.page-service .techseo-theme-page #services .svc-card p,
html body.page-techseo.page-service .techseo-theme-page.webdev-ref #services .svc-card p,
html body.page-techseo.page-service .webdev-ref #services .svc-card p {
  color: #9fb6be !important;
}
html body.page-techseo.page-service .techseo-theme-page #services .svc-card .svc-icon,
html body.page-techseo.page-service .techseo-theme-page.webdev-ref #services .svc-card .svc-icon,
html body.page-techseo.page-service .webdev-ref #services .svc-card .svc-icon,
html body.page-techseo.page-service .techseo-theme-page #services .svc-card .tile {
  background: rgba(10, 26, 34, 0.72) !important;
  color: var(--signal, #f47a1f) !important;
  border: 1px solid rgba(244, 122, 31, 0.22) !important;
}
html body.page-techseo.page-service .techseo-theme-page #services .svc-card .svc-icon svg,
html body.page-techseo.page-service .webdev-ref #services .svc-card .svc-icon svg {
  stroke: var(--signal, #f47a1f) !important;
}
html body.page-techseo.page-service .techseo-theme-page #services .svc-card:hover {
  border-color: rgba(244, 122, 31, 0.45) !important;
}
html body.page-techseo.page-service .techseo-theme-page #services .svc-card:hover .svc-icon {
  background: var(--signal, #f47a1f) !important;
  color: var(--signal-ink, #0a1a22) !important;
  border-color: var(--signal, #f47a1f) !important;
}
html body.page-techseo.page-service .techseo-theme-page #services .svc-card:hover .svc-icon svg {
  stroke: var(--signal-ink, #0a1a22) !important;
}

/* Contact points from theme copy — match existing DM contact list look */
body.page-techseo .contact-side .compare-list,
body.page-techseo .dm-contact .points,
body.page-techseo .contact-points {
  list-style: none;
}

/* ── Carousel dots (same pattern as on-page / off-page / DM) ── */
body.page-techseo .techseo-theme-page .testi-dots.thm-carousel-dots,
body.page-techseo .testi-dots.thm-carousel-dots {
  display: none;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  margin-top: 18px;
  padding: 4px 0;
  min-height: 18px;
}

body.page-techseo .techseo-theme-page .thm-carousel-dots .testi-dot,
body.page-techseo .thm-carousel-dots .testi-dot {
  width: 10px;
  height: 10px;
  min-width: 10px;
  min-height: 10px;
  border-radius: 50%;
  padding: 0;
  margin: 0;
  border: 2px solid transparent;
  background: #c5d4ce;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 0 0 8px transparent;
}

body.page-techseo .techseo-theme-page .thm-carousel-dots .testi-dot.is-active,
body.page-techseo .thm-carousel-dots .testi-dot.is-active {
  background: var(--signal, #f47a1f);
  border-color: rgba(244, 122, 31, 0.25);
  transform: scale(1.2);
  box-shadow: 0 0 0 6px rgba(244, 122, 31, 0.12);
}

body.page-techseo .techseo-theme-page .thm-carousel-dots .testi-dot:focus-visible,
body.page-techseo .thm-carousel-dots .testi-dot:focus-visible {
  outline: 2px solid var(--signal, #f47a1f);
  outline-offset: 3px;
}

body.page-techseo .thm-carousel-nav-wrap,
body.page-techseo .techseo-theme-page .thm-carousel-nav-wrap {
  display: none !important;
}

@media (max-width: 980px) {
  body.page-techseo .techseo-theme-page .testi-dots.thm-carousel-dots,
  body.page-techseo .testi-dots.thm-carousel-dots {
    display: flex !important;
  }

  /* Clip horizontal bleed; keep vertical stack/scroll natural */
  body.page-techseo .techseo-theme-page section:has([data-thm-carousel]),
  body.page-techseo .techseo-theme-page section:has(.why-mobile-carousel) {
    overflow-x: clip !important;
    overflow-y: visible !important;
  }

  body.page-techseo .techseo-theme-page .why-mobile-carousel:has(> .pain-grid),
  body.page-techseo .techseo-theme-page .why-mobile-carousel:has(> .svc-grid),
  body.page-techseo .techseo-theme-page .why-mobile-carousel:has(> .testi-grid) {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
    touch-action: auto !important;
    scroll-snap-type: none !important;
  }

  /* Services + testimonials — 1 card per row swipe carousel (pain uses swipe-up stack) */
  body.page-techseo .techseo-theme-page .pain-grid[data-thm-carousel]:not([data-thm-stack]):not(.page-svc-stack),
  body.page-techseo .techseo-theme-page .why-mobile-carousel > .pain-grid:not([data-thm-stack]):not(.page-svc-stack),
  body.page-techseo .techseo-theme-page .pain-grid.thm-mobile-carousel:not([data-thm-stack]):not(.page-svc-stack),
  body.page-techseo .techseo-theme-page #services .svc-grid[data-thm-carousel],
  body.page-techseo .techseo-theme-page #services .why-mobile-carousel > .svc-grid,
  body.page-techseo .techseo-theme-page #services .svc-grid.thm-mobile-carousel,
  body.page-techseo .techseo-theme-page .testi-grid[data-thm-carousel],
  body.page-techseo .techseo-theme-page .why-mobile-carousel > .testi-grid,
  body.page-techseo .techseo-theme-page .testi-grid.thm-mobile-carousel {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-snap-type: x mandatory !important;
    overscroll-behavior-x: contain !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    scrollbar-width: none !important;
    touch-action: pan-x !important;
  }

  body.page-techseo .techseo-theme-page .pain-grid[data-thm-carousel]:not([data-thm-stack])::-webkit-scrollbar,
  body.page-techseo .techseo-theme-page .pain-grid.thm-mobile-carousel:not([data-thm-stack])::-webkit-scrollbar,
  body.page-techseo .techseo-theme-page #services .svc-grid[data-thm-carousel]::-webkit-scrollbar,
  body.page-techseo .techseo-theme-page #services .svc-grid.thm-mobile-carousel::-webkit-scrollbar,
  body.page-techseo .techseo-theme-page .testi-grid[data-thm-carousel]::-webkit-scrollbar,
  body.page-techseo .techseo-theme-page .testi-grid.thm-mobile-carousel::-webkit-scrollbar {
    display: none !important;
  }

  body.page-techseo .techseo-theme-page .pain-grid[data-thm-carousel]:not([data-thm-stack]) > .pain-card,
  body.page-techseo .techseo-theme-page .pain-grid.thm-mobile-carousel:not([data-thm-stack]) > .pain-card,
  body.page-techseo .techseo-theme-page #services .svc-grid[data-thm-carousel] > .svc-card,
  body.page-techseo .techseo-theme-page #services .svc-grid.thm-mobile-carousel > .svc-card,
  body.page-techseo .techseo-theme-page .testi-grid[data-thm-carousel] > .testi-card,
  body.page-techseo .techseo-theme-page .testi-grid.thm-mobile-carousel > .testi-card {
    flex: 0 0 100% !important;
    flex-shrink: 0 !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
    scroll-snap-align: start !important;
    scroll-snap-stop: always !important;
    transform: none !important;
    opacity: 1 !important;
  }

  /* Services cards readable on dark section */
  body.page-techseo .techseo-theme-page #services .svc-grid[data-thm-carousel] > .svc-card,
  body.page-techseo .techseo-theme-page #services .svc-grid.thm-mobile-carousel > .svc-card {
    min-height: 0 !important;
  }

  body.page-techseo .techseo-theme-page .wrap > .thm-carousel-nav-wrap {
    display: none !important;
  }

  body.page-techseo .techseo-theme-page .wrap > .testi-dots.thm-carousel-dots {
    margin-top: 12px !important;
  }

  /* Dark section dots — inactive slightly brighter */
  body.page-techseo .techseo-theme-page .sec-ink .thm-carousel-dots .testi-dot:not(.is-active) {
    background: rgba(255, 255, 255, 0.35);
  }

  /* Pain cards — swipe-up sticky stack */
  body.page-techseo .techseo-theme-page section.sec-paper:has(.pain-grid[data-thm-stack]),
  body.page-techseo .techseo-theme-page section.sec-paper:has(.pain-grid.page-svc-stack),
  body.page-techseo .techseo-theme-page section.sec-paper.has-page-svc-stack {
    overflow-x: clip !important;
    overflow-y: visible !important;
  }
  body.page-techseo .techseo-theme-page .pain-grid.page-svc-stack,
  body.page-techseo .techseo-theme-page .pain-grid[data-thm-stack] {
    display: block !important;
    grid-template-columns: none !important;
    gap: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    flex-direction: unset !important;
    flex-wrap: unset !important;
    scroll-snap-type: none !important;
    touch-action: auto !important;
  }
  body.page-techseo .techseo-theme-page .pain-grid.page-svc-stack > .svc-stack-item,
  body.page-techseo .techseo-theme-page .pain-grid[data-thm-stack] > .svc-stack-item {
    position: sticky !important;
    top: calc(var(--svc-stack-nav, 68px) + (var(--index0, 0) * var(--svc-stack-peek, 14px))) !important;
    z-index: calc(1 + var(--index0, 0)) !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 0 var(--svc-stack-gap, 18px) !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    transform: none !important;
  }
  body.page-techseo .techseo-theme-page .pain-grid.page-svc-stack > .svc-stack-item:last-child,
  body.page-techseo .techseo-theme-page .pain-grid[data-thm-stack] > .svc-stack-item:last-child {
    margin-bottom: 0 !important;
  }
  body.page-techseo .techseo-theme-page .pain-grid.page-svc-stack .pain-card,
  body.page-techseo .techseo-theme-page .pain-grid.page-svc-stack .svc-stack-item > .pain-card,
  body.page-techseo .techseo-theme-page .pain-grid[data-thm-stack] .pain-card,
  body.page-techseo .techseo-theme-page .pain-grid[data-thm-stack] .svc-stack-item > .pain-card {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 160px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (min-width: 981px) {
  body.page-techseo .techseo-theme-page .why-mobile-carousel:has(> .pain-grid),
  body.page-techseo .techseo-theme-page .why-mobile-carousel:has(> .svc-grid),
  body.page-techseo .techseo-theme-page .why-mobile-carousel:has(> .testi-grid) {
    display: contents !important;
  }

  body.page-techseo .techseo-theme-page .testi-dots.thm-carousel-dots {
    display: none !important;
  }
}
