/* ==========================================================================
   PARTNERSHIP TERMS & CONDITIONS - FIRSTLY HEADER VISIBLE, BOXES REVEAL WITH SCROLL
   - Firstly ONLY the centered title & subtitle are visible
   - Boxes appear ONE BY ONE dynamically as user scrolls down
   - Mouse hover changes box to DARK BLUE (#222e40 - same as header)
   - Inside text & bullet points transition cleanly to white on hover
   - Zero numbering badges & zero light blue colors
   - 100% Mobile Responsive across all device breakpoints
   - Pure Vanilla HTML / CSS / JS (Zero Python, Content Fully Preserved)
   ========================================================================== */

:root {
  --pt-bg-section: #f8fafc;
  --pt-card-bg: #ffffff;
  --pt-card-border: #e2e8f0;
  
  /* Brand Header Dark Navy (#222e40) */
  --pt-header-dark-blue: #222e40;
  
  --pt-text-title: #0f172a;
  --pt-text-subtitle: #475569;
  --pt-text-muted: #64748b;
  --pt-text-body: #334155;
  
  --pt-radius-card: 16px;
  --pt-transition-spring: 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  --pt-transition-smooth: 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* --------------------------------------------------------------------------
   Section Layout & Containers - Flat Matte Aesthetic
   -------------------------------------------------------------------------- */
.partnership-terms-section {
  position: relative;
  width: 100%;
  background: var(--pt-bg-section);
  padding: 40px 0 100px;
  box-sizing: border-box;
  overflow: hidden;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.pt-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   Centered Header: Shifted Upward with Clean Top Spacing
   -------------------------------------------------------------------------- */
.pt-header-centered {
  text-align: center;
  max-width: 860px;
  margin: 0 auto 44px auto;
  padding: 10px 16px 0;
  box-sizing: border-box;
}

.pt-main-title {
  font-family: 'Poppins', 'Inter', -apple-system, sans-serif;
  font-size: clamp(2.2rem, 3.6vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--pt-text-title);
  letter-spacing: -0.025em;
  margin: 0 0 18px 0;
  text-align: center;
}

.pt-main-subtitle {
  font-size: 1.18rem;
  font-weight: 500;
  color: var(--pt-text-subtitle);
  line-height: 1.6;
  margin: 0 auto;
  text-align: center;
  max-width: 620px;
}

/* --------------------------------------------------------------------------
   Centered Cards Deck (Boxes Appear One By One With Scroll)
   -------------------------------------------------------------------------- */
.pt-cards-deck {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding-bottom: 40px;
}

/* Base Card Style: Hidden Initially So ONLY Header is Visible First */
.pt-card {
  position: relative;
  background: linear-gradient(165deg, #ffffff 0%, #fafbfd 100%);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--pt-radius-card);
  box-shadow:
    0 1px 0 0 rgba(255,255,255,0.85) inset,
    0 6px 22px -3px rgba(15, 23, 42, 0.05),
    0 2px 8px rgba(0, 0, 0, 0.02) !important;
  overflow: hidden;
  box-sizing: border-box;
  
  /* Hidden until user scrolls to each box */
  opacity: 0;
  visibility: hidden;
  transform: translateY(45px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.65s ease,
              background var(--pt-transition-smooth),
              border-color var(--pt-transition-smooth),
              color var(--pt-transition-smooth),
              box-shadow 0.35s cubic-bezier(0.16,1,0.3,1);
  will-change: opacity, transform, visibility;
}

/* Card Becomes Visible When User Scrolls Down To It */
.pt-card.pt-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   HOVER & ACTIVE STATE: Driven by JS timing for silky smooth delayed closing
   -------------------------------------------------------------------------- */
.pt-card:hover:not(.is-active) {
  border-color: #cbd5e1 !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px -4px rgba(15, 23, 42, 0.08) !important;
}

.pt-card.is-active,
.pt-card.is-open {
  background: linear-gradient(165deg, #222e40 0%, #1a2332 100%) !important;
  border-color: #1a2332 !important;
  box-shadow:
    0 1px 0 0 rgba(255,255,255,0.06) inset,
    0 20px 48px -6px rgba(15, 23, 42, 0.2),
    0 6px 16px rgba(0, 0, 0, 0.08) !important;
}

/* --------------------------------------------------------------------------
   Card Header: Clean Minimalist Title + Preview + Toggle Trigger
   -------------------------------------------------------------------------- */
.pt-card-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 28px;
  cursor: pointer;
  user-select: none;
  background: transparent;
  transition: background-color 0.18s ease;
}

/* Title & Subtitle Container */
.pt-header-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.pt-clause-title {
  font-family: 'Poppins', 'Inter', -apple-system, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--pt-text-title);
  line-height: 1.3;
  margin: 0;
  transition: color var(--pt-transition-smooth);
}

/* Title turns Crisp White on Dark Blue Hover */
.pt-card.is-active .pt-clause-title,
.pt-card.is-open .pt-clause-title {
  color: #ffffff !important;
}

.pt-clause-preview {
  font-size: 0.88rem;
  color: var(--pt-text-muted);
  line-height: 1.4;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--pt-transition-smooth);
}

/* Preview text turns soft light slate on Dark Blue Hover */
.pt-card.is-active .pt-clause-preview,
.pt-card.is-open .pt-clause-preview {
  color: #cbd5e1 !important;
}

/* Toggle Chevron Button — Frosted Pill */
.pt-toggle-btn {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #f1f5f9, #e8ecf1);
  color: #475569;
  font-size: 0.85rem;
  border: 1px solid rgba(226, 232, 240, 0.6);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05) !important;
  transition: all var(--pt-transition-spring);
}

/* Toggle Button on Dark Blue Hover */
.pt-card.is-active .pt-toggle-btn,
.pt-card.is-open .pt-toggle-btn {
  background-color: rgba(255, 255, 255, 0.14) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.24) !important;
  transform: rotate(180deg);
}

