/* ============================================================
   Cortexia — Main Site Stylesheet
   Colours: #203260 (dark blue), #4b7abd (mid blue), #fff
   Font: Open Sans
   ============================================================ */

:root {
  --bd:   #203260;   /* blue dark  */
  --bm:   #4b7abd;   /* blue mid   */
  --bl:   #d6e4f7;   /* blue light */
  --bp:   #f4f7fc;   /* blue pale  */
  --wh:   #ffffff;
  --tx:   #333333;
  --mu:   #666666;
  --header-h: 75px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--tx);
  background: var(--wh);
}
img { max-width: 100%; display: block; }
a { color: var(--bm); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--bd); font-weight: 700; line-height: 1.2; }
p  { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }
ul { list-style: none; }
video { width: 100%; border-radius: 4px; display: block; }


/* ── LAYOUT HELPERS ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}
.section { padding: 5rem 0; }
.section.bg-light { background: var(--bp); }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
@media (max-width: 800px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}


/* ── BUTTONS ── */
.btn {
  display: inline-block;
  background: var(--bm);
  color: var(--wh);
  padding: .6rem 1.5rem;
  border: 2px solid var(--bm);
  border-radius: 3px;
  font-weight: 600;
  font-size: .88rem;
  letter-spacing: .04em;
  transition: background .2s, color .2s;
  cursor: pointer;
}
.btn:hover { background: var(--bd); border-color: var(--bd); text-decoration: none; color: var(--wh); }

.btn-outline {
  background: transparent;
  border: 2px solid var(--bm);
  color: var(--bm);
}
.btn-outline:hover { background: var(--bm); color: var(--wh); }

.btn-dark {
  background: var(--bd);
  border-color: var(--bd);
  color: var(--wh);
  font-size: .85rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.btn-dark:hover { background: #162244; border-color: #162244; color: var(--wh); }


/* ══════════════════════════════════════
   HEADER
   — transparent over the hero, turns dark on scroll
   — .scrolled class added by the 4-line JS at bottom of page
══════════════════════════════════════ */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  gap: 1.5rem;
  background: rgba(32,50,96,0);        /* transparent by default */
  transition: background .3s, box-shadow .3s;
}
header.scrolled,
header.solid {
  background: rgba(32,50,96,1);
  box-shadow: 0 2px 12px rgba(32,50,96,.3);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-shrink: 0;
  text-decoration: none;
}
.logo img { height: 36px; }
.logo-tagline {
  color: rgba(255,255,255,.65);
  font-size: .7rem;
  letter-spacing: .06em;
  line-height: 1;
  white-space: nowrap;
}
.logo:hover { opacity: .88; text-decoration: none; }

/* Main nav */
header nav { flex: 1; }
header nav > ul {
  display: flex;
  align-items: center;
  gap: .15rem;
}
header nav a {
  display: block;
  color: rgba(255,255,255,.9);
  padding: .45rem .75rem;
  border-radius: 3px;
  font-size: .88rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}
header nav a:hover,
header nav a.active {
  color: var(--wh);
  background: rgba(255,255,255,.15);
  text-decoration: none;
}

/* Dropdown */
.has-dropdown { position: relative; }
.has-dropdown > ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--wh);
  min-width: 210px;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  padding: .4rem 0;
  padding-top: .65rem;  /* bridges the gap so hover isn't lost mid-air */
  margin-top: 0;
  z-index: 200;
}
.has-dropdown:hover > ul { display: block; }
.has-dropdown > ul a {
  color: var(--tx);
  padding: .5rem 1.2rem;
  font-size: .87rem;
  border-radius: 0;
  background: none;
}
/* Override the white-text active rule for dropdown items (white bg) */
.has-dropdown > ul a.active {
  color: var(--bd);
  background: var(--bl);
  font-weight: 700;
}
.has-dropdown > ul a:hover { background: var(--bp); color: var(--bd); }

