/* ============================================================
   PricingHero — Component Styles
   Card styles live in PricingCard/PricingCard.css.
   Design tokens are defined in src/tokens.css.
   ============================================================ */

/* ---- Outer section ---- */
.pricing-hero {
  align-items:      center;
  background-color: var(--background);
  box-sizing:       border-box;
  display:          flex;
  flex-direction:   column;
  font-family:      var(--font-family-default);
  gap:              4rem;        /* 64px */
  padding:          8rem 0 6rem; /* 128px top, 96px bottom */
  width:            100%;
}


/* ============================================================
   Heading block
   ============================================================ */

.pricing-hero__heading {
  align-items:    center;
  display:        flex;
  flex-direction: column;
  gap:            1.5rem;      /* 24px */
  width:          100%; 
  margin-bottom:  4rem;        /* 64px */
}

/* ---- Tab switcher — uses shared Tabs component ---- */
.pricing-hero__tabs {
  display:         flex;
  justify-content: center;
  width:           100%;
}

/* ---- Heading title + subtitle ---- */
.pricing-hero__title {
  color:       var(--foreground);
  font-size:   3.75rem;        /* 60px */
  font-weight: var(--font-weight-bold);
  line-height: 1;
  margin:      0;
  max-width:   40rem;          /* 640px */
  text-align:  center;
}

.pricing-hero__subtitle {
  color:       var(--muted-foreground);
  font-size:   1.125rem;       /* 18px */
  font-weight: var(--font-weight-regular);
  line-height: 1.75rem;        /* 28px */
  margin:      0;
  max-width:   40rem;          /* 640px */
  text-align:  center;
}


/* ============================================================
   Pricing section (cards + details)
   ============================================================ */

.pricing-hero__section {
  align-items:    center;
  container-type: inline-size; /* enables @container queries on children */
  display:        flex;
  flex-direction: column;
  gap:            4rem;        /* 64px */
  width:          100%;
}


/* ============================================================
   Cards grid — auto-fit base + targeted orphan prevention
   auto-fit handles 1/2/4-col naturally; we only override in
   the specific ranges where it would create an orphan row.

   Card min-width = 15rem (240px), gap = 1rem (16px).
   N cols min width = N×240 + (N-1)×16.
     4 cols → 1008px   3 cols → 752px   2 cols → 496px
   ============================================================ */

.pricing-hero__packages {
  display: grid;
  gap:     1rem;               /* 16px */
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  width:   100%;
}

/* ---- 4 items: 3-col zone (752–1007px) → force 2 cols to avoid 3+1 orphan ---- */
@container (min-width: 752px) and (max-width: 1007px) {
  .pricing-hero__packages:has(> :nth-child(4):last-child) {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---- 3 items: 2-col zone (496–751px) → force 1 col to avoid 2+1 orphan ---- */
@container (min-width: 496px) and (max-width: 751px) {
  .pricing-hero__packages:has(> :nth-child(3):last-child) {
    grid-template-columns: 1fr;
  }
}

/* ---- Cross-card section alignment via CSS subgrid ---- */
/* Each card's 4 sections (title-group, pricing, button-area, footer)
   participate in the parent row tracks so they align at the same
   Y position across all cards, regardless of content height differences. */
.pricing-hero__packages > .pricing-card {
  display:            grid;
  grid-row:           span 4;
  grid-template-rows: subgrid;
}


/* ============================================================
   Details section
   ============================================================ */

.pricing-hero__details {
  align-items:     center;
  display:         flex;
  flex-direction:  column;
  gap:             0.75rem;     /* 12px */
  justify-content: center;
  width:           100%;
  text-align: center;
}

.pricing-hero__guarantee {
  color:       var(--muted-foreground);
  font-size:   var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-base);
  margin:      0;
  text-align:  center;
}

.pricing-hero__advantages {
  align-items:    center;
  display:        flex;
  flex-direction: column;
  gap:            1rem;        /* 16px */
}

.pricing-hero__advantage-row {
  align-items:     center;
  display:         flex;
  flex-wrap:       wrap;
  column-gap:             1.5rem;     /* 24px */
  row-gap: 1rem; /* 16px — separate row for each advantage on narrow screens */
  justify-content: center;
}

.pricing-hero__advantage {
  align-items: center;
  display:     flex;
  flex-shrink: 0;
  gap:         0.375rem;       /* 6px */
}

/* ---- Advantage icon badge ---- */
.pricing-hero__advantage-badge {
  align-items:     center;
  border-radius:   var(--radius-full);
  display:         inline-flex;
  flex-shrink:     0;
  height:          1.25rem;   /* 20px */
  justify-content: center;
  width:           1.25rem;
}

.pricing-hero__advantage-badge svg {
  display: block;
  height:  0.75rem;  /* 12px */
  width:   0.75rem;
}

.pricing-hero__advantage-badge--info {
  background-color: var(--info);
  color:            #ffffff;
}

.pricing-hero__advantage-badge--primary {
  background-color: var(--primary);
  color:            #ffffff;
}

.pricing-hero__advantage-text {
  color:       var(--foreground);
  font-size:   var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-base);
  white-space: nowrap;
}


