/* =========================================================
   CRI - PARCOURS INVESTISSEUR MODERN HOVER DESIGN
   FIXED: last link not hovered + left text alignment
   ========================================================= */

:root {
  --cri-path-bg: #0b3d36;
  --cri-path-bg-2: #07352f;
  --cri-path-card: #073930;
  --cri-path-card-dark: #062f28;
  --cri-path-orange: #e9784e;
  --cri-path-orange-2: #ff936d;
  --cri-path-white: #ffffff;
  --cri-path-muted: rgba(255, 255, 255, 0.82);
}

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

.cri-path-modern-section {
  background:
    radial-gradient(circle at 50% -10%, rgba(233, 120, 78, 0.09), transparent 35%),
    radial-gradient(circle at 15% 65%, rgba(255, 255, 255, 0.035), transparent 30%),
    linear-gradient(135deg, var(--cri-path-bg) 0%, var(--cri-path-bg-2) 100%) !important;
  overflow: hidden;
}

.cri-path-modern-section .container,
.cri-path-modern-section .custom-container {
  width: 100% !important;
  max-width: 100% !important;
  padding-left: 65px !important;
  padding-right: 65px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.cri-path-modern {
  width: 100%;
  min-height: calc(100svh - 130px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 34px 0 42px;
}

/* ================= TITLE ================= */

.cri-path-modern .tp-event-title-wrap {
  margin-bottom: 42px !important;
}

.cri-path-modern .tp-section-title {
  color: #ffffff !important;
}

.cri-path-modern .tp-section-title strong {
  color: var(--cri-path-orange-2);
}

/* ================= TRACK ================= */

.cri-path-modern__track {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: clamp(18px, 1.45vw, 30px);
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.cri-path-modern__item {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: clamp(270px, 17.2vw, 330px);
  outline: none;
  z-index: 1;
  transition:
    flex 0.45s cubic-bezier(.22, .61, .36, 1),
    transform 0.35s ease;
}

.cri-path-modern__item:not(:last-child)::after {
  content: "";
  position: absolute;
  right: calc((clamp(18px, 1.45vw, 30px) * -1) + 7px);
  top: 50%;
  width: 17px;
  height: 30px;
  transform: translateY(-50%);
  background: var(--cri-path-orange);
  clip-path: polygon(0 0, 48% 0, 100% 50%, 48% 100%, 0 100%, 52% 50%);
  z-index: 8;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.18));
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.cri-path-modern__item:hover:not(:last-child)::after,
.cri-path-modern__item.is-active:not(:last-child)::after {
  transform: translateY(-50%) translateX(4px);
}

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

.cri-path-modern__card {
  position: relative;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0)),
    var(--cri-path-card);
  border: 1px solid rgba(255, 255, 255, 0.025);
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
  transition:
    background 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

.cri-path-modern__card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 14%, rgba(233, 120, 78, 0.20), transparent 26%),
    linear-gradient(135deg, rgba(233, 120, 78, 0.10), transparent 48%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.cri-path-modern__card::after {
  content: "";
  position: absolute;
  inset: 1px;
  border: 1px solid rgba(233, 120, 78, 0);
  pointer-events: none;
  transition: border-color 0.35s ease;
}

/* ================= CLOSED STATE ================= */

.cri-path-modern__icon {
  position: absolute;
  left: 50%;
  top: 42%;
  width: clamp(68px, 4.8vw, 86px);
  height: clamp(68px, 4.8vw, 86px);
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition:
    transform 0.35s ease,
    opacity 0.25s ease;
}

.cri-path-modern__icon img {
  width: clamp(58px, 4.1vw, 76px);
  height: clamp(58px, 4.1vw, 76px);
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.95;
  transition:
    filter 0.35s ease,
    opacity 0.35s ease,
    transform 0.35s ease;
}

.cri-path-modern__item:hover .cri-path-modern__icon img {
  transform: scale(1.04);
}

.cri-path-modern__compact {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 24px;
  z-index: 3;
  text-align: center;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.cri-path-modern__compact h5 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(16px, 1.05vw, 20px);
  line-height: 1.15;
  font-weight: 400;
}

/* ================= OPEN DETAILS ================= */

.cri-path-modern__details {
  position: relative;
  z-index: 5;
  height: 100%;
  padding: 18px 16px 15px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition:
    opacity 0.25s ease,
    transform 0.35s ease;
}

.cri-path-modern__details-top {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: start;
  column-gap: 11px;
  margin-bottom: 14px;
}

.cri-path-modern__details-icon {
  width: 42px;
  height: 42px;
  opacity: 0;
  transform: translateY(-4px) scale(0.92);
  transition:
    opacity 0.35s ease 0.05s,
    transform 0.35s ease 0.05s;
}

.cri-path-modern__details-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(62%) sepia(83%) saturate(605%) hue-rotate(323deg) brightness(96%) contrast(91%);
}

