/* ══════════════════════════════════════════════
   CalTex Card Slider
   Modelled on the reboot-slider pattern
   ══════════════════════════════════════════════ */

/* ── Section wrapper ── */
#ct-card-slider {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 620px;
  max-height: 980px;
  overflow: hidden;
  background: #0e1624;
  font-family: var(--font, 'Inter', sans-serif);
}

/* ── Backgrounds ── */
.ct-slider__bgs { position: absolute; inset: 0; }

.ct-slider__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.1s ease, transform 1.1s ease;
  filter: blur(4px);
}

.ct-slider__bg.active {
  opacity: 1;
  transform: scale(1);
}

/* dark gradient overlay */
.ct-slider__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(0,0,0,.72) 0%, rgba(0,0,0,.15) 100%);
  z-index: 1;
}

/* ── Inner layout ── */
.ct-slider__inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 3% 0 5%;
  gap: 0;
}

/* ── LEFT side ── */
.ct-slider__left {
  flex: 0 0 54%;
  display: flex;
  align-items: flex-start;
  gap: 24px;
  position: relative;
}

/* Dot bar */
.ct-slider__bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  height: 220px;
  width: 28px;
  flex-shrink: 0;
  position: relative;
}

/* vertical connecting line */
.ct-slider__bar::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(176,183,208,.3);
  transform: translateX(-50%);
}

.ct-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(176,183,208,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transform: scale(0.35);
  transition: transform .3s ease, background .3s ease;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.ct-dot.active {
  transform: scale(1);
  background: #fff;
}

.ct-dot__num {
  font-size: 10px;
  font-weight: 700;
  color: #1B2D6B;
  opacity: 0;
  transition: opacity .3s ease;
}

.ct-dot.active .ct-dot__num { opacity: 1; }

/* Text area */
.ct-slider__text {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-right: 2%;
  flex: 1;
  min-width: 0;
}

/* Heading */
.ct-slider__hw {
  position: relative;
  overflow: hidden;
  height: 200px;
}

.ct-slider__heading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  font-family: 'Lato', 'Inter', sans-serif;
  font-size: clamp(40px, 5.5vw, 72px);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}

.ct-slider__heading.active {
  opacity: 1;
  transform: translateY(0);
}

.ct-slider__sub {
  display: block;
  font-size: clamp(20px, 2.8vw, 36px);
  font-weight: 400;
  color: #bdbdbd;
  margin-top: 6px;
}

/* Description */
.ct-slider__dw {
  position: relative;
  overflow: hidden;
  height: 160px;
}

.ct-slider__desc {
  position: absolute;
  top: 0; left: 0; right: 0;
  font-size: 16px;
  line-height: 1.8;
  color: rgba(255,255,255,.88);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .55s ease .08s, transform .55s ease .08s;
  max-width: 100%;
  margin: 0;
}

.ct-slider__desc.active {
  opacity: 1;
  transform: translateY(0);
}

/* Explore button */
.ct-slider__btn-wrap { margin-top: 8px; }

.ct-slider__btn {
  display: inline-block;
  padding: 14px 32px;
  background: #1B2D6B;
  color: #fff !important;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .5px;
  text-decoration: none !important;
  border-radius: 0;
  transition: background .2s ease, transform .15s ease;
}

.ct-slider__btn:hover {
  background: #C41E3A;
  transform: translateY(-2px);
}

/* Arrows */
.ct-slider__arrows {
  position: absolute;
  bottom: -120px;
  left: 42px;
  display: flex;
  gap: 12px;
}

.ct-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(173,173,173,.62);
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease;
}

.ct-arrow:hover { background: #1B2D6B; }

/* ── RIGHT side: card track ── */
.ct-slider__right {
  flex: 0 0 46%;
  overflow: hidden;
  padding: 30px 0;
  /* mask fade on edges */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.ct-slider__track {
  display: flex;
  gap: 20px;
  transition: transform 0.85s cubic-bezier(.45,0,.2,1);
  align-items: center;
}

/* Used by JS to suppress transition during teleport */
.ct-slider__track--no-transition {
  transition: none !important;
}

/* ── Cards ── */
.ct-card {
  flex: 0 0 180px;
  height: 300px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  display: block;
  text-decoration: none;
  box-shadow: 0 0 40px rgba(0,0,0,.25);
  transition: height .35s ease .1s, flex-basis .35s ease .1s;
  cursor: pointer;
}

.ct-card.active {
  flex: 0 0 220px;
  height: 380px;
}

.ct-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  transition: transform .4s ease;
}

.ct-card:hover .ct-card__img { transform: scale(1.05); }

.ct-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(20deg, rgba(0,0,0,.78) 0%, rgba(0,0,0,0) 60%);
  border-radius: 8px;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  z-index: 1;
}

.ct-card__cite {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ct-card__name {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  display: block;
  font-family: 'Lato', sans-serif;
}

.ct-card__title {
  font-size: 13px;
  color: #bdbdbd;
  font-family: 'Lato', sans-serif;
}

/* ══════════════════════
   Responsive
   ══════════════════════ */
@media (max-width: 900px) {
  .ct-slider__inner { flex-direction: column; padding: 40px 5% 20px; gap: 32px; }
  .ct-slider__left  { flex: none; width: 100%; }
  .ct-slider__right { flex: none; width: 100%; }
  .ct-slider__hw    { height: 130px; }
  .ct-slider__dw    { height: 120px; }
  .ct-slider__desc  { font-size: 15px; }
  .ct-slider__heading { font-size: 32px; }
  .ct-slider__bar   { flex-direction: row; height: auto; width: 160px; }
  .ct-slider__bar::before { width: calc(100% - 20px); height: 1px; top: 50%; left: 10px; transform: translateY(-50%); }
  .ct-card          { flex: 0 0 130px; height: 200px; }
  .ct-card.active   { flex: 0 0 155px; height: 255px; }
  #ct-card-slider   { height: auto; max-height: none; min-height: 700px; }
}

@media (max-width: 560px) {
  .ct-card          { flex: 0 0 100px; height: 140px; }
  .ct-card.active   { flex: 0 0 120px; height: 180px; }
  .ct-slider__heading { font-size: 26px; }
  .ct-slider__desc  { font-size: 13px; }
}
