/* ==========================================================================
   KloudData — SAP MaintenanceIQ (Predictive Maintenance Accelerator)
   Dedicated, self-contained stylesheet for page-templates/tmpl-sap-
   maintenanceiq.php. Cloned 1:1 from assets/css/sap-terra.css (same
   tokens, same class structure, .kd-terra renamed to .kd-miq) per the
   "same structure and design style, without modification" brief — this
   is deliberately NOT the MaintenanceIQ microsite package's own
   styles.css/fonts (Space Grotesk etc.); only that package's copy was
   used, restyled with this theme's existing design system so the page
   reads as a sibling of Terra/the other "Services" landing pages.

   Sections (7 total): Hero + Stats Bar (shared background, no hero CTA
   button — sitewide rule), Problem vs. Solution (2-card comparison),
   Capabilities (4 cards), Industries (4 cards), FAQ (native
   <details>/<summary>, single-open-at-a-time), Final CTA (dark
   contained card — the page's only button).
   ========================================================================== */

.kd-miq {
  --miq-cream:      #f7f4ee;
  --miq-paper:      #fbfaf7;
  --miq-white:      #ffffff;
  --miq-lav:        #F2F5FA;
  --miq-lav-line:   #dfe4f7;
  --miq-ink-950:    #0D1B2E;
  --miq-ink-800:    #182352;
  --miq-ink-600:    #3b477a;
  --miq-ink-400:    #6B7A99;
  --miq-ink-300:    #98a0bd;
  --miq-line:       #E2E6F0;
  --miq-blue-700:   #003b85;
  --miq-blue-600:   #004195;
  --miq-blue-500:   #01AEF0;
  --miq-teal-500:   #01D4DA;
  --miq-red-500:    #E0453C;
  --miq-navy-950:   #0B1733;
  --miq-radius-lg:  20px;
  --miq-radius-md:  16px;
  --miq-radius-sm:  10px;
  --miq-max:        1280px;
  --miq-shadow:     0 8px 30px rgba(12,20,48,0.06);

  font-family: 'Geist', 'Inter', sans-serif;
  color: var(--miq-ink-950);
  background: var(--miq-white);
  overflow-x: hidden;
}

.kd-miq h1, .kd-miq h2, .kd-miq h3, .kd-miq h4 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  color: var(--miq-ink-950);
  font-weight: 800;
  line-height: 1.18;
  margin: 0;
}
.kd-miq p { margin: 0; font-family: 'Geist', 'Inter', sans-serif; }
.kd-miq a { text-decoration: none; }
.kd-miq ul { margin: 0; padding: 0; list-style: none; }
.kd-miq svg { display: block; }

.kd-miq .accent {
background-image: linear-gradient(90deg, #014a9c, #01aef0);  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.kd-miq-wrap {
  max-width: var(--miq-max);
  margin: 0 auto;
  padding: 0 32px;
}

.kd-miq-section { padding: 88px 0; background-color: var(--miq-white); }
.kd-miq-section--white { background: #fbfaf7; }
.kd-miq-section--lav { background: var(--miq-lav); }
/* Two adjacent --lav sections (PROOF, then INDUSTRIES) share one
   continuous background — tighten the seam between them so it doesn't
   read as an oversized gap. */
.kd-miq-section--lav + .kd-miq-section--lav { padding-top: 24px; }

/* ── Section head ─────────────────────────────────────────── */
.kd-miq-head {
  margin: 0 auto 48px;
  text-align: center;
}
.kd-miq-head h2 { font-size: 48px; margin-bottom: 16px; line-height: 1.2; }
.kd-miq-head p { font-size: 16px; line-height: 28px; color: var(--miq-ink-400); }

/* ── Eyebrow label ────────────────────────────────────────── */
.kd-miq-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--miq-blue-600);
  margin-bottom: 18px;
}
.kd-miq-eyebrow::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: linear-gradient(90.47deg, #01AEF0 -0.02%, #01D4DA 97.78%);
  flex-shrink: 0;
}
.kd-miq-eyebrow--center { display: flex; justify-content: center; width: 100%; }
.kd-miq-eyebrow--onDark { color: #8fd0ff; }

/* ── Buttons ──────────────────────────────────────────────── */
/* CTA button — outline pill + circular white arrow badge, same style
   as the data-modernization-services page's CTA button
   (.kd-dmod-cta2-btn / .kd-dmod-cta2-arrow). */
.kd-miq-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 8px 8px 8px 26px;
  border: 1.5px solid rgba(255,255,255,0.6);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  transition: background .18s ease;
}
.kd-miq-cta-btn:hover { background: rgba(255,255,255,0.08); }
.kd-miq-cta-arrow {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #fff;
  color: #0B1733;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ══════════════════════════════════════════════════════════════
   HERO + STATS BAR — shared background wrapper
   The optional editor-supplied Background Image (Hero tab) spans both
   sections as one continuous image (no seam at the section boundary).
   ══════════════════════════════════════════════════════════════ */
.kd-miq-hero-merged {
  position: relative;
  background-color: var(--miq-paper);
}
.kd-miq-hero-merged-has-bg {
  background-size: 100% 100%;
  background-position: top center;
  background-repeat: no-repeat;
}
.kd-miq-hero {
  position: relative;
  background: transparent;
  padding-bottom: 72px;
  overflow: hidden;
}
.kd-miq-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding-top: 140px;
}
.kd-miq-hero h1 {
  font-size: 60px;
  line-height: 74px;
  letter-spacing: 0;
  color: var(--miq-ink-950);
  margin-bottom: 22px;
}
.kd-miq-hero-lead {
 font-size: 18px;
    font-weight: 400;
    line-height: 28px;
    color: #6B7A99;
    max-width: 500px;
    margin-bottom: 34px;
    animation: af-fade-up 0.5s ease-out 0.24s both;
}

