/* "Best plan" guide layout (prototype: /mejor-plan-alphafutures/).
   Everything is scoped to main.pg or .pg-* classes, so the 144 pages that
   load plan-comparison.css are not affected. */

.pg { padding-bottom: 3rem; }
.pg .container { max-width: 1120px; }

/* ---------- Hero ---------- */
.pg-hero { padding: 2.2rem 0 1.2rem; }
/* standalone.css styles the first section of <main> as a centred, full-width hero
   (main > section.container:first-of-type:not(...)); this selector outranks it. */
body main.pg > section.pg-hero.container:first-of-type:not(.section):not(.challenges-app):not(.plan-page) {
  max-width: 1120px; text-align: left; border-bottom: 0;
  padding-top: 2.2rem !important; padding-bottom: 1.2rem !important;
}
.pg-crumbs { display: flex; flex-wrap: wrap; gap: 0.4rem; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 1rem; }
.pg-crumbs a { color: var(--text-muted); }
.pg-crumbs a:hover { color: var(--accent); }
.pg-kicker { margin: 0 0 0.6rem; font-size: 0.82rem; color: var(--text-muted); }
.pg-kicker a { color: var(--text-secondary); font-weight: 600; }
.pg-hero h1 { margin: 0; max-width: 860px; font-size: clamp(1.75rem, 3.6vw, 2.7rem); line-height: 1.12; letter-spacing: -0.01em; }
.pg-lead { max-width: 800px; margin: 1rem 0 0; color: var(--text-secondary); font-size: 1.05rem; line-height: 1.6; }
.pg-lead strong { color: var(--text); }

.pg-codebar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.9rem 1rem;
  margin-top: 1.4rem; padding: 0.9rem 1rem;
  border: 1px solid rgba(0, 255, 135, 0.32); border-radius: 14px;
  background: linear-gradient(135deg, rgba(0, 255, 135, 0.09), rgba(0, 255, 135, 0.02));
}
/* Dark plate like the rest of the site; Bulenox and Phidias keep their light
   plate from the global img[src=...] rule in style.css (!important). */
