/*
 * Eptamed — Case Study (prima e dopo).
 * Tutto è scoped su .csx-cs-root. Le regole con !important servono a
 * resistere agli stili del tema sui bottoni e sulle immagini.
 */

.csx-cs-root,
.csx-cs-root *,
.csx-cs-root *::before,
.csx-cs-root *::after {
  box-sizing: border-box;
}

.csx-cs-root {
  --navy: #134169;
  --navy-dark: #0E2E4B;
  --navy-xd: #081E33;
  --navy-light: #E8EFF8;
  --terra: #BC5A29;
  --off: #F4F6FA;
  --bd: #DDE3EC;
  --bd-l: #EBF0F6;
  --txt: #0D1924;
  --txt-mid: #3A4E63;
  --txt-muted: #6C7F96;
  --ease: cubic-bezier(.16, 1, .3, 1);
  font-family: var(--font-body, 'Familjen Grotesk', -apple-system, sans-serif);
  background: var(--off);
  color: var(--txt);
  line-height: 1.6;
}

.csx-cs-root img {
  display: block;
  max-width: 100%;
}

/* HERO */
.csx-hero {
  background: linear-gradient(150deg, var(--navy-xd) 0%, var(--navy-dark) 55%, #193E6B 100%);
  padding: 100px 48px 88px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.csx-hero::after {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(188, 90, 41, .15) 0%, transparent 70%);
  pointer-events: none;
}

.csx-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .45);
  margin-bottom: 22px;
}

.csx-hero-title {
  font-family: var(--font-heading, Georgia, serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(2.25rem, 4vw + .75rem, 3.875rem);
  color: #fff;
  line-height: 1.1;
  margin: 0 0 18px;
}

.csx-hero-title em {
  font-style: normal;
  color: rgba(255, 255, 255, .78);
}

.csx-hero-sub {
  font-size: clamp(1rem, .8vw + .55rem, 1.125rem);
  color: rgba(255, 255, 255, .58);
  max-width: 54ch;
  margin: 0 auto 44px;
  line-height: 1.75;
}

.csx-hero-stats {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 18px;
  overflow: hidden;
}

.csx-hero-stat {
  padding: 18px 32px;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, .10);
}

.csx-hero-stat:last-child {
  border-right: none;
}

.csx-hero-stat-n {
  font-family: var(--font-heading, Georgia, serif);
  font-size: 1.875rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.csx-hero-stat-l {
  font-size: .75rem;
  color: rgba(255, 255, 255, .45);
  margin-top: 5px;
}

/* FILTRI */
.csx-filter-bar {
  position: sticky;
  top: 76px;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--bd);
}

.csx-filter-inner {
  max-width: 1560px;
  margin: 0 auto;
  padding: 10px 48px;
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.csx-filter-inner::-webkit-scrollbar {
  display: none;
}

.csx-cs-root .csx-fbtn {
  flex-shrink: 0 !important;
  padding: 8px 20px !important;
  height: auto !important;
  min-height: 0 !important;
  border-radius: 999px !important;
  border: 1.5px solid var(--bd) !important;
  background: #fff !important;
  font-family: inherit !important;
  font-size: .875rem !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  color: var(--txt-mid) !important;
  cursor: pointer;
  white-space: nowrap;
  transition: all 130ms ease;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: none !important;
  margin: 0 !important;
}

.csx-cs-root .csx-fbtn:hover {
  border-color: var(--navy) !important;
  color: var(--navy) !important;
}

.csx-cs-root .csx-fbtn.active {
  background: var(--navy-dark) !important;
  border-color: var(--navy-dark) !important;
  color: #fff !important;
}

/* CASI */
.csx-cases-wrap {
  max-width: 1560px;
  margin: 0 auto;
  padding: 56px 48px 100px;
}

.csx-cases {
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.csx-cs {
  background: #fff;
  border-radius: 24px;
  border: 1px solid var(--bd-l);
  box-shadow: 0 8px 40px -12px rgba(14, 46, 75, .10);
  overflow: hidden;
}

.csx-cs[hidden] {
  display: none;
}

.csx-cs-inner {
  display: grid;
  grid-template-columns: 440px 1fr;
  min-height: 480px;
}

.csx-cs-info {
  padding: 44px 40px 36px;
  border-right: 1px solid var(--bd-l);
  display: flex;
  flex-direction: column;
}

.csx-cs-num {
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 6px;
}

.csx-cs-title {
  font-family: var(--font-heading, Georgia, serif);
  font-size: clamp(1.1rem, 1.2vw + .3rem, 1.625rem);
  font-weight: 400;
  color: var(--txt);
  line-height: 1.3;
  margin: 0 0 18px;
}

.csx-cs-metas {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--bd-l);
}

.csx-cs-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .875rem;
  color: var(--txt-mid);
}

