/* =====================================================
   GLOBAL RESET & BASE
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@300;400;600;700&display=swap');

:root {
  --blue-primary: #0b2f59;
  --blue-secondary: #0e5fa3;
  --blue-light: #eaf2f9;
  --teal-cta: #1c5769;

  --white: #ffffff;
  --gray-light: #f6f8fb;
  --gray-mid: #cfd6de;
  --gray-dark: #3a4653;

  --font-main: 'Source Sans 3', sans-serif;

  --max-width: 1280px;

  /* STANDARD PADDING */
  --container-padding: 3rem;        /* desktop */
  --container-padding-mobile: 1rem; /* mobile */

  --section-padding: 6rem;
  --section-padding-mobile: 3.5rem;

  --nav-height: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  color: var(--blue-primary);
  background-color: var(--white);
  line-height: 1.65;
}

/* =====================================================
   TYPOGRAPHY
   ===================================================== */

h1, h2, h3 {
  font-weight: 300;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 3.8rem;
  line-height: 1.15;
  margin-bottom: 1.8rem;
}

h2 {
  font-size: 3.2rem;
  margin-bottom: 1.8rem;
  line-height: 1.0;
}

h3 {
  font-size: 1.6rem;
  font-weight: 400;
  margin-bottom: 1.4rem;
}

h4 {
  font-family: var(--font-main);
  font-size: 3.1rem;
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.01em;
  color: #1c5769; /* RAL 5009 */
  margin-bottom: 1.8rem;
}

p {
  font-size: 1.18rem;
  margin-bottom: 1.4rem;
  max-width: 720px;
  line-height: 1.5;
}

.text-center { text-align: center; }

/* =====================================================
   LAYOUT — SINGLE SYSTEM
   ===================================================== */

.container {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.section {
  padding: var(--section-padding) 0;
}

/* =====================================================
   BUTTONS
   ===================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  padding: 0.85rem 1.6rem;
  min-height: 44px;
  border: none;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--teal-cta);
  color: var(--white);
}

.btn-secondary {
  background-color: transparent;
  color: var(--blue-primary);
  border: 1px solid var(--blue-primary);
}

/* =====================================================
   HERO SLIDER — FULL VIEWPORT, HORIZONTAL FLOW
   ===================================================== */

.hero-slider {
  position: relative;
  min-height: 67vh;
  overflow: hidden;
}

/* SLIDES */
.hero-slider .slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: translateX(100%);
  transition: transform 1.1s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* ACTIVE SLIDE */
.hero-slider .slide.active {
  transform: translateX(0);
  z-index: 2;
}

/* PREVIOUS SLIDE */
.hero-slider .slide.prev {
  transform: translateX(-100%);
  z-index: 1;
}

/* OVERLAY — SINGLE SOURCE OF TRUTH */
.hero-slider .hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(28, 87, 105, 0.50);
  z-index: 3;
}

/* CONTENT */
.hero-slider .container {
  position: relative;
  z-index: 4;
  min-height: 67vh;
  display: flex;
  align-items: center;
  align-items: flex-start;
  padding-top: 13vh;
}

/* TEXT */
.hero-content {
  max-width: 560px;
  color: var(--white);
}

.hero-content h1,
.hero-content p {
  color: var(--white);
}

.hero-content p {
  margin-bottom: 2.4rem;
}

/* =====================================================
   SLIM HERO — INTERIOR PAGES (BLACK / LEFT ALIGNED)
   ===================================================== */

.slim-hero {
  background-color: #1C5769;
  padding: 2.5rem 0 2rem 0; /* much shorter */
}

.slim-hero h1 {
  color: var(--white);
  margin-bottom: 0.75rem;
}

.slim-hero p {
  color: var(--gray-mid);
  margin-bottom: 0;
  max-width: 720px;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .slim-hero {
    padding: 2rem 0 1.75rem 0;
  }
}

/* =====================================================
   FEATURE SECTION — SINGLE REUSABLE BLOCK (LOCKED)
   ===================================================== */