/* Language switcher */
.lang-switcher {
  display: flex;
  gap: .2rem;
  flex-shrink: 0;
}
.lang-switcher a {
  color: rgba(255,255,255,.65);
  font-size: .8rem;
  font-weight: 600;
  padding: .25rem .45rem;
  border-radius: 3px;
  border: 1px solid transparent;
}
.lang-switcher a:hover,
.lang-switcher a.active {
  color: var(--wh);
  border-color: rgba(255,255,255,.45);
  text-decoration: none;
}

/* Mobile burger */
.burger { display: none; }
#nav-toggle { display: none; }

@media (max-width: 960px) {
  header nav, .lang-switcher { display: none; }
  .burger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-left: auto;
    cursor: pointer;
    padding: .5rem;
  }
  .burger span {
    display: block;
    width: 24px; height: 2px;
    background: var(--wh);
    border-radius: 2px;
  }
  #nav-toggle:checked ~ nav,
  #nav-toggle:checked ~ .lang-switcher { display: flex; }
  #nav-toggle:checked ~ nav {
    position: absolute;
    top: var(--header-h); left: 0; right: 0;
    background: var(--bd);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
  }
  #nav-toggle:checked ~ nav > ul { flex-direction: column; width: 100%; }
  .has-dropdown > ul { position: static; box-shadow: none; background: rgba(0,0,0,.15); }
}


/* ══════════════════════════════════════
   HERO SLIDES
   Two slides crossfade via CSS animation.
   First slide is visible immediately (opacity:1 at 0%).
   Full viewport height, content centered.
══════════════════════════════════════ */
.hero-slides {
  position: relative;
  height: 100vh;
  min-height: 520px;
  overflow: hidden;
}

.hero-slides .slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;   /* clips the zoomed background layer */
  opacity: 0;
}

/* Background image layer — animates independently of text content */
.slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  animation: kenburns 7s ease-in-out infinite;
  transform-origin: center center;
  will-change: transform;
}

@keyframes kenburns {
  0%   { transform: scale(1);    }
  100% { transform: scale(1.12); }
}

/* Dark overlay — sits above .slide-bg, below .slide-inner */
.hero-slides .slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(32,50,96,.52);
  z-index: 1;
}

/* 3 slides × 7 s each = 21 s cycle.
   Each slide is visible for ~6 s then fades out over 1 s. */
.hero-slides .slide:nth-child(1) { animation: crossfade 21s  0s infinite; }
.hero-slides .slide:nth-child(2) { animation: crossfade 21s  7s infinite; }
.hero-slides .slide:nth-child(3) { animation: crossfade 21s 14s infinite; }

@keyframes crossfade {
  0%    { opacity: 1; }
  28.5% { opacity: 1; }   /* stay visible for 6 / 21 = 28.5 % */
  33.3% { opacity: 0; }   /* fade out over 1 s */
  95%   { opacity: 0; }
  100%  { opacity: 1; }
}

/* Content inside each slide — above overlay (z-index:1) */
.slide-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  justify-content: center;
}

/* Decorative corner bracket frame */
.slide-bracket {
  text-align: center;
  color: var(--wh);
  max-width: 660px;
  padding: 2.5rem 3rem;
  position: relative;
}
/* Four corner brackets drawn with pseudo-elements on child divs */
.slide-bracket::before,
.slide-bracket::after {
  content: '';
  position: absolute;
  width: 60px;
  height: 60px;
  border-color: rgba(255,255,255,.6);
  border-style: solid;
}
.slide-bracket::before {
  top: 0; left: 0;
  border-width: 2px 0 0 2px;
}
.slide-bracket::after {
  bottom: 0; right: 0;
  border-width: 0 2px 2px 0;
}
/* Two more corners via inner spans — simulated with box-shadow */
.slide-bracket .bracket-tl,
.slide-bracket .bracket-br { display: none; } /* handled by pseudo */

