/* ==========================================================================
   COSERVE THEME — SUPPLEMENTARY STYLES
   Only for markup the WordPress theme adds that has no equivalent in the
   original static site (currently: the server-side case-study gate form).
   The original design system in style.css is never edited.
   Brand tokens reused: --color-future-blue #14D7D2, --color-space-grey-deep,
   Lato via --font-family-base.
   ========================================================================== */

.cs-gate {
  padding: 48px 0 72px;
}

.cs-gate-card {
  max-width: 560px;
  margin: 0 auto;
  background: var(--color-dark-card, #172736);
  border: 1px solid var(--color-dark-border, rgba(20, 215, 210, 0.18));
  border-radius: var(--radius-lg, 20px);
  padding: 36px clamp(20px, 4vw, 40px);
  color: var(--color-dark-text, #f1f5f9);
}

.cs-gate-heading {
  font-family: var(--font-family-base, 'Lato', sans-serif);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 10px;
  color: #ffffff;
}

.cs-gate-intro {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--color-dark-muted, #94a3b8);
  margin: 0 0 24px;
}

.cs-gate-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fecaca;
  border-radius: var(--radius-sm, 6px);
  padding: 10px 14px;
  font-size: 0.9rem;
  margin: 0 0 20px;
}

.cs-gate-form {
  text-align: left;
}

.cs-gate-field {
  width: 100%;
  margin-bottom: 14px;
  text-align: left;
}

.cs-gate-row {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 14px;
  width: 100%;
}

.cs-gate-form label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-dark-muted, #94a3b8);
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 14px;
}

.cs-gate-field label {
  margin-bottom: 0;
}

.cs-gate-form label span {
  display: block;
  text-align: left;
  width: 100%;
}

.cs-gate-form input,
.cs-gate-form select {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background: var(--color-space-grey-darkest, #0B131A);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm, 6px);
  padding: 12px 14px;
  color: #ffffff;
  font-family: var(--font-family-base, 'Lato', sans-serif);
  font-size: 0.95rem;
  font-weight: 400;
  text-align: left;
}

.cs-gate-form input:focus,
.cs-gate-form select:focus {
  outline: none;
  border-color: var(--color-future-blue, #14D7D2);
  box-shadow: 0 0 0 3px var(--color-future-blue-glow, rgba(20, 215, 210, 0.25));
}

.cs-gate-submit {
  width: 100%;
  margin-top: 8px;
}

.cs-gate-fineprint {
  font-size: 0.75rem;
  color: var(--color-dark-muted, #94a3b8);
  text-align: center;
  margin: 14px 0 0;
}

/* The teaser fade above the gate on a locked case study */
.cs-locked-teaser {
  position: relative;
}

.cs-locked-teaser::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 120px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--color-bg-white, #ffffff));
  pointer-events: none;
}

/* Shared front-end form status banner (contact, careers) */
.coserve-form-status {
  border-radius: var(--radius-sm, 6px);
  padding: 14px 18px;
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 28px;
}
.coserve-form-status.is-success {
  background: rgba(20, 215, 210, 0.1);
  border: 1px solid var(--color-future-blue, #14D7D2);
  color: #0f766e;
}
.coserve-form-status.is-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #b91c1c;
}

/* Careers job list */
.coserve-jobs {
  display: grid;
  gap: 16px;
  margin: 32px 0 48px;
}
.coserve-job {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 24px;
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: var(--radius-md, 12px);
  background: #fff;
}
.coserve-job h3 {
  font-size: 1.15rem;
  margin: 0 0 4px;
  color: var(--color-space-grey, #415564);
}
.coserve-job-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted, #64748b);
}

@media (max-width: 640px) {
  .cs-gate-row {
    grid-template-columns: 1fr;
  }
}

/*
 * Global case-study gate popup (coserve_gate_modal(), assets/js/gate-modal.js).
 *
 * Always present in the DOM (never display:none) and toggled purely with the
 * .is-open class flipping opacity/pointer-events — the same pattern as the
 * Careers "Apply" modal (.app-modal-overlay, assets/css/careers.css). A
 * display:none/:block toggle has no transition to animate and the panel can
 * jump on open; this fixed-flex + opacity approach is what keeps the popup
 * from flashing/glitching on open and close.
 */
.cs-gate-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.cs-gate-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.cs-gate-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 19, 26, 0.72);
  backdrop-filter: blur(4px);
}