.feature {
  position: relative;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

/* BASE OVERLAY — DEFAULT (DARK FEATURE, e.g. KPA) */
.feature::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(28, 87, 105, 0.65),
    rgba(0, 0, 0, 0.75)
  );
  z-index: 0;
}

/* CONTAINER */
.feature .container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 520px;
}

/* CONTENT BLOCK */
.feature-content {
  max-width: 520px;
}

/* RIGHT-ALIGNED TEXT */
.feature--right .container {
  justify-content: flex-end;
}

/* DARK FEATURE — FORCE LIGHT TEXT (KPA) */
.feature--dark,
.feature--dark h1,
.feature--dark h2,
.feature--dark h3,
.feature--dark p {
  color: var(--white);
}

/* LIGHT FEATURE — SOFT WHITE WASH (ZONEGUARD) */
.feature--light::before {
  background: rgba(255, 255, 255, 0.05);
}

/* LIGHT FEATURE — DEFAULT TEXT COLOR */
.feature--light,
.feature--light h1,
.feature--light h2,
.feature--light h3,
.feature--light p {
  color: var(--blue-primary);
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .feature .container {
    min-height: 420px;
  }

  .feature-content {
    max-width: 100%;
  }
}

/* =====================================================
   SPLIT CARDS — FINAL, EDITORIAL, LOCKED
   ===================================================== */

.split-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.25rem;
}

.card {
  display: flex;
  flex-direction: column;
}

/* IMAGE */
.card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

/* VERY LIGHT OVERLAY — ALWAYS ON */
.card-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.45); /* almost white */
  transition: background 0.25s ease;
}

/* SLIGHT DARKEN ON HOVER */
.card:hover .card-image::before {
  background: rgba(255, 255, 255, 0.30);
}

/* TEXT BELOW IMAGE */
.card-content {
  margin-top: 1.25rem;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .split-grid {
    grid-template-columns: 1fr;
  }
}

/* =====================================================
   SECTION VARIANTS
   ===================================================== */

.section-light { background-color: var(--white); }
.section-soft { background-color: var(--gray-light); }
.section-dark { background-color: var(--blue-primary); }

.section-dark * { color: var(--white); }

/* =====================================================
   PRODUCT CARDS — 4-UP GRID (VISIBLE GREY CARDS)
   ===================================================== */

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.25rem;
}

/* CARD SURFACE — THIS IS THE FIX */
.product-card {
  display: flex;
  flex-direction: column;
  background-color: #eef1f4; /* STRONGER GREY */
  padding: 1.75rem;
}

/* IMAGE */
.product-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

/* VERY LIGHT OVERLAY */
.product-card-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.35);
  transition: background 0.25s ease;
}

/* HOVER */
.product-card:hover .product-card-image::before {
  background: rgba(255, 255, 255, 0.2);
}

/* TEXT */
.product-card-content {
  margin-top: 1.25rem;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

/* =====================================================
   PRODUCTS PAGE — ENTERPRISE GRID (BOSCH / GRUNDFOS STYLE)
   ===================================================== */

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3.25rem;
}

.products-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  background-color: #ffffff;
  padding: 3rem 2.75rem;

  border: 1px solid #e5e9ef;
  border-radius: 2px;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

/* Hover — controlled, not flashy */
.products-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.06);
  border-color: #d7dde5;
}

.products-card h3 {
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 1.25rem;
  font-size: 1.45rem;
}

.products-card p {
  margin-bottom: 2rem;
  max-width: none;
  font-size: 1.05rem;
  line-height: 1.6;
  color: #4a5663; /* softer enterprise tone */
}

/* Button alignment */
.products-card .btn {
  margin-top: auto;
}

/* RESPONSIVE */

@media (max-width: 1100px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
}

@media (max-width: 600px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .products-card {
    padding: 2.25rem;
  }
}

/* =====================================================
   SERIES GRID — CATEGORY PAGES (STACKED FULL WIDTH)
   ===================================================== */

.series-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

/* SERIES CARD — FULL WIDTH INDUSTRIAL BLOCK */
.series-grid .product-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 3rem;
  padding: 2rem 2.5rem;
}