.pg-codebar img { width: 44px; height: 44px; object-fit: contain; border-radius: 10px; background: var(--surface, #11161d); border: 1px solid var(--border); padding: 4px; }

/* Centred hero from tablet up (mobile stays left-aligned for readability) */
@media (min-width: 721px) {
  body main.pg > section.pg-hero.container:first-of-type:not(.section):not(.challenges-app):not(.plan-page) { text-align: center; }
  .pg-crumbs { justify-content: center; }
  .pg-hero h1, .pg-lead { margin-left: auto; margin-right: auto; }
  .pg-codebar { max-width: 880px; margin-left: auto; margin-right: auto; text-align: left; }
}
/* One row on wide screens whatever the length of the offer text or the CTA: the text wraps, the buttons do not */
@media (min-width: 900px) {
  .pg-codebar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; max-width: 1000px; }
  .pg-codebar-text span { white-space: nowrap; }
  .pg-codebar-text { margin-right: 0; }
  .pg-codebar-cta { white-space: nowrap; }
  .pg-jump { justify-content: safe center; }
}
.pg-codebar-text { display: grid; gap: 0.1rem; margin-right: auto; }
.pg-codebar-text span { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.pg-codebar-text strong { font-size: 1.15rem; color: var(--accent); }
.pg-trust { margin: 0.6rem 0 0; font-size: 0.82rem; color: var(--text-muted); }
.pg-trust a { color: var(--text-secondary); text-decoration: underline; text-underline-offset: 2px; }

/* Code coupon: "CODE  SCOPE  [copy icon Copy]", copies on click (script.js).
   standalone.css paints every .copy-btn solid green with !important, so the
   coupon look needs !important too. */
.pg .pg-code.copy-btn {
  display: inline-flex !important; visibility: visible !important; opacity: 1 !important;
  width: auto !important; height: auto !important; min-width: 0 !important; min-height: 46px; overflow: visible !important;
  align-items: center; gap: 0.45rem; padding: 0.38rem 0.4rem 0.38rem 0.65rem !important;
  border: 1.5px dashed rgba(0, 255, 135, 0.75) !important; border-radius: 12px !important;
  background: rgba(5, 10, 16, 0.75) !important; color: #fff !important;
  font: 800 1rem/1 'Inter', sans-serif; letter-spacing: 0.04em; white-space: nowrap;
  cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}
.pg .pg-code.copy-btn::before {
  content: "Code"; font-size: 0.58rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-muted); padding-right: 0.45rem; border-right: 1px solid rgba(255, 255, 255, 0.14);
}
.pg .pg-code.copy-btn::after {
  content: "Copy"; display: inline-flex; align-items: center;
  padding: 0.4rem 0.5rem 0.4rem 1.4rem; border-radius: 8px;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2303140b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='12' height='12' rx='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E") no-repeat 0.45rem center / 0.75rem;
  color: #03140b; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.01em; text-transform: none;
}
html[lang="es"] .pg .pg-code.copy-btn::before { content: "Código"; }
html[lang="es"] .pg .pg-code.copy-btn::after { content: "Copiar"; }
html[lang="fr"] .pg .pg-code.copy-btn::after { content: "Copier"; }
.pg .pg-code.copy-btn:hover { border-color: var(--accent) !important; background: rgba(0, 255, 135, 0.1) !important; }
.pg .pg-code.copy-btn:active { transform: scale(0.98); }
/* After a click script.js swaps the text for "Copied"; the badge turns into a tick */
.pg .pg-code.copy-btn.is-copied { border-style: solid !important; border-color: var(--accent) !important; color: var(--accent) !important; }
html[lang] .pg .pg-code.copy-btn.is-copied::after { content: "\2713"; padding-left: 0.6rem; background-image: none; }

/* Jump links: chips instead of a 10-link sidebar */
.pg-jump { display: flex; gap: 0.45rem; margin-top: 1.3rem; overflow-x: auto; padding-bottom: 0.3rem; scrollbar-width: thin; }
.pg-jump a {
  flex: 0 0 auto; padding: 0.42rem 0.75rem; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text-secondary); font-size: 0.84rem; white-space: nowrap;
}
.pg-jump a:hover { border-color: rgba(0, 255, 135, 0.4); color: var(--accent); }