.cs-gate-modal-panel {
  position: relative;
  z-index: 1;
  max-height: 90vh;
  overflow-y: auto;
  width: min(560px, 100%);
  transform: translateY(20px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.cs-gate-modal.is-open .cs-gate-modal-panel {
  transform: translateY(0);
}

.cs-gate-modal-panel .cs-gate {
  padding: 0;
}

.cs-gate-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.cs-gate-modal-close:hover {
  background: rgba(255, 255, 255, 0.18);
}

.cs-gate-successview {
  text-align: center;
  padding: 12px 0;
}

.cs-gate-success-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(20, 215, 210, 0.15);
  color: var(--color-future-blue, #14D7D2);
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cs-gate-success-link {
  display: none !important;
}

.cs-gate-done-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
}

/*
 * Home "Customer Stories" accordion: a full-colour client logo (real photo
 * logos, not a white-knockout SVG) needs its own small white chip instead of
 * the default brightness/invert-to-white filter used for the bundled
 * knockout logos — inverting a full-colour logo would turn it into a solid
 * white blob. Toggle with the "Logo is full-colour" checkbox on the Case
 * Story (cs_logo_is_color).
 */
.cs-acc-logo-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 8px;
  padding: 6px 12px;
}
.cs-acc-logo-color {
  filter: none !important;
  opacity: 1 !important;
}

/*
 * Interior page-hero background image (the "Background image / video"
 * field, ph_bg, in the Page Hero Band box — template-parts/interior/page-hero.php
 * sets background-image inline via that field). .page-hero's own default is
 * a solid dark gradient with no background-size/position handling, so an
 * image set this way needs its own cover/position + a dark scrim to keep
 * the white hero text legible over a photo instead of the flat gradient.
 */
.page-hero[style*="background-image"] {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.page-hero[style*="background-image"]::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 19, 26, 0.78) 0%, rgba(11, 19, 26, 0.88) 100%);
  z-index: 1;
}
.page-hero[style*="background-image"] .container {
  position: relative;
  z-index: 2;
}

/* ==========================================================================
   Full Viewport Height (100vh) for All Page Heroes
   Guarantees 100vh hero on Home, About Us, Careers, Consolidated AI & Products,
   Individual Product, Individual Industry, Partners, Insights, and all pages.
   ========================================================================== */
.hero-section,
.hero-section-j4rvis,
.page-hero,
.pr-hero,
.partner-hero,
.ar-hero-band {
  min-height: 100vh !important;
  min-height: 100dvh !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}

/* Industry case cards: exactly 2 cards visible at a time on desktop & tablet */
.ind-carousel-track,
.entry-content .ind-carousel-track,
.wp-block-group .ind-carousel-track {
  gap: 24px !important;
  padding: 6px 0 14px 0 !important;
}

.ind-case-card,
.entry-content .ind-case-card,
.wp-block-group .ind-case-card {
  flex: 0 0 calc((100% - 24px) / 2) !important;
  min-width: calc((100% - 24px) / 2) !important;
  max-width: calc((100% - 24px) / 2) !important;
  width: calc((100% - 24px) / 2) !important;
  scroll-snap-align: start !important;
  scroll-snap-stop: always !important;
  background: #ffffff !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  box-shadow: 0 4px 16px rgba(7, 16, 23, 0.04) !important;
  transition: all 0.25s ease !important;
  position: relative !important;
  box-sizing: border-box !important;
}

.ind-case-card:hover {
  transform: translateY(-2px) !important;
  border-color: #14D7D2 !important;
  box-shadow: 0 12px 28px rgba(7, 16, 23, 0.08) !important;
}

.ind-case-img,
.cs-img {
  height: 180px !important;
  min-height: 180px !important;
  width: 100% !important;
  background-size: cover !important;
  background-position: center !important;
  position: relative !important;
  flex-shrink: 0 !important;
  background-color: #0d1b26 !important;
}

.ind-case-metric-badge,
.cs-metric {
  position: absolute !important;
  bottom: 12px !important;
  left: 12px !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: #ffffff !important;
  background: rgba(20, 215, 210, 0.92) !important;
  padding: 4px 10px !important;
  border-radius: 3px !important;
  line-height: 1.2 !important;
  z-index: 2 !important;
  display: inline-block !important;
}

.ind-case-card-body,
.cs-body {
  padding: 24px 26px 28px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  justify-content: flex-start !important;
  box-sizing: border-box !important;
}

.ind-case-client,
.cs-client {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: #64748b !important;
  margin-bottom: 2px !important;
  line-height: 1.3 !important;
  display: block !important;
}