.csx-cs-meta svg {
  flex-shrink: 0;
  opacity: .55;
}

.csx-cs-sh {
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--txt-muted);
  margin: 18px 0 6px;
}

.csx-cs-sh:first-of-type {
  margin-top: 0;
}

.csx-cs-diag {
  font-size: .875rem;
  color: var(--txt-mid);
  line-height: 1.72;
  margin: 0;
}

.csx-cs-res {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.csx-cs-res li {
  font-size: .875rem;
  color: var(--txt);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
}

.csx-chk {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(188, 90, 41, .10);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.csx-chk svg {
  width: 9px;
  height: 9px;
}

.csx-cs-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: auto;
  padding-top: 18px;
}

.csx-cs-tag {
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--navy-light);
  color: var(--navy);
}

.csx-cs-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--off);
  padding: 20px;
}

/* CURSORE PRIMA/DOPO */
.csx-cs-root .csx-ba {
  position: relative !important;
  border-radius: 14px;
  overflow: hidden !important;
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  flex: none;
  aspect-ratio: 2 / 1;
  width: 100%;
  background: var(--navy-dark);
}

.csx-cs-root .csx-ba img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

.csx-cs-root .csx-ba-before {
  clip-path: inset(0 50% 0 0) !important;
  filter: grayscale(20%) brightness(.8) contrast(1.1) saturate(.55) !important;
}

.csx-cs-root .csx-ba-div {
  position: absolute !important;
  top: 0 !important;
  bottom: 0 !important;
  left: 50% !important;
  width: 3px !important;
  background: rgba(255, 255, 255, .92) !important;
  transform: translateX(-50%) !important;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .12), 0 0 14px rgba(0, 0, 0, .22) !important;
  pointer-events: none !important;
}

.csx-cs-root .csx-ba-handle {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 46px !important;
  height: 46px !important;
  border-radius: 50% !important;
  background: #fff !important;
  box-shadow: 0 2px 18px rgba(0, 0, 0, .28) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  pointer-events: none !important;
  color: var(--navy-dark);
}

.csx-cs-root .csx-ba-lbl {
  position: absolute !important;
  top: 14px !important;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff !important;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .45) !important;
  pointer-events: none !important;
}

.csx-cs-root .csx-ba-lbl-l {
  left: 14px !important;
}

.csx-cs-root .csx-ba-lbl-r {
  right: 14px !important;
}

.csx-cs-hint {
  text-align: center;
  font-size: .8125rem;
  color: var(--txt-muted);
  padding-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
  .csx-cs-inner {
    grid-template-columns: 380px 1fr;
  }
}

@media (max-width: 860px) {
  .csx-cs-inner {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .csx-cs-info {
    border-right: none;
    border-bottom: 1px solid var(--bd-l);
    padding: 28px 24px;
  }

  .csx-filter-inner,
  .csx-cases-wrap {
    padding-left: 24px;
    padding-right: 24px;
  }

  .csx-cases-wrap {
    padding-top: 36px;
    padding-bottom: 72px;
  }

  .csx-cases {
    gap: 40px;
  }
}

@media (max-width: 600px) {
  .csx-hero {
    padding: 80px 24px 70px;
  }

  .csx-hero-stats {
    flex-direction: column;
    border-radius: 14px;
  }

  .csx-hero-stat {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, .10);
  }

  .csx-hero-stat:last-child {
    border-bottom: none;
  }

  .csx-cs-right {
    padding: 14px;
  }

  .csx-cs-root .csx-ba {
    aspect-ratio: 16 / 9;
  }
}
