/* ==========================================================================
   TPS Empire - "Our Advantage / Why Choose TPS Empire" Interactive Cards
   Top-Right Expanding Color Fill Transition + Delayed Sequential Text Reveal
   Sharp Geometric Edges | Alternate Blue & Orange | Matte Finish (Compact Size)
   ========================================================================== */

/* Section Wrapper: Clean, Matte Brand Navy Background */
.tps-advantage-section {
  position: relative;
  background-color: #09101d;
  padding: 80px 0 90px;
  overflow: hidden;
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   Grid Architecture & Side-by-Side Row 1 Layout
   -------------------------------------------------------------------------- */
.tps-adv-grid-container {
  position: relative;
  z-index: 2;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Rows: Staggered Pairs with Refined Vertical Rhythm */
.tps-adv-row-stagger {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 28px 24px;
  margin-bottom: 36px;
}

.tps-adv-row-stagger:last-child {
  margin-bottom: 0;
}

.tps-adv-row-header-card {
  align-items: center;
}

.tps-adv-col {
  flex: 1 1 calc(50% - 12px);
  max-width: calc(50% - 12px);
}

/* Left-Side Header Column (Positioned next to Card 01) */
.tps-adv-col-header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  padding-right: 20px;
}

/* Clean Subheading Text */
.tps-adv-subheading {
  display: inline-block;
  color: #4b58f8;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  margin-bottom: 10px;
}

.tps-adv-heading {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.6px;
  color: #ffffff;
  margin-bottom: 12px;
  text-align: left;
}

.tps-adv-heading span {
  color: #323edd;
}

.tps-adv-subtext {
  font-size: 14.5px;
  line-height: 1.65;
  color: #94a3b8;
  text-align: left;
  margin: 0;
}

/* Downward Vertical Stagger for Clear Separation */
.tps-stagger-offset {
  margin-top: 32px;
}

/* --------------------------------------------------------------------------
   The Interactive Card (Compact Dimensions, Sharp Geometric Corners)
   -------------------------------------------------------------------------- */
.tps-adv-card {
  position: relative;
  background-color: #111a2e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0px !important;
  min-height: 230px;
  padding: 20px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  transition: 
    border-color 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, box-shadow;
  outline: none;
}

/* --------------------------------------------------------------------------
   Top-Right Expanding Color Fill Surface (clip-path ripple)
   -------------------------------------------------------------------------- */
.tps-adv-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  /* Starts as 0% radius circle at top-right corner */
  clip-path: circle(0% at 100% 0%);
  -webkit-clip-path: circle(0% at 100% 0%);
  transition: clip-path 0.42s cubic-bezier(0.22, 1, 0.36, 1), -webkit-clip-path 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: clip-path;
}

.tps-adv-theme-blue::before {
  background-color: #323edd;
}

.tps-adv-theme-orange::before {
  background-color: #ffa41b;
}