/* Additional corners (top-right, bottom-left) using a wrapper trick */
.slide-bracket {
  --bc: rgba(255,255,255,.6);
  box-shadow:
    calc(100% - 60px) 0 0 0 var(--bc),   /* top-right horizontal */
    0 calc(100% - 60px) 0 0 var(--bc);   /* bottom-left vertical  */
}
/* Simpler 4-corner approach: outline corners via gradient */
.slide-bracket {
  background:
    linear-gradient(var(--bc), var(--bc)) top    left  / 60px 2px no-repeat,
    linear-gradient(var(--bc), var(--bc)) top    left  / 2px 60px no-repeat,
    linear-gradient(var(--bc), var(--bc)) top    right / 60px 2px no-repeat,
    linear-gradient(var(--bc), var(--bc)) top    right / 2px 60px no-repeat,
    linear-gradient(var(--bc), var(--bc)) bottom left  / 60px 2px no-repeat,
    linear-gradient(var(--bc), var(--bc)) bottom left  / 2px 60px no-repeat,
    linear-gradient(var(--bc), var(--bc)) bottom right / 60px 2px no-repeat,
    linear-gradient(var(--bc), var(--bc)) bottom right / 2px 60px no-repeat;
  /* override the box-shadow trick */
  box-shadow: none;
}
.slide-bracket::before,
.slide-bracket::after { display: none; } /* handled by gradient bg */

.hero-label {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255,255,255,.75);
  margin-bottom: .75rem;
}
.slide-bracket h1 {
  color: var(--wh);
  font-size: 2.6rem;
  text-transform: uppercase;
  line-height: 1.1;
  margin: .5rem 0 1rem;
  text-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.hero-sub {
  font-size: 1rem;
  color: rgba(255,255,255,.88);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .slide-bracket h1 { font-size: 1.7rem; }
  .slide-bracket { padding: 2rem 1.5rem; }
  .hero-slides { height: 80vh; }
}

/* Slide navigation dots — right side, vertical */
.slide-dots {
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: .7rem;
  z-index: 2;
}
.slide-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.6);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background .3s, border-color .3s, transform .2s;
}
.slide-dots button.active {
  background: var(--wh);
  border-color: var(--wh);
  transform: scale(1.2);
}
.slide-dots button:hover:not(.active) {
  border-color: rgba(255,255,255,.9);
}


/* ══════════════════════════════════════
   INTRO SECTION
══════════════════════════════════════ */
.intro-section { padding-top: 4rem; padding-bottom: 4rem; }

.intro-image { display: flex; flex-direction: column; }
.intro-image img { border-radius: 4px; width: 100%; }

/* Full-width dark contact bar below image */
.btn-contact-bar {
  display: block;
  background: var(--bd);
  color: var(--wh);
  text-align: center;
  padding: .85rem 1rem;
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: background .2s;
}
.btn-contact-bar:hover { background: #162244; color: var(--wh); text-decoration: none; }

/* Right column — blue left accent */
.intro-text {
  border-left: 4px solid var(--bm);
  padding-left: 2rem;
}
.intro-text h2 {
  text-transform: uppercase;
  font-size: 1.3rem;
  line-height: 1.35;
  color: var(--bd);
  margin-bottom: 1rem;
}
.intro-text p { color: var(--mu); }
.intro-text strong { color: var(--tx); }

/* Check list */
.check-list {
  margin-top: .5rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.check-list li {
  color: var(--mu);
  display: flex;
  align-items: center;
  gap: .6rem;
}
.check-list li::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background: var(--bm);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/contain no-repeat;
}


/* ══════════════════════════════════════
   SECTION TITLE (centred, with bracket decoration)
══════════════════════════════════════ */
.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  padding-left: 1rem;  /* space for bracket */
}
.section-title h2 {
  text-transform: uppercase;
  font-size: 1.5rem;
  letter-spacing: .05em;
  display: inline-block;
  position: relative;
}
/* Blue dash under title */
.section-title h2::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--bm);
  margin: .5rem auto 0;
}
.section-title p {
  color: var(--mu);
  margin-top: .5rem;
  font-size: .95rem;
}
/* Left bracket accent on section titles */
.section-title::before {
  content: '';
  position: absolute;
  left: 0; top: 0;
  width: 4px; height: 100%;
  background: var(--bm);
  border-radius: 2px;
  display: none; /* only shown where needed — enable per-section */
}


