/* Packages — source: sections/Packages.tsx */

/*
 * This section is built from native containers/widgets so every price, plan name
 * and feature is editable in Elementor. That costs two things the source did not
 * have, and most of the non-obvious rules below exist to pay for them:
 *
 *  1. Extra wrappers. A widget is <div class="…widget"><div class="elementor-
 *     widget-container">…</div></div>, so a box that was one element in the
 *     source is now three. Box properties (flex, margin, padding for pills) go
 *     on the widget div; typography goes on the inner element.
 *  2. Elementor's own resets. .elementor-heading-title{line-height:1;margin:0;
 *     padding:0} at (0,1,0) beats a value the source merely inherited (body is
 *     line-height:1.6) and beats tokens.css's h3/h4 line-heights. So EVERY
 *     heading widget below restates line-height explicitly, even where that
 *     looks redundant — drop one and the text silently reflows.
 *
 * Every rule is #packages-scoped, which outranks .e-con (0,1,0) regardless of
 * stylesheet order, so no !important is needed for the container resets.
 */

/*
 * The source section is pure block flow: a <section> holding two absolutely
 * positioned blobs plus a container whose children space themselves with
 * margins (`margin: 0 auto 36px` on the guarantee, `0 auto clamp()` on the
 * head). Elementor makes every container display:flex, which would (a) insert
 * the kit's --gap on top of those margins and (b) blockify the eyebrow's
 * inline-block pill to the full 780px head width. Restoring display:block at
 * each of the three levels reproduces the source exactly and is far cheaper
 * than re-expressing the margin rhythm as flex gaps.
 */
#packages {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--page-bg);
}

#packages .lt-pkg-inner {
  display: block;
  position: relative;
  z-index: 1;
}

#packages .lt-pkg-head {
  display: block;
}

/*
 * Trap #3: the blobs are absolute against the section, but Elementor gives the
 * HTML widget's wrapper position:relative — which would make that wrapper (height
 * 0, pinned to the top) their containing block, so bottom:-80px on blob 2 would
 * land near the section's top edge instead of below its bottom.
 */
#packages .lt-pkg-blobs,
#packages .lt-pkg-blobs > .elementor-widget-container {
  position: static;
}

/* Both blobs are static here — unlike Hero's, the source gives them no animation. */
#packages .lt-pkg-blob-1 {
  top: -100px;
  inset-inline-end: -80px;
  width: 500px;
  height: 400px;
  border-radius: 55% 45% 60% 40% / 45% 55% 40% 60%;
  background: rgba(41, 128, 242, 0.06);
}

#packages .lt-pkg-blob-2 {
  bottom: -80px;
  inset-inline-start: -60px;
  width: 380px;
  height: 300px;
  border-radius: 40% 60% 50% 50% / 55% 40% 60% 45%;
  background: rgba(126, 176, 242, 0.07);
}

/* ---------- Head ---------- */

/* .lt-eyebrow supplies the pill; Packages overrides all three of its colours. */
#packages .lt-pkg-eyebrow {
  color: var(--brand-primary);
  background: rgba(41, 128, 242, 0.08);
  box-shadow: inset 0 0 0 1px rgba(41, 128, 242, 0.18);
}

/*
 * Typography lands on .elementor-heading-title, not on the widget wrapper:
 * hello-elementor's reset sets `h1,h2,…{font-weight:500;line-height:1.2}` on the
 * heading element itself, and a real rule always beats a value inherited from an
 * ancestor — so styling only the wrapper would silently lose the 900 weight.
 */
#packages .lt-pkg-h2 .elementor-heading-title {
  font-size: var(--t-h2);
  font-weight: 900;
  line-height: 1.05;
  color: var(--page-fg-strong);
  margin: 18px 0 0;
}

#packages .lt-pkg-sub p {
  font-size: var(--t-lead);
  color: var(--page-fg-muted);
  margin: 14px 0 0;
}

/* ---------- Guarantee bar ---------- */
#packages .lt-pkg-guarantee {
  display: flex;
  flex-direction: row; /* containers default to --flex-direction:column */
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(41, 128, 242, 0.07);
  border: 1px solid rgba(41, 128, 242, 0.18);
  border-radius: var(--r-lg);
  padding: 14px 22px;
  max-width: 680px;
  margin: 0 auto 36px;
  text-align: center;
}

