/* Agro Enmienda: misma estética que el sitio anterior, sin Bootstrap ni jQuery. */
@font-face { font-family: Raleway; font-weight: 400 700; font-display: swap; src: url(../fonts/raleway.woff2) format("woff2"); }
@font-face { font-family: Poppins; font-weight: 700; font-display: swap; src: url(../fonts/poppins-700.woff2) format("woff2"); }
@font-face { font-family: Poppins; font-weight: 400; font-display: swap; src: url(../fonts/poppins-400.woff2) format("woff2"); }

:root {
  --brand: #28a745;
  --brand-dark: #1e7d34;
  --dark: #292c34;
  --dark-2: #33363f;
  --dark-line: #4a4d58;
  --soft: #c7c7c7;
  /* Usadas también por el administrador y el panel */
  --green-900: #145423;
  --green-800: #1e7d34;
  --green-600: #28a745;
  --lime: #94d3a2;
  --ink: #212529;
  --muted: #5d6066;
  --line: #dee2e6;
  --tint: #f4f5f6;
  --white: #fff;
  --error: #b3261e;
  --radius: 5px;
  --wrap: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--dark); color: var(--ink); font: 17.6px/1.5 Raleway, "Helvetica Neue", Arial, sans-serif; letter-spacing: -.02em; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