/* ══════════════════════════════════════
   PROMISE CARDS (icon + title + text + link)
══════════════════════════════════════ */
.promise-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .75rem;
  background: var(--wh);
  padding: 1.5rem;
  border: 1px solid var(--bl);
  border-radius: 4px;
}
.promise-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 0.5rem;
  display: block;
  align-self: center;
}
.promise-icon svg { width: 100%; height: 100%; }
.promise-card h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--bd);
  border-bottom: 1px solid var(--bl);
  padding-bottom: .5rem;
  width: 100%;
}
.promise-card p { color: var(--mu); font-size: .9rem; flex: 1; }
.promise-link {
  font-size: .82rem;
  font-weight: 600;
  color: var(--bm);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-top: auto;
}
.promise-link:hover { color: var(--bd); text-decoration: none; }


/* ══════════════════════════════════════
   CTA STRIP — horizontal, newsletter
══════════════════════════════════════ */
.cta-strip {
  background: var(--bm);
  color: var(--wh);
  padding: 1.75rem 0;
}
.cta-strip-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.cta-strip p {
  font-size: .95rem;
  margin: 0;
  max-width: 520px;
  line-height: 1.5;
}
@media (max-width: 900px) {
  .cta-strip-inner { flex-direction: column; align-items: flex-start; }
}


/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
footer { background: var(--bd); color: rgba(255,255,255,.75); }

/* Contact bar at top of footer */
.footer-contact {
  border-bottom: 1px solid rgba(255,255,255,.12);
  padding: 1.75rem 0;
}
/* Same container as footer-grid — items spread evenly across that width */
.footer-contact-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-contact > span,
.footer-contact-inner > span {
  display: flex;
  align-items: center;
  gap: .85rem;
  font-size: .9rem;
  color: rgba(255,255,255,.85);
}
.footer-contact a { color: rgba(255,255,255,.85); }
.footer-contact a:hover { color: var(--wh); text-decoration: none; }

/* Icon in white circle */
.contact-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--wh);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--bd);
}
.contact-icon svg { stroke: var(--bd); }

@media (max-width: 700px) {
  .footer-contact-inner { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
}

/* Main footer grid */
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding: 3rem 0 2.5rem;
}
footer img { margin-bottom: .75rem; }
footer p  { font-size: .88rem; line-height: 1.7; }
footer h4 {
  color: var(--wh);
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: .75rem;
}
/* Blue underline on footer headings */
footer h4::after {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--bm);
  margin-top: .3rem;
}
footer nav ul { display: flex; flex-direction: column; gap: .4rem; }
footer nav li::before { content: '—'; margin-right: .4rem; opacity: .4; font-size: .8rem; }
footer nav a { color: rgba(255,255,255,.7); font-size: .88rem; }
footer nav a:hover { color: var(--wh); text-decoration: none; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  text-align: center;
  padding: 1rem;
  font-size: .78rem;
  color: rgba(255,255,255,.35);
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin-top: .5rem;
}
.social-links a {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .3rem .6rem;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 4px;
  color: rgba(255,255,255,.8);
  text-decoration: none;
  font-size: .82rem;
  transition: background .15s, color .15s;
  align-self: flex-start;
}
.social-links a:hover {
  background: rgba(255,255,255,.12);
  color: var(--wh);
  border-color: rgba(255,255,255,.5);
}
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  background: rgba(255,255,255,.12);
  border-radius: 3px;
  font-weight: 700;
  font-size: .8rem;
  flex-shrink: 0;
}
.social-label {
  font-size: .8rem;
  letter-spacing: .01em;
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cta-strip { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-contact-inner { flex-direction: column; gap: 1rem; }
}


/* ── INNER PAGE HERO (static, no slideshow) ── */
.hero {
  min-height: 420px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  position: relative;
  margin-top: var(--header-h);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(32,50,96,.55);
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem;
  color: var(--wh);
}
.hero-inner h1 {
  color: var(--wh);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  max-width: 700px;
  margin-top: .5rem;
}

/* ── LEAD PARAGRAPH ── */
.lead {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--bd);
  margin-bottom: 1rem;
}

/* ── CASE STUDY CARDS ── */
.case-studies {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}
.case-card {
  border: 1px solid var(--bl);
  border-radius: 4px;
  overflow: hidden;
}
.case-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