/* ---------- Blocks ---------- */
.pg-block { padding-top: 2.4rem; scroll-margin-top: 80px; }
.pg-block h2 { margin: 0; font-size: clamp(1.35rem, 2.4vw, 1.75rem); line-height: 1.2; }
.pg-head { margin-bottom: 1rem; }
.pg-head p { margin: 0.45rem 0 0; color: var(--text-muted); font-size: 0.95rem; }
.pg-note { margin: 0.8rem 0 0; color: var(--text-muted); font-size: 0.84rem; line-height: 1.55; }
.pg-note a { color: var(--text-secondary); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Plan cards ---------- */
.pg-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.9rem; align-items: stretch; }
.pg-card {
  position: relative; display: flex; flex-direction: column; gap: 0.75rem;
  padding: 1.25rem 1.1rem 1.1rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface);
}
.pg-card.is-featured { border-color: rgba(0, 255, 135, 0.55); box-shadow: 0 0 0 1px rgba(0, 255, 135, 0.25), 0 18px 40px rgba(0, 0, 0, 0.3); background: linear-gradient(180deg, rgba(0, 255, 135, 0.07), var(--surface) 45%); }
.pg-badge {
  align-self: flex-start; padding: 0.28rem 0.6rem; border-radius: 999px;
  background: rgba(255, 255, 255, 0.06); color: var(--text-secondary); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase;
}
.pg-card.is-featured .pg-badge { background: var(--accent); color: #04130b; }
.pg-card h3 { margin: 0; font-size: 1.35rem; }
.pg-card h3 small { font-size: 0.95rem; font-weight: 600; color: var(--text-muted); }
.pg-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 0.55rem; margin: 0; }
.pg-price del { color: var(--text-muted); font-size: 0.9rem; }
.pg-price strong { font-size: 1.5rem; color: var(--text); }
.pg-off { padding: 0.15rem 0.45rem; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-size: 0.75rem; font-weight: 800; }
.pg-facts, .pg-pros, .pg-cons { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.pg-facts li, .pg-pros li, .pg-cons li { position: relative; padding-left: 1.45rem; font-size: 0.9rem; line-height: 1.4; color: var(--text-secondary); }
.pg-facts li::before, .pg-pros li::before, .pg-cons li::before {
  position: absolute; left: 0; top: 0.05rem; width: 1.05rem; height: 1.05rem; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.68rem; font-weight: 800;
}
.pg-facts li.is-good::before, .pg-pros li::before { content: "\2713"; background: rgba(0, 255, 135, 0.15); color: var(--accent); }
.pg-facts li.is-bad::before, .pg-cons li::before { content: "!"; background: rgba(255, 176, 32, 0.15); color: #ffb020; }
.pg-ideal { margin: 0; padding-top: 0.7rem; border-top: 1px solid var(--border); font-size: 0.88rem; color: var(--text-muted); line-height: 1.45; }
.pg-ideal strong { color: var(--text); }
.pg-card-cta { margin-top: auto; justify-content: center; text-align: center; font-size: 0.9rem; padding: 0.72rem 0.8rem; }
.pg-card:not(.is-featured) .pg-card-cta.btn-primary { background: transparent !important; color: var(--accent) !important; border: 1px solid rgba(0, 255, 135, 0.5) !important; box-shadow: none !important; }
.pg-card:not(.is-featured) .pg-card-cta.btn-primary:hover { background: rgba(0, 255, 135, 0.1) !important; }
.pg-more { font-size: 0.82rem; color: var(--text-muted); text-align: center; }
.pg-more:hover { color: var(--accent); }

.pg-cards.pg-cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- Two-option explainer (e.g. Bulenox Option 1 vs Option 2) ---------- */
.pg-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }
.pg-option { padding: 1.1rem 1.15rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.pg-options.pg-options-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pg-option > p { margin: 0; color: var(--text-secondary); font-size: 0.9rem; line-height: 1.55; }
.pg-option h3 { margin: 0 0 0.25rem; font-size: 1.1rem; }
.pg-option .pg-option-tag { display: block; margin-bottom: 0.7rem; color: var(--text-muted); font-size: 0.85rem; }

/* ---------- Chooser ---------- */
.pg-choose { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
.pg-choose li {
  display: flex; align-items: center; justify-content: space-between; gap: 0.8rem;
  padding: 0.8rem 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
}
.pg-choose span { color: var(--text-secondary); font-size: 0.93rem; }
.pg-choose a { flex: 0 0 auto; padding: 0.35rem 0.7rem; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-size: 0.85rem; font-weight: 700; white-space: nowrap; }
.pg-choose a:hover { background: rgba(0, 255, 135, 0.2); }

/* ---------- Tables ---------- */
.pg-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.pg-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 0.9rem; }
.pg-table th, .pg-table td { padding: 0.72rem 0.85rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.pg-table thead th { position: sticky; top: 0; background: var(--surface-strong); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.pg-table thead th.is-featured { color: var(--accent); }
.pg-table tbody th { color: var(--text-muted); font-weight: 600; width: 22%; }
.pg-table tbody tr:last-child th, .pg-table tbody tr:last-child td { border-bottom: 0; }
.pg-table td { color: var(--text-secondary); }
.pg-table td.is-featured, .pg-table th.is-featured { background: rgba(0, 255, 135, 0.045); }
.pg-table td.is-good { color: var(--accent); font-weight: 700; }
.pg-table td.is-bad { color: #ffb020; font-weight: 700; }
.pg-table .pg-row-price td { color: var(--text); font-weight: 800; font-size: 0.98rem; }
.pg-table .pg-row-price td.is-good { color: var(--accent); }
.pg-table-prices td del { display: block; color: var(--text-muted); font-size: 0.78rem; }
.pg-table-prices td strong { color: var(--text); }
.pg-table td.is-na { color: var(--text-muted); }
.pg-table tbody th:first-child, .pg-table thead th:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); }
.pg-table thead th:first-child { background: var(--surface-strong); z-index: 2; }
.pg-legend { display: inline-flex; align-items: center; gap: 0.35rem; margin-left: 0.4rem; font-size: 0.8rem; }
.pg-legend i { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 50%; margin-left: 0.35rem; }
.pg-legend i.is-good { background: var(--accent); }
.pg-legend i.is-bad { background: #ffb020; }

/* ---------- Inline CTA / verdict ---------- */
.pg-inline-cta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.8rem; margin-top: 1rem; padding: 0.9rem 1rem;
  border: 1px solid rgba(0, 255, 135, 0.28); border-radius: 14px; background: rgba(0, 255, 135, 0.05);
}
.pg-inline-cta p { flex: 1 1 320px; margin: 0; color: var(--text-secondary); font-size: 0.92rem; }
.pg-verdict { padding: 1.4rem; border: 1px solid rgba(0, 255, 135, 0.4); border-radius: 16px; background: linear-gradient(135deg, rgba(0, 255, 135, 0.08), var(--surface) 60%); }
.pg-verdict p { margin: 0.7rem 0 0; color: var(--text-secondary); line-height: 1.6; max-width: 820px; }
.pg-verdict-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1rem; }

/* ---------- Per-plan sections ---------- */
.pg-plan > p { margin: 0.7rem 0 0; color: var(--text-secondary); line-height: 1.65; max-width: 860px; }
.pg-plan > p strong { color: var(--text); }
.pg-proscons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; margin-top: 1rem; }
.pg-pros, .pg-cons { padding: 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.pg-plan-link { font-size: 0.88rem; color: var(--text-muted) !important; }
.pg-plan-link a { color: var(--accent); font-weight: 600; }

/* ---------- FAQ / sources ---------- */
.pg .plan-faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.pg .plan-faq-item { padding: 1rem 1.1rem; }
.pg .plan-faq-item h3 { margin: 0 0 0.45rem; font-size: 1rem; line-height: 1.35; }
.pg .plan-faq-item p { margin: 0; color: var(--text-secondary); font-size: 0.9rem; line-height: 1.55; }
.pg-sources p, .pg-sources li { color: var(--text-muted); font-size: 0.86rem; }
.pg-sources a { color: var(--text-secondary); text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .pg-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pg-cards.pg-cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .pg-cards.pg-cards-3 { grid-template-columns: 1fr; }
  .pg-options, .pg-options.pg-options-3 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .pg-hero { padding-top: 1.4rem; }
  .pg-lead { font-size: 0.98rem; }
  .pg-codebar { padding: 0.85rem; }
  .pg-codebar img { width: 38px; height: 38px; }
  .pg-codebar-text { flex: 1 1 calc(100% - 60px); margin-right: 0; }
  .pg-codebar .pg-code { flex: 0 0 auto; }
  .pg-codebar-cta { flex: 1 1 auto; justify-content: center; text-align: center; }
  .pg-cards { grid-template-columns: 1fr; }
  .pg-card.is-featured { order: -1; }
  .pg-choose { grid-template-columns: 1fr; }
  .pg-choose li { flex-direction: column; align-items: flex-start; gap: 0.45rem; }
  .pg-proscons { grid-template-columns: 1fr; }
  .pg .plan-faq { grid-template-columns: 1fr; }
  .pg-inline-cta p { flex: 1 1 100%; }
  .pg-block { padding-top: 2rem; }
}