/* FIX: title + text start from left */
.cri-path-modern__details-text {
  min-width: 0;
  text-align: left !important;
  padding: 0;
  margin: 0;
}

.cri-path-modern__details-text h5 {
  margin: 0 0 5px;
  color: var(--cri-path-orange-2);
  font-size: 17px;
  line-height: 1.1;
  font-weight: 700;
  text-align: left !important;
}

.cri-path-modern__details-text p {
  margin: 0;
  color: #ffffff;
  font-size: 12px;
  line-height: 1.28;
  font-weight: 500;
  text-align: left !important;
}

/* ================= LINKS / PILLS ================= */

.cri-path-modern__links {
  position: static;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-bottom: 2px;
}

.cri-path-modern__links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  max-width: 170px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(233, 120, 78, 0.96);
  color: #ffffff;
  font-size: 12px;
  line-height: 1.05;
  font-weight: 800;
  text-align: center;
  text-decoration: none !important;
  box-shadow: 0 8px 18px rgba(233, 120, 78, 0.16);
  transform: translateY(8px);
  opacity: 0;
  white-space: normal;
  transition:
    opacity 0.28s ease,
    transform 0.28s ease,
    background 0.25s ease,
    color 0.25s ease,
    box-shadow 0.25s ease;
}

/* only real hover becomes white */
/* link normal state */
.cri-path-modern__links a {
  cursor: pointer;
  position: relative;
}

/* keep normal color when visited/focused, but NOT when hover */
.cri-path-modern__links a:visited:not(:hover):not(:focus-visible),
.cri-path-modern__links a:focus:not(:hover):not(:focus-visible),
.cri-path-modern__links a:active:not(:hover):not(:focus-visible) {
  background: rgba(233, 120, 78, 0.96);
  color: #ffffff;
}

/* real hover effect */
.cri-path-modern__links a:hover,
.cri-path-modern__links a:focus-visible {
  background: #ffffff !important;
  color: var(--cri-path-orange) !important;
  box-shadow: 0 12px 26px rgba(255, 255, 255, 0.16);
  transform: translateY(-3px) !important;
  transition-delay: 0s !important;
}

/* keyboard focus */
.cri-path-modern__links a:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.75);
  outline-offset: 3px;
}

/* ================= ACTIVE / HOVER OPEN ================= */

.cri-path-modern__item {
  scroll-margin-top: 110px;
}

.cri-path-modern__item.is-active,
.cri-path-modern__item:target {
  flex: 1.85 1 0;
  z-index: 10;
}