/* Portrait layout: image left, text right */
.case-card--portrait {
  display: flex;
  flex-direction: row;
  align-items: center;
}
.case-card--portrait img {
  width: 220px;
  height: auto;
  flex-shrink: 0;
  object-fit: contain;
}
.case-card-body {
  padding: 1.5rem;
}
.case-card-body h3 {
  font-size: 1rem;
  margin-bottom: .75rem;
}

/* ── BEFORE / AFTER FIGURES ── */
.before-after {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.before-after figure {
  text-align: center;
}
.before-after figcaption {
  font-size: .82rem;
  color: var(--mu);
  margin-top: .35rem;
}

@media (max-width: 900px) {
  .case-studies { grid-template-columns: 1fr; }
  .before-after { grid-template-columns: 1fr; }
}

/* Case card spanning full grid width (e.g. when it contains a chart) */
.case-card--wide {
  grid-column: 1 / -1;
}
.chart-embed {
  margin-top: 1.5rem;
}


/* ── BEFORE / AFTER COMPARISON SLIDER ── */
.img-compare {
  position: relative;
  overflow: hidden;
  cursor: ew-resize;
  border-radius: 4px;
  user-select: none;
  -webkit-user-select: none;
  /* aspect-ratio locks the container height so both images are identical */
  aspect-ratio: 826 / 396;   /* natural size of the map images */
}
/* Both images fill the container exactly */
.img-compare img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  display: block;
  pointer-events: none;
}
/* "After" image sits behind as the base layer */
.img-compare-after {
  position: absolute;
  inset: 0;
}
/* "Before" image clipped from the left by JS-controlled width */
.img-compare-before {
  position: absolute;
  inset: 0;
  width: 50%;        /* initial split position */
  overflow: hidden;
}
.img-compare-before img {
  /* override: must stay full container width so the image doesn't squish */
  width: 100%;
  min-width: unset;
  max-width: unset;
}
/* Vertical handle bar */
.img-compare-handle {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  z-index: 10;
  pointer-events: none;
}
.img-compare-btn {
  width: 40px; height: 40px;
  background: var(--wh);
  color: var(--bd);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
  flex-shrink: 0;
  margin: auto 0;   /* vertically centered */
}
/* Thin vertical line above and below the button */
.img-compare-handle::before,
.img-compare-handle::after {
  content: '';
  flex: 1;
  width: 2px;
  background: var(--wh);
  opacity: .8;
}
/* Before / After labels */
.img-compare-label {
  position: absolute;
  top: .6rem;
  background: rgba(32,50,96,.75);
  color: var(--wh);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .2rem .55rem;
  border-radius: 3px;
  pointer-events: none;
  white-space: nowrap;
}
.img-compare-label--before { left: .6rem; }
.img-compare-label--after  { right: .6rem; }


/* ── MODULE CARDS (biodéchet ECO Collecte / ECO Waste) ── */
.module-card {
  border: 1px solid var(--bl);
  border-radius: 4px;
  padding: 1.75rem;
}
.module-card-label {
  display: inline-block;
  background: var(--bd);
  color: var(--wh);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  padding: .3rem .75rem;
  border-radius: 3px;
  margin-bottom: .5rem;
}
.module-caption {
  font-size: .8rem;
  color: var(--mu);
  font-style: italic;
  margin-top: -.5rem;
}