/* When Hovered / Active: Expand color out from the top-right */
.tps-adv-card:hover::before,
.tps-adv-card:focus-visible::before,
.tps-adv-card.is-active::before {
  clip-path: circle(160% at 100% 0%);
  -webkit-clip-path: circle(160% at 100% 0%);
  transition: clip-path 0.42s cubic-bezier(0.22, 1, 0.36, 1), -webkit-clip-path 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Card Elevation & Border adjustments on hover */
.tps-adv-theme-blue:hover,
.tps-adv-theme-blue:focus-visible,
.tps-adv-theme-blue.is-active {
  border-color: #323edd !important;
  transform: translateY(-5px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.tps-adv-theme-orange:hover,
.tps-adv-theme-orange:focus-visible,
.tps-adv-theme-orange.is-active {
  border-color: #ffa41b !important;
  transform: translateY(-5px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

/* --------------------------------------------------------------------------
   Card Header: Index Number & Action Arrow Button
   -------------------------------------------------------------------------- */
.tps-adv-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  position: relative;
  z-index: 2;
}

.tps-adv-card-num {
  font-size: 13px;
  font-weight: 700;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
  letter-spacing: 0.8px;
  transition: color 0.3s ease;
}

.tps-adv-card-btn {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 0px !important;
  border: 1px solid;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: 
    background-color 0.3s ease,
    border-color 0.3s ease,
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tps-adv-arrow-svg {
  width: 14px;
  height: 14px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.3s ease;
  transform-origin: center center;
}

/* --------------------------------------------------------------------------
   Card Body: Revealable Capability Bullet Points
   -------------------------------------------------------------------------- */
.tps-adv-card-body {
  position: relative;
  z-index: 2;
  width: 100%;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tps-adv-sublist {
  list-style: none;
  padding: 0;
  margin: 0;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: translateY(-8px);
  pointer-events: none;
  /* Fast collapse on unhover */
  transition: 
    opacity 0.18s ease 0s,
    transform 0.18s ease 0s,
    max-height 0.22s ease 0s,
    margin 0.22s ease 0s;
}

.tps-adv-sublist li {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 7px;
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.15s ease 0s, transform 0.15s ease 0s;
}

.tps-adv-sublist li:last-child {
  margin-bottom: 0;
}

.tps-adv-sublist li::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 0px;
  flex-shrink: 0;
  opacity: 0.85;
}

/* --------------------------------------------------------------------------
   Card Footer: Main Heading
   -------------------------------------------------------------------------- */
.tps-adv-card-footer {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: 6px;
}

.tps-adv-card-title {
  font-size: 17.5px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.3px;
  color: #ffffff;
  margin: 0;
  transition: color 0.3s ease;
}

/* ==========================================================================
   THEME COLORS & HOVER STATE STYLING
   ========================================================================== */

/* --- 1. THEME BLUE (Cards 01, 03, 05) --- */
.tps-adv-theme-blue .tps-adv-card-num {
  color: #4b58f8;
}

.tps-adv-theme-blue .tps-adv-card-btn {
  border-color: rgba(75, 88, 248, 0.4);
  color: #4b58f8;
}

.tps-adv-theme-blue .tps-adv-arrow-svg {
  stroke: #4b58f8;
}

.tps-adv-theme-blue:hover .tps-adv-card-num,
.tps-adv-theme-blue.is-active .tps-adv-card-num {
  color: #ffffff;
  transition: color 0.3s ease 0.25s;
}

.tps-adv-theme-blue:hover .tps-adv-card-btn,
.tps-adv-theme-blue.is-active .tps-adv-card-btn {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  transition: background-color 0.3s ease 0.2s, border-color 0.3s ease 0.2s;
}

.tps-adv-theme-blue:hover .tps-adv-arrow-svg,
.tps-adv-theme-blue.is-active .tps-adv-arrow-svg {
  transform: rotate(180deg);
  stroke: #ffffff;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.3s ease 0.2s;
}

.tps-adv-theme-blue:hover .tps-adv-arrow-svg path,
.tps-adv-theme-blue.is-active .tps-adv-arrow-svg path {
  stroke: #ffffff;
}

.tps-adv-theme-blue:hover .tps-adv-sublist li,
.tps-adv-theme-blue.is-active .tps-adv-sublist li {
  color: #ffffff;
}

.tps-adv-theme-blue:hover .tps-adv-sublist li::before,
.tps-adv-theme-blue.is-active .tps-adv-sublist li::before {
  background: #ffffff;
}

.tps-adv-theme-blue:hover .tps-adv-card-title,
.tps-adv-theme-blue.is-active .tps-adv-card-title {
  color: #ffffff !important;
  transition: color 0.3s ease 0.25s;
}


/* --- 2. THEME ORANGE (Cards 02, 04) --- */
.tps-adv-theme-orange .tps-adv-card-num {
  color: #ffa41b;
}

.tps-adv-theme-orange .tps-adv-card-btn {
  border-color: rgba(255, 164, 27, 0.4);
  color: #ffa41b;
}

.tps-adv-theme-orange .tps-adv-arrow-svg {
  stroke: #ffa41b;
}

.tps-adv-theme-orange:hover .tps-adv-card-num,
.tps-adv-theme-orange.is-active .tps-adv-card-num {
  color: #111827;
  font-weight: 800;
  transition: color 0.3s ease 0.25s;
}

.tps-adv-theme-orange:hover .tps-adv-card-btn,
.tps-adv-theme-orange.is-active .tps-adv-card-btn {
  border-color: rgba(17, 24, 39, 0.35);
  background: rgba(17, 24, 39, 0.12);
  color: #111827;
  transition: background-color 0.3s ease 0.2s, border-color 0.3s ease 0.2s;
}

.tps-adv-theme-orange:hover .tps-adv-arrow-svg,
.tps-adv-theme-orange.is-active .tps-adv-arrow-svg {
  transform: rotate(180deg);
  stroke: #111827;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.3s ease 0.2s;
}

.tps-adv-theme-orange:hover .tps-adv-arrow-svg path,
.tps-adv-theme-orange.is-active .tps-adv-arrow-svg path {
  stroke: #111827;
}

.tps-adv-theme-orange:hover .tps-adv-sublist li,
.tps-adv-theme-orange.is-active .tps-adv-sublist li {
  color: #111827;
  font-weight: 600;
}

.tps-adv-theme-orange:hover .tps-adv-sublist li::before,
.tps-adv-theme-orange.is-active .tps-adv-sublist li::before {
  background: #111827;
}

.tps-adv-theme-orange:hover .tps-adv-card-title,
.tps-adv-theme-orange.is-active .tps-adv-card-title {
  color: #111827 !important;
  font-weight: 800;
  transition: color 0.3s ease 0.25s;
}


/* ==========================================================================
   SEQUENTIAL TEXT REVEAL (Starts AFTER card is filled with color ~0.38s)
   ========================================================================== */
.tps-adv-card:hover .tps-adv-sublist,
.tps-adv-card.is-active .tps-adv-sublist {
  opacity: 1;
  max-height: 180px;
  transform: translateY(0);
  margin: 12px 0 8px 0;
  pointer-events: auto;
  /* Delayed entry: Starts after color expansion covers the card */
  transition: 
    opacity 0.32s ease 0.36s,
    transform 0.32s ease 0.36s,
    max-height 0.32s ease 0.34s,
    margin 0.32s ease 0.34s;
}

.tps-adv-card:hover .tps-adv-sublist li,
.tps-adv-card.is-active .tps-adv-sublist li {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered item entry animations after card is filled */
.tps-adv-card:hover .tps-adv-sublist li:nth-child(1),
.tps-adv-card.is-active .tps-adv-sublist li:nth-child(1) {
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1) 0.38s, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) 0.38s;
}

.tps-adv-card:hover .tps-adv-sublist li:nth-child(2),
.tps-adv-card.is-active .tps-adv-sublist li:nth-child(2) {
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1) 0.43s, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) 0.43s;
}

.tps-adv-card:hover .tps-adv-sublist li:nth-child(3),
.tps-adv-card.is-active .tps-adv-sublist li:nth-child(3) {
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1) 0.48s, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) 0.48s;
}