/* IMAGE WRAPPER — RESTRAINED & CONTROLLED */
.series-grid .product-card-image {
  flex: 0 0 240px;
  height: 200px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* TEXT */
.series-grid .product-card-content {
  margin-top: 0;
  max-width: none;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .series-grid .product-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .series-grid .product-card-image {
    width: 100%;
    height: 220px;
  }
}

/* =====================================================
   SUPPORT GRID — ENGINEERING & SERVICE (CATEGORY PAGES)
   ===================================================== */

.support-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.75rem;
  align-items: stretch;
}

/* SUPPORT CARD — ELEVATED INDUSTRIAL STYLE */
.support-card {
  padding: 2.25rem 2.5rem;
  background-color: var(--gray-light);
  border-top: 3px solid var(--blue-primary);
  transition: box-shadow 0.25s ease;

  display: flex;
  flex-direction: column;
}

.support-card:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

/* HEADING */
.support-card h3 {
  font-weight: 500; /* reduced weight */
  color: var(--blue-secondary);
  letter-spacing: -0.01em;
  margin-bottom: 1.1rem;
}

/* TEXT */
.support-card p {
  margin-bottom: 1.5rem;
  max-width: none;
  flex-grow: 1;
}

/* BUTTON ALIGNMENT */
.support-card .btn {
  margin-top: auto;
  align-self: flex-start;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .support-grid {
    grid-template-columns: 1fr;
  }
}

/* =====================================================
   SECTION VARIANT — SUPPORT BACKGROUND
   ===================================================== */

.section-support {
  background-color: #e3e9f0; /* controlled neutral grey for support sections */
}


/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 900px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2rem; }

  .split-grid { grid-template-columns: 1fr; }

  .section {
    padding: var(--section-padding-mobile) 0;
  }

  .container {
    padding-left: var(--container-padding-mobile);
    padding-right: var(--container-padding-mobile);
  }

  .hero .container {
    min-height: 85vh;
  }

  .hero-content {
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  h1 { font-size: 2.4rem; }
  p { font-size: 1.05rem; }
}



/* =====================================================
   CASE STUDIES LAYOUT — ENTERPRISE REFINED
   ===================================================== */

.case-studies-section {
  padding: 4.0rem 0;
  background-color: #f5f7fa;
}

.case-studies-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 4rem;
  padding: 0 3rem;
}

/* =====================================================
   FILTER PANEL
   ===================================================== */

.case-filter-panel {
  background: #ffffff;
  padding: 2.75rem;
  border: 1px solid #e3e8ef;
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.03);
  height: fit-content;
}

.case-filter-panel h3 {
  margin-bottom: 2.25rem;
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.filter-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.85rem;
}

.filter-group label {
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: var(--blue-primary);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.filter-group input,
.filter-group select {
  padding: 0.9rem 1rem;
  font-family: var(--font-main);
  font-size: 0.95rem;
  border: 1px solid #d6dde6;
  background-color: #ffffff;
  border-radius: 3px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-group input:hover,
.filter-group select:hover {
  border-color: var(--blue-secondary);
}

.filter-group input:focus,
.filter-group select:focus {
  outline: none;
  border-color: var(--blue-secondary);
  box-shadow: 0 0 0 3px rgba(14, 95, 163, 0.12);
}

/* =====================================================
   RESULTS GRID
   ===================================================== */

.case-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.75rem;
  align-items: start;
  grid-auto-rows: min-content;
}

/* =====================================================
   CASE CARD
   ===================================================== */

.case-card {
  background: #ffffff;
  border: 1px solid #e3e8ef;
  border-radius: 4px;
  padding: 2.25rem 2.25rem 2rem 2.25rem;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.case-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.06);
  border-color: #d7dde5;
}

