/**
 * F1GMAT APU Theme · essay-guide-preview-cta.css
 * Guide offer card (.fg-guide) for MBA essay preview pages — the end-of-page
 * CTA that sells the paid guide. Tokens from style.css :root; renders under
 * .node__content so it works in any Full HTML node body.
 *
 * Hardened for CKEditor 5, which wraps bare inline elements (the tab span,
 * each button anchor) in <p>; those wrappers are neutralised below so the
 * markup renders the same whether hand-authored or editor-produced.
 *
 * Load site-wide via apu.libraries.yml so the class is available on any
 * content type, matching mba-essay-questions.css.
 *
 * Depends on the :root palette in style.css.
 */

/* Shell: two-panel card, gold frame, offset paper shadow ------------- */
.node__content .fg-guide {
  position: relative;
  margin: 48px 0 0;
  background: var(--fg-paper-lift);
  border: 1px solid var(--fg-gold-dark);
  box-shadow: 8px 8px 0 -2px var(--fg-paper-aged);
  display: grid;
  grid-template-columns: 1fr 250px;
}

/* Columns are pinned explicitly so a stray editor-added <p> cannot shift
   them. Any unclassed <p> CKEditor wraps around the tab (or buttons) is
   taken out of grid flow with display:contents — no :has() selector, which
   some CSS minifiers drop during aggregation. The .fg-guide__trust <p> is
   excluded because it is a real grid item spanning both columns. */
.node__content .fg-guide > p:not(.fg-guide__trust) {
  display: contents;
}
.node__content .fg-guide__main { grid-column: 1; grid-row: 1; }
.node__content .fg-guide__aside { grid-column: 2; grid-row: 1; }
.node__content .fg-guide__trust { grid-column: 1 / -1; }
.node__content .fg-guide__tab {
  position: absolute;
  top: -13px;
  left: 28px;
  background: var(--fg-ink);
  color: var(--fg-paper);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 14px;
}

/* Left panel: pitch + what's inside --------------------------------- */
.node__content .fg-guide__main { padding: 34px 30px 30px; }

.node__content .fg-guide__eyebrow {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--fg-gold-dark);
  margin: 0 0 14px;
}

.node__content .fg-guide__head {
  font-family: Georgia, serif;
  font-size: 25px;
  line-height: 1.22;
  color: var(--fg-ink);
  font-weight: 700;
  letter-spacing: -0.3px;
  margin: 0 0 18px;
}

.node__content ul.fg-guide__list { list-style: none; margin: 0; padding: 0; }

.node__content .fg-guide__list li {
  position: relative;
  padding: 9px 0 9px 30px;
  font-family: Georgia, serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--fg-ink-soft);
  border-top: 0.5px solid var(--fg-hairline-soft);
  background: none;
}
.node__content .fg-guide__list li:first-child { border-top: 0; }

/* Teal check tick drawn in CSS (rotated corner), no image. */
.node__content .fg-guide__list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 15px;
  width: 11px;
  height: 6px;
  border-left: 2px solid var(--fg-teal);
  border-bottom: 2px solid var(--fg-teal);
  transform: rotate(-45deg);
}
.node__content .fg-guide__list strong { color: var(--fg-ink); font-weight: 600; }

/* Right panel: premium action box ----------------------------------- */
.node__content .fg-guide__aside {
  background: var(--fg-paper-premium);
  border-left: 1px solid var(--fg-gold-dark);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}
/* CKEditor wraps the buttons in <p>; keep those tight. */
.node__content .fg-guide__aside > p { margin: 0; }

.node__content .fg-guide__kicker {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--fg-ink-muted);
  margin: 0 0 4px;
}

.node__content .fg-guide__price {
  font-family: Georgia, serif;
  font-size: 15px;
  line-height: 1.35;
  color: var(--fg-ink-soft);
  font-style: italic;
  margin: 0 0 16px;
}

/* Primary button. These rules beat the theme's store-link treatment
   (a[href*="store.f1gmat.com"] → blue text + dotted gold underline),
   which otherwise turns the button label blue and underlined. */
.node__content .fg-guide a.btn { text-decoration: none; }
.node__content .fg-guide a.btn-primary,
.node__content .fg-guide a.btn-primary:hover {
  color: var(--fg-paper);
  font-size: 14px;
  font-weight: 700;
  padding: 14px 18px;
  display: block;
  width: 100%;
  letter-spacing: 0.02em;
  border-radius: 0;
  border: 1px solid var(--fg-teal);
  text-decoration: none;
}
.node__content .fg-guide a.btn-primary { background: var(--fg-teal); }
.node__content .fg-guide a.btn-primary:hover {
  background: var(--fg-teal-dark);
  border-color: var(--fg-teal-dark);
}

.node__content .fg-guide__or {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--fg-ink-muted);
  margin: 14px 0;
}

.node__content .fg-guide a.fg-guide__edit {
  display: inline-block;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-teal);
  text-decoration: none;
  border-bottom: 1px solid var(--fg-teal);
  padding-bottom: 1px;
}

/* Trust line spans both columns at the foot of the card. */
.node__content .fg-guide__trust {
  grid-column: 1 / -1;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  line-height: 1.5;
  color: var(--fg-ink-muted);
  margin: 0;
  padding: 16px 30px 24px;
  border-top: 0.5px solid var(--fg-hairline);
}
.node__content .fg-guide__trust b,
.node__content .fg-guide__trust strong { color: var(--fg-ink); font-weight: 700; }

/* Stack to one column on phones. */
@media (max-width: 620px) {
  .node__content .fg-guide { grid-template-columns: 1fr; }
  /* undo the desktop column pinning so panels stack in source order */
  .node__content .fg-guide__main,
  .node__content .fg-guide__aside { grid-column: 1; grid-row: auto; }
  .node__content .fg-guide__aside {
    border-left: 0;
    border-top: 1px solid var(--fg-gold-dark);
  }
}