/*
 * The shield was a direct flex child of the bar; now the HTML widget's two
 * wrappers sit between them. Left as block wrappers the <svg> would become
 * inline-level and pick up baseline descender space, growing the bar by ~4px —
 * so the wrappers are flex, which blockifies the svg exactly as before.
 */
#packages .lt-pkg-guarantee-ico-w {
  flex-shrink: 0;
  display: flex;
}

/* .elementor-widget-container does not exist here (e_optimized_markup ACTIVE);
   the rule above already puts display:flex on the widget itself. */

#packages .lt-pkg-guarantee-ico {
  flex-shrink: 0;
  display: block;
  color: var(--brand-primary);
}

#packages .lt-pkg-guarantee-txt .elementor-heading-title {
  font-size: var(--t-body);
  color: var(--page-fg);
  font-weight: 600;
  line-height: 1.6; /* the source <span> inherited this from body */
}

/* ══════════════ Desktop: featured bar + 3-col grid ══════════════
   The radii below are the source's literals. It bypasses --r-lg/--r-xl here
   (20px / 18px / 999px are none of them), so they are transcribed, not mapped. */

/* Both trees are plain block boxes; their children own all spacing. */
#packages .lt-pkg-desktop,
#packages .lt-pkg-mobile {
  display: block;
  padding: 0;
}

#packages .lt-pkg-feat {
  display: flex;
  flex-direction: row;
  gap: 0;
  align-items: stretch;
  padding: 0;
  background: #2980f2;
  color: #fff;
  border-radius: 20px;
  margin-bottom: 14px;
  box-shadow: 0 16px 48px -8px rgba(41, 128, 242, 0.35);
  overflow: hidden;
}

/* Column 1 — name. padding-left:0 is the source's literal, not an oversight. */
#packages .lt-pkg-feat-info {
  flex: 0 0 240px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px 28px 28px 0;
  border-inline-start: none;
  border-inline-end: 1px solid rgba(255, 255, 255, 0.18);
}

/*
 * The pill styling sits on the widget div, not on .elementor-heading-title:
 * align-self only works on the flex item, and a background on the inner element
 * would paint the full column width. align-self:flex-start shrinks the item to
 * its text, reproducing the source's inline-block span.
 */
#packages .lt-pkg-feat-badge {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.22);
  padding: 3px 11px;
  border-radius: 999px;
}

#packages .lt-pkg-feat-badge .elementor-heading-title {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  line-height: 1.6;
}

#packages .lt-pkg-feat-name .elementor-heading-title {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  margin: 0;
  line-height: 1.2;
}

#packages .lt-pkg-feat-tagline .elementor-heading-title {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
  line-height: 1.5;
}

/* Column 2 — features, two abreast.
   The grid moves onto the <ul> the icon-list widget renders; the widget div
   takes the outer box (flex + border). .elementor-widget-container is already
   height:100% from Elementor's own .e-con>.elementor-widget rule, and both it
   and the ul need that height for align-content:center to have room to work. */
#packages .lt-pkg-feat-list {
  flex: 1;
  border-inline-end: 1px solid rgba(255, 255, 255, 0.18);
}

/* No .elementor-widget-container on this install; the <ul> below carries the
   height, and .lt-pkg-feat-list itself is the flex child. */

#packages .lt-pkg-feat-list .elementor-icon-list-items {
  height: 100%;
  list-style: none;
  padding: 28px 28px;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
  align-content: center;
}

#packages .lt-pkg-feat-list .elementor-icon-list-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.4;
}

/*
 * The check is a ::before rather than an Elementor icon: the source's glyph is a
 * bare ✓ character, and every Font Awesome check is a different shape, so an
 * `icon` widget could not be pixel-identical. Because the li is display:flex the
 * pseudo is a real flex item — same gap, and wrapped text still indents past it,
 * which a ::before inside the text span would not do.
 */
#packages .lt-pkg-feat-list .elementor-icon-list-item::before {
  content: "✓";
  flex-shrink: 0;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 1px;
}