.ind-case-title {
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  color: #071017 !important;
  margin: 0 !important;
  line-height: 1.35 !important;
}

.ind-case-desc {
  font-size: 0.855rem !important;
  color: #64748b !important;
  line-height: 1.6 !important;
  flex: 1 1 auto !important;
  margin: 0 0 8px 0 !important;
}

.ind-case-card-action {
  flex: 0 0 auto !important;
  margin-top: auto !important;
  padding-top: 6px !important;
  align-self: flex-start !important;
}

.ind-case-btn,
.ind-case-card .cs-btn {
  display: inline-block !important;
  align-self: flex-start !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.07em !important;
  text-transform: uppercase !important;
  color: #0fb8b3 !important;
  background: transparent !important;
  border: 1.5px solid #14D7D2 !important;
  padding: 7px 16px !important;
  border-radius: 4px !important;
  text-decoration: none !important;
  transition: all 0.18s ease !important;
  cursor: pointer !important;
  line-height: 1.3 !important;
  font-family: inherit !important;
}

.ind-case-btn:hover,
.ind-case-card .cs-btn:hover {
  background: #14D7D2 !important;
  color: #ffffff !important;
  border-color: #14D7D2 !important;
}

@media (max-width: 768px) {
  .ind-case-card,
  .entry-content .ind-case-card,
  .wp-block-group .ind-case-card {
    flex: 0 0 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    scroll-snap-align: center !important;
    scroll-snap-stop: always !important;
    padding: 0 !important;
    overflow: hidden !important;
    border-radius: 8px !important;
  }
  .ind-case-card-body {
    padding: 20px 20px 24px !important;
  }
}

/* ==========================================================================
   CAREERS HERO BACKGROUND SLIDESHOW (Silky-smooth crossfade, 100% responsive)
   ========================================================================== */
.page-hero--has-slider {
  position: relative !important;
  overflow: hidden !important;
  background-color: #0b1320 !important;
  background-image: none !important;
}

.page-hero--has-slider::before {
  display: none !important;
}

/* Screen-size responsive hero padding so content and indicator fit viewports comfortably */
@media (min-width: 992px) {
  .page-hero--has-slider {
    padding-top: 136px !important;
    padding-bottom: 56px !important;
  }
}
@media (max-width: 991px) {
  .page-hero--has-slider {
    padding-top: 118px !important;
    padding-bottom: 44px !important;
    min-height: auto !important;
  }
}

.careers-hero-slideshow,
.page-hero-slider-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.careers-hero-slides-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.careers-hero-slide,
.page-hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 0;
  pointer-events: none;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity;
}

/* Incoming active slide: sits on top and dissolves smoothly to full opacity */
.careers-hero-slide.is-active,
.careers-hero-slide.active,
.page-hero-slide.is-active,
.page-hero-slide.active {
  opacity: 1 !important;
  z-index: 2 !important;
}

/* Outgoing slide: remains 100% visible underneath while incoming fades in over it */
.careers-hero-slide.is-prev,
.page-hero-slide.is-prev {
  opacity: 1 !important;
  z-index: 1 !important;
}

.careers-hero-slide img,
.page-hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: scale(1.0);
  transition: transform 7s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.careers-hero-slide.is-active img,
.careers-hero-slide.active img,
.page-hero-slide.is-active img,
.page-hero-slide.active img {
  transform: scale(1.04);
}

/* Lightened overlays — background images are clearly visible, bright & recognizable */
.careers-hero-overlay,
.page-hero-slider-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}

.careers-hero-overlay.overlay-dark,
.page-hero-slider-overlay.overlay-dark,
.careers-hero-overlay {
  background: 
    linear-gradient(90deg, rgba(11, 19, 32, 0.65) 0%, rgba(11, 19, 32, 0.38) 55%, rgba(11, 19, 32, 0.20) 100%),
    linear-gradient(180deg, rgba(11, 19, 32, 0.35) 0%, transparent 40%, rgba(11, 19, 32, 0.50) 100%);
}

.careers-hero-overlay.overlay-medium,
.page-hero-slider-overlay.overlay-medium {
  background: 
    linear-gradient(90deg, rgba(11, 19, 32, 0.50) 0%, rgba(11, 19, 32, 0.25) 55%, rgba(11, 19, 32, 0.15) 100%),
    linear-gradient(180deg, rgba(11, 19, 32, 0.25) 0%, transparent 40%, rgba(11, 19, 32, 0.40) 100%);
}

