/* Detail pages (Phase 3: products; later phases add solutions, blog and case studies below).
   Ordinary responsive CSS. Colours come from the variables in style.css and inner.css. */

/* ===== Product detail ===== */
.pd-top { padding-top: 30px; padding-bottom: 50px; }
.pd-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: start; }

.pd-main { aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #eef7f8; box-shadow: var(--shadow); }
.pd-main img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.pd-thumb { width: 96px; aspect-ratio: 16 / 9; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 8px; background: #eef7f8; }
.pd-thumb.is-on { border-color: var(--brand); }
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }

.pd-model { margin-bottom: 14px; font-size: 15px; color: var(--ink-70); }
.pd-model strong { color: var(--brand-dark); }
.pd-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.pd-lead { margin-bottom: 28px; font-size: 19px; line-height: 1.65; }
.pd-summary .pcard-price { font-size: 22px; margin-bottom: 22px; }

.pd-details-wrap { background: #f4fafa; }
.pd-details { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.pd-text { margin-bottom: 16px; font-size: 17px; line-height: 1.8; color: var(--ink-70); }
.pd-gap { margin-top: 48px; }

.spec-table { width: 100%; border-collapse: separate; border-spacing: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.spec-table th, .spec-table td { padding: 14px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.spec-table th { width: 34%; font-weight: 700; color: var(--brand-dark); background: var(--brand-light); }

.pd-side { display: grid; gap: 20px; }
.pd-box { padding: 24px 26px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.pd-box-title { margin-bottom: 14px; font-family: var(--font-heading); font-size: 19px; }
.pd-box p { line-height: 1.7; color: var(--ink-70); }
.pd-checks li, .pd-bullets li { position: relative; margin-bottom: 9px; padding-left: 28px; line-height: 1.5; }
.pd-checks li:last-child, .pd-bullets li:last-child { margin-bottom: 0; }
.pd-checks li::before { content: ""; position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--brand); }
.pd-checks li::after { content: ""; position: absolute; left: 6px; top: 6px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.pd-bullets li::before { content: ""; position: absolute; left: 6px; top: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--g2); }

.pd-related .card-grid { margin-top: 8px; }

@media (max-width: 1100px) {
  .pd-grid, .pd-details { gap: 32px; }
}
@media (max-width: 900px) {
  .pd-grid, .pd-details { grid-template-columns: 1fr; }
  .pd-top { padding-bottom: 36px; }
}
@media (max-width: 480px) {
  .pd-lead { font-size: 17px; }
  .pd-summary .btn-row .btn { flex: 1 1 100%; }
  .spec-table th, .spec-table td { padding: 12px 14px; }
  .spec-table th { width: 40%; }
  .pd-box { padding: 20px; }
}

/* ===== Solution detail (Phase 4) ===== */
.sd-top { padding-top: 24px; padding-bottom: 50px; }
.sd-intro-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.sd-intro .pd-text:first-child { font-size: 19px; color: var(--ink); }
.sd-note { margin-top: 22px; padding: 14px 18px; border-left: 4px solid var(--g2); border-radius: 0 var(--radius) var(--radius) 0; background: var(--brand-light); font-size: 15px; line-height: 1.65; color: var(--ink-70); }
.sd-cta { position: sticky; top: 100px; }
.sd-cta p { margin-bottom: 18px; }

.sd-why, .sd-how { background: #f4fafa; }
.sd-wide { max-width: 860px; }

.sd-features { display: grid; gap: 24px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.sd-feature { padding: 26px 26px 28px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.sd-icon-wrap { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; margin-bottom: 16px; border-radius: 14px; background: var(--brand-light); color: var(--brand); }
.sd-feature h3 { margin-bottom: 8px; font-family: var(--font-heading); font-size: 18px; line-height: 1.35; }
.sd-feature p { font-size: 15px; line-height: 1.65; color: var(--ink-70); }

.sd-steps { display: grid; gap: 24px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; counter-reset: step; }
.sd-step { position: relative; padding: 28px 24px 26px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; counter-increment: step; }
.sd-step::before { content: counter(step); display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: 16px; border-radius: 50%; background: var(--gradient-strip); font-family: var(--font-heading); font-weight: 700; color: #fff; }
.sd-step h3 { margin-bottom: 8px; font-family: var(--font-heading); font-size: 18px; }
.sd-step p { font-size: 15px; line-height: 1.65; color: var(--ink-70); }

.sd-cases { background: #f4fafa; }

@media (max-width: 1100px) {
  .sd-intro-grid { gap: 32px; }
  .sd-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sd-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .sd-intro-grid { grid-template-columns: 1fr; }
  .sd-cta { position: static; }
}
@media (max-width: 640px) {
  .sd-features, .sd-steps { grid-template-columns: 1fr; }
  .sd-feature { padding: 22px; }
  .sd-cta .btn-row .btn { flex: 1 1 100%; }
}

/* ===== Blog article (Phase 5) ===== */
.ba-top { padding-top: 24px; }
.ba { min-width: 0; }
.ba-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 26px; font-size: 15px; font-weight: 600; color: var(--ink-70); }
.ba-meta time { color: var(--brand); }
.ba-body { max-width: 760px; }
/* style.css already sets html { scroll-padding-top: 84px } for the sticky header, so only a small extra gap is needed here */
.ba-body h2 { scroll-margin-top: 24px; margin: 42px 0 14px; font-family: var(--font-heading); font-size: clamp(24px, 3vw, 30px); line-height: 1.25; }
.ba-body h2:first-child { margin-top: 0; }
.ba-body p { margin-bottom: 18px; font-size: 18px; line-height: 1.85; color: rgba(15, 42, 45, .85); }
.ba-body ul { margin: 0 0 24px; padding: 0; list-style: none; font-size: 18px; line-height: 1.7; color: rgba(15, 42, 45, .85); }
.ba-body ul li { margin-bottom: 10px; line-height: 1.7; }
.ba-body .pd-bullets li::before { top: 11px; }
.ba-figure { margin: 30px 0; }
.ba-figure img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #eef7f8; }
.ba-figure figcaption { margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--ink-70); }
.ba-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 34px 0 0; padding: 0; list-style: none; }

.ba-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 760px; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.ba-step { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 16px 20px; border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; transition: border-color .2s, box-shadow .2s; }
.ba-step:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.ba-next { grid-column: 2; text-align: right; }
.ba-step-label { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
.ba-step-title { font-family: var(--font-heading); font-size: 17px; line-height: 1.35; }

.ba-top .blog-side { position: sticky; top: 100px; }
.bw-toc-list { margin: 0; padding: 0; list-style: none; }
.bw-toc-list a { display: block; padding: 9px 10px 9px 14px; border-left: 3px solid var(--line); border-radius: 0 8px 8px 0; font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--ink-70); transition: color .2s, border-color .2s, background-color .2s; }
.bw-toc-list a:hover { border-left-color: var(--g2); color: var(--brand); }
.bw-toc-list a[aria-current="location"] { border-left-color: var(--brand); background: var(--brand-light); color: var(--brand-dark); }

.ba-related { background: #f4fafa; }

@media (max-width: 900px) {
  .ba-top .blog-side { position: static; }
}
@media (max-width: 640px) {
  .ba-body p, .ba-body ul { font-size: 17px; line-height: 1.8; }
  .ba-steps { grid-template-columns: 1fr; }
  .ba-next { grid-column: auto; text-align: left; }
}
@media (prefers-reduced-motion: reduce) { .ba-step, .bw-toc-list a { transition: none; } }

/* ===== Case study detail (Phase 6) ===== */
.cd-head { padding-top: 14px; }
.cd-chip { display: inline-block; margin-bottom: 14px; padding: 6px 16px; border-radius: 999px; background: var(--brand-light); font-size: 14px; font-weight: 700; letter-spacing: .04em; color: var(--brand-dark); }
.cd-title { max-width: 900px; margin-bottom: 22px; font-family: var(--font-heading); font-size: clamp(30px, 4.6vw, 48px); line-height: 1.15; }
.cd-meta { display: flex; flex-wrap: wrap; gap: 10px 40px; margin: 0 0 30px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cd-meta dt { margin-bottom: 2px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
.cd-meta dd { margin: 0; font-size: 17px; font-weight: 600; }
/* Gradient border around the hero image: the gradient shows through the padding */
.cd-hero { padding: 5px; border-radius: calc(var(--radius) + 5px); background: var(--gradient-strip); box-shadow: var(--shadow); }
.cd-hero img { display: block; width: 100%; height: auto; aspect-ratio: 21 / 9; object-fit: cover; border-radius: var(--radius); background: #eef7f8; }

.cd-body { padding-top: 46px; padding-bottom: 20px; }
.cd-body > * { max-width: 880px; }
.cd-lead { margin-bottom: 38px; font-size: 21px; line-height: 1.65; color: var(--ink); }
.cd-block { margin-bottom: 44px; }
.cd-block .pd-text { max-width: 820px; }
.cd-results { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.cd-results li { position: relative; padding: 16px 20px 16px 56px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; font-size: 17px; line-height: 1.55; box-shadow: var(--shadow); }
.cd-results li::before { content: ""; position: absolute; left: 20px; top: 17px; width: 24px; height: 24px; border-radius: 50%; background: var(--brand-light) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23008088' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 16px no-repeat; }
.cd-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.cd-links .pill { padding: 8px 18px; font-size: 15px; font-weight: 600; color: var(--brand-dark); transition: background-color .2s; }
.cd-links .pill:hover { background: var(--brand-light); }

.cd-products { background: #f4fafa; }
.cd-cta-wrap { padding-top: 24px; padding-bottom: 24px; }
.cd-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px 40px; padding: 34px 40px; border-radius: var(--radius); background: linear-gradient(110deg, #00474d 0%, var(--g1) 100%); color: #fff; }
.cd-cta-title { margin-bottom: 8px; font-family: var(--font-heading); font-size: clamp(22px, 3vw, 28px); }
.cd-cta p { max-width: 520px; color: rgba(255, 255, 255, .88); line-height: 1.6; }
.cd-more { padding-top: 56px; }

@media (max-width: 640px) {
  .cd-hero img { aspect-ratio: 16 / 9; }
  .cd-meta { gap: 12px 28px; }
  .cd-lead { font-size: 18px; }
  .cd-results li { padding: 14px 16px 14px 50px; font-size: 16px; }
  .cd-results li::before { left: 15px; top: 15px; }
  .cd-cta { padding: 26px 22px; }
  .cd-cta .btn-row .btn { flex: 1 1 100%; }
}

/* How it works with photos: image and text side by side, alternating left and right */
.sd-flow { display: grid; gap: 72px; margin: 0; padding: 0; list-style: none; }
.sd-flow-item { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.sd-flow-item.is-reverse .sd-flow-media { order: 2; }
.sd-flow-media img { display: block; width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.sd-flow-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.sd-flow-num { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--brand); color: #fff; font-family: var(--font-heading); font-size: 22px; font-weight: 700; }
.sd-flow-arrow { position: relative; display: block; width: 96px; height: 2px; background: var(--ink, #0f2a2d); }
.sd-flow-arrow::before { content: ""; position: absolute; top: -5px; width: 10px; height: 10px; border: solid var(--ink, #0f2a2d); border-width: 2px 0 0 2px; }
.sd-flow-item:not(.is-reverse) .sd-flow-head { flex-direction: row-reverse; justify-content: flex-end; }
.sd-flow-item:not(.is-reverse) .sd-flow-arrow::before { left: 0; transform: rotate(-45deg); }
.sd-flow-item.is-reverse .sd-flow-arrow::before { right: 0; transform: rotate(135deg); }
.sd-flow-item.is-reverse .sd-flow-head { justify-content: flex-start; flex-direction: row; }
.sd-flow-body h3 { margin-bottom: 10px; font-family: var(--font-heading); font-size: clamp(26px, 3vw, 36px); line-height: 1.2; }
.sd-flow-body p { margin-bottom: 20px; font-size: 17px; line-height: 1.65; color: var(--ink-70); }
@media (max-width: 900px) {
  .sd-flow { gap: 48px; }
  .sd-flow-item { grid-template-columns: 1fr; gap: 22px; }
  .sd-flow-item.is-reverse .sd-flow-media { order: 0; }
  .sd-flow-arrow { display: none; }
  .sd-flow-item:not(.is-reverse) .sd-flow-head { flex-direction: row; }
}