/* ── TESTIMONIAL CARDS ── */
.testimonial-card {
  background: var(--wh);
  border: 1px solid var(--bl);
  border-radius: 8px;
  padding: 2rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .6rem;
}
.testi-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bl);
  flex-shrink: 0;
}
.testi-avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bp);
  border: 3px solid var(--bl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--bm);
  flex-shrink: 0;
}
.testi-identity {
  line-height: 1.4;
}
.testi-identity strong {
  display: block;
  color: var(--bd);
  font-size: .95rem;
}
.testi-identity span {
  display: block;
  font-size: .8rem;
  color: var(--mu);
}
.testimonial-quote {
  font-size: 2.5rem;
  line-height: 1;
  color: var(--bl);
  font-family: Georgia, serif;
  margin-top: .4rem;
}
.testimonial-body {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  text-align: left;
  font-size: .88rem;
  line-height: 1.65;
  color: var(--tx);
}
.testimonial-card.is-expanded .testimonial-body {
  display: block;
  overflow: visible;
}
.testi-toggle {
  background: none;
  border: none;
  color: var(--bm);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.testi-toggle:hover { color: var(--bd); }
.testi-toggle[hidden] { display: none; }

/* Case study highlight block */
.case-study-block {
  display: flex;
  align-items: center;
  gap: 3rem;
  background: var(--bd);
  border-radius: 4px;
  padding: 3rem;
  color: var(--wh);
}
.case-study-block h2 {
  color: var(--wh);
  font-size: 1.6rem;
  margin-bottom: .5rem;
}
.case-study-block p {
  color: rgba(255,255,255,.75);
  margin-bottom: 1.5rem;
}
.case-study-block img {
  width: 300px;
  flex-shrink: 0;
  border-radius: 4px;
}
@media (max-width: 760px) {
  .case-study-block { flex-direction: column; gap: 1.5rem; padding: 2rem 1.5rem; }
  .case-study-block img { width: 100%; }
}


/* ── CLEANLINESS CHART ── */
.cleanliness-chart {
  position: relative;
  background: var(--wh);
  border: 1px solid var(--bl);
  border-radius: 4px;
  padding: 1.25rem 1.25rem .75rem;
  margin-top: 1.5rem;
}
.cleanliness-chart canvas {
  width: 100% !important;
}

/* ── YOUTUBE EMBED ── */
.yt-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 4px;
  background: #000;
}
.yt-embed--portrait {
  aspect-ratio: 9 / 16;
  max-width: 360px;   /* portrait videos look huge at full width */
  margin: 0 auto;
}
.yt-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ── TESTIMONIAL VIDEO CARD ── */
.testi-video-card {
  border: 1px solid var(--bl);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.testi-video-card .testi-author {
  padding: .9rem 1.1rem;
  background: var(--bp);
  border-top: 1px solid var(--bl);
}
.testi-video-card .testi-author strong {
  display: block;
  font-size: .9rem;
  color: var(--bd);
}
.testi-video-card .testi-author span {
  display: block;
  font-size: .78rem;
  color: var(--mu);
  line-height: 1.4;
}

/* Portrait testimonial — side-by-side on desktop */
.testi-portrait-wrap {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  grid-column: 1 / -1;   /* spans full width in a grid */
}
.testi-portrait-wrap .yt-embed--portrait {
  flex: 0 0 auto;
}
.testi-portrait-wrap .testi-author-block {
  flex: 1;
  align-self: center;
}
.testi-portrait-wrap .testi-author-block strong {
  font-size: 1rem;
  color: var(--bd);
  display: block;
  margin-bottom: .25rem;
}
.testi-portrait-wrap .testi-author-block span {
  font-size: .85rem;
  color: var(--mu);
}

@media (max-width: 640px) {
  .yt-embed--portrait { max-width: 100%; }
  .testi-portrait-wrap { flex-direction: column; }
  /* Grille témoignages biodéchet : portrait + 2×16:9 */
  .testi-mixed-grid { grid-template-columns: 1fr !important; }
}

/* ── PARTNER GRID ── */
.partner-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
}
.partner-grid img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: .65;
  transition: opacity .2s, filter .2s;
}
.partner-grid img:hover {
  filter: grayscale(0%);
  opacity: 1;
}


/* ══════════════════════════════════════
   HERO — SHORT VARIANT (À Propos pages)
   ══════════════════════════════════════ */
.hero--short {
  min-height: 220px;
}
.hero--short .hero-inner {
  padding: 3rem 2rem;
}
.hero--short .hero-inner h1 {
  font-size: clamp(1.4rem, 3vw, 2rem);
}


/* ══════════════════════════════════════
   QUOTE CARDS (Témoignages)
   ══════════════════════════════════════ */
.quotes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 700px) {
  .quotes-grid { grid-template-columns: 1fr; }
}