.cri-path-modern__item.is-active .cri-path-modern__card,
.cri-path-modern__item:target .cri-path-modern__card {
  background:
    radial-gradient(circle at 16% 12%, rgba(233, 120, 78, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
    var(--cri-path-card-dark);
  border-color: rgba(233, 120, 78, 0.22);
  box-shadow:
    0 24px 55px rgba(0, 0, 0, 0.18),
    inset 0 0 0 1px rgba(233, 120, 78, 0.06);
}

.cri-path-modern__item.is-active .cri-path-modern__card::before,
.cri-path-modern__item:target .cri-path-modern__card::before {
  opacity: 1;
}

.cri-path-modern__item.is-active .cri-path-modern__card::after,
.cri-path-modern__item:target .cri-path-modern__card::after {
  border-color: rgba(233, 120, 78, 0.18);
}

.cri-path-modern__item.is-active .cri-path-modern__icon,
.cri-path-modern__item:target .cri-path-modern__icon {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.72);
  pointer-events: none;
}

.cri-path-modern__item.is-active .cri-path-modern__compact,
.cri-path-modern__item:target .cri-path-modern__compact {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.cri-path-modern__item.is-active .cri-path-modern__details,
.cri-path-modern__item:target .cri-path-modern__details {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.cri-path-modern__item.is-active .cri-path-modern__details-icon,
.cri-path-modern__item:target .cri-path-modern__details-icon {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.cri-path-modern__item.is-active .cri-path-modern__links a,
.cri-path-modern__item:target .cri-path-modern__links a {
  opacity: 1;
  transform: translateY(0);
}

.cri-path-modern__item.is-active .cri-path-modern__links a:nth-child(1) { transition-delay: .04s; }
.cri-path-modern__item.is-active .cri-path-modern__links a:nth-child(2) { transition-delay: .08s; }
.cri-path-modern__item.is-active .cri-path-modern__links a:nth-child(3) { transition-delay: .12s; }
.cri-path-modern__item.is-active .cri-path-modern__links a:nth-child(4) { transition-delay: .16s; }
.cri-path-modern__item.is-active .cri-path-modern__links a:nth-child(5) { transition-delay: .20s; }
.cri-path-modern__item.is-active .cri-path-modern__links a:nth-child(6) { transition-delay: .24s; }

/* IMPORTANT:
   Removed this old rule because it made the last link always look hovered:
   .cri-path-modern__links a:last-child...
*/

/* ================= DESKTOP 1400+ ================= */

@media (min-width: 1400px) {
  .cri-path-modern-section .container,
  .cri-path-modern-section .custom-container {
    padding-left: 65px !important;
    padding-right: 65px !important;
  }

  .cri-path-modern__track {
    gap: 30px !important;
  }

  .cri-path-modern__item {
    height: 320px;
  }

  .cri-path-modern__item:not(:last-child)::after {
    right: -23px;
  }
}

/* ================= DESKTOP 1200 - 1399 ================= */

@media (min-width: 1200px) and (max-width: 1399.98px) {
  .cri-path-modern-section .container,
  .cri-path-modern-section .custom-container {
    padding-left: 50px !important;
    padding-right: 50px !important;
  }

  .cri-path-modern__track {
    gap: 22px !important;
  }

  .cri-path-modern__item {
    height: 275px;
  }

  .cri-path-modern__item:not(:last-child)::after {
    right: -18px;
    width: 15px;
    height: 27px;
  }

  .cri-path-modern__icon {
    width: 70px;
    height: 70px;
  }

  .cri-path-modern__icon img {
    width: 62px;
    height: 62px;
  }

  .cri-path-modern__compact {
    bottom: 20px;
  }

  .cri-path-modern__compact h5 {
    font-size: 16px;
  }

  .cri-path-modern__details {
    padding: 16px 13px 13px;
  }

  .cri-path-modern__details-top {
    grid-template-columns: 42px minmax(0, 1fr);
    column-gap: 9px;
    margin-bottom: 12px;
  }

  .cri-path-modern__details-icon {
    width: 38px;
    height: 38px;
  }

  .cri-path-modern__details-text h5 {
    font-size: 16px;
  }

  .cri-path-modern__details-text p {
    font-size: 12px;
    line-height: 1.22;
  }

  .cri-path-modern__links {
    gap: 7px;
  }

  .cri-path-modern__links a {
    font-size: 12px;
    padding: 6px 10px;
    max-width: 145px;
  }
}

/* ================= SMALL DESKTOP / TABLET ================= */

@media (min-width: 992px) and (max-width: 1199.98px) {
  .cri-path-modern-section .container,
  .cri-path-modern-section .custom-container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 30px !important;
    padding-right: 30px !important;
  }

  .cri-path-modern {
    min-height: auto;
    padding: 80px 0;
  }

  .cri-path-modern__track {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 100%;
    gap: 18px;
  }

  .cri-path-modern__item,
  .cri-path-modern__item.is-active {
    height: auto;
    min-height: 255px;
    flex-basis: auto !important;
  }

  .cri-path-modern__item::after {
    display: none;
  }

  .cri-path-modern__icon,
  .cri-path-modern__compact {
    display: none;
  }

  .cri-path-modern__details,
  .cri-path-modern__item.is-active .cri-path-modern__details {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .cri-path-modern__details-icon,
  .cri-path-modern__item.is-active .cri-path-modern__details-icon {
    opacity: 1;
    transform: none;
  }

  .cri-path-modern__links {
    justify-content: flex-start;
  }

  .cri-path-modern__links a,
  .cri-path-modern__item.is-active .cri-path-modern__links a {
    opacity: 1;
    transform: none;
  }
}

/* ================= TABLET ================= */

@media (max-width: 991.98px) {
  .cri-path-modern-section .container,
  .cri-path-modern-section .custom-container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 22px !important;
    padding-right: 22px !important;
  }

  .cri-path-modern {
    min-height: auto;
    padding: 70px 0;
  }

  .cri-path-modern__track {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 100%;
    gap: 18px;
  }

  .cri-path-modern__item,
  .cri-path-modern__item.is-active {
    height: auto;
    min-height: 250px;
    flex-basis: auto !important;
  }

  .cri-path-modern__item::after {
    display: none;
  }

  .cri-path-modern__icon,
  .cri-path-modern__compact {
    display: none;
  }

  .cri-path-modern__details,
  .cri-path-modern__item.is-active .cri-path-modern__details {
    opacity: 1;
    pointer-events: auto;
    transform: none;
    padding: 20px;
  }

  .cri-path-modern__details-icon,
  .cri-path-modern__item.is-active .cri-path-modern__details-icon {
    opacity: 1;
    transform: none;
  }

  .cri-path-modern__links {
    justify-content: flex-start;
    margin-top: auto;
  }

  .cri-path-modern__links a,
  .cri-path-modern__item.is-active .cri-path-modern__links a {
    opacity: 1;
    transform: none;
    font-size: 10px;
    max-width: none;
  }
}

/* ================= MOBILE ================= */

@media (max-width: 767.98px) {
  .cri-path-modern-section .container,
  .cri-path-modern-section .custom-container {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .cri-path-modern {
    padding: 55px 0;
  }

  .cri-path-modern__track {
    grid-template-columns: 1fr;
    max-width: 430px;
    gap: 14px;
  }

  .cri-path-modern__item,
  .cri-path-modern__item.is-active {
    min-height: auto;
  }

  .cri-path-modern__details {
    padding: 18px 16px;
  }

  .cri-path-modern__details-top {
    grid-template-columns: 44px minmax(0, 1fr);
    column-gap: 10px;
  }

  .cri-path-modern__details-text h5 {
    font-size: 17px;
  }

  .cri-path-modern__details-text p {
    font-size: 13px;
    line-height: 1.35;
  }

  .cri-path-modern__links {
    gap: 8px;
  }

  .cri-path-modern__links a {
    min-height: 26px;
    padding: 7px 12px;
    font-size: 10px;
  }
}


/* =========================================================
   CRI PATH - FIX LINKS UX
   Same size pills + clean 2-column layout
   Add at the END of the CSS file
   ========================================================= */

.cri-path-modern__links {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 9px 10px !important;
  width: 100% !important;
  justify-content: stretch !important;
  align-items: stretch !important;
  align-content: end !important;
  margin-top: auto !important;
  padding: 0 2px 2px !important;
}

.cri-path-modern__links a {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;

  height: 38px !important;
  min-height: 38px !important;
  padding: 0 12px !important;
  box-sizing: border-box !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  font-size: 11.5px !important;
  line-height: 1.08 !important;
  font-weight: 800 !important;
  text-align: center !important;

  white-space: normal !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;

  border-radius: 999px !important;
}

/* Give opened card a little more space for clean links */
@media (min-width: 1200px) {
  .cri-path-modern__item.is-active {
    flex: 2.05 1 0 !important;
  }
}

/* Medium desktop */
@media (min-width: 1200px) and (max-width: 1399.98px) {
  .cri-path-modern__links {
    gap: 8px !important;
  }

  .cri-path-modern__links a {
    height: 35px !important;
    min-height: 35px !important;
    padding: 0 9px !important;
    font-size: 10.8px !important;
    line-height: 1.06 !important;
  }
}

/* Small desktop / tablet cards */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .cri-path-modern__links {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    justify-content: stretch !important;
  }

  .cri-path-modern__links a {
    height: 36px !important;
    min-height: 36px !important;
    font-size: 11px !important;
  }
}

/* Tablet */
@media (max-width: 991.98px) {
  .cri-path-modern__links {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    justify-content: stretch !important;
    gap: 8px !important;
  }

  .cri-path-modern__links a,
  .cri-path-modern__item.is-active .cri-path-modern__links a {
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 10px !important;
    font-size: 10.5px !important;
    line-height: 1.08 !important;
  }
}

/* Mobile */
@media (max-width: 767.98px) {
  .cri-path-modern__links {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .cri-path-modern__links a {
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 9px !important;
    font-size: 10.5px !important;
  }
}

/* Very small phones: one link per line for readability */
@media (max-width: 390px) {
  .cri-path-modern__links {
    grid-template-columns: 1fr !important;
  }

  .cri-path-modern__links a {
    height: auto !important;
    min-height: 34px !important;
    padding: 7px 10px !important;
  }
}