/* ============================================================
   Mobile — Webflow landscape breakpoint (≤767px)
   ============================================================ */

@media (max-width: 767px) {
  .pricing-hero {
    padding: 4rem 0;
  }


  .pricing-hero__title {
    font-size: 3rem;    /* 48px */
  }

  .pricing-hero__section {
    gap: 2.25rem;       /* 36px — between cards and details */
  }

  .pricing-hero__details {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .pricing-hero__advantages {
    width: 100%;
  }

  .pricing-hero__advantage-row {
    justify-content: flex-start;
    align-items: flex-start;
    width: 100%;
    flex-wrap: wrap;
    flex-direction: column;
  }
}

/* ============================================================
   Container — shared responsive layout constraint
   Provides 1024px max content width with responsive side padding.
   Import this in any component that uses the .container class.
   ============================================================ */

.container {
  width:     1024px;
  max-width: calc(100% - 160px); /* 80px × 2 — desktop */
  margin:    0 auto;
}

/* Tablet + landscape mobile (≤991px): 60px × 2 = 120px */
@media (max-width: 991px) {
  .container {
    max-width: calc(100% - 120px);
  }
}

/* Portrait mobile (≤479px): 24px × 2 = 48px */
@media (max-width: 479px) {
  .container {
    max-width: calc(100% - 48px);
  }
}

/* ============================================================
   Tabs — Segmented pill tab bar
   Design tokens from src/tokens.css.
   ============================================================ */

.seg-tabs {
  display:       inline-flex;
  align-items:   center;
  flex-shrink:   0;
  height:        38px;
  background:    var(--muted);
  border-radius: var(--radius-full);
  column-gap:    1px;
}

/* Individual tab — button or anchor */
.seg-tabs__tab {
  display:         flex;
  align-items:     center;
  justify-content: center;
  height:          100%;
  padding:         var(--spacing-2) var(--spacing-4); /* 8px 16px */
  border:          1px solid transparent; /* size-stable when active border appears */
  border-radius:   var(--radius-full);
  background:      transparent;
  color:           var(--foreground);
  font-family:     var(--font-family-default);
  font-size:       var(--font-size-sm);   /* 14px */
  font-weight:     var(--font-weight-medium);
  line-height:     var(--line-height-sm);
  cursor:          pointer;
  text-decoration: none;  /* reset <a> default */
  white-space:     nowrap;
  transition:      background 0.2s, border-color 0.2s;
  box-sizing: border-box;
}

.seg-tabs__tab:hover {
  background: var(--opacity-background-50);
}

/* Active tab — only visible in playing state (.seg-tabs--active) */
.seg-tabs--active .seg-tabs__tab.is-active {
  background: var(--background);
  border:     1px solid var(--border);
}

.seg-tabs--active .seg-tabs__tab.is-active:hover {
  background: var(--background);
}