.quote-card {
  background: var(--bp);
  border: 1px solid var(--bl);
  border-radius: 4px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.quote-card p {
  font-size: .92rem;
  color: var(--tx);
  font-style: italic;
  line-height: 1.7;
  margin: 0;
  flex: 1;
}
.quote-card footer {
  padding-top: 1rem;
  border-top: 1px solid var(--bl);
}
.quote-card footer strong {
  display: block;
  font-size: .88rem;
  color: var(--bd);
  font-style: normal;
}
.quote-card footer span {
  display: block;
  font-size: .78rem;
  color: var(--mu);
  line-height: 1.4;
}

.quote-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}


/* ══════════════════════════════════════
   TEAM GRID (Équipe)
   ══════════════════════════════════════ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 960px) {
  .team-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}

.team-card {
  background: var(--wh);
  border: 1px solid var(--bl);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.team-card > img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.team-card-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.team-card-body strong {
  font-size: .9rem;
  color: var(--bd);
  display: block;
}
.team-card-body > span {
  font-size: .78rem;
  color: var(--bm);
  font-weight: 600;
  display: block;
  margin-bottom: .35rem;
}
.team-card-body p {
  font-size: .8rem;
  color: var(--mu);
  line-height: 1.5;
  margin: 0;
  flex: 1;
}
.team-card-links {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: .5rem;
}
.team-video-link {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  color: var(--bm);
}
.team-video-link:hover { color: var(--bd); text-decoration: none; }
.team-linkedin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--bm);
  color: var(--wh);
  border-radius: 3px;
  font-size: .75rem;
  font-weight: 700;
  line-height: 1;
  margin-top: .5rem;
  flex-shrink: 0;
  text-decoration: none;
}
.team-linkedin:hover { background: var(--bd); color: var(--wh); text-decoration: none; }
/* When inside .team-card-links, margin-top is handled by the parent flex */
.team-card-links .team-linkedin { margin-top: 0; }


/* ══════════════════════════════════════
   AWARDS LIST (Équipe — distinctions)
   ══════════════════════════════════════ */
.awards-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.awards-list li {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: .75rem 1rem;
  border-left: 3px solid var(--bm);
  background: var(--bp);
  border-radius: 0 4px 4px 0;
  font-size: .9rem;
  color: var(--tx);
}
.award-year {
  flex-shrink: 0;
  font-weight: 700;
  color: var(--bm);
  font-size: .85rem;
  min-width: 2.5rem;
}


/* ══════════════════════════════════════
   NEWS GRID (Actualités)
   ══════════════════════════════════════ */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 900px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 580px) {
  .news-grid { grid-template-columns: 1fr; }
}

.news-card {
  background: var(--wh);
  border: 1px solid var(--bl);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.news-card-img img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.news-card-body {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  flex: 1;
}
.news-card-body--full {
  padding: 1.5rem;
  justify-content: center;
  min-height: 120px;
}
.news-card-body h3 {
  font-size: .92rem;
  color: var(--bd);
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}
.news-card-body p {
  font-size: .82rem;
  color: var(--mu);
  margin: 0;
}
.news-tag {
  display: inline-block;
  background: var(--bl);
  color: var(--bd);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .15rem .5rem;
  border-radius: 3px;
  align-self: flex-start;
}
.news-link {
  display: inline-block;
  margin-top: auto;
  padding-top: .5rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--bm);
}
.news-link:hover { color: var(--bd); text-decoration: none; }

/* ══════════════════════════════════════
   CONTACT PAGE
══════════════════════════════════════ */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 4rem;
  align-items: start;
}
@media (max-width: 860px) {
  .contact-layout { grid-template-columns: 1fr; gap: 2.5rem; }
}

.contact-form-wrap h2,
.contact-offices h2 {
  font-size: 1.4rem;
  color: var(--bd);
  margin-bottom: .5rem;
}
.contact-form-lead {
  font-size: .9rem;
  color: var(--mu);
  margin-bottom: 1.5rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.form-row label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--bd);
}
.form-row input,
.form-row textarea {
  border: 1px solid var(--bl);
  border-radius: 4px;
  padding: .6rem .75rem;
  font-size: .9rem;
  font-family: inherit;
  color: var(--tx);
  background: var(--wh);
  transition: border-color .15s;
  width: 100%;
  box-sizing: border-box;
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--bm);
  box-shadow: 0 0 0 3px rgba(75,122,189,.12);
}
.form-row textarea { resize: vertical; min-height: 130px; }