/* ── Equipment vitals-monitor visual (ACF image override, or coded
      fallback) — a static (non-animated) stand-in for the microsite's
      JS-driven waveform, same visual weight as Terra's hub-and-spoke
      diagram. ── */
.kd-miq-hero-visual { position: relative; }
.kd-miq-hero-visual img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--miq-radius-lg);
}
.kd-miq-scope {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  background: var(--miq-navy-950);
  border-radius: var(--miq-radius-lg);
  box-shadow: 0 20px 60px rgba(12,20,48,0.10);
  padding: 20px 22px 24px;
  box-sizing: border-box;
}
.kd-miq-scope-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  margin-bottom: 14px;
}
.kd-miq-scope-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--miq-teal-500);
}
.kd-miq-scope-live i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--miq-teal-500);
  display: inline-block;
}
.kd-miq-scope-svg { width: 100%; height: auto; display: block; }
.kd-miq-scope-grid { stroke: rgba(255,255,255,.08); stroke-width: 1; }
.kd-miq-scope-line { fill: none; stroke: var(--miq-blue-500); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.kd-miq-scope-stages {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 18px;
}
.kd-miq-scope-stage {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,.85);
}
.kd-miq-scope-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--miq-teal-500);
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════
   STATS BAR — 4-column stat strip
   ══════════════════════════════════════════════════════════════ */
.kd-miq-stats { position: relative; z-index: 1; padding: 40px 0 40px; background-color: #fff;}
.kd-miq-stats-grid {
  display: flex;
}
.kd-miq-stat {
  flex: 1;
  position: relative;
  text-align: center;
  padding: 0 24px;
}
.kd-miq-stat + .kd-miq-stat::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--miq-line);
}
.kd-miq-stat-value {
  display: block;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-weight: 800;
  font-size: 48px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #004195;
  margin-bottom: 12px;
}
.kd-miq-stat-label {
  display: block;
  max-width: 220px;
  margin: 0 auto;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--miq-ink-400);
}

/* ══════════════════════════════════════════════════════════════
   CAPABILITIES — "What MaintenanceIQ Actually Does" (4 cards, the
   microsite's real "What it does" list)
   ══════════════════════════════════════════════════════════════ */
