/* ==========================================================================
   TEAM CAROUSEL SECTION — Ryleni-inspired design adapted for Qubenix
   ========================================================================== */

/* ---- Section ---- */
.team-carousel-section {
  position: relative;
  width: 100%;
  padding: 80px 0 100px;
  background-color: #F8F7FF;
  background-image: url('../assets/images/team-bg.webp');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  overflow: hidden;
}

/* ---- Dotted Background Pattern ---- */
.team-dots-bg {
  display: none;
}

/* ---- Header ---- */
.team-carousel-header {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto 64px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 0 24px;
}
.team-carousel-header .team-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  border-radius: 9999px;
  border: 1px solid rgba(60, 50, 163, 0.18);
  color: #3C32A3;
  background: rgba(60, 50, 163, 0.06);
  line-height: 1.2;
}
.team-carousel-heading {
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 700;
  color: #141225;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.team-carousel-subheading {
  font-size: 17px;
  color: #5B5975;
  line-height: 1.65;
  max-width: 560px;
}

/* ---- Carousel Wrapper ---- */
.team-carousel-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  overflow: hidden;
  padding: 0 0 48px;
}

/* ---- Carousel Track ---- */
.team-carousel-track {
  display: flex;
  gap: 24px;
  padding: 0 calc(50% - 180px);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  will-change: transform;
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.team-carousel-track.is-dragging {
  cursor: grabbing;
  transition: none;
}

/* ---- Card ---- */
.team-carousel-card {
  flex: 0 0 360px;
  min-width: 300px;
  max-width: 400px;
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.45s ease;
  opacity: 0.55;
  transform: scale(0.92);
  font-family: var(--qubenix-font, "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
}
.team-carousel-card.is-active {
  opacity: 1;
  transform: scale(1);
}

.team-carousel-card__inner {
  position: relative;
  background-color: #1A3FB8;
  background-image: 
    linear-gradient(180deg, rgba(8, 20, 68, 0.12) 0%, rgba(6, 14, 48, 0.45) 100%),
    url('../assets/images/team-card-blue-bg.webp');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 24px 22px 28px;
  gap: 14px;
  height: 100%;
  border: 1px solid rgba(140, 190, 255, 0.35);
  box-shadow: 
    0 12px 32px -4px rgba(10, 30, 95, 0.35),
    0 4px 14px rgba(20, 60, 160, 0.2),
    inset 0 1px 1.5px rgba(255, 255, 255, 0.4);
  transition: box-shadow 0.45s ease, border-color 0.45s ease;
  font-family: var(--qubenix-font, "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Micro-dots disabled so blue ribbed artwork remains vivid and crisp */
.team-carousel-card__inner::before {
  display: none;
}

.team-carousel-card__inner > * {
  position: relative;
  z-index: 1;
}

.team-carousel-card.is-active .team-carousel-card__inner {
  border-color: rgba(180, 220, 255, 0.65);
  box-shadow: 
    0 20px 44px -6px rgba(10, 30, 95, 0.45),
    0 8px 22px rgba(20, 60, 160, 0.28),
    inset 0 1px 2px rgba(255, 255, 255, 0.6);
}

/* ---- Brand Row (top of card) ---- */
.team-carousel-card__brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 2px;
}
.team-carousel-card__logo {
  height: 20px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
.team-carousel-card__social-icons {
  display: flex;
  gap: 10px;
  align-items: center;
}
.team-carousel-card__social-icons a {
  color: rgba(255, 255, 255, 0.75);
  display: flex;
  transition: color 0.2s;
}
.team-carousel-card__social-icons a:hover {
  color: #fff;
}

/* ---- Title Banner ---- */
.team-carousel-card__title-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 2px;
  padding: 2px 0 0;
}
.team-carousel-card__welcome {
  font-family: var(--qubenix-font, "Inter", sans-serif);
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: 0.13em;
  color: rgba(235, 240, 255, 0.9);
  text-transform: uppercase;
  line-height: 1.25;
  margin: 0;
}
.team-carousel-card__onboard {
  font-family: var(--qubenix-font, "Inter", sans-serif);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: #FFFFFF;
  text-transform: uppercase;
  line-height: 1.06;
  font-style: normal;
  margin: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* ---- Photo Frame ---- */
.team-carousel-card__photo-frame {
  width: 155px;
  height: 155px;
  border-radius: 10px;
  overflow: hidden;
  margin: 2px auto 0;
  border: 3px solid rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
  box-shadow: 0 8px 24px -2px rgba(8, 20, 70, 0.35);
}
.team-carousel-card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* ---- Details ---- */
.team-carousel-card__details {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
}
.team-carousel-card__name {
  font-family: var(--qubenix-font, "Inter", sans-serif);
  font-size: 23px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0.02em;
  line-height: 1.25;
  text-transform: uppercase;
  margin: 0 0 5px 0;
  max-width: 330px;
  word-break: normal;
  overflow-wrap: break-word;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
.team-carousel-card__role {
  font-family: var(--qubenix-font, "Inter", sans-serif);
  font-size: 13.5px;
  font-weight: 600;
  color: #CAD7FD;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  line-height: 1.35;
  margin: 0 0 10px 0;
  max-width: 320px;
  text-rendering: optimizeLegibility;
}
.team-carousel-card__bio {
  font-family: var(--qubenix-font, "Inter", sans-serif);
  font-size: 13.5px;
  font-weight: 400;
  color: #EEF2FF;
  line-height: 1.62;
  margin: 0 auto;
  max-width: 310px;
  text-align: center;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* ---- Navigation Arrows ---- */
.team-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid rgba(60, 50, 163, 0.2);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #3C32A3;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: all 0.25s ease;
}
.team-carousel-arrow:hover {
  background: #3C32A3;
  color: #fff;
  border-color: #3C32A3;
  box-shadow: 0 6px 24px rgba(60, 50, 163, 0.3);
}
.team-carousel-arrow:active {
  transform: translateY(-50%) scale(0.95);
}
.team-carousel-arrow--prev {
  left: max(16px, calc(50% - 240px));
}
.team-carousel-arrow--next {
  right: max(16px, calc(50% - 240px));
}
.team-carousel-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---- Dot Indicators ---- */
.team-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 36px;
}
.team-carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid rgba(60, 50, 163, 0.3);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
}
.team-carousel-dot.is-active {
  background: #3C32A3;
  border-color: #3C32A3;
  transform: scale(1.2);
}
.team-carousel-dot:hover:not(.is-active) {
  border-color: #6B5FD1;
  background: rgba(107, 95, 209, 0.15);
}

/* ---- CTA Wrap ---- */
.team-carousel-cta-wrap {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Responsive ---- */

/* Desktop wide — arrows spread further */
@media (min-width: 1200px) {
  .team-carousel-arrow--prev {
    left: calc(50% - 280px);
  }
  .team-carousel-arrow--next {
    right: calc(50% - 280px);
  }
  .team-carousel-card {
    flex: 0 0 380px;
  }
  .team-carousel-track {
    padding: 0 calc(50% - 190px);
  }
  .team-carousel-card__welcome {
    font-size: 16px;
    letter-spacing: 0.14em;
  }
  .team-carousel-card__onboard {
    font-size: 38px;
  }
  .team-carousel-card__photo-frame {
    width: 160px;
    height: 160px;
  }
  .team-carousel-card__name {
    font-size: 24px;
    letter-spacing: 0.02em;
  }
  .team-carousel-card__role {
    font-size: 14px;
    letter-spacing: 0.06em;
  }
  .team-carousel-card__bio {
    font-size: 14px;
    line-height: 1.64;
    max-width: 325px;
  }
}

/* Tablet */
@media (max-width: 1024px) {
  .team-carousel-section {
    padding: 64px 0 80px;
  }
  .team-carousel-header {
    margin-bottom: 48px;
  }
  .team-carousel-card {
    flex: 0 0 330px;
    min-width: 290px;
  }
  .team-carousel-track {
    padding: 0 calc(50% - 165px);
    gap: 20px;
  }
  .team-carousel-card__inner {
    padding: 22px 20px 26px;
    gap: 13px;
  }
  .team-carousel-card__welcome {
    font-size: 14.5px;
    letter-spacing: 0.12em;
  }
  .team-carousel-card__onboard {
    font-size: 33px;
    font-style: normal;
  }
  .team-carousel-card__photo-frame {
    width: 145px;
    height: 145px;
  }
  .team-carousel-card__name {
    font-size: 21.5px;
  }
  .team-carousel-card__role {
    font-size: 13px;
    letter-spacing: 0.05em;
  }
  .team-carousel-card__bio {
    font-size: 13px;
    line-height: 1.58;
    max-width: 290px;
  }
  .team-carousel-arrow--prev {
    left: 12px;
  }
  .team-carousel-arrow--next {
    right: 12px;
  }
  .team-carousel-arrow {
    width: 42px;
    height: 42px;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .team-carousel-section {
    padding: 48px 0 64px;
  }
  .team-carousel-header {
    margin-bottom: 36px;
    gap: 14px;
  }
  .team-carousel-subheading {
    font-size: 15px;
  }
  .team-carousel-card {
    flex: 0 0 295px;
    min-width: 270px;
    max-width: 320px;
  }
  .team-carousel-track {
    padding: 0 calc(50% - 147px);
    gap: 16px;
  }
  .team-carousel-card__inner {
    padding: 20px 18px 24px;
    border-radius: 16px;
    gap: 12px;
  }
  .team-carousel-card__welcome {
    font-size: 13.5px;
    letter-spacing: 0.11em;
  }
  .team-carousel-card__onboard {
    font-size: 29px;
    font-style: normal;
  }
  .team-carousel-card__photo-frame {
    width: 130px;
    height: 130px;
    border-radius: 8px;
    margin: 2px auto 0;
  }
  .team-carousel-card__name {
    font-size: 19.5px;
    letter-spacing: 0.015em;
  }
  .team-carousel-card__role {
    font-size: 12.5px;
    letter-spacing: 0.045em;
    line-height: 1.35;
    margin-bottom: 8px;
  }
  .team-carousel-card__bio {
    font-size: 12.5px;
    line-height: 1.55;
    max-width: 265px;
  }
  .team-carousel-arrow {
    width: 38px;
    height: 38px;
  }
  .team-carousel-arrow--prev {
    left: 8px;
  }
  .team-carousel-arrow--next {
    right: 8px;
  }
  .team-carousel-arrow svg {
    width: 16px;
    height: 16px;
  }
  .team-dots-bg {
    background-size: 22px 22px;
  }
}

/* Small mobile */
@media (max-width: 400px) {
  .team-carousel-card {
    flex: 0 0 clamp(250px, 80vw, 275px);
    min-width: 240px;
  }
  .team-carousel-track {
    padding: 0 calc(50% - clamp(125px, 40vw, 137px));
    gap: 12px;
  }
  .team-carousel-card__inner {
    padding: 18px 15px 22px;
    gap: 10px;
  }
  .team-carousel-card__welcome {
    font-size: 12.5px;
    letter-spacing: 0.1em;
  }
  .team-carousel-card__onboard {
    font-size: 26px;
    font-style: normal;
  }
  .team-carousel-card__photo-frame {
    width: 118px;
    height: 118px;
    border-radius: 8px;
  }
  .team-carousel-card__name {
    font-size: 18px;
    letter-spacing: 0.01em;
  }
  .team-carousel-card__role {
    font-size: 11.5px;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
  }
  .team-carousel-card__bio {
    font-size: 12px;
    line-height: 1.5;
    max-width: 240px;
  }
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
  .team-carousel-track {
    transition: none;
  }
  .team-carousel-card {
    transition: none;
  }
  .team-carousel-arrow {
    transition: none;
  }
  .team-carousel-dot {
    transition: none;
  }
}
