/* ==========================================================================
   TECHSPEAK — SERVICE PAGES + SINGLE POST STYLES
   ========================================================================== */

/* --------------------------------------------------------------------------
   SERVICE PAGE — Problem section
   -------------------------------------------------------------------------- */

.ts-svc-problems {
  background: var(--color-amber-light);
  border-top: 3px solid var(--color-amber-border);
  border-bottom: 3px solid var(--color-amber-border);
  padding: var(--section-py) 0;
}

.ts-svc-problems .ts-section-header--center h2 { color: var(--color-amber-dark); }
.ts-svc-problems .ts-section-header--center p  { color: var(--color-amber-darker); }

.ts-svc-problems__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.ts-svc-problem-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  background: #fff;
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  border-left: 3px solid var(--color-amber);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.ts-svc-problem-item__icon {
  font-size: var(--text-lg);
  color: var(--color-amber);
  flex-shrink: 0;
  margin-top: 2px;
}

.ts-svc-problem-item p {
  font-size: var(--text-base);
  color: var(--color-amber-darker);
  line-height: var(--leading-relaxed);
  margin: 0;
}

/* --------------------------------------------------------------------------
   BLOG FILTER BAR
   -------------------------------------------------------------------------- */

.ts-blog-filter {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-4) 0;
  position: sticky;
  top: 76px; /* matches header height */
  z-index: var(--z-raised);
}

.ts-blog-filter__inner {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.ts-blog-filter__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  background: #fff;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.ts-blog-filter__btn:hover {
  color: var(--color-navy);
  border-color: var(--color-navy);
}

.ts-blog-filter__btn.is-active {
  background: var(--color-navy);
  color: #fff;
  border-color: var(--color-navy);
}

.ts-blog-filter__count {
  font-size: 10px;
  background: rgba(255,255,255,0.2);
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.ts-blog-filter__btn.is-active .ts-blog-filter__count {
  background: rgba(255,255,255,0.2);
}

.ts-blog-filter__btn:not(.is-active) .ts-blog-filter__count {
  background: var(--color-bg-muted);
  color: var(--color-text-subtle);
}

/* Archive section */
.ts-blog-archive { padding: var(--space-12) 0 var(--space-16); }

/* --------------------------------------------------------------------------
   SINGLE POST — hero
   -------------------------------------------------------------------------- */

.ts-post-hero {
  padding: var(--space-12) 0;
}

.ts-post-hero__breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  flex-wrap: wrap;
}

.ts-post-hero__breadcrumb a,
.ts-post-hero__breadcrumb span {
  font-size: var(--text-xs);
  color: var(--color-navy-muted);
  text-decoration: none;
}

.ts-post-hero__breadcrumb a:hover { color: #fff; }

.ts-post-hero__breadcrumb span[aria-hidden] { color: var(--color-navy-border); }

.ts-post-hero__title {
  font-size: clamp(1.75rem, 4vw, var(--text-4xl));
  font-weight: var(--weight-extrabold);
  color: #fff;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--space-6);
}

.ts-post-hero__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.ts-post-hero__author {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-navy-muted);
}

.ts-post-hero__avatar {
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
}

.ts-post-hero__sep { color: var(--color-navy-border); }

.ts-post-hero__date,
.ts-post-hero__read-time {
  font-size: var(--text-sm);
  color: var(--color-navy-muted);
}

/* Featured image */
.ts-post-featured-image {
  background: var(--color-navy);
  padding-bottom: var(--space-10);
}

.ts-post-featured-image__img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--radius-2xl);
  display: block;
}

/* --------------------------------------------------------------------------
   SINGLE POST — layout (content + sidebar)
   -------------------------------------------------------------------------- */

.ts-post-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--space-12);
  align-items: start;
  padding-top: var(--space-12);
  padding-bottom: var(--space-16);
}

/* --------------------------------------------------------------------------
   SINGLE POST — content area
   -------------------------------------------------------------------------- */

