/* ===========================================================================
   eu261.es/css/components.css — content-page components (money & guide pages).
   Complements theme.css (palette + base chrome); consumes the same var(--fc-*).
   Apple-ish light, generous whitespace, no inline styles, no JS (FAQ = <details>).
   =========================================================================== */

/* ---- header nav --------------------------------------------------------- */
/* Desktop: checkbox + hamburger hidden, nav shown inline. Mobile rules (below)
   reveal the hamburger and turn .eu-nav into a drop-down driven by `:checked ~`. */
.eu-navcb { display: none; }
.eu-menu__btn { display: none; }
.eu-nav { margin-left: auto; display: flex; gap: 22px; }
.eu-nav a { color: var(--fc-text); text-decoration: none; font-weight: 500; font-size: .98rem; }
.eu-nav a:hover { color: var(--fc-primary); }
.eu-nav a[aria-current="page"] { color: var(--fc-primary); }

/* ---- article shell ------------------------------------------------------ */
.eu-article { max-width: 760px; margin: 0 auto; }
.eu-article h1 { font-size: clamp(1.9rem, 4.6vw, 2.7rem); font-weight: 700; letter-spacing: -.022em; line-height: 1.12; margin: 6px 0 14px; }
.eu-lead { font-size: 1.2rem; color: var(--fc-muted); margin: 0 0 10px; }
.eu-lead strong { color: var(--fc-text); font-weight: 600; }
.eu-updated { font-size: .82rem; color: var(--fc-muted); margin: 0 0 8px; }
.eu-article h2 { font-size: 1.6rem; font-weight: 700; letter-spacing: -.012em; margin: 40px 0 12px; scroll-margin-top: 76px; }
.eu-article h3 { font-size: 1.2rem; font-weight: 600; margin: 24px 0 8px; }
.eu-article p { margin: 0 0 14px; }
.eu-article ul, .eu-article ol { margin: 0 0 14px; padding-left: 22px; }
.eu-article li { margin: 7px 0; }
.eu-article a:not(.eu-btn) { color: var(--fc-primary); text-decoration: none; }
.eu-article a:not(.eu-btn):hover { text-decoration: underline; }
.eu-article em { font-style: italic; }

/* ---- breadcrumb --------------------------------------------------------- */
.eu-breadcrumb { max-width: 760px; margin: 0 auto 6px; font-size: .85rem; }
.eu-breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.eu-breadcrumb li { color: var(--fc-muted); }
.eu-breadcrumb li::after { content: "›"; margin-left: 6px; color: var(--fc-border); }
.eu-breadcrumb li:last-child::after { content: ""; }
.eu-breadcrumb a { color: var(--fc-muted); text-decoration: none; }
.eu-breadcrumb a:hover { color: var(--fc-primary); }

/* ---- table of contents -------------------------------------------------- */
.eu-toc { background: var(--fc-panel-2); border: 1px solid var(--fc-border); border-radius: var(--fc-radius); padding: 18px 20px; margin: 22px 0 8px; }
.eu-toc__title { font-weight: 600; margin: 0 0 8px; font-size: .95rem; }
.eu-toc ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 24px; }
.eu-toc li { margin: 5px 0; break-inside: avoid; }
.eu-toc a { color: var(--fc-primary); text-decoration: none; font-size: .95rem; }
.eu-toc a:hover { text-decoration: underline; }

/* ---- amount cards (250 / 400 / 600) ------------------------------------- */
.eu-amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0; }
.eu-amount { background: var(--fc-panel); border: 1px solid var(--fc-border); border-radius: var(--fc-radius); padding: 18px; text-align: center; box-shadow: var(--fc-shadow); }
.eu-amount__eur { font-size: 2rem; font-weight: 700; color: var(--fc-primary); letter-spacing: -.02em; }
.eu-amount__desc { font-size: .92rem; color: var(--fc-muted); margin-top: 6px; }