/* Offices sidebar */
.contact-offices {
  background: var(--bp);
  border: 1px solid var(--bl);
  border-radius: 4px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.office-card {
  border-bottom: 1px solid var(--bl);
  padding-bottom: 1.25rem;
}
.office-card:last-of-type { border-bottom: none; padding-bottom: 0; }
.office-card h3 { font-size: .95rem; color: var(--bd); margin-bottom: .5rem; }
.office-card address { font-style: normal; font-size: .85rem; color: var(--tx); line-height: 1.6; margin-bottom: .4rem; }
.office-card p { font-size: .85rem; margin: .1rem 0; }
.office-card a { color: var(--bm); }
.contact-social h3 { font-size: .95rem; color: var(--bd); margin-bottom: .6rem; }

/* Offices 3-col grid (contact page) */
.offices-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 720px) {
  .offices-grid { grid-template-columns: 1fr; }
}
.offices-grid .office-card {
  background: var(--bp);
  border: 1px solid var(--bl);
  border-radius: 4px;
  padding: 1.75rem;
  border-bottom: none;  /* override sidebar style */
}

/* ── Cookie consent banner ── */
#cx-banner {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9999;
  background: #1a2a4a;
  color: #fff;
  padding: 1rem 1.5rem;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .85rem;
  box-shadow: 0 -2px 12px rgba(0,0,0,.25);
}
#cx-banner p {
  margin: 0;
  flex: 1;
  min-width: 200px;
}
#cx-banner a { color: #8fb8e8; }
.cx-banner-btns {
  display: flex;
  gap: .6rem;
  flex-shrink: 0;
}
#cx-btn-accept {
  background: #4b7abd;
  border: none;
  color: #fff;
  padding: .45rem 1.1rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: .83rem;
  font-family: inherit;
}
#cx-btn-refuse {
  background: transparent;
  border: 1px solid rgba(255,255,255,.45);
  color: #fff;
  padding: .45rem 1.1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: .83rem;
  font-family: inherit;
}


/* ══════════════════════════════════════
   NEWSLETTER FORM — subscription page
══════════════════════════════════════ */
.nl-card {
  background: var(--wh);
  border: 1px solid var(--bl);
  border-radius: 8px;
  padding: 2rem 2rem 1.5rem;
  margin-top: 2rem;
}
.nl-card__title {
  font-size: 1.25rem;
  color: var(--bd);
  margin-top: 0;
  margin-bottom: .75rem;
}
.nl-form__row {
  margin-top: 1.25rem;
}
.nl-form__label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  color: var(--bd);
  margin-bottom: .4rem;
}
.nl-form__field {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
}
.nl-form__input {
  flex: 1;
  min-width: 200px;
  padding: .55rem .85rem;
  border: 1px solid var(--bl);
  border-radius: 4px;
  font-size: .95rem;
  font-family: inherit;
  color: var(--tx);
  background: #fff;
  transition: border-color .2s;
}
.nl-form__input:focus {
  outline: none;
  border-color: var(--bm);
  box-shadow: 0 0 0 3px rgba(75,122,189,.15);
}
.nl-form__btn { flex-shrink: 0; white-space: nowrap; }
.nl-form__msg {
  font-size: .85rem;
  margin: .75rem 0 0;
  min-height: 1.2em;
}
.nl-form__msg--success { color: #276221; }
.nl-form__msg--error   { color: #b91c1c; }
.nl-form__msg--info    { color: var(--bm); }
.nl-form__legal {
  font-size: .78rem;
  color: var(--mu);
  margin-top: 1.25rem;
  border-top: 1px solid var(--bp);
  padding-top: .85rem;
  line-height: 1.55;
}
.nl-form__legal a { color: var(--bm); }