:focus-visible { outline: 3px solid #ffd54a; outline-offset: 2px; }
h1, h2, h3 { margin: 0 0 .5em; font-family: Poppins, Raleway, sans-serif; font-weight: 400; line-height: 1.2; letter-spacing: -.03em; color: var(--green-900); text-wrap: balance; }
h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
address { font-style: normal; }
[hidden] { display: none !important; }
.ico { width: 1.15em; height: 1.15em; fill: currentColor; vertical-align: -.2em; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 10px 14px; z-index: 30; }
.skip:focus { left: 8px; top: 8px; }

/* Encabezado */
.site-header { border-top: 8px solid var(--dark); background: var(--brand); position: relative; z-index: 20; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 122px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 16px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand img { width: 99px; height: 100px; }
.slogan { font-weight: 700; font-size: 15px; letter-spacing: -.05em; white-space: nowrap; }
.nav-toggle { display: none; width: 46px; height: 42px; padding: 9px; border: 1px solid rgba(255, 255, 255, .6); border-radius: var(--radius); background: none; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; margin: 5px 0; background: #fff; }
.main-nav > ul { display: flex; align-items: center; gap: 5px; margin: 0; padding: 0; list-style: none; }
.main-nav li { position: relative; }
.main-nav a { display: block; padding: 6px 2px; color: #fff; font-size: 17px; font-weight: 700; letter-spacing: -.03em; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.main-nav a:hover, .main-nav a[aria-current] { color: rgba(255, 255, 255, .72); }
.sub { display: none; position: absolute; left: -12px; top: 100%; min-width: 150px; margin: 0; padding: 6px 12px; list-style: none; background: var(--brand-dark); border-radius: 0 0 var(--radius) var(--radius); }
.has-sub:hover .sub, .has-sub:focus-within .sub { display: block; }
.nav-social { display: flex; gap: 4px; margin-left: 8px; }
.nav-social a { padding: 6px 3px; font-size: 18px; }

/* Botones */
.btn { display: inline-block; padding: 6px 30px; border: 1px solid transparent; border-radius: var(--radius); font: inherit; line-height: 1.5; text-align: center; text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-secondary, .btn-ghost { border-color: var(--brand); color: var(--brand); background: transparent; }
.btn-secondary:hover, .btn-ghost:hover { background: var(--brand); color: #fff; }
.btn-lg { padding: 10px 40px; font-size: 1.15rem; }
.btn-block { display: block; width: 100%; }
.btn:disabled { opacity: .6; cursor: wait; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 1.5em; }

/* Contenido público: fondo oscuro y texto blanco, como el sitio anterior */
.site-main { background: var(--dark); color: #fff; }
.site-main h1, .site-main h2, .site-main h3 { color: #fff; }
.site-main .prose h2, .site-main .accent { color: var(--brand); font-family: Raleway, sans-serif; font-weight: 700; font-size: 1.15rem; }
.eyebrow { margin-bottom: .3em; color: var(--soft); font-size: .85rem; font-weight: 700; text-transform: uppercase; }
.lead { color: var(--soft); max-width: 46em; }
.note { font-size: .9rem; color: var(--muted); }
.site-main .note { color: var(--soft); }
.notice { padding: 14px 16px; margin-bottom: 2em; border-left: 4px solid var(--brand); background: var(--dark-2); }
.section { padding-block: 56px; }
.section-tint { background: var(--dark-2); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; margin-bottom: 1em; }
.after-steps { margin-top: 28px; }
.rounded { border-radius: 8px; }

/* Inicio */
.home-slider { position: relative; height: 473px; background: linear-gradient(#c5c5c5, #f7f7f7); overflow: hidden; }
.home-slider::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 118px; background: url(../img/onda-pie.svg) center / 100% 100% no-repeat; pointer-events: none; }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .6s, visibility .6s; }
.slide.is-active { opacity: 1; visibility: visible; }
.slide-row { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; height: 100%; padding-bottom: 90px; }
.slide-text h2 { margin-bottom: 1.2em; color: #fff; font-size: 24px; text-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.slide-row img { justify-self: center; width: auto; max-height: 320px; }
.slider-dots { position: absolute; left: 0; right: 0; bottom: 14px; z-index: 2; display: flex; justify-content: center; gap: 8px; }
.slider-dots button { width: 12px; height: 12px; padding: 0; border: 0; border-radius: 50%; background: #b9b9b9; cursor: pointer; }
.slider-dots button[aria-current] { background: var(--brand); }
.home-video { position: relative; height: 330px; overflow: hidden; background: #55603a; }
.home-video img { width: 100%; height: 100%; object-fit: cover; }
.home-video iframe { position: absolute; top: 50%; left: 50%; width: 100vw; height: 56.25vw; min-height: 100%; min-width: 177.8vh; transform: translate(-50%, -50%); border: 0; pointer-events: none; }

/* Páginas internas */
.page-head { padding-block: 34px 26px; }
.page-head h1 { margin: 0; text-transform: uppercase; }
.page-head .lead { margin: .6em 0 0; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 10px; padding: 0; list-style: none; font-size: .9rem; color: var(--soft); }
.crumbs a { color: #fff; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .ico { margin-right: 6px; }
.crumbs li + li::before { content: "›"; margin-right: 10px; color: var(--soft); }

.prod-band { position: relative; padding-block: 70px 60px; }
.prod-band::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 46px; background: url(../img/onda.svg) center / 100% 100% no-repeat; }
.prod-row { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.prod-row h2 { margin-bottom: .1em; color: var(--soft); font-family: Raleway, sans-serif; font-weight: 700; font-size: 1.3rem; }
.prod-row h2 a { color: inherit; text-decoration: none; }
.prod-row p { font-weight: 700; max-width: 27em; }
.prod-row .btn { margin-top: 1.4em; }
.prod-row img { justify-self: center; width: auto; max-height: 340px; }

.product-top { display: grid; grid-template-columns: 260px 1fr; gap: 48px; align-items: start; }
.product-photo { display: flex; justify-content: center; }
.price { margin-bottom: .8em; font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.price small { color: var(--soft); font-size: .95rem; font-weight: 400; }
.price-lg { font-size: 2.1rem; line-height: 1.2; }
.spec { margin: 0; }
.spec > div { display: grid; grid-template-columns: minmax(150px, 1fr) 2fr; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--dark-line); }
.spec dt { color: var(--soft); }
.spec dd { margin: 0; font-weight: 700; }
.dose-big { color: var(--brand); font-size: 1.6rem; font-weight: 700; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.two-col-text { grid-template-columns: 3fr 2fr; }
.service-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 40px; align-items: start; }

.table-wrap { overflow-x: auto; margin-bottom: 1.2em; }
table { width: 100%; border-collapse: collapse; background: #fff; font-size: .95rem; letter-spacing: 0; }
caption { padding-bottom: 8px; text-align: left; font-weight: 700; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
thead th { background: var(--brand-dark); color: #fff; font-weight: 700; white-space: nowrap; }
td { font-variant-numeric: tabular-nums; }
.site-main table { background: var(--dark-2); }
.site-main th, .site-main td { border-color: var(--dark-line); }
.r { text-align: right; }

.calc { padding: 24px; background: var(--dark-2); border: 1px solid var(--dark-line); border-radius: var(--radius); }
.calc-out { margin: 16px 0; }
.calc-out > div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.site-main .calc-out > div { border-color: var(--dark-line); }
.calc-out dt { color: var(--muted); }
.site-main .calc-out dt { color: var(--soft); }
.calc-out dt small { display: block; font-size: .82rem; }
.calc-out dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.calc-total dd { color: var(--brand); font-size: 1.3rem; }

.prose { max-width: 60em; text-align: justify; }
.prose h2 { margin-top: 1.6em; text-align: left; }
.prose > :first-child { margin-top: 0; }
.prose li { margin-bottom: .4em; }
.prose a, .site-main p a { color: var(--brand); }
.article { max-width: 900px; }
.byline { color: var(--soft); font-size: .92rem; }
.article-img { width: 100%; margin-bottom: 1.5em; border-radius: 8px; }
.cta-box { margin-top: 2.5em; padding: 24px; background: var(--dark-2); border-left: 4px solid var(--brand); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin: 1.5em 0 0; padding: 0; list-style: none; counter-reset: paso; }
.steps li { padding-top: 14px; border-top: 3px solid var(--brand); counter-increment: paso; }
.steps li::before { content: counter(paso); display: block; margin-bottom: 6px; color: var(--brand); font: 2rem/1 Poppins, sans-serif; }
.steps p { margin: 0; color: var(--soft); }

.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card, .course { padding: 24px; background: var(--dark-2); border-radius: var(--radius); }
.card h2, .course h2 { font-size: 1.25rem; }
.card p:last-child, .course p:last-child { margin: 0; color: var(--soft); }
.course h2 a, .guide-card h3 a, .book h2 a { color: #fff; text-decoration: none; }
.course h2 a:hover, .guide-card h3 a:hover, .book h2 a:hover { text-decoration: underline; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }

.catalog { columns: 3 260px; column-gap: 40px; }
.catalog section { break-inside: avoid; margin-bottom: 28px; }
.catalog h2 { padding-bottom: 6px; border-bottom: 2px solid var(--brand); font-size: 1.15rem; }
.catalog ul { margin: 0; padding: 0; list-style: none; }
.catalog li { padding: 3px 0; }

.service-list { display: grid; gap: 30px; text-align: justify; }
.service-list h2 { color: var(--brand); font-family: Raleway, sans-serif; font-weight: 700; font-size: 1.2rem; }
.contact-list { margin: 1em 0 0; padding: 0; list-style: none; }
.contact-list li { padding: 4px 0; }
.contact-list a { color: #fff; }

.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.guide-card { border-radius: 8px; overflow: hidden; background: var(--dark-2); }
.guide-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.guide-card > div { padding: 18px; }
.guide-card p:last-child { margin: 0; color: var(--soft); font-size: .95rem; }
.guide-card .eyebrow { font-size: .75rem; color: var(--brand); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip { padding: 6px 14px; border: 1px solid var(--brand); border-radius: 999px; background: none; color: #fff; font: inherit; font-size: .92rem; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--brand); }

.lesson-list { margin: 0 0 1.5em; padding-left: 1.3em; }
.lesson-list li { padding: 7px 0; border-bottom: 1px solid var(--dark-line); }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 2.5em; }
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 32px; }
.book h2 { margin-top: 14px; font-size: 1.15rem; }
.book p { margin: 0; color: var(--soft); font-size: .95rem; }
.book-cover { display: flex; flex-direction: column; justify-content: space-between; aspect-ratio: 3 / 4; max-width: 230px; padding: 22px 18px; border-left: 8px solid #94d3a2; border-radius: 3px 6px 6px 3px; background: var(--brand-dark); color: #fff; text-decoration: none; }
.book-cover:hover { background: var(--green-900); color: #fff; }
.book-cover span { font: 1.3rem/1.2 Poppins, sans-serif; }
.book-cover small { color: #c9e9d1; }
.book-detail { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; align-items: start; }
.book-cover-lg { width: 100%; }

.video { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #000; margin-bottom: 1.5em; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map iframe { display: block; width: 100%; height: 360px; border: 0; }

/* Formularios */
.form h2 { margin-bottom: .7em; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin-bottom: 14px; }
.field-wide { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 4px; font-size: .9rem; }
input:not([type="checkbox"]), select, textarea { width: 100%; padding: 8px 12px; border: 1px solid #ced4da; border-radius: var(--radius); background: #fff; color: var(--ink); font: inherit; letter-spacing: 0; }
[aria-invalid="true"] { border-color: #ff8a80 !important; }
.field-error { margin: 4px 0 0; color: var(--error); font-size: .88rem; }
.site-main .field-error { color: #ffb4ab; }
.check { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin-bottom: 16px; font-size: .92rem; }
.check input { width: 18px; height: 18px; margin-top: 3px; }
.check .field-error { grid-column: 2; }
.hp { position: absolute; left: -9999px; }
.form-status { margin-bottom: 16px; padding: 12px 14px; border-radius: var(--radius); font-weight: 700; }
.form-status[data-state="ok"] { background: #d7f0dc; color: var(--green-900); }
.form-status[data-state="error"] { background: #fbe9e7; color: var(--error); }
.status-link { display: block; width: max-content; margin-top: 10px; }

/* Pie */
.site-footer { position: relative; background: #fff; color: #545454; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 70px; margin-bottom: -1px; background: url(../img/onda-pie.svg) center / 100% 100% no-repeat; pointer-events: none; }
.footer-grid { display: grid; grid-template-columns: 1.65fr 1fr 2fr; gap: 32px; padding-block: 60px 50px; border-top: 1px solid #e6e6e6; }
.footer-company img { width: 73px; height: 74px; margin: 0 0 44px 14px; }
.footer-company address { color: #212529; }
.footer-title { margin-bottom: .6em; color: #2a2a2a; font-family: Poppins, sans-serif; text-transform: uppercase; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer nav a { color: #8e8f90; text-decoration: none; text-transform: uppercase; }
.site-footer nav a:hover { color: var(--brand); }
.footer-bottom { border-top: 1px solid #e6e6e6; }
.footer-bottom-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-block: 20px 34px; }
.footer-bottom p { margin: 0; font-weight: 700; letter-spacing: -.04em; }
.footer-social { display: flex; gap: 8px; font-size: 22px; }
.footer-social a { color: #545454; }
.footer-social a:hover { color: var(--brand); }
.to-top { position: fixed; right: 20px; bottom: 30px; z-index: 15; display: grid; place-items: center; width: 50px; height: 50px; border-radius: var(--radius); background: var(--brand); color: #fff; font-size: 22px; }
.to-top { opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
.to-top.is-on { opacity: 1; visibility: visible; }
.solo-lectores { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.to-top:hover { background: var(--brand-dark); color: #fff; }

@media (max-width: 1240px) {
  .slogan { display: none; }
}
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; padding: 6px 20px 16px; background: var(--brand); }
  .main-nav.open { display: block; }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .sub { display: block; position: static; padding: 0 0 0 16px; background: none; }
  .nav-social { margin: 8px 0 0; }
  .header-row { min-height: 90px; }
  .brand img { width: 69px; height: 70px; }
  .two-col, .two-col-text, .product-top, .service-layout, .book-detail, .prod-row { grid-template-columns: 1fr; gap: 28px; }
  .book-cover-lg { max-width: 200px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-company { grid-column: 1 / -1; }
  .slide-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding-block: 40px; }
  .steps, .card-grid, .form-grid { grid-template-columns: 1fr; }
  .home-slider { height: 420px; }
  .slide-row img { max-height: 230px; }
  .home-video { height: 240px; }
  .footer-grid { grid-template-columns: 1fr; }
  .prose, .service-list { text-align: left; }
  .actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slide { transition: none; }
}

.aviso-borrador { margin: 16px 0 0; padding: 12px 16px; border: 1px solid #e0b100; border-radius: var(--radius); background: #fff8dc; color: #4a3b00; font-weight: 600; }

/* Tipografía de lectura: letra más grande, con más cuerpo y sin apretar */
body { font-size: 19px; line-height: 1.65; letter-spacing: 0; font-weight: 500; font-variant-numeric: lining-nums; }
.app { font-weight: 400; line-height: 1.5; }
h1, h2, h3 { letter-spacing: -.015em; }
h1 { font-size: clamp(2rem, 4.4vw, 2.75rem); }
h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); }
.lead { font-size: 1.1em; line-height: 1.55; color: #dedede; }
.article { max-width: var(--wrap); }
.article > * { max-width: 800px; }
.byline { font-size: .95rem; }
.prose { max-width: 42em; font-size: 1.06em; line-height: 1.8; text-align: left; }
.prose p { margin: 0 0 1.2em; }
.site-main .prose h2 { margin-top: 1.9em; margin-bottom: .55em; font-size: 1.55rem; line-height: 1.25; }
.site-main .prose h3 { margin-top: 1.5em; font-family: Raleway, sans-serif; font-weight: 700; font-size: 1.22rem; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.3em; }
.prose li { margin-bottom: .6em; }
.prose strong { font-weight: 700; }
.prose table { font-size: 1rem; }
.prose .table-wrap { margin: 0 0 1.5em; }
.guide-card p:last-child, .book p, .card p:last-child { font-size: 1rem; }
@media (max-width: 640px) {
  body { font-size: 17.5px; }
  .prose { font-size: 1.03em; line-height: 1.75; }
  .site-main .prose h2 { font-size: 1.35rem; }
}

/* Cabecera más limpia: logo y menú */
.header-row { min-height: 104px; }
.brand img { width: 83px; height: 84px; }
.main-nav > ul { gap: 26px; }
.main-nav a { padding: 8px 0; font-size: 16px; letter-spacing: .01em; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current] { color: #fff; border-bottom-color: #fff; }
.sub a { border-bottom: 0; }
@media (max-width: 1040px) { .main-nav > ul { gap: 16px; } .main-nav a { font-size: 15px; } }

/* Portada */
.btn-light { border-color: #fff; background: transparent; color: #fff; }
.btn-light:hover { background: #fff; color: var(--dark); }
.hero { position: relative; overflow: hidden; background: var(--dark); }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20, 24, 30, .92) 0%, rgba(20, 24, 30, .7) 55%, rgba(20, 24, 30, .25) 100%); }
.hero-row { position: relative; z-index: 1; display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: center; padding-block: 72px 80px; }
.hero-kicker { margin: 0 0 .9em; color: var(--lime); font-weight: 700; font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; }
.site-main .hero h1 { margin-bottom: .45em; font-size: clamp(2.1rem, 4.6vw, 3.3rem); line-height: 1.12; }
.hero-lead { max-width: 34em; margin: 0 0 1.6em; color: #e6e6e6; font-size: 1.15em; line-height: 1.55; }
.hero .actions, .home-feature .actions, .why-grid + .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-product { display: grid; justify-items: center; gap: 14px; color: #fff; text-decoration: none; }
.hero-product img { width: auto; max-height: 340px; filter: drop-shadow(0 18px 28px rgba(0, 0, 0, .55)); transition: transform .25s; }
.hero-product:hover img { transform: translateY(-6px); }
.hero-price { padding: 6px 16px; border-radius: 999px; background: rgba(255, 255, 255, .12); font-size: .95rem; }
.hero-price strong { font-size: 1.15rem; }

.line-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.line-card { display: flex; flex-direction: column; gap: 8px; padding: 20px; border-radius: 10px; background: var(--dark-2); color: var(--soft); text-decoration: none; transition: transform .2s, background .2s; }
.line-card:hover { transform: translateY(-4px); background: #3b3f4a; color: var(--soft); }
.line-img { display: grid; place-items: center; height: 180px; margin-bottom: 8px; border-radius: 8px; background: linear-gradient(#d2d2d2, #f7f7f7); }
.line-img img { width: auto; max-height: 160px; }
.line-card strong { color: #fff; font-family: Poppins, sans-serif; font-weight: 400; font-size: 1.3rem; }
.line-card span { font-size: .98rem; line-height: 1.5; }

.home-feature { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; }
.tick-list { margin: 1.2em 0 1.6em; padding: 0; list-style: none; }
.tick-list li { position: relative; margin-bottom: .6em; padding-left: 1.8em; }
.tick-list li::before { content: ""; position: absolute; left: 0; top: .42em; width: 1em; height: .55em; border-left: 3px solid var(--brand); border-bottom: 3px solid var(--brand); transform: rotate(-45deg); }
.fact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0; }
.fact-grid > div { padding: 18px; border-radius: 10px; background: var(--dark); border: 1px solid var(--dark-line); }
.fact-grid dt { color: var(--lime); font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.fact-grid dd { margin: 4px 0 0; font-family: Poppins, sans-serif; font-size: 1.9rem; line-height: 1.2; }
.fact-grid small { display: block; margin-top: 4px; color: var(--soft); font-family: Raleway, sans-serif; font-size: .9rem; line-height: 1.4; }

.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 1.6em; }
.case-card { display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: 10px; border-left: 4px solid var(--brand); background: var(--dark-2); color: var(--soft); text-decoration: none; transition: transform .2s, background .2s; }
.case-card:hover { transform: translateY(-3px); background: #3b3f4a; color: var(--soft); }
.case-card strong { color: #fff; font-size: 1.15rem; }
.case-card span { font-size: .98rem; line-height: 1.5; }
.case-card .case-more { margin-top: auto; padding-top: 8px; color: var(--brand); font-weight: 700; }

.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin: 1.4em 0 2em; }
.why-grid > div { padding-top: 16px; border-top: 3px solid var(--brand); }
.why-grid h3 { font-size: 1.2rem; }
.why-grid p { margin: 0; color: var(--soft); font-size: .98rem; line-height: 1.55; }
.contact-box { padding: 28px; border-radius: 10px; background: var(--dark-2); }
.contact-box .note { margin: 1em 0 0; }
.section-head a { font-weight: 700; }

@media (max-width: 1000px) {
  .line-grid, .why-grid { grid-template-columns: 1fr 1fr; }
  .case-grid { grid-template-columns: 1fr 1fr; }
  .home-feature { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 900px) {
  .main-nav > ul { gap: 0; }
  .main-nav a { font-size: 17px; border-bottom: 0; }
  .hero-row { grid-template-columns: 1fr; padding-block: 44px 52px; }
  .hero-product img { max-height: 230px; }
}
@media (max-width: 640px) {
  .line-grid, .why-grid, .case-grid { grid-template-columns: 1fr; }
  .line-img { height: 150px; }
  .hero .btn-lg { flex: 1 1 100%; }
  .fact-grid dd { font-size: 1.55rem; }
}
.section-end { padding-bottom: 120px; }
.section-tint .guide-card { background: var(--dark); }

/* Tarjetas de guía con portada */
.guide-card { display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.guide-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0, 0, 0, .35); }
.guide-card-cover { display: block; overflow: hidden; }
.guide-card .cover { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .35s; }
.guide-card:hover .cover { transform: scale(1.04); }
.guide-card > div { padding: 20px; }
.guide-card h3 { font-size: 1.22rem; line-height: 1.3; }

/* Página de guía */
.guide-hero { padding-block: 34px 44px; background: linear-gradient(180deg, #23262e, var(--dark)); border-bottom: 1px solid var(--dark-line); }
.guide-hero-row { display: grid; grid-template-columns: 1.35fr 1fr; gap: 48px; align-items: center; }
.guide-chip { display: inline-block; margin: 10px 0 14px; padding: 4px 14px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .82rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.site-main .guide-hero h1 { margin-bottom: .4em; font-size: clamp(1.9rem, 3.8vw, 2.7rem); line-height: 1.15; }
.guide-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 1.2em 0 0; color: var(--soft); font-size: .92rem; }
.guide-meta span + span { position: relative; }
.guide-meta span + span::before { content: ""; position: absolute; left: -12px; top: .7em; width: 4px; height: 4px; border-radius: 50%; background: var(--brand); }
.guide-hero-cover .cover { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 14px; box-shadow: 0 20px 40px rgba(0, 0, 0, .45); }
.guide-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 56px; align-items: start; }
.guide-main { min-width: 0; }
.guide-toc { position: sticky; top: 24px; padding: 22px; border-radius: 12px; background: var(--dark-2); border: 1px solid var(--dark-line); }
.guide-toc-title { margin: 0 0 .8em; color: var(--lime); font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.guide-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.guide-toc li { counter-increment: toc; margin-bottom: .7em; padding-left: 1.9em; position: relative; font-size: .95rem; line-height: 1.4; }
.guide-toc li::before { content: counter(toc); position: absolute; left: 0; top: .05em; width: 1.4em; height: 1.4em; border-radius: 50%; background: var(--dark); color: var(--lime); font-size: .78rem; font-weight: 700; line-height: 1.4em; text-align: center; }
.guide-toc a { color: #e6e6e6; text-decoration: none; }
.guide-toc a:hover { color: var(--brand); }

.prose-guide > p:first-child { font-size: 1.18em; line-height: 1.65; color: #fff; }
.site-main .prose-guide h2 { padding-left: 16px; border-left: 4px solid var(--brand); color: #fff; font-family: Poppins, sans-serif; font-weight: 400; scroll-margin-top: 24px; }
.site-main .prose-guide h3 { color: var(--lime); }
.prose-guide ul { padding-left: 0; list-style: none; }
.prose-guide ul > li { position: relative; padding-left: 1.7em; }
.prose-guide ul > li::before { content: ""; position: absolute; left: .2em; top: .68em; width: .55em; height: .55em; border-radius: 50%; background: var(--brand); }
.prose-guide ol { padding-left: 0; list-style: none; counter-reset: paso; }
.prose-guide ol > li { position: relative; margin-bottom: .9em; padding: 14px 16px 14px 62px; border-radius: 10px; background: var(--dark-2); counter-increment: paso; }
.prose-guide ol > li::before { content: counter(paso); position: absolute; left: 16px; top: 14px; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; font-family: Poppins, sans-serif; font-size: 1rem; line-height: 32px; text-align: center; }
.prose-guide .table-wrap { border-radius: 12px; overflow: hidden; border: 1px solid var(--dark-line); }
.prose-guide table { background: var(--dark-2); color: #fff; }
.prose-guide caption { padding: 14px 16px 10px; background: var(--dark-2); color: var(--lime); font-size: .9rem; }
.prose-guide th, .prose-guide td { padding: 12px 16px; border-color: var(--dark-line); }
.prose-guide thead th { background: var(--green-800); color: #fff; }
.prose-guide tbody tr:nth-child(even) { background: rgba(255, 255, 255, .03); }
.prose-guide tbody th { color: #fff; font-weight: 700; }
.prose-guide strong { color: #fff; }
/* La lista de fuentes va más chica y apagada */
.prose-guide h2[id^="fuentes"] { margin-top: 2.6em; padding-left: 0; border-left: 0; color: var(--soft); font-family: Raleway, sans-serif; font-weight: 700; font-size: 1.05rem; letter-spacing: .06em; text-transform: uppercase; }
.prose-guide h2[id^="fuentes"] + ul { font-size: .9em; color: var(--soft); }
.prose-guide h2[id^="fuentes"] + ul > li::before { background: var(--dark-line); }
.cta-box { border-left: 0; border-radius: 14px; padding: 30px; background: linear-gradient(135deg, var(--green-900), #1c3324); }
.site-main .cta-box h2 { color: #fff; }
.cta-box .actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.2em 0 0; }

@media (max-width: 1000px) {
  .guide-layout { grid-template-columns: 1fr; gap: 0; }
  .guide-toc { position: static; order: -1; margin-bottom: 32px; }
  .guide-hero-row { grid-template-columns: 1fr; gap: 26px; }
  .guide-hero-cover { max-width: 520px; }
}
@media (max-width: 640px) {
  .prose-guide ol > li { padding-left: 54px; }
  .prose-guide ol > li::before { left: 12px; }
}

/* Logo de letra: "agro" en etiqueta, "enmienda" pegado */
.wordmark { display: inline-flex; align-items: center; gap: 4px; font-family: Poppins, sans-serif; font-size: 30px; line-height: 1; letter-spacing: -.01em; color: #fff; white-space: nowrap; }
.wordmark b { padding: 6px 10px 8px; border-radius: 10px; background: #fff; color: var(--brand); font-weight: 700; }
.wordmark span { font-weight: 400; }
.wordmark-dark { color: var(--green-900); font-size: 24px; }
.wordmark-dark b { background: var(--brand); color: #fff; }
.header-row { min-height: 84px; }
.footer-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.app-top .brand img { width: 26px; height: 32px; }
@media (max-width: 900px) { .header-row { min-height: 72px; } .wordmark { font-size: 25px; } .wordmark-dark { font-size: 22px; } }
.footer-company .footer-logo img { width: 48px; height: 60px; margin: 0; }

/* Los botones conservan su color de texto aunque estén dentro de un párrafo */
.site-main a.btn-primary, .site-main a.btn-primary:hover { color: #fff; }
.site-main a.btn-light { color: #fff; }
.site-main a.btn-light:hover { color: var(--dark); }
.site-main a.btn-secondary { color: var(--brand); }
.site-main a.btn-secondary:hover { color: #fff; }

/* Tapa de libro */
.tapa { position: relative; display: block; width: 100%; aspect-ratio: 3 / 4.2; border-radius: 4px 10px 10px 4px; overflow: hidden; background: var(--green-900); box-shadow: 0 18px 36px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .08); color: #fff; text-decoration: none; transition: transform .25s; }
a:hover > .tapa { transform: translateY(-5px) rotate(-1deg); }
.tapa-foto { position: absolute; inset: 0; background-size: cover; background-position: center; }
.tapa-foto::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 40, 18, .25) 0%, rgba(10, 40, 18, .55) 45%, rgba(8, 30, 14, .96) 100%); }
.tapa-lomo { position: absolute; left: 0; top: 0; bottom: 0; width: 7%; background: linear-gradient(90deg, rgba(0, 0, 0, .45), rgba(255, 255, 255, .12) 60%, rgba(0, 0, 0, .18)); }
.tapa-texto { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 12% 10% 9% 15%; }
.tapa-serie { align-self: flex-start; padding: 3px 10px; border-radius: 999px; background: var(--brand); font-size: .68em; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.tapa-titulo { margin-top: auto; font-family: Poppins, sans-serif; font-weight: 700; font-size: 1.45em; line-height: 1.12; letter-spacing: -.01em; }
.tapa-marca { margin-top: .9em; padding-top: .7em; border-top: 2px solid var(--brand); font-family: Poppins, sans-serif; font-size: .82em; }
.tapa-marca b { font-weight: 700; }
.tapa-lg { font-size: 1.25rem; }

/* Listado de libros */
.book-list { display: grid; gap: 28px; }
.book-row { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; align-items: center; padding: 30px; border-radius: 14px; background: var(--dark-2); }
.book-row-cover { display: block; text-decoration: none; }
.book-row h2 { margin-bottom: .3em; font-size: 1.7rem; }
.book-row h2 a { color: #fff; text-decoration: none; }
.book-row > div > p { color: var(--soft); }
.book-chapters { margin: 1em 0 1.4em; padding: 0; list-style: none; columns: 2 220px; column-gap: 28px; font-size: .95rem; }
.book-chapters li { position: relative; margin-bottom: .45em; padding-left: 1.3em; break-inside: avoid; }
.book-chapters li::before { content: ""; position: absolute; left: 0; top: .6em; width: .5em; height: .5em; border-radius: 50%; background: var(--brand); }
.book-chapters .mas { color: var(--lime); }
.book-chapters .mas::before { background: transparent; }

/* Ficha del libro */
.book-hero { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 56px; align-items: center; }
.book-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.6em 0 .8em; }
.book-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 56px; align-items: start; }
.book-main { min-width: 0; }
.book-h { margin-top: 2em; }
.book-index { position: sticky; top: 24px; padding: 24px; border-radius: 12px; background: var(--dark-2); border: 1px solid var(--dark-line); }
.indice, .indice ol { margin: 0; padding: 0; list-style: none; }
.indice-parte { margin-top: 1.1em; color: var(--lime); font-size: .8rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.indice-parte ol { margin-top: .5em; font-size: .95rem; font-weight: 500; letter-spacing: 0; text-transform: none; }
.indice a { display: flex; gap: 10px; padding: 5px 0; color: #e6e6e6; text-decoration: none; line-height: 1.35; }
.indice a:hover { color: var(--brand); }
.indice a span { flex: none; width: 1.5em; color: var(--lime); font-weight: 700; }
.indice-suelto a { font-size: .95rem; }
.prologo { max-width: 40em; font-size: 1.08em; line-height: 1.8; font-style: italic; color: #e9e9e9; }
.prologo p { margin: 0 0 1.1em; }
.prologo strong { font-style: normal; }
.muestra { position: relative; padding: 28px; border-radius: 14px; background: var(--dark-2); border: 1px solid var(--dark-line); }
.muestra h3 { font-size: 1.4rem; }
.muestra-texto { max-height: 330px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); margin-bottom: 1em; }

/* Lectura del libro */
.lectura-portada { display: grid; grid-template-columns: 250px minmax(0, 560px); gap: 48px; justify-content: center; align-items: center; padding: 48px 20px; background: linear-gradient(180deg, #23262e, var(--dark)); border-bottom: 1px solid var(--dark-line); }
.lectura-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 56px; align-items: start; padding-block: 48px 80px; }
.lectura-indice { max-height: calc(100vh - 48px); overflow: auto; }
.lectura-texto { min-width: 0; max-width: 46em; }
.capitulo { padding-bottom: 56px; margin-bottom: 56px; border-bottom: 1px solid var(--dark-line); scroll-margin-top: 20px; }
.capitulo-num { margin: 0 0 .4em; color: var(--lime); font-size: .85rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.site-main .capitulo-titulo { margin-bottom: .35em; font-size: clamp(1.7rem, 3.4vw, 2.3rem); line-height: 1.15; }
.capitulo-bajada { margin: 0 0 1.4em; color: var(--soft); font-size: 1.12em; }
.capitulo-foto { width: 100%; height: auto; margin-bottom: 1.8em; border-radius: 12px; }
.parte { margin: 0 0 40px; padding: 26px 30px; border-radius: 14px; background: linear-gradient(135deg, var(--green-900), #1c3324); color: #fff; font-family: Poppins, sans-serif; font-size: 1.6rem; }
.parte span { display: block; margin-bottom: 2px; color: var(--lime); font-family: Raleway, sans-serif; font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.lectura-cierre { border-bottom: 0; }

/* Escuela */
.school-facts { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 32px; padding: 0; list-style: none; }
.school-facts li { padding: 10px 18px; border-radius: 999px; background: var(--dark-2); color: var(--soft); font-size: .95rem; }
.school-facts strong { color: #fff; }
.course-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.course-card { display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; background: var(--dark-2); transition: transform .2s, box-shadow .2s; }
.course-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0, 0, 0, .35); }
.course-cover { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--green-900); overflow: hidden; }
.course-cover img { width: 100%; height: 100%; object-fit: cover; }
.course-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, .6)); }
.course-num { position: absolute; left: 16px; bottom: 14px; z-index: 1; padding: 4px 14px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.course-card > div { display: flex; flex-direction: column; flex: 1; padding: 22px; }
.course-card h2 { font-size: 1.4rem; line-height: 1.25; }
.course-card h2 a { color: #fff; text-decoration: none; }
.course-card p { color: var(--soft); }
.course-card .eyebrow { color: var(--brand); }
.course-card .btn { align-self: flex-start; margin-top: auto; }
.programa { margin: 1em 0 0; padding: 0; list-style: none; }
.programa li { margin-bottom: 12px; }
.programa a { display: flex; align-items: center; gap: 18px; padding: 16px 20px; border-radius: 12px; background: var(--dark-2); color: #fff; text-decoration: none; transition: background .2s, transform .2s; }
.programa a:hover { background: #3b3f4a; transform: translateX(4px); }
.programa-num { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--brand); font-family: Poppins, sans-serif; font-size: 1.2rem; }
.programa-txt { flex: 1; min-width: 0; }
.programa-txt strong { display: block; font-size: 1.1rem; line-height: 1.3; }
.programa-txt small { color: var(--soft); font-size: .9rem; }
.programa-ir { color: var(--brand); font-size: 1.8rem; line-height: 1; }
.lesson-hero { padding-bottom: 30px; }
.avance { height: 6px; max-width: 420px; margin-top: 18px; border-radius: 999px; background: var(--dark-2); overflow: hidden; }
.avance span { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.guide-toc li.actual a { color: var(--brand); font-weight: 700; }
.guide-toc li.actual::before { background: var(--brand); color: #fff; }
.leccion-intro { font-size: 1.15em; color: #fff; }
.figura { margin: 1.8em 0; padding: 22px; border-radius: 14px; background: #20232b; border: 1px solid var(--dark-line); }
.figura svg { display: block; width: 100%; height: auto; font-family: Raleway, sans-serif; }
.figura figcaption { margin-top: 12px; color: var(--soft); font-size: .92rem; text-align: center; }
.claves { margin: 2.4em 0 0; padding: 24px 26px; border-radius: 14px; background: linear-gradient(135deg, var(--green-900), #1c3324); }
.site-main .prose-guide .claves h2 { margin-top: 0; padding-left: 0; border-left: 0; font-size: 1.25rem; }
.repaso { margin-top: 2em; }
.repaso details { margin-bottom: 10px; border-radius: 10px; background: var(--dark-2); border: 1px solid var(--dark-line); }
.repaso summary { padding: 14px 18px; cursor: pointer; font-weight: 700; color: #fff; }
.repaso details p { margin: 0; padding: 0 18px 16px; color: var(--lime); }
.pager { align-items: stretch; }

@media (max-width: 1000px) {
  .book-layout, .lectura-layout { grid-template-columns: 1fr; gap: 32px; }
  .book-index, .lectura-indice { position: static; max-height: none; }
  .book-hero, .lectura-portada { grid-template-columns: 1fr; gap: 28px; justify-items: start; }
  .book-hero-cover, .lectura-portada .tapa { max-width: 230px; width: 100%; }
}
@media (max-width: 640px) {
  .book-row { grid-template-columns: 1fr; gap: 22px; padding: 22px; }
  .book-row-cover { max-width: 190px; }
}

/* Versión para imprimir y para el PDF del libro */
@media print {
  .site-header, .site-footer, .to-top, .solo-pantalla, .lectura-indice, .skip { display: none !important; }
  html, body, .site-main { background: #fff !important; color: #1b1b1b !important; }
  body { font-size: 11.5pt; }
  .lectura-portada { display: block; padding: 0; border: 0; background: #fff !important; page-break-after: always; text-align: center; }
  .lectura-portada .tapa { width: 78mm; margin: 26mm auto 14mm; box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .site-main .lectura-portada h1 { color: #145423 !important; font-size: 26pt; }
  .lectura-portada .lead, .lectura-portada .guide-meta { color: #444 !important; justify-content: center; }
  .lectura-portada .guide-chip { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .lectura-layout { display: block; padding: 0; max-width: none; }
  .lectura-texto { max-width: none; }
  .capitulo { page-break-before: always; border: 0; margin: 0; padding: 0; }
  .parte { page-break-before: always; page-break-after: avoid; background: #145423 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; margin-top: 60mm; }
  .parte + .capitulo { page-break-before: auto; }
  .capitulo-num { color: #1e7d34 !important; }
  .site-main .capitulo-titulo, .site-main .prose-guide h2, .site-main .prose-guide h3, .prose-guide strong, .prose-guide > p:first-child { color: #145423 !important; }
  .capitulo-bajada, .prologo, .prose-guide, .prose-guide li, .prose-guide p, .lectura-cierre p { color: #1b1b1b !important; }
  .capitulo-foto { max-height: 70mm; object-fit: cover; }
  .prose-guide ol > li, .prose-guide table, .prose-guide caption, .prose-guide .table-wrap { background: #f3f6f3 !important; color: #1b1b1b !important; border-color: #cfd8cf !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .prose-guide th, .prose-guide td, .prose-guide tbody th { color: #1b1b1b !important; border-color: #cfd8cf !important; }
  .prose-guide thead th { background: #1e7d34 !important; color: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .prose-guide ol > li::before, .prose-guide ul > li::before { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .prose-guide h2[id^="fuentes"] + ul, .prose-guide h2[id^="fuentes"] { color: #555 !important; }
  .prose-guide h2, .prose-guide h3 { page-break-after: avoid; }
  .prose-guide ol > li, .prose-guide .table-wrap, .figura { page-break-inside: avoid; }
  a { color: inherit !important; text-decoration: none !important; }
  @page { size: A4; margin: 20mm 18mm; }
}

/* La tapa escala su texto según su propio ancho */
.tapa { container-type: inline-size; }
.tapa-titulo { font-size: 10.2cqw; overflow-wrap: break-word; }
.tapa-serie { font-size: 4.4cqw; }
.tapa-marca { font-size: 6cqw; }

/* Página pública de socios */
.socios-intro { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.socios-caja { padding: 28px; border-radius: 14px; background: var(--dark-2); border: 1px solid var(--dark-line); }
.socios-caja .tick-list { margin-bottom: 0; }
@media (max-width: 900px) { .socios-intro { grid-template-columns: 1fr; gap: 28px; } }

/* ==========================================================================
   Paleta institucional: verde de la marca, azul, naranja y grises, con líneas de color.
   Vale para el fondo claro y para el oscuro.
   ========================================================================== */
:root { --azul: #1b5fa7; --azul-osc: #123c69; --celeste: #3aa0d8; --naranja: #f08a24; --naranja-osc: #c96a0c; --gris: #6b7682; --franja: linear-gradient(90deg, var(--brand) 0 40%, var(--azul) 40% 68%, var(--naranja) 68% 88%, #9aa5b1 88% 100%); }

/* Fondo oscuro: azul noche en lugar de negro */
html[data-tema="oscuro"] { --dark: #101a26; --dark-2: #1a2634; --dark-line: #2b3a4c; --soft: #b7c3cf; --lime: #7cc4f0; --titulo: #ffffff; }
html[data-tema="oscuro"] .guide-hero, html[data-tema="oscuro"] .lectura-portada { background: linear-gradient(180deg, #17283b, var(--dark)); }
html[data-tema="oscuro"] .site-footer { background: #0b131c; color: #c9d3dd; }
html[data-tema="oscuro"] .site-footer a, html[data-tema="oscuro"] .footer-title { color: #e6edf4; }
html[data-tema="oscuro"] .site-footer::before { filter: brightness(.07) sepia(1) hue-rotate(175deg) saturate(3); }
html[data-tema="oscuro"] .wordmark-dark { color: #fff; }
html[data-tema="oscuro"] .footer-logo img { filter: brightness(0) invert(1); }
html[data-tema="oscuro"] .footer-bottom { border-color: #223041; }
html[data-tema="oscuro"] .guide-toc li.actual::before { background: var(--naranja); }
html[data-tema="oscuro"] .guide-toc li.actual a { color: var(--naranja); }
html[data-tema="oscuro"] .site-main .prose-guide h3 { color: var(--celeste); }
html[data-tema="oscuro"] .crumbs a, html[data-tema="oscuro"] .section-head a { color: var(--celeste); }

/* Cabecera: franja de cuatro colores y botón de sol y luna */
.site-header { border-top: 0; }
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 5px; background: var(--franja); }
.tema-btn { display: grid; place-items: center; width: 40px; height: 40px; margin-left: 6px; padding: 0; border: 2px solid rgba(255, 255, 255, .75); border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; transition: background .2s, transform .3s; }
.tema-btn:hover { background: rgba(255, 255, 255, .28); transform: rotate(20deg); }
.tema-btn svg { width: 20px; height: 20px; }
.tema-btn .luna { display: block; } .tema-btn .sol { display: none; }
html[data-tema="oscuro"] .tema-btn .luna { display: none; } html[data-tema="oscuro"] .tema-btn .sol { display: block; }
.header-acciones { display: flex; align-items: center; gap: 10px; }

/* Títulos de sección con línea de color */
.section > .wrap > h2, .section-head h2, .book-main > h2, .guide-main > h2 { position: relative; padding-bottom: 14px; }
.section > .wrap > h2::after, .section-head h2::after, .book-main > h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 84px; height: 5px; border-radius: 3px; background: linear-gradient(90deg, var(--naranja) 0 55%, var(--azul) 55% 100%); }
.page-head h1 { position: relative; padding-bottom: 14px; }
.page-head h1::after { content: ""; position: absolute; left: 0; bottom: 0; width: 120px; height: 6px; border-radius: 3px; background: var(--franja); }

/* Botones: naranja para la acción principal, azul para la secundaria */
.btn-primary { background: var(--naranja); border-color: var(--naranja); color: #fff; font-weight: 700; }
.btn-primary:hover { background: var(--naranja-osc); border-color: var(--naranja-osc); }
.btn-secondary, .btn-ghost { border-color: var(--azul); color: var(--azul); }
.btn-secondary:hover, .btn-ghost:hover { background: var(--azul); color: #fff; }
.site-main a.btn-secondary { color: var(--azul); }
html[data-tema="oscuro"] .btn-secondary, html[data-tema="oscuro"] .site-main a.btn-secondary { border-color: var(--celeste); color: var(--celeste); }
html[data-tema="oscuro"] .btn-secondary:hover, html[data-tema="oscuro"] .site-main a.btn-secondary:hover { background: var(--celeste); color: #0b131c; }
.site-main a.btn-secondary:hover { color: #fff; }
.site-main a:not(.btn) { text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
.prose a, .site-main p a:not(.btn) { color: var(--azul); }
html[data-tema="oscuro"] .prose a, html[data-tema="oscuro"] .site-main p a:not(.btn) { color: var(--celeste); }

/* Portada */
.hero::after { background: linear-gradient(90deg, rgba(10, 30, 55, .94) 0%, rgba(12, 40, 70, .74) 55%, rgba(12, 40, 70, .25) 100%); }
.hero-kicker { color: #ffc27a; }
.hero-price { background: rgba(240, 138, 36, .92); }
.hero-row::before { content: ""; position: absolute; left: 20px; top: 46px; width: 64px; height: 5px; border-radius: 3px; background: var(--naranja); }
.hero-row { padding-top: 84px; }

/* Tarjetas con línea superior de color, una por cada una */
.line-card, .case-card, .why-grid > div, .steps li, .fact-grid > div, .course-card, .guide-card { --acento: var(--brand); }
.line-card:nth-child(4n+2), .case-card:nth-child(3n+2), .why-grid > div:nth-child(4n+2), .steps li:nth-child(3n+2), .fact-grid > div:nth-child(4n+2), .course-card:nth-child(3n+2) { --acento: var(--azul); }
.line-card:nth-child(4n+3), .case-card:nth-child(3n), .why-grid > div:nth-child(4n+3), .steps li:nth-child(3n), .fact-grid > div:nth-child(4n+3), .course-card:nth-child(3n) { --acento: var(--naranja); }
.line-card:nth-child(4n), .why-grid > div:nth-child(4n), .fact-grid > div:nth-child(4n) { --acento: #8b97a4; }
.line-card, .fact-grid > div { border-top: 5px solid var(--acento) !important; }
.case-card { border-left: 5px solid var(--acento) !important; }
.case-card .case-more { color: var(--acento); }
.why-grid > div, .steps li { border-top: 4px solid var(--acento); }
.steps li::before { color: var(--acento); }
.fact-grid dt { color: var(--acento); }
.course-num { background: var(--acento); }
.tick-list li::before { border-color: var(--naranja); }

/* Guías: color por tema */
.guide-card[data-cat="Nutrientes"] { --acento: var(--azul); }
.guide-card[data-cat="Suelos"] { --acento: #8a5a2b; }
.guide-card[data-cat="Manejo"] { --acento: var(--naranja); }
.guide-card[data-cat="Pasturas"] { --acento: #5a8a1f; }
.guide-card { border-bottom: 4px solid var(--acento) !important; }
.guide-card .eyebrow { color: var(--acento); }
.guide-chip { background: var(--azul); }
.site-main .prose-guide h2 { border-left-color: var(--naranja); }
.prose-guide ul > li::before { background: var(--azul); }
.prose-guide ol > li::before { background: var(--naranja); }
.prose-guide thead th { background: var(--azul-osc); }
.guide-toc-title { color: var(--naranja-osc); }
html[data-tema="oscuro"] .guide-toc-title { color: var(--naranja); }
.avance span { background: var(--naranja); }
.programa-num { background: var(--azul); }
.programa-ir { color: var(--naranja); }
.cta-box { background: linear-gradient(135deg, var(--azul-osc), #1b5fa7); }
.claves { background: linear-gradient(135deg, #145423, #1e7d34); }
.parte { background: linear-gradient(135deg, var(--azul-osc), #1b5fa7); }
.parte span { color: #ffc27a; }
.capitulo-num { color: var(--naranja-osc); }
html[data-tema="oscuro"] .capitulo-num { color: var(--naranja); }
.indice-parte { color: var(--azul); }
html[data-tema="oscuro"] .indice-parte { color: var(--celeste); }
.indice a span { color: var(--naranja-osc); }
.tapa-serie { background: var(--naranja); }
.tapa-marca { border-top-color: var(--naranja); }
.eyebrow { letter-spacing: .08em; }
.to-top { background: var(--azul); }
.to-top:hover { background: var(--azul-osc); }
.main-nav a:hover, .main-nav a[aria-current] { border-bottom-color: #ffd9ad; }

@media (max-width: 900px) {
  .header-acciones { gap: 8px; }
  .tema-btn { width: 42px; height: 42px; }
}

/* Fondo claro (el de siempre, salvo que se elija el oscuro con el botón de la luna) */
html:not([data-tema="oscuro"]) {--dark: #f3f6fa; --dark-2: #ffffff; --dark-line: #dbe2ea; --soft: #56626e; --lime: #1b5fa7; --titulo: #123c69; --sombra: 0 1px 2px rgba(18, 60, 105, .06), 0 8px 22px rgba(18, 60, 105, .08); }
html:not([data-tema="oscuro"]) .site-main {background: var(--dark); color: var(--ink); }
html:not([data-tema="oscuro"]) .site-main h1, html:not([data-tema="oscuro"]) .site-main h2, html:not([data-tema="oscuro"]) .site-main h3 {color: var(--titulo); }
html:not([data-tema="oscuro"]) .site-main .prose h2, html:not([data-tema="oscuro"]) .site-main .accent {color: var(--azul); }
html:not([data-tema="oscuro"]) .site-main .note {color: var(--soft); }
html:not([data-tema="oscuro"]) .lead {color: #44505c; }
html:not([data-tema="oscuro"]) .section-tint {background: #fff; border-block: 1px solid var(--dark-line); }
html:not([data-tema="oscuro"]) .page-head, html:not([data-tema="oscuro"]) .guide-hero, html:not([data-tema="oscuro"]) .lectura-portada {background: linear-gradient(180deg, #dfecf8 0%, var(--dark) 100%); border-bottom: 1px solid var(--dark-line); }
html:not([data-tema="oscuro"]) .crumbs ol {color: var(--soft); }
html:not([data-tema="oscuro"]) .crumbs a {color: var(--azul); }
html:not([data-tema="oscuro"]) .guide-meta {color: var(--soft); }
html:not([data-tema="oscuro"]) .card, html:not([data-tema="oscuro"]) .course, html:not([data-tema="oscuro"]) .guide-card, html:not([data-tema="oscuro"]) .line-card, html:not([data-tema="oscuro"]) .case-card, html:not([data-tema="oscuro"]) .course-card, html:not([data-tema="oscuro"]) .book-row, html:not([data-tema="oscuro"]) .contact-box, html:not([data-tema="oscuro"]) .socios-caja, html:not([data-tema="oscuro"]) .muestra, html:not([data-tema="oscuro"]) .guide-toc, html:not([data-tema="oscuro"]) .book-index, html:not([data-tema="oscuro"]) .fact-grid > div, html:not([data-tema="oscuro"]) .programa a, html:not([data-tema="oscuro"]) .repaso details, html:not([data-tema="oscuro"]) .prose-guide ol > li, html:not([data-tema="oscuro"]) .school-facts li {background-color: #fff; border: 1px solid var(--dark-line); box-shadow: var(--sombra); }
html:not([data-tema="oscuro"]) .section-tint .guide-card, html:not([data-tema="oscuro"]) .section-tint .card, html:not([data-tema="oscuro"]) .section-tint .repaso details {background-color: var(--dark); }
html:not([data-tema="oscuro"]) .line-card:hover, html:not([data-tema="oscuro"]) .case-card:hover, html:not([data-tema="oscuro"]) .programa a:hover {background-color: #eef4fb; }
html:not([data-tema="oscuro"]) .line-card, html:not([data-tema="oscuro"]) .case-card, html:not([data-tema="oscuro"]) .card p:last-child, html:not([data-tema="oscuro"]) .course p:last-child, html:not([data-tema="oscuro"]) .course-card p, html:not([data-tema="oscuro"]) .book-row > div > p, html:not([data-tema="oscuro"]) .why-grid p, html:not([data-tema="oscuro"]) .steps p, html:not([data-tema="oscuro"]) .guide-card p:last-child, html:not([data-tema="oscuro"]) .book p {color: var(--soft); }
html:not([data-tema="oscuro"]) .line-card strong, html:not([data-tema="oscuro"]) .case-card strong, html:not([data-tema="oscuro"]) .programa a, html:not([data-tema="oscuro"]) .programa-txt strong, html:not([data-tema="oscuro"]) .repaso summary, html:not([data-tema="oscuro"]) .school-facts strong {color: var(--titulo); }
html:not([data-tema="oscuro"]) .course h2 a, html:not([data-tema="oscuro"]) .guide-card h3 a, html:not([data-tema="oscuro"]) .book h2 a, html:not([data-tema="oscuro"]) .course-card h2 a, html:not([data-tema="oscuro"]) .book-row h2 a, html:not([data-tema="oscuro"]) .contact-list a {color: var(--titulo); }
html:not([data-tema="oscuro"]) .guide-card h3 a:hover, html:not([data-tema="oscuro"]) .course-card h2 a:hover, html:not([data-tema="oscuro"]) .book-row h2 a:hover {color: var(--azul); }
html:not([data-tema="oscuro"]) .programa-num {color: #fff; }
html:not([data-tema="oscuro"]) .repaso details p {color: var(--azul); }
html:not([data-tema="oscuro"]) .fact-grid dd {color: var(--titulo); }
html:not([data-tema="oscuro"]) .chip {color: var(--titulo); border-color: var(--azul); }
html:not([data-tema="oscuro"]) .chip[aria-pressed="true"] {color: #fff; background: var(--azul); }
html:not([data-tema="oscuro"]) .guide-hero .btn-light, html:not([data-tema="oscuro"]) .socios-intro .btn-light {border-color: var(--azul); color: var(--azul); }
html:not([data-tema="oscuro"]) .guide-hero .btn-light:hover {background: var(--azul); color: #fff; }
html:not([data-tema="oscuro"]) .prose-guide > p:first-child, html:not([data-tema="oscuro"]) .leccion-intro {color: var(--ink); }
html:not([data-tema="oscuro"]) .site-main .prose-guide h2 {color: var(--titulo); }
html:not([data-tema="oscuro"]) .site-main .prose-guide h3 {color: var(--azul); }
html:not([data-tema="oscuro"]) .prose-guide strong {color: var(--titulo); }
html:not([data-tema="oscuro"]) .prose-guide table, html:not([data-tema="oscuro"]) .prose-guide caption {background: #fff; color: var(--ink); }
html:not([data-tema="oscuro"]) .prose-guide caption {color: var(--azul); }
html:not([data-tema="oscuro"]) .prose-guide tbody th {color: var(--titulo); }
html:not([data-tema="oscuro"]) .prose-guide tbody tr:nth-child(even) {background: #f6f9fc; }
html:not([data-tema="oscuro"]) .prose-guide .table-wrap {box-shadow: var(--sombra); }
html:not([data-tema="oscuro"]) .prose-guide h2[id^="fuentes"] {color: var(--soft); }
html:not([data-tema="oscuro"]) .prose-guide h2[id^="fuentes"] + ul > li::before {background: #b8c4d0; }
html:not([data-tema="oscuro"]) .guide-toc a, html:not([data-tema="oscuro"]) .indice a {color: var(--ink); }
html:not([data-tema="oscuro"]) .guide-toc li::before {background: #e3eef9; color: var(--azul); }
html:not([data-tema="oscuro"]) .guide-toc li.actual::before {background: var(--naranja); color: #fff; }
html:not([data-tema="oscuro"]) .guide-toc li.actual a {color: var(--naranja-osc); }
html:not([data-tema="oscuro"]) .prologo {color: #36424e; }
html:not([data-tema="oscuro"]) .capitulo-bajada {color: var(--soft); }
html:not([data-tema="oscuro"]) .avance {background: #d7e1ec; }
html:not([data-tema="oscuro"]) .site-main .book-row h2, html:not([data-tema="oscuro"]) .site-main .course-card h2 {color: var(--titulo); }
html:not([data-tema="oscuro"]) .hero {background: #0f2238; }
html:not([data-tema="oscuro"]) .site-main .hero h1 {color: #fff; }
html:not([data-tema="oscuro"]) .cta-box, html:not([data-tema="oscuro"]) .claves, html:not([data-tema="oscuro"]) .parte {color: #fff; }
html:not([data-tema="oscuro"]) .site-main .cta-box h2, html:not([data-tema="oscuro"]) .site-main .prose-guide .claves h2 {color: #fff; }
html:not([data-tema="oscuro"]) .claves li, html:not([data-tema="oscuro"]) .cta-box p {color: #e3eefa; }
html:not([data-tema="oscuro"]) .figura {background: #16283c; border-color: #16283c; }
html:not([data-tema="oscuro"]) .figura figcaption {color: #c5d2df; }
html:not([data-tema="oscuro"]) .tapa, html:not([data-tema="oscuro"]) .tapa-titulo {color: #fff; }
html:not([data-tema="oscuro"]) .section-head a {color: var(--azul); }
html:not([data-tema="oscuro"]) .line-img {background: linear-gradient(#e6edf5, #f7f9fc); }
html:not([data-tema="oscuro"]) .site-main .field label, html:not([data-tema="oscuro"]) .site-main .check {color: var(--ink); }
html:not([data-tema="oscuro"]) .site-main input, html:not([data-tema="oscuro"]) .site-main select, html:not([data-tema="oscuro"]) .site-main textarea {border-color: #c5d0db; }
html:not([data-tema="oscuro"]) .site-footer {background: #fff; }

/* Orden de la cabecera: logo, menú y botones */
.brand { margin-right: auto; }
.main-nav { order: 2; }
.header-acciones { order: 3; }

/* El menú y su desplegable van por encima de la franja de colores */
.site-header::after { z-index: 0; pointer-events: none; }
.main-nav, .header-acciones, .brand { position: relative; z-index: 2; }
.sub { z-index: 5; box-shadow: 0 10px 24px rgba(0, 0, 0, .25); }
@media (max-width: 900px) { .main-nav { position: absolute; } .sub { box-shadow: none; } }