/* --------------------------------------------------------------------------
   Card Body: Ultra-Smooth Height Expansion
   -------------------------------------------------------------------------- */
.pt-card-body-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--pt-transition-spring);
  will-change: grid-template-rows;
}

.pt-card.is-active .pt-card-body-wrapper,
.pt-card.is-open .pt-card-body-wrapper {
  grid-template-rows: 1fr;
}

.pt-card-body-inner {
  overflow: hidden;
  transition: opacity 0.25s ease;
  opacity: 0;
}

.pt-card.is-active .pt-card-body-inner,
.pt-card.is-open .pt-card-body-inner {
  opacity: 1;
}

/* Content Area: Aligned with card header text */
.pt-card-content {
  padding: 10px 28px 24px 28px;
  color: var(--pt-text-body);
  font-size: 0.98rem;
  line-height: 1.7;
  border-top: 1px solid #f1f5f9;
  box-sizing: border-box;
  transition: border-color var(--pt-transition-smooth), color var(--pt-transition-smooth);
}

/* Content Divider on Dark Blue Hover */
.pt-card.is-active .pt-card-content,
.pt-card.is-open .pt-card-content {
  border-top-color: rgba(255, 255, 255, 0.12) !important;
  color: #e2e8f0 !important;
}

/* Paragraphs & Text on Dark Blue Hover */
.pt-card-content p {
  margin: 14px 0;
  color: var(--pt-text-body);
  line-height: 1.7;
  transition: color var(--pt-transition-smooth);
}

.pt-card-content p:first-child {
  margin-top: 12px;
}

.pt-card-content p:last-child {
  margin-bottom: 0;
}

.pt-card.is-active .pt-card-content p,
.pt-card.is-open .pt-card-content p {
  color: #e2e8f0 !important;
}

.pt-card-content strong {
  font-weight: 700;
  color: #0f172a;
  transition: color var(--pt-transition-smooth);
}

.pt-card.is-active .pt-card-content strong,
.pt-card.is-open .pt-card-content strong {
  color: #ffffff !important;
}

.pt-card-content ul {
  list-style: none;
  padding: 0;
  margin: 14px 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pt-card-content li {
  position: relative;
  padding-left: 20px;
  line-height: 1.6;
  color: var(--pt-text-body);
  transition: color var(--pt-transition-smooth);
}

.pt-card.is-active .pt-card-content li,
.pt-card.is-open .pt-card-content li {
  color: #e2e8f0 !important;
}

/* Solid Bullet Point - Neutral Slate on Default, Crisp White on Dark Blue Hover */
.pt-card-content li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #475569;
  box-shadow: none !important;
  transition: background-color var(--pt-transition-smooth);
}

.pt-card.is-active .pt-card-content li::before,
.pt-card.is-open .pt-card-content li::before {
  background-color: #ffffff !important; /* Pure White, Zero Light Blue */
}

/* --------------------------------------------------------------------------
   Mobile & Tablet Responsiveness
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .partnership-terms-section {
    padding: 36px 0 80px;
  }

  .pt-header-centered {
    margin-bottom: 32px;
    padding: 8px 16px 0;
  }

  .pt-main-title {
    font-size: clamp(1.9rem, 4vw, 2.45rem);
  }

  .pt-cards-deck {
    max-width: 100%;
  }

  .pt-card-content {
    padding: 10px 24px 22px 24px;
  }
}

@media (max-width: 768px) {
  .partnership-terms-section {
    padding: 30px 0 64px;
  }

  .pt-container {
    padding: 0 16px;
  }

  .pt-header-centered {
    margin-bottom: 24px;
    padding: 4px 8px 0;
  }

  .pt-main-title {
    font-size: 1.8rem;
    margin-bottom: 12px;
  }

  .pt-main-subtitle {
    font-size: 1.02rem;
  }

  .pt-card-header {
    padding: 18px 20px;
    gap: 12px;
  }

  .pt-clause-title {
    font-size: 1.05rem;
  }

  .pt-clause-preview {
    font-size: 0.84rem;
  }

  .pt-toggle-btn {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }

  .pt-card-content {
    padding: 8px 18px 18px 18px;
    font-size: 0.92rem;
  }

  .pt-card-content ul {
    gap: 8px;
  }

  .pt-card-content li {
    padding-left: 18px;
  }
}

@media (max-width: 480px) {
  .pt-main-title {
    font-size: 1.6rem;
  }

  .pt-main-subtitle {
    font-size: 0.94rem;
  }

  .pt-clause-preview {
    display: none;
  }

  .pt-card-header {
    padding: 16px 16px;
  }

  .pt-card-content {
    padding: 6px 16px 16px 16px;
  }
}