/* Column 3 — price + CTA */
#packages .lt-pkg-feat-price-block {
  flex: 0 0 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 28px 28px 28px 28px;
  text-align: center;
}

#packages .lt-pkg-feat-price-main .elementor-heading-title { font-size: 40px; font-weight: 900; line-height: 1; }
#packages .lt-pkg-feat-price-orig { margin-top: 2px; }
#packages .lt-pkg-feat-price-orig .elementor-heading-title { font-size: 13px; text-decoration: line-through; opacity: 0.42; line-height: 1.6; }
#packages .lt-pkg-feat-price-monthly { margin-top: 3px; margin-bottom: 14px; }
#packages .lt-pkg-feat-price-monthly .elementor-heading-title { font-size: 12px; opacity: 0.72; line-height: 1.6; }

/*
 * The button widget nests <a class="elementor-button"> two wrappers deep. The
 * source's <a> was the flex item and carried width:100%; the widget div is the
 * flex item now, and the column's align-items:center would otherwise shrink it
 * to its text — so the width has to be restated at both levels.
 */
#packages .lt-pkg-feat-cta {
  width: 100%;
}

/* line-height:1.6 restates what the source's <a> inherited from body —
   .elementor-button hardcodes line-height:1, which would shorten the button
   by ~9px. Every .elementor-button rule below restates it for the same reason. */
#packages .lt-pkg-feat-cta .elementor-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 11px 12px;
  border-radius: 999px;
  background: #fff;
  color: #2980f2;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.6;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.18s;
}

#packages .lt-pkg-feat-cta .elementor-button:hover { opacity: 0.88; }

/* 3-col grid */
#packages .lt-pkg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 0;
}

#packages .lt-pkg-card {
  background: #fff;
  border: 1px solid rgba(41, 128, 242, 0.13);
  border-radius: 18px;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 4px 18px -4px rgba(41, 128, 242, 0.09);
}

/*
 * .lt-pkg-card-top / .lt-pkg-card-price are the source's two unclassed <div>
 * groupings inside each card — they exist to make the card's 14px gap fall
 * between the three groups rather than between all six leaves. Naming them was
 * unavoidable: a container needs a class to be styled.
 */
#packages .lt-pkg-card-top,
#packages .lt-pkg-card-price {
  display: block;
  padding: 0;
}

#packages .lt-pkg-card-badge {
  display: inline-block;
  background: rgba(41, 128, 242, 0.1);
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 6px;
}

#packages .lt-pkg-card-badge .elementor-heading-title {
  font-size: 11px;
  font-weight: 800;
  color: #2980f2;
  line-height: 1.6;
}

/* line-height:1.2 is tokens.css's h4 rule, which .elementor-heading-title would
   otherwise override with 1. Same story for the 1.6 on the <p> tagline. */
#packages .lt-pkg-card-name .elementor-heading-title { font-size: 17px; font-weight: 800; color: var(--page-fg-strong); margin: 0; line-height: 1.2; }
#packages .lt-pkg-card-tagline .elementor-heading-title { font-size: 12px; color: var(--page-fg-muted); margin: 4px 0 0; line-height: 1.6; }

#packages .lt-pkg-card-price-row {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 8px;
  padding: 0;
}

#packages .lt-pkg-card-price-main .elementor-heading-title { font-size: 26px; font-weight: 900; color: #2980f2; line-height: 1.6; }
#packages .lt-pkg-card-price-orig .elementor-heading-title { font-size: 12px; text-decoration: line-through; color: var(--page-fg-subtle); line-height: 1.6; }
#packages .lt-pkg-card-monthly { margin-top: 2px; }
#packages .lt-pkg-card-monthly .elementor-heading-title { font-size: 12px; color: var(--page-fg-muted); line-height: 1.6; }

#packages .lt-pkg-card-list {
  flex: 1;
}

#packages .lt-pkg-card-list .elementor-icon-list-items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#packages .lt-pkg-card-list .elementor-icon-list-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12px;
  color: var(--page-fg);
  line-height: 1.4;
}

#packages .lt-pkg-card-list .elementor-icon-list-item::before {
  content: "✓";
  color: #2980f2;
  font-weight: 700;
  flex-shrink: 0;
}

/* margin-top:auto pushes the CTA to the card's bottom edge; it belongs on the
   flex item, which is now the widget div rather than the <a>. */