.careers-hero-overlay.overlay-light,
.page-hero-slider-overlay.overlay-light {
  background: 
    linear-gradient(90deg, rgba(11, 19, 32, 0.35) 0%, rgba(11, 19, 32, 0.15) 55%, rgba(11, 19, 32, 0.08) 100%),
    linear-gradient(180deg, rgba(11, 19, 32, 0.15) 0%, transparent 40%, rgba(11, 19, 32, 0.25) 100%);
}

.page-hero--has-slider .hero-title {
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.65);
}

.page-hero .hero-title em,
.hero-title em {
  color: #14D7D2 !important;
  font-style: italic !important;
  font-weight: 300 !important;
  font-family: 'Lato', sans-serif !important;
}

.page-hero--has-slider .hero-subtitle {
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}

.page-hero .container {
  position: relative;
  z-index: 4;
}

/* ── HERO SLIDER INDICATOR BAR (Always inside viewport, 100% responsive) ── */
.careers-hero-nav-bar {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-top: 36px;
  padding: 8px 18px;
  background: rgba(11, 19, 32, 0.62);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  position: relative;
  z-index: 10;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
}

.careers-hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  margin: 0;
  padding: 0;
}

.careers-hero-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 6px 2px;
  cursor: pointer;
  transition: all 0.3s ease;
  line-height: 0;
}

.careers-hero-dot .careers-hero-dot-bar {
  display: block;
  width: 26px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.38);
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease, box-shadow 0.3s ease;
}

.careers-hero-dot:hover .careers-hero-dot-bar {
  background: rgba(255, 255, 255, 0.75);
}

.careers-hero-dot.active .careers-hero-dot-bar {
  width: 44px;
  background: #14D7D2;
  box-shadow: 0 0 10px rgba(20, 215, 210, 0.75);
}

.careers-hero-counter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'Lato', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  line-height: 1;
}

.careers-hero-current {
  color: #14D7D2;
}

.careers-hero-sep {
  color: rgba(255, 255, 255, 0.35);
  font-weight: 400;
}

.careers-hero-total {
  color: rgba(255, 255, 255, 0.65);
}

/* Responsive adjustments across screen sizes */
@media (max-width: 1024px) {
  .careers-hero-nav-bar {
    margin-top: 28px;
    padding: 7px 14px;
    gap: 12px;
  }
  .careers-hero-dot .careers-hero-dot-bar {
    width: 20px;
    height: 3.5px;
  }
  .careers-hero-dot.active .careers-hero-dot-bar {
    width: 34px;
  }
}

@media (max-width: 768px) {
  .careers-hero-nav-bar {
    margin-top: 24px;
    padding: 6px 12px;
    gap: 10px;
  }
  .careers-hero-dot .careers-hero-dot-bar {
    width: 16px;
    height: 3px;
  }
  .careers-hero-dot.active .careers-hero-dot-bar {
    width: 28px;
  }
  .careers-hero-counter {
    font-size: 0.75rem;
    padding-left: 6px;
  }
}

@media (max-width: 480px) {
  .careers-hero-nav-bar {
    margin-top: 20px;
    padding: 5px 10px;
    gap: 8px;
  }
  .careers-hero-dots {
    gap: 6px;
  }
  .careers-hero-dot .careers-hero-dot-bar {
    width: 14px;
    height: 3px;
  }
  .careers-hero-dot.active .careers-hero-dot-bar {
    width: 22px;
  }
  .careers-hero-counter {
    font-size: 0.70rem;
    padding-left: 5px;
  }
}



/* ── HERO SLIDER INDICATOR: small dots, pinned near the bottom of the viewport ── */
.page-hero--has-slider .container {
  position: static;
}
.careers-hero-nav-bar {
  position: absolute;
  left: 32px;
  bottom: 40px;
  margin-top: 0;
  padding: 0;
  gap: 14px;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.careers-hero-dots { gap: 2px; }
.careers-hero-dot { padding: 6px 4px; }
.careers-hero-dot .careers-hero-dot-bar,
.careers-hero-dot.active .careers-hero-dot-bar {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.careers-hero-dot.active .careers-hero-dot-bar {
  box-shadow: 0 0 6px rgba(20, 215, 210, 0.7);
}
.careers-hero-counter { font-size: 0.75rem; }
@media (max-width: 768px) {
  .careers-hero-nav-bar { left: 20px; bottom: 28px; margin-top: 0; padding: 0; }
  .careers-hero-dot .careers-hero-dot-bar,
  .careers-hero-dot.active .careers-hero-dot-bar { width: 6px; height: 6px; }
}