.tps-adv-card:hover .tps-adv-sublist li:nth-child(4),
.tps-adv-card.is-active .tps-adv-sublist li:nth-child(4) {
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1) 0.53s, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) 0.53s;
}

.tps-adv-card:hover .tps-adv-sublist li:nth-child(5),
.tps-adv-card.is-active .tps-adv-sublist li:nth-child(5) {
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1) 0.58s, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) 0.58s;
}

/* ==========================================================================
   Scroll-Reveal Entrance
   ========================================================================== */
.tps-adv-reveal {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.tps-adv-reveal.tps-adv-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 991.98px) {
  .tps-advantage-section {
    padding: 65px 0 75px;
  }

  .tps-adv-heading {
    font-size: 28px;
  }

  .tps-adv-col-header {
    padding-right: 0;
    margin-bottom: 16px;
  }

  .tps-adv-row-stagger {
    gap: 22px 18px;
    margin-bottom: 28px;
  }

  .tps-stagger-offset {
    margin-top: 0;
  }

  .tps-adv-card {
    min-height: 220px;
    padding: 18px 18px;
  }

  .tps-adv-card-title {
    font-size: 16.5px;
  }
}

@media (max-width: 767.98px) {
  .tps-advantage-section {
    padding: 55px 0 60px;
  }

  .tps-adv-heading {
    font-size: 24px;
  }

  .tps-adv-row-stagger {
    gap: 20px;
    margin-bottom: 20px;
  }

  .tps-adv-col {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .tps-stagger-offset {
    margin-top: 0;
  }

  .tps-adv-card {
    min-height: 200px;
    padding: 16px 16px;
  }

  .tps-adv-card-title {
    font-size: 16px;
  }

  .tps-adv-sublist li {
    font-size: 12px;
  }
}