.case-card h4 {
  margin: 0 0 0.75rem 0;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.case-card p {
  margin-bottom: 1.25rem;
  color: #4a5663;
  font-size: 1.02rem;
  line-height: 1.6;
  max-width: none;
}

/* subtle divider above meta */
.case-card::after {
  content: "";
  display: block;
  height: 1px;
  background: #eef2f6;
  margin: 1.5rem 0 1rem 0;
}

.case-meta {
  font-size: 0.85rem;
  color: #66717d;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 1100px) {

  .case-studies-wrapper {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

.case-results {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.75rem;
  align-items: stretch;
  grid-auto-rows: auto;
}

}

@media (max-width: 750px) {

  .case-results {
    grid-template-columns: 1fr;
  }

.case-results:empty::before {
  content: "No documentation matches your current filter selection.";
  display: block;
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1rem;
  color: #66717d;
  font-size: 1.1rem;
}

  .case-studies-wrapper {
    padding: 0 1.5rem;
  }

}

.case-back-link {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--blue-secondary);
  text-decoration: none;
  margin-bottom: 2rem;
  transition: opacity 0.2s ease;
}

.case-back-link:hover {
  opacity: 0.7;
}

/* =====================================================
   RELATED CASE STUDIES — PRODUCT PAGE
   ===================================================== */

.related-case-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.25rem;
}

.related-case-card {
  background-color: #162b3d;
  padding: 2rem;
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.related-case-card h3 {
  color: #ffffff;
  font-weight: 500;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.related-case-card p {
  color: rgba(255,255,255,0.75);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: none;
}

.related-case-card .btn {
  align-self: flex-start;
  border-color: #ffffff;
  color: #ffffff;
}

.related-case-card .btn:hover {
  background-color: #ffffff;
  color: #0f1f2e;
}

/* Responsive */
@media (max-width: 900px) {
  .related-case-grid {
    grid-template-columns: 1fr;
  }
}

/* Push button to bottom so all align */
.related-case-card .btn {
  margin-top: auto;
}

/* =====================================================
   DOCUMENTATION CARD MODIFIER — TECHNICAL STYLE
   Scoped to Documentation Only
   ===================================================== */

.case-card--doc {
  padding: 1.75rem 1.75rem 1.5rem 1.75rem;
}

/* Title — slightly tighter, more technical tone */
.case-card--doc h4 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--blue-secondary);
  margin-bottom: 0.75rem;
}

/* Meta line */
/* =====================================================
   DOCUMENT META — ENGINEERED REFINEMENT
   ===================================================== */

.case-card--doc .case-meta {
  margin-bottom: 1rem;
  font-size: 0.82rem;
  color: #6b7682;
  letter-spacing: 0.03em;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  line-height: 1.4;
}

.case-card--doc .case-meta span {
  display: inline-flex;
  align-items: center;
}

.case-card--doc .meta-separator {
  margin: 0 0.65rem;
  color: #c7ced6;
  font-weight: 400;
}

/* Subtle structural divider (documentation only) */
.case-card--doc .case-meta::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  background: #eef2f6;
  margin-top: 1rem;
}

/* Description — tighter and more utilitarian */
.case-card--doc p {
  font-size: 0.98rem;
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

/* Remove decorative divider from case study cards */
.case-card--doc::after {
  display: none;
}

/* Download button — full width for documentation clarity */
.case-card--doc .btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

/* PDF Icon */
.doc-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
}

/* =====================================================
   CASE CARD — FORCE UNIFORM HEIGHT + BUTTON ALIGNMENT
   ===================================================== */

.case-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.case-card-inner {
  flex-grow: 1;
}

.case-summary {
  display: -webkit-box;
  -webkit-line-clamp: 4;      /* number of lines shown */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.case-read-more {
  margin-top: auto;
}

/* =====================================================
   RELATED CASE STUDIES — FORCE PERFECT CARD ALIGNMENT
   ===================================================== */

.related-case-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Title height lock */
.related-case-card h3 {
  min-height: 3.2em;
}

/* THIS is the blue line you mentioned */
.related-case-meta {
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.75rem;
  min-height: 2.2em;
}

/* Clamp description to equal height */
.related-case-summary {
  display: -webkit-box;
  -webkit-line-clamp: 4;     /* number of lines shown */
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1.75rem;
}


