/*
Theme Name: Heredar con Orden
Theme URI: https://heredarconorden.es/
Author: Heredar con Orden
Description: Tema editorial accesible para Heredar con Orden.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: heredar-con-orden
*/

:root {
  --ink: #132238;
  --navy: #102a43;
  --navy-2: #183b56;
  --teal: #25685f;
  --teal-dark: #1c514b;
  --gold: #c18b3d;
  --cream: #f6f3ec;
  --paper: #fffdf9;
  --mist: #eaf2ef;
  --line: #dce3e0;
  --muted: #5d6a78;
  --white: #fff;
  --shadow: 0 16px 40px rgba(16, 42, 67, .10);
  --radius: 18px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--teal); text-decoration-thickness: .08em; text-underline-offset: .16em; }
a:hover { color: var(--teal-dark); }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 {
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.15;
  letter-spacing: -.02em;
}
h1 { font-size: clamp(2.45rem, 6vw, 4.8rem); margin: 0 0 1.25rem; }
h2 { font-size: clamp(1.8rem, 4vw, 2.75rem); margin: 2.7rem 0 1rem; }
h3 { font-size: 1.45rem; margin: 2rem 0 .7rem; }
p { margin: 0 0 1.15rem; }
.container { width: min(calc(100% - 2rem), var(--max)); margin-inline: auto; }
.narrow { width: min(calc(100% - 2rem), 820px); margin-inline: auto; }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 9999;
  background: var(--navy); color: #fff; padding: .75rem 1rem;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,253,249,.96);
  border-bottom: 1px solid rgba(16,42,67,.09);
  backdrop-filter: blur(14px);
}
.header-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: flex; align-items: center; gap: .75rem; color: var(--navy); text-decoration: none; }
.brand-mark {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 12px; color: #fff; background: var(--teal);
  font-family: Georgia, serif; font-size: 1.35rem; font-weight: 700;
  box-shadow: 0 6px 18px rgba(37,104,95,.22);
}
.brand-name { font-family: Georgia, serif; font-size: 1.2rem; font-weight: 700; line-height: 1; }
.brand-sub { display: block; margin-top: .25rem; color: var(--muted); font-family: Inter, sans-serif; font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.menu-toggle { display: none; }
.main-nav ul { display: flex; align-items: center; gap: 1.35rem; margin: 0; padding: 0; list-style: none; }
.main-nav a { color: var(--ink); font-size: .93rem; font-weight: 650; text-decoration: none; }
.main-nav a:hover { color: var(--teal); }
.main-nav li:last-child a {
  display: inline-flex; padding: .65rem 1rem; color: #fff;
  border-radius: 999px; background: var(--teal);
}

.hero { position: relative; overflow: hidden; padding: 7rem 0 6rem; background: var(--cream); }
.hero::after {
  content: ""; position: absolute; width: 600px; height: 600px; right: -260px; top: -300px;
  border: 90px solid rgba(37,104,95,.08); border-radius: 50%;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.18fr .82fr; gap: 5rem; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem; margin-bottom: 1.4rem;
  color: var(--teal); font-size: .79rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 30px; height: 2px; background: var(--gold); }
.hero p.lead { max-width: 720px; color: #425466; font-size: 1.18rem; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 50px; padding: .75rem 1.25rem; border: 0; border-radius: 10px;
  background: var(--teal); color: #fff; font-weight: 750; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); background: var(--teal-dark); color: #fff; }
.btn-secondary { color: var(--navy); background: transparent; border: 1px solid #b8c6c2; }
.btn-secondary:hover { color: var(--navy); background: #fff; }
.hero-card { padding: 2rem; border: 1px solid rgba(16,42,67,.08); border-radius: 24px; background: #fff; box-shadow: var(--shadow); }
.hero-card h2 { margin-top: 0; font-size: 1.6rem; }
.route-list { display: grid; gap: .7rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }
.route-list a {
  display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 1rem;
  color: var(--ink); border-radius: 10px; background: var(--cream); font-weight: 700; text-decoration: none;
}
.route-list a:hover { background: var(--mist); }

.trustbar { border-block: 1px solid var(--line); background: #fff; }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.trust-item { padding: 1.5rem 2rem; border-right: 1px solid var(--line); }
.trust-item:last-child { border-right: 0; }
.trust-item strong { display: block; color: var(--navy); font-family: Georgia, serif; font-size: 1.08rem; }
.trust-item span { color: var(--muted); font-size: .88rem; }

.section { padding: 5.5rem 0; }
.section-alt { background: var(--cream); }
.section-head { max-width: 720px; margin-bottom: 2.4rem; }
.section-head h2 { margin-top: 0; }
.section-head p { color: var(--muted); }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.15rem; }
.card {
  display: flex; flex-direction: column; min-height: 100%; padding: 1.65rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  box-shadow: 0 8px 24px rgba(16,42,67,.05);
}
.card-kicker { color: var(--teal); font-size: .73rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.card h3 { margin: .55rem 0 .65rem; font-size: 1.35rem; }
.card p { color: var(--muted); font-size: .95rem; }
.card a.stretched { margin-top: auto; font-weight: 750; text-decoration: none; }
.card a.stretched::after { content: " →"; }
.path-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; counter-reset: paths; }
.path {
  position: relative; padding: 1.5rem; border-radius: var(--radius); background: var(--navy); color: #fff;
  counter-increment: paths;
}
.path::before { content: "0" counter(paths); display: block; color: #8cc3ba; font-weight: 800; letter-spacing: .08em; }
.path h3 { color: #fff; margin: .65rem 0; }
.path p { color: #d7e2ea; font-size: .9rem; }
.path a { color: #fff; font-weight: 750; }

.cta-band { padding: 3rem; border-radius: 26px; background: var(--teal); color: #fff; }
.cta-band h2 { color: #fff; margin-top: 0; }
.cta-band p { max-width: 720px; color: #e5f1ef; }

.page-hero { padding: 4.5rem 0 3.5rem; background: var(--cream); }
.page-hero h1 { max-width: 900px; font-size: clamp(2.35rem, 5vw, 4rem); }
.page-hero .intro { max-width: 780px; color: #47596a; font-size: 1.13rem; }
.breadcrumbs { margin-bottom: 1.5rem; color: var(--muted); font-size: .84rem; }
.breadcrumbs a { color: var(--muted); }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 4rem; align-items: start; padding: 4rem 0 6rem; }
.article-content { min-width: 0; }
.article-content h2:first-child { margin-top: 0; }
.article-content ul, .article-content ol { padding-left: 1.3rem; }
.article-content li { margin-bottom: .55rem; }
.article-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.3rem; margin-top: 1.2rem; color: var(--muted); font-size: .82rem; }
.toc { padding: 1.25rem; border-left: 4px solid var(--gold); background: var(--cream); }
.toc strong { display: block; margin-bottom: .55rem; color: var(--navy); }
.toc ul { margin: 0; padding-left: 1.1rem; }
.toc li { margin: .35rem 0; font-size: .9rem; }
.callout { margin: 1.8rem 0; padding: 1.25rem 1.4rem; border-radius: 12px; background: var(--mist); }
.callout-warning { background: #fff4df; border-left: 4px solid var(--gold); }
.checklist { padding: 1.5rem; border-radius: 14px; background: var(--navy); color: #fff; }
.checklist h2, .checklist h3 { color: #fff; margin-top: 0; }
.checklist li::marker { color: #8cc3ba; }
.source-box { margin-top: 2.5rem; padding: 1.4rem; border: 1px solid var(--line); border-radius: 14px; background: #fbfcfb; }
.source-box h2 { margin-top: 0; font-size: 1.35rem; }
.source-box li { font-size: .9rem; }
.faq details { margin-bottom: .75rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.faq summary { padding: 1rem 1.15rem; color: var(--navy); font-weight: 750; cursor: pointer; }
.faq details p { padding: 0 1.15rem 1rem; margin: 0; color: var(--muted); }
.article-sidebar { position: sticky; top: 105px; }
.side-card { margin-bottom: 1rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.side-card.accent { color: #fff; background: var(--navy); border: 0; }
.side-card.accent h3 { color: #fff; margin-top: 0; }
.side-card.accent p { color: #d7e2ea; font-size: .9rem; }
.side-card .btn { width: 100%; }
.legal-note { color: var(--muted); font-size: .82rem; }

.hco-form { display: grid; gap: 1rem; }
.hco-form label { color: var(--navy); font-weight: 700; }
.hco-form input, .hco-form select, .hco-form textarea {
  width: 100%; margin-top: .35rem; padding: .8rem .9rem;
  border: 1px solid #bbc8c4; border-radius: 9px; background: #fff; color: var(--ink); font: inherit;
}
.hco-form textarea { min-height: 150px; resize: vertical; }
.hco-form .consent { display: flex; align-items: flex-start; gap: .65rem; font-size: .85rem; font-weight: 500; }
.hco-form .consent input { width: auto; margin-top: .3rem; }
.form-status { padding: .85rem 1rem; border-radius: 9px; background: var(--mist); }
.orientador { padding: 1.5rem; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.orientador fieldset { margin: 0 0 1.2rem; padding: 0; border: 0; }
.orientador legend { margin-bottom: .55rem; color: var(--navy); font-family: Georgia, serif; font-size: 1.2rem; font-weight: 700; }
.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
.choice-grid label { padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.orientador-result { display: none; margin-top: 1.3rem; padding: 1.3rem; border-radius: 12px; background: var(--mist); }
.orientador-result.is-visible { display: block; }

.site-footer { padding: 4rem 0 2rem; background: var(--navy); color: #d6e0e8; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 3rem; }
.site-footer h2, .site-footer h3 { color: #fff; }
.site-footer h2 { margin: 0 0 .8rem; font-size: 1.5rem; }
.site-footer h3 { margin: 0 0 .8rem; font-family: Inter, sans-serif; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin-bottom: .45rem; }
.site-footer a { color: #d6e0e8; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 2rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.13); font-size: .78rem; }

@media (max-width: 960px) {
  .hero-grid, .article-layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero { padding: 5rem 0; }
  .hero-card { max-width: 650px; }
  .article-sidebar { position: static; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .path-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .header-inner { min-height: 68px; }
  .brand-sub { display: none; }
  .menu-toggle {
    display: inline-flex; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 8px;
    background: #fff; color: var(--navy); font-weight: 800;
  }
  .main-nav { display: none; position: absolute; left: 1rem; right: 1rem; top: 68px; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
  .main-nav.is-open { display: block; }
  .main-nav ul { display: grid; gap: .4rem; }
  .main-nav a { display: block; padding: .55rem; }
  .trust-grid, .card-grid, .path-grid, .footer-grid, .choice-grid { grid-template-columns: 1fr; }
  .trust-item { border-right: 0; border-bottom: 1px solid var(--line); padding-inline: 0; }
  .section { padding: 4rem 0; }
  .cta-band { padding: 2rem 1.4rem; }
  .footer-bottom { display: block; }
}