.ts-post-content.ts-content h2 {
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.ts-post-content.ts-content h3 {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

.ts-post-content.ts-content h4 {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
}

.ts-post-content.ts-content p {
  font-size: var(--text-base);
  line-height: 1.8;
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
}

.ts-post-content.ts-content ul,
.ts-post-content.ts-content ol {
  padding-left: var(--space-6);
  margin-bottom: var(--space-5);
}

.ts-post-content.ts-content li {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: var(--space-2);
}

.ts-post-content.ts-content img {
  border-radius: var(--radius-xl);
  margin: var(--space-6) 0;
  box-shadow: var(--shadow-md);
}

.ts-post-content.ts-content blockquote {
  border-left: 4px solid var(--color-blue);
  background: var(--color-blue-light);
  padding: var(--space-5) var(--space-6);
  margin: var(--space-6) 0;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.ts-post-content.ts-content blockquote p {
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--color-navy);
  margin: 0;
}

/* TOC */
.ts-toc {
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-5) var(--space-6);
  margin-bottom: var(--space-8);
}

.ts-toc__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ts-toc__nav a {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding: var(--space-1) 0;
  transition: color var(--transition-fast);
}

.ts-toc__nav a:hover { color: var(--color-blue); }

/* Post tags */
.ts-post-tags {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: var(--space-10);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}

.ts-post-tag {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.ts-post-tag:hover {
  border-color: var(--color-blue);
  color: var(--color-blue);
}

/* --------------------------------------------------------------------------
   SIDEBAR
   -------------------------------------------------------------------------- */

.ts-post-sidebar { display: flex; flex-direction: column; gap: var(--space-6); }

/* CTA — position controlled by JS on desktop */
.ts-sidebar-cta {
  background: var(--color-navy);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
}

/* Recent posts widget */
.ts-sidebar-recent {
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
}

.ts-sidebar-recent a:hover { color: var(--color-blue) !important; }

.ts-sidebar-cta__icon {
  width: 48px;
  height: 48px;
  background: var(--color-blue);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: var(--space-4);
}

.ts-sidebar-cta__title {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: #fff;
  margin-bottom: var(--space-2);
}

.ts-sidebar-cta__desc {
  font-size: var(--text-sm);
  color: var(--color-navy-muted);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-5);
}

.ts-sidebar-cta__list {
  list-style: none;
  margin-top: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.ts-sidebar-cta__list li {
  font-size: var(--text-xs);
  color: var(--color-navy-muted);
}

/* Services mini list */
.ts-sidebar-services {
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
}

.ts-sidebar-services__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ts-sidebar-services__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.ts-sidebar-services__list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.ts-sidebar-services__list li a:hover {
  background: #fff;
  color: var(--color-blue);
}

/* Related posts */
.ts-related { padding: var(--section-py) 0; }

/* --------------------------------------------------------------------------
   FAQ — copied from homepage.css so service pages have full styles
   -------------------------------------------------------------------------- */

.ts-faq__list { display: flex; flex-direction: column; gap: var(--space-2); }

.ts-faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #fff;
  transition: border-color var(--transition-fast);
}

.ts-faq-item:has(.ts-faq-item__trigger[aria-expanded="true"]) {
  border-color: var(--color-blue);
}

.ts-faq-item__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  background: #fff;
  cursor: pointer;
  border: none;
  text-align: left;
  transition: background-color var(--transition-fast);
}

.ts-faq-item__trigger:hover { background: var(--color-bg-soft); }
.ts-faq-item__trigger[aria-expanded="true"] { background: var(--color-bg-soft); }

.ts-faq-item__question {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--color-text);
  line-height: var(--leading-snug);
}

.ts-faq-item__icon {
  color: var(--color-blue);
  flex-shrink: 0;
  transition: transform var(--transition-base);
}

.ts-faq-item__trigger[aria-expanded="true"] .ts-faq-item__icon {
  transform: rotate(180deg);
}

.ts-faq-item__answer {
  padding: 0 var(--space-6) var(--space-5);
  background: var(--color-bg-soft);
}

.ts-faq-item__answer p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  margin: 0;
}

/* --------------------------------------------------------------------------
   FINAL CTA — service page version (inside .ts-section--dark)
   -------------------------------------------------------------------------- */

.ts-section--dark .ts-cta__heading {
  font-size: clamp(1.75rem, 3vw, var(--text-4xl));
  font-weight: var(--weight-extrabold);
  color: #fff;
  margin-bottom: var(--space-4);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
}

.ts-section--dark .ts-cta__subtext {
  font-size: var(--text-lg);
  color: var(--color-navy-muted);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-8);
}

.ts-section--dark .ts-cta__reassurance {
  font-size: var(--text-sm);
  color: var(--color-navy-subtle);
  margin-top: var(--space-4);
  display: block;
}

/* --------------------------------------------------------------------------
   SECONDARY BUTTON ON DARK BACKGROUNDS
   Override the light-on-light problem
   -------------------------------------------------------------------------- */

.ts-section--dark .ts-btn--secondary,
.ts-page-hero .ts-btn--secondary {
  border-color: rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.85);
  background: transparent;
}

.ts-section--dark .ts-btn--secondary:hover,
.ts-page-hero .ts-btn--secondary:hover {
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* --------------------------------------------------------------------------
   RESPONSIVE — SERVICE + BLOG
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .ts-post-layout {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .ts-sidebar-cta--sticky { position: static; }

  .ts-post-sidebar {
    order: -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
  }

  .ts-svc-problems__grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .ts-post-sidebar { grid-template-columns: 1fr; }
  .ts-blog-filter { top: 64px; }
  .ts-post-hero__title { font-size: clamp(1.5rem, 7vw, 2rem); }
  .ts-post-featured-image__img { border-radius: var(--radius-lg); max-height: 260px; }
}