#packages .lt-pkg-card-cta {
  margin-top: auto;
}

/* transition:none — the source's <a> declares none, so its :hover opacity snaps.
   .elementor-button ships `transition:all .3s`, which would fade it instead. */
#packages .lt-pkg-card-cta .elementor-button {
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--brand-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.6;
  text-decoration: none;
  transition: none;
}

#packages .lt-pkg-card-cta .elementor-button:hover { opacity: 0.88; }

/* ══════════════ Mobile: accordion stack, featured first ══════════════ */

#packages .lt-pkg-acc-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
}

#packages .lt-pkg-acc-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  position: relative;
  padding: 0;
  display: block;
  transition: box-shadow 0.3s ease;
}

#packages .lt-pkg-acc-item-feat {
  background: var(--brand-primary);
  border: none;
  box-shadow: 0 12px 36px -8px rgba(41, 128, 242, 0.38);
}

/*
 * The head is a container with html_tag:"button", so it is still a real <button>
 * — native focus and Enter/Space, which lifetec.js's click handler gets for free
 * and which a div+role="button" could not have without new JS. The editor's
 * HTML-Tag dropdown does not offer "button", but the renderer validates against
 * Utils::ALLOWED_HTML_WRAPPER_TAGS, which includes it.
 */
#packages .lt-pkg-acc-head {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 16px 16px 16px 20px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

#packages .lt-pkg-acc-head-txt {
  display: block;
  padding: 0;
  text-align: right;
  flex: 1;
}

#packages .lt-pkg-acc-name .elementor-heading-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--page-fg-strong);
  line-height: 1.2;
}

/* line-height:normal, not 1.6: the source's span inherited the UA <button>
   font shorthand, which resets line-height to normal. */
#packages .lt-pkg-acc-meta {
  margin-top: 2px;
}

#packages .lt-pkg-acc-meta .elementor-heading-title {
  font-size: 13px;
  color: var(--page-fg-muted);
  line-height: normal;
}

#packages .lt-pkg-acc-badge {
  background: var(--brand-primary);
  padding: 3px 10px;
  border-radius: var(--r-pill);
  flex-shrink: 0;
}

#packages .lt-pkg-acc-badge .elementor-heading-title {
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  line-height: 1.4;
}

/*
 * The chevron is a ::after on the head rather than a fifth HTML widget: it is
 * pure chrome, there is one per accordion item, and as a pseudo it is still the
 * last flex item (so it lands left of the badge in RTL, as before). The glyph is
 * the source's own SVG inlined as a data URI, so the shape is unchanged;
 * currentColor cannot cross into a background-image, so the two colour variants
 * are spelled out instead.
 */
#packages .lt-pkg-acc-head::after {
  content: "";
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  background-color: rgba(41, 128, 242, 0.1);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232980f2' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
  transition: transform 0.3s var(--ease);
}

/*
 * The source mounts/unmounts the body — there is no height transition and it
 * snaps open. display:none reproduces that exactly; do not "upgrade" this to a
 * max-height slide. lifetec.js only toggles .is-open.
 */
#packages .lt-pkg-acc-body {
  display: none;
  padding: 0 20px 20px;
}

#packages .lt-pkg-acc-item.is-open .lt-pkg-acc-body { display: block; }
#packages .lt-pkg-acc-item.is-open .lt-pkg-acc-head::after { transform: rotate(180deg); }

#packages .lt-pkg-acc-price {
  display: block;
  border-top: 1px solid var(--line);
  padding: 16px 0 0;
  margin-bottom: 14px;
}

/*
 * Price and struck price are two spans on one line in the source, separated by a
 * literal {" "}. Elementor emits each widget as its own block-level div, so all
 * three levels are forced back to inline: that puts them in one inline
 * formatting context (baseline-aligned, as before) and the newline Elementor
 * prints between sibling widgets collapses to exactly the one space the source
 * had. A flex row with a fixed gap could not reproduce a space's real width.
 */
#packages .lt-pkg-acc-price-main,
#packages .lt-pkg-acc-price-main > .elementor-widget-container,
#packages .lt-pkg-acc-price-orig,
#packages .lt-pkg-acc-price-orig > .elementor-widget-container {
  display: inline;
}