.kd-miq-cap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.kd-miq-cap-card {
  background: #fff;
  border: 1px solid var(--miq-line);
  border-radius: var(--miq-radius-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.kd-miq-cap-icon {
  width: 56px; height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(230, 247, 254, 0.5) 0%, #E6F7FE 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--miq-blue-600);
}
.kd-miq-cap-icon img,
.kd-miq-cap-icon svg { width: 26px; height: 26px; }
.kd-miq-cap-card h3 {
  font-size: 20px;
  line-height: 1.3;
}
.kd-miq-cap-card p {
  font-size: 16px;
  line-height: 28px;
  color: var(--miq-ink-400);
}

/* ══════════════════════════════════════════════════════════════
   PROOF — "Detection to work order in under 60 seconds." A single
   bordered case-file panel: header (title + two stat callouts) above
   a timestamped event log. Real content from the microsite's index.html.
   ══════════════════════════════════════════════════════════════ */
.kd-miq-case {
  max-width: 950px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--miq-line);
  border-radius: var(--miq-radius-md);
  overflow: hidden;
}
.kd-miq-case-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  padding: 28px 32px;
  border-bottom: 1px solid var(--miq-line);
}
.kd-miq-case-head h3 { font-size: 20px; line-height: 1.3; margin: 0; }
.kd-miq-case-sub {
  margin-top: 6px;
  padding-top: 10px;
  font-family: 'Inter', monospace;
  font-size: 16px;
  color: var(--miq-ink-400);
}
.kd-miq-case-stats { display: flex; gap: 28px; }
.kd-miq-case-stat { text-align: center; }
.kd-miq-case-stat-num {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-weight: 800;
  font-size: 30px;
  line-height: 1.2;
  background-image: linear-gradient(90deg, #014a9c, #01aef0);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.kd-miq-case-stat-label {
  font-size: 16px;
  color: var(--miq-ink-400);
  margin-top: 2px;
}
.kd-miq-case-log { padding: 8px 32px 28px; }
.kd-miq-case-row {
  display: flex;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--miq-line);
}
.kd-miq-case-row:last-child { border-bottom: none; }
.kd-miq-case-time {
  flex-shrink: 0;
  width: 90px;
  font-family: 'Inter', monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--miq-blue-600);
}
.kd-miq-case-desc {
  font-size: 16px;
  line-height: 1.6;
  color: var(--miq-ink-400);
}
.kd-miq-case-desc strong { color: var(--miq-ink-950); font-weight: 700; }

/* ══════════════════════════════════════════════════════════════
   INDUSTRIES — "Where MaintenanceIQ Pays for Itself Fastest" (4
   cards — the microsite's 4 real verticals)
   ══════════════════════════════════════════════════════════════ */
.kd-miq-industries-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
/* Full-bleed photo card, dark gradient overlay, title always visible,
   description reveals on hover/focus — same pattern as the home page's
   "Industry Context" grid (.kd-home-indctx-card). */
.kd-miq-industries-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 260px;
  border-radius: var(--miq-radius-md);
  overflow: hidden;
  background-color: var(--miq-navy-950);
  background-size: cover;
  background-position: center;
  cursor: pointer;
  outline: none;
  transition: transform .3s ease, box-shadow .3s ease;
}
.kd-miq-industries-card:hover,
.kd-miq-industries-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -18px rgba(11,18,36,.35);
}
.kd-miq-industries-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,23,51,0) 30%, rgba(11,23,51,.88) 100%);
  transition: background .3s ease;
}
.kd-miq-industries-card:hover .kd-miq-industries-overlay,
.kd-miq-industries-card:focus-visible .kd-miq-industries-overlay {
  background: linear-gradient(180deg, rgba(11,23,51,.15) 20%, rgba(11,23,51,.92) 100%);
}
.kd-miq-industries-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 22px 24px;
}
.kd-miq-industries-card h3 {
  display: inline-block;
  color: #fff;
  font-size: 19px;
  line-height: 1.3;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--miq-blue-500);
}
.kd-miq-industries-desc {
  font-size:16px;
  line-height: 26px;
  color: rgba(255,255,255,.85);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height .3s ease, opacity .25s ease, margin .3s ease;
}
.kd-miq-industries-card:hover .kd-miq-industries-desc,
.kd-miq-industries-card:focus .kd-miq-industries-desc,
.kd-miq-industries-card:focus-visible .kd-miq-industries-desc,
.kd-miq-industries-card:focus-within .kd-miq-industries-desc {
  max-height: 140px;
  opacity: 1;
  margin-top: 10px;
}
.kd-miq-industries-link {
  display: none;
}

/* ══════════════════════════════════════════════════════════════
   FAQ — bordered rounded card, native <details>/<summary>
   ══════════════════════════════════════════════════════════════ */