/* ---- table -------------------------------------------------------------- */
.eu-table-wrap { overflow-x: auto; margin: 16px 0; }
.eu-table { width: 100%; border-collapse: collapse; font-size: .96rem; }
.eu-table th, .eu-table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--fc-border); vertical-align: top; }
.eu-table thead th { background: var(--fc-panel-2); font-weight: 600; }
.eu-table td:last-child, .eu-table th:last-child { white-space: nowrap; font-weight: 600; }
.eu-table td.eu-num, .eu-table th.eu-num { text-align: right; white-space: nowrap; }
.eu-table td a { text-decoration: none; color: var(--fc-primary); font-weight: 600; }
.eu-table td a:hover { text-decoration: underline; }
.eu-iata { color: var(--fc-muted); font-weight: 400; font-size: .9em; }

/* ---- callouts ----------------------------------------------------------- */
.eu-note, .eu-warn { border-radius: var(--fc-radius); padding: 14px 18px; margin: 16px 0; border: 1px solid var(--fc-border); }
.eu-note { background: #eaf3ff; border-color: #cfe2ff; }
.eu-warn { background: #fff6e6; border-color: #ffe1a8; }
.eu-note p, .eu-warn p { margin: 0; }

/* ---- two columns (sí / no) ---------------------------------------------- */
.eu-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
.eu-col { border: 1px solid var(--fc-border); border-radius: var(--fc-radius); padding: 16px 18px; }
.eu-col h3 { margin-top: 0; }
.eu-col--yes { background: #e7f5ec; border-color: #bfe6cd; }
.eu-col--no  { background: #fdecea; border-color: #f6cfca; }
.eu-col ul { margin: 8px 0 0; }

/* ---- steps -------------------------------------------------------------- */
ol.eu-steps { counter-reset: step; list-style: none; padding: 0; margin: 18px 0; }
ol.eu-steps li { position: relative; padding: 14px 16px 14px 60px; margin: 10px 0; background: var(--fc-panel); border: 1px solid var(--fc-border); border-radius: var(--fc-radius); }
ol.eu-steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 15px; top: 13px; width: 30px; height: 30px; border-radius: 50%; background: var(--fc-primary); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* ---- worked examples ---------------------------------------------------- */
.eu-example { border-left: 4px solid var(--fc-primary); background: var(--fc-panel-2); border-radius: 0 var(--fc-radius) var(--fc-radius) 0; padding: 14px 18px; margin: 14px 0; }
.eu-example h3 { margin: 0 0 6px; font-size: 1.08rem; }
.eu-example p { margin: 0; }

/* ---- FAQ accordion (no JS) ---------------------------------------------- */
.eu-faq { margin: 8px 0; }
.eu-faq details { border: 1px solid var(--fc-border); border-radius: var(--fc-radius); margin: 10px 0; background: var(--fc-panel); }
.eu-faq summary { cursor: pointer; padding: 14px 18px; font-weight: 600; list-style: none; }
.eu-faq summary::-webkit-details-marker { display: none; }
.eu-faq summary::after { content: "+"; float: right; color: var(--fc-muted); font-weight: 400; font-size: 1.2rem; line-height: 1; }
.eu-faq details[open] summary::after { content: "–"; }
.eu-faq details > p { margin: 0; padding: 0 18px 16px; color: var(--fc-text); }

/* ---- buttons + CTA band ------------------------------------------------- */
.eu-btn { display: inline-block; background: var(--fc-primary); color: var(--fc-on-primary); border: 0; border-radius: 999px; padding: 12px 26px; font-size: 1rem; font-weight: 600; text-decoration: none; cursor: pointer; }
.eu-btn:hover { filter: brightness(1.07); text-decoration: none; }
.eu-hero-cta { margin: 18px 0 6px; }
.eu-cta { text-align: center; background: var(--fc-panel-2); border: 1px solid var(--fc-border); border-radius: var(--fc-radius); padding: 28px 22px; margin: 34px auto; max-width: 760px; }
.eu-cta h2 { margin: 0 0 6px; font-size: 1.4rem; }
.eu-cta p { margin: 0 0 16px; color: var(--fc-muted); }

/* ---- mobile ------------------------------------------------------------- */
/* ---- calculator (cuanto-me-corresponde) --------------------------------- */
.calc-form { display: grid; gap: 16px; }
.calc-field { display: flex; flex-direction: column; gap: 6px; }
/* calculadora.js sets [hidden] on the irrelevant conditional groups; this must
   beat .calc-field's display:flex (author rule overrides the UA [hidden] reset). */
.calc-cond[hidden] { display: none; }
.calc-field > label, .calc-field > .calc-label { font-weight: 600; font-size: .95rem; }
.calc-field input[type="text"], .calc-field input[type="number"], .calc-field select {
  padding: 10px 12px; border: 1px solid var(--fc-border); border-radius: 8px;
  font-size: 1rem; background: #fff; color: var(--fc-text); width: 100%; box-sizing: border-box;
}
.calc-field input:focus, .calc-field select:focus { outline: 2px solid var(--fc-primary); outline-offset: 1px; }
.calc-form .fc-ac > input { padding: 10px 12px; border: 1px solid var(--fc-border); border-radius: 8px; font-size: 1rem; }
.calc-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.calc-delay { display: flex; gap: 12px; }
.calc-delay .calc-field { flex: 1; }
.calc-inline { display: flex; align-items: center; gap: 8px; }
.calc-inline input { max-width: 120px; }
.calc-check { flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 400; }
.calc-check input { margin-top: 4px; }
.calc-hint { font-size: .85rem; color: var(--fc-muted); margin: 2px 0 0; }
.calc-submit { justify-self: start; margin-top: 4px; }
.calc-prompt { color: var(--fc-muted); margin: 4px 0 0; }

.calc-result { border: 1px solid var(--fc-border); border-left: 5px solid var(--fc-border); border-radius: var(--fc-radius); padding: 20px 22px; margin-top: 18px; background: var(--fc-panel-2); }
.calc-result--yes   { border-left-color: var(--fc-ontime);    background: #e7f5ec; }
.calc-result--maybe { border-left-color: var(--fc-late);      background: #fbf4d8; }
.calc-result--no    { border-left-color: var(--fc-cancelled); background: #fdecea; }
.calc-result__headline { font-size: 1.25rem; font-weight: 700; margin: 0 0 8px; }
.calc-result__amount { font-size: 1.05rem; margin: 0 0 8px; }
.calc-result__amount strong { font-size: 1.6rem; color: var(--fc-text); }
.calc-result__detail { color: var(--fc-muted); font-size: .92rem; margin: 0 0 8px; }
.calc-result__needs { margin: 10px 0 4px; font-weight: 600; font-size: .95rem; }
.calc-result__needslist { margin: 0 0 8px; padding-left: 20px; }
.calc-result__needslist li { margin: 4px 0; }
.calc-result__reason { margin: 0 0 8px; }
.calc-result__caveat { font-size: .92rem; color: var(--fc-muted); margin: 0 0 8px; }
.calc-result__disclaimer { font-size: .82rem; color: var(--fc-muted); margin: 10px 0 14px; }

/* ---- eligibility wizard (elegibilidad) ---------------------------------- */
.wiz-progress { color: var(--fc-muted); font-size: .85rem; font-weight: 600; margin: 0 0 14px; }
.wiz-step { display: grid; gap: 14px; }
.wiz-step[hidden] { display: none; }                 /* beat .wiz-step display:grid */
.wiz-step__title { font-size: 1.2rem; font-weight: 700; margin: 0; }
.wiz-options { display: grid; gap: 10px; }
.wiz-option { display: flex; align-items: flex-start; gap: 10px; border: 1px solid var(--fc-border); border-radius: 10px; padding: 12px 14px; cursor: pointer; background: #fff; }
.wiz-option:hover { border-color: var(--fc-primary); }
.wiz-option input { margin-top: 3px; }
.wiz-option:has(input:checked) { border-color: var(--fc-primary); background: #eef5ff; }
.wiz-field { display: flex; flex-direction: column; gap: 6px; }
.wiz-field > label, .wiz-field > .wiz-label { font-weight: 600; font-size: .95rem; }
.wiz-field input[type="text"], .wiz-field input[type="number"], .wiz-field select { padding: 10px 12px; border: 1px solid var(--fc-border); border-radius: 8px; font-size: 1rem; background: #fff; color: var(--fc-text); width: 100%; box-sizing: border-box; }
.wiz-field input:focus, .wiz-field select:focus { outline: 2px solid var(--fc-primary); outline-offset: 1px; }
.wiz-form .fc-ac > input { padding: 10px 12px; border: 1px solid var(--fc-border); border-radius: 8px; font-size: 1rem; }
.wiz-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wiz-cond[hidden] { display: none; }                 /* beat .wiz-field display:flex */
.wiz-delay { display: flex; gap: 12px; }
.wiz-delay .wiz-field { flex: 1; }
.wiz-row { display: flex; align-items: center; gap: 8px; }
.wiz-row input { max-width: 140px; }
.wiz-check { flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 400; }
.wiz-check input { margin-top: 4px; }
.wiz-hint { font-size: .85rem; color: var(--fc-muted); margin: 0; }
.wiz-nav { display: flex; gap: 10px; margin-top: 8px; }
.wiz-nav .wiz-spacer { flex: 1; }

.eu-btn--ghost { background: transparent; color: var(--fc-primary); border: 1px solid var(--fc-primary); }
.eu-btn--ghost:hover { background: var(--fc-panel-2); filter: none; }

.wiz-result { border: 1px solid var(--fc-border); border-left: 5px solid var(--fc-border); border-radius: var(--fc-radius); padding: 22px; margin-top: 6px; background: var(--fc-panel-2); }
.wiz-result--probable   { border-left-color: var(--fc-ontime);    background: #e7f5ec; }
.wiz-result--posible    { border-left-color: var(--fc-late);      background: #fbf4d8; }
.wiz-result--improbable { border-left-color: var(--fc-cancelled); background: #fdecea; }
.wiz-result__badge { display: inline-block; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, .07); margin: 0 0 8px; }
.wiz-result__headline { font-size: 1.3rem; font-weight: 700; margin: 0 0 8px; }
.wiz-result__reason { margin: 0 0 10px; }
.wiz-result__disclaimer { font-size: .82rem; color: var(--fc-muted); margin: 0 0 14px; }
.wiz-result__cta { display: flex; flex-wrap: wrap; gap: 10px; }
.wiz-prompt { color: var(--fc-muted); margin: 6px 0 0; }

/* ---- flight page (/vuelo/) ---------------------------------------------- */
.flight-dates { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.flight-date { padding: 6px 12px; border: 1px solid var(--fc-border); border-radius: 999px; text-decoration: none; color: var(--fc-primary); font-size: .9rem; background: #fff; }
.flight-date[aria-current="page"] { background: var(--fc-primary); color: #fff; border-color: var(--fc-primary); }
.flight-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 24px; margin: 8px 0 0; }
.flight-fact { padding: 12px 0; border-bottom: 1px solid var(--fc-border); }
.flight-fact dt { font-size: .82rem; color: var(--fc-muted); margin: 0 0 2px; }
.flight-fact dd { margin: 0; font-weight: 600; }
.flight-note { color: var(--fc-muted); font-size: .85rem; margin: 14px 0 0; }
.flight-similar { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.flight-simcard { display: block; border: 1px solid var(--fc-border); border-left: 4px solid var(--fc-border); border-radius: 10px; padding: 12px 14px; text-decoration: none; color: var(--fc-text); background: #fff; }
.flight-simcard:hover { background: var(--fc-panel-2); }
.flight-simcard--cancelled { border-left-color: var(--fc-cancelled); }
.flight-simcard--diverted  { border-left-color: var(--fc-diverted); }
.flight-simcard--delayed   { border-left-color: var(--fc-delayed); }
.flight-simcard--late      { border-left-color: var(--fc-late); }
.flight-simcard--ontime    { border-left-color: var(--fc-ontime); }
.flight-simcard__route { display: block; font-weight: 700; font-size: 1.1rem; }
.flight-simcard__meta { display: block; color: var(--fc-muted); font-size: .85rem; margin: 4px 0 8px; }

/* ---- stat tiles (aeropuerto / aerolinea / ruta pages) ------------------- */
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin: 8px 0 4px; }
.stat-tile { background: var(--fc-panel-2); border: 1px solid var(--fc-border); border-radius: var(--fc-radius); padding: 16px 18px; text-align: center; }
.stat-tile__num { font-size: 1.8rem; font-weight: 700; color: var(--fc-text); letter-spacing: -.02em; line-height: 1.1; }
.stat-tile__label { font-size: .82rem; color: var(--fc-muted); margin-top: 4px; }
.stat-note { color: var(--fc-muted); font-size: .82rem; margin: 8px 0 0; }
.eu-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.eu-links a { color: var(--fc-primary); text-decoration: none; font-weight: 500; }
.eu-links a:hover { text-decoration: underline; }

/* Header nav collapses to a hamburger wherever the six (long, Spanish) links would
   overflow the bar — i.e. phones AND small tablets — not only the 560px content
   breakpoint below. Prevents horizontal body scroll on ~561–860px viewports. */
@media (max-width: 860px) {
  .eu-header { gap: 10px; }

  /* The checkbox stays in the DOM (visually hidden) so it remains keyboard-
     focusable — Tab to it, Space toggles the menu. */
  .eu-navcb {
    display: block; position: absolute; top: 0; left: 0;
    width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none;
  }
  .eu-menu__btn {
    display: flex; align-items: center; justify-content: center; margin-left: auto;
    width: 42px; height: 42px; cursor: pointer; border-radius: 10px;
    -webkit-tap-highlight-color: transparent;
  }

  /* Three-bar icon that morphs into an X when the menu is open. */
  .eu-menu__bars, .eu-menu__bars::before, .eu-menu__bars::after {
    content: ""; display: block; width: 22px; height: 2px; border-radius: 2px;
    background: var(--fc-text); transition: transform .2s ease, background-color .2s ease;
  }
  .eu-menu__bars { position: relative; }
  .eu-menu__bars::before { position: absolute; top: -7px; }
  .eu-menu__bars::after  { position: absolute; top: 7px; }
  .eu-navcb:checked ~ .eu-menu__btn .eu-menu__bars { background: transparent; }
  .eu-navcb:checked ~ .eu-menu__btn .eu-menu__bars::before { transform: translateY(7px) rotate(45deg); }
  .eu-navcb:checked ~ .eu-menu__btn .eu-menu__bars::after  { transform: translateY(-7px) rotate(-45deg); }
  .eu-navcb:focus-visible ~ .eu-menu__btn { outline: 2px solid var(--fc-primary); outline-offset: 2px; }

  .eu-nav {
    display: none;
    position: absolute; top: 56px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: rgba(255, 255, 255, .98);
    border-bottom: 1px solid var(--fc-border);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .1);
    padding: 6px 0;
  }
  .eu-navcb:checked ~ .eu-nav { display: flex; }
  .eu-nav a { padding: 13px 22px; font-size: 1rem; }
  .eu-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--fc-primary); }
}

@media (max-width: 560px) {
  .eu-amounts { grid-template-columns: 1fr; }
  .eu-cols { grid-template-columns: 1fr; }
  .eu-toc ul { columns: 1; }
  .calc-grid2 { grid-template-columns: 1fr; }
  .wiz-grid2 { grid-template-columns: 1fr; }
  .flight-facts { grid-template-columns: 1fr; }
}