#packages .lt-pkg-acc-price-main .elementor-heading-title {
  font-size: clamp(26px, 6vw, 34px);
  font-weight: 900;
  color: var(--brand-primary);
  line-height: 1;
}

#packages .lt-pkg-acc-price-orig .elementor-heading-title {
  font-size: 13px;
  text-decoration: line-through;
  color: var(--page-fg-subtle);
  line-height: 1.6;
}

#packages .lt-pkg-acc-terms {
  margin-top: 4px;
}

#packages .lt-pkg-acc-terms .elementor-heading-title {
  font-size: 13px;
  color: var(--page-fg-muted);
  line-height: 1.6;
}

#packages .lt-pkg-acc-feats .elementor-icon-list-items {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#packages .lt-pkg-acc-feats .elementor-icon-list-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

/* Circle and check in one pseudo: background-color draws the disc, the source's
   own 12x12 SVG (scaled to 8px, exactly as width/height=8 did) draws the tick. */
#packages .lt-pkg-acc-feats .elementor-icon-list-item::before {
  content: "";
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin-top: 2px;
  background-color: rgba(41, 128, 242, 0.1);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'%3E%3Cpolyline points='2,6 5,9 10,3' stroke='%232980f2' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 8px 8px;
}

#packages .lt-pkg-acc-feats .elementor-icon-list-text {
  font-size: 13px;
  color: var(--page-fg);
  line-height: 1.5;
}

#packages .lt-pkg-acc-cta .elementor-button {
  display: block;
  width: 100%;
  text-align: center;
  font-weight: 800;
  font-size: 15px;
  padding: 13px 20px;
  border-radius: var(--r-pill);
  background: var(--brand-primary);
  color: #fff;
  min-height: 48px;
  line-height: 22px;
  text-decoration: none;
  transition: none;
}

/* Featured inversions. The two glyphs are backgrounds now, so where the source
   let currentColor cascade into the SVG, the white variant is restated. */
#packages .lt-pkg-acc-item-feat .lt-pkg-acc-name .elementor-heading-title { color: #fff; }
#packages .lt-pkg-acc-item-feat .lt-pkg-acc-meta .elementor-heading-title { color: rgba(255, 255, 255, 0.72); }
#packages .lt-pkg-acc-item-feat .lt-pkg-acc-badge { background: rgba(255, 255, 255, 0.22); }
#packages .lt-pkg-acc-item-feat .lt-pkg-acc-head::after {
  background-color: rgba(255, 255, 255, 0.18);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}
#packages .lt-pkg-acc-item-feat .lt-pkg-acc-price { border-top-color: rgba(255, 255, 255, 0.18); }
#packages .lt-pkg-acc-item-feat .lt-pkg-acc-price-main .elementor-heading-title { color: #fff; }
#packages .lt-pkg-acc-item-feat .lt-pkg-acc-price-orig .elementor-heading-title { color: rgba(255, 255, 255, 0.45); }
#packages .lt-pkg-acc-item-feat .lt-pkg-acc-terms .elementor-heading-title { color: rgba(255, 255, 255, 0.72); }
#packages .lt-pkg-acc-item-feat .lt-pkg-acc-feats .elementor-icon-list-item::before {
  background-color: rgba(255, 255, 255, 0.18);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'%3E%3Cpolyline points='2,6 5,9 10,3' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
#packages .lt-pkg-acc-item-feat .lt-pkg-acc-feats .elementor-icon-list-text { color: rgba(255, 255, 255, 0.88); }
#packages .lt-pkg-acc-item-feat .lt-pkg-acc-cta .elementor-button { background: #fff; color: var(--brand-primary); }

/*
 * Desktop and mobile are different layouts, not a reflow, so both trees are in
 * the DOM and this one pair of rules owns the switch. The classes sit on the
 * outermost container of each tree, so hiding one leaves nothing behind — and
 * .lt-pkg-inner is display:block, so a hidden sibling cannot collect a --gap.
 */
@media (max-width: 820px) {
  #packages .lt-pkg-desktop { display: none !important; }
}

@media (min-width: 821px) {
  #packages .lt-pkg-mobile { display: none !important; }
}