.kd-miq-faq-wrap { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.kd-miq-faq-item {
  border: 2px solid #E5E7EB;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.kd-miq-faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 20px;
  background: #fff;
  border: none;
  text-align: left;
  font-size: 17px;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  color: var(--miq-ink-950);
  cursor: pointer;
  transition: background .18s ease;
}
.kd-miq-faq-q:hover { background: #F9FAFB; }
.kd-miq-faq-item[open] .kd-miq-faq-q { background: #F9FAFB; border-bottom: 2px solid #E5E7EB; }
.kd-miq-faq-icon {
  flex-shrink: 0;
  width: 20px; height: 20px;
  color: #111827;
  display: flex; align-items: center; justify-content: center;
}
.kd-miq-faq-icon img { width: 14px; height: 14px; }
.kd-miq-faq-icon svg { transition: transform .2s ease; }
.kd-miq-faq-item[open] .kd-miq-faq-icon { color: var(--miq-ink-950); }
.kd-miq-faq-item[open] .kd-miq-faq-icon svg { transform: rotate(180deg); }
.kd-miq-faq-a {
  padding: 20px 20px 24px 20px;
  font-size: 16px;
  line-height: 1.7;
  color: #6B7280;
  background: #fff;
}
.kd-miq-faq-item > summary { list-style: none; }
.kd-miq-faq-item > summary::-webkit-details-marker { display: none; }

/* ══════════════════════════════════════════════════════════════
   FINAL CTA — contained rounded dark card, centered heading/subtext,
   solid pill button (the page's only button).
   ══════════════════════════════════════════════════════════════ */
.kd-miq-cta-wrap { padding-bottom: 120px; }
.kd-miq-cta {
  background-color: var(--miq-navy-950);
  background-size: cover;
  background-position: center;
  border-radius: 26px;
  padding: 64px 32px;
  overflow: hidden;
}
.kd-miq-cta-inner { max-width: 840px; margin: 0 auto; text-align: center; }
.kd-miq-cta-inner h2 {
  font-size: 40px;
  line-height: 1.25;
  color: #fff;
  margin-bottom: 16px;
}
.kd-miq-cta-inner p {
  font-size: 16px;
  line-height: 1.65;
  color: rgba(255,255,255,0.75);
  margin-bottom: 32px;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .kd-miq-hero-grid { grid-template-columns: 1fr; gap: 40px; padding-top: 115px; }
  .kd-miq-hero h1 { font-size: 40px; }
  .kd-miq-hero-lead { max-width: 100%; }
  .kd-miq-hero-visual { max-width: 360px; margin: 0 auto; }
  .kd-miq-stats-grid { flex-wrap: wrap; row-gap: 28px; }
  .kd-miq-stat { flex: 0 0 50%; }
  .kd-miq-stat:nth-child(odd)::before { display: none; }
  .kd-miq-cap-grid { grid-template-columns: 1fr; }
  .kd-miq-industries-grid { grid-template-columns: repeat(2, 1fr); }
  .kd-miq-head h2 { font-size: 34px; }
}

@media (max-width: 640px) {
  .kd-miq-wrap { padding: 0 20px; }
  .kd-miq-section { padding: 56px 0; }
  .kd-miq-hero h1 { font-size: 30px; line-height: 1.25; }
  .kd-miq-hero-lead { font-size: 16px; }
  .kd-miq-head h2 { font-size: 26px; }
  .kd-miq-hero-grid { gap: 28px; padding-top: 100px; }
  .kd-miq-stats-grid { flex-direction: column; row-gap: 20px; }
  .kd-miq-stat { flex: 1 1 auto; padding: 16px 0 0; }
  .kd-miq-stat::before { display: none; }
  .kd-miq-stat:not(:first-child) { border-top: 1px solid var(--miq-lav-line); }
  .kd-miq-industries-grid { grid-template-columns: 1fr; }
  .kd-miq-cta-inner h2 { font-size: 26px; }
  .kd-miq-case-head { padding: 22px; }
  .kd-miq-case-log { padding: 8px 22px 22px; }
  .kd-miq-case-stats { gap: 20px; }
  .kd-miq-case-stat-num { font-size: 24px; }
  .kd-miq-case-row { flex-direction: column; gap: 4px; }
  .kd-miq-case-time { width: auto; }
}
