:root {
  --ink: #16302a;
  --text: #34443d;
  --muted: #5b6b63;
  --green: #1f6f43;
  --green-strong: #175634;
  --green-bright: #2fa35a;
  --mint: #eaf4ee;
  --cream: #f7f6f1;
  --line: #dde6e0;
  --white: #ffffff;
  --radius: 14px;
  --serif: "Playfair Display", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --shadow: 0 10px 30px rgba(22, 48, 42, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.6; color: var(--text); background: var(--cream); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); }
h1, h2, h3 { font-family: var(--serif); color: var(--ink); line-height: 1.2; margin: 0; font-weight: 600; }
h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(247, 246, 241, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 4px 18px rgba(22, 48, 42, .06); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand img { height: 44px; width: auto; }
.menu { display: flex; align-items: center; gap: 26px; }
.menu > a { color: var(--ink); text-decoration: none; font-size: .95rem; font-weight: 600; }
.menu > a:hover { color: var(--green); }
.menu-actions { display: flex; gap: 10px; margin-left: 8px; }
.menu-toggle { display: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; padding: 12px 20px; font-weight: 700; font-size: .95rem; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s; font-family: var(--sans); }
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 8px 14px; font-size: .88rem; }
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-strong); }
.btn-ghost { background: var(--white); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--green); color: var(--green); }
.btn-light { background: var(--white); color: var(--ink); }
.btn-outline-light { color: var(--white); border-color: rgba(255, 255, 255, .55); }
.btn-outline-light:hover { border-color: var(--white); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--green); margin-bottom: 12px; }

/* Hero */
.hero { position: relative; padding: 48px 0 56px; background:
  radial-gradient(circle at 85% 20%, rgba(47, 163, 90, .14), transparent 40%),
  radial-gradient(circle at 10% 90%, rgba(31, 111, 67, .08), transparent 45%); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.15rem); }
.lead { margin: 18px 0 26px; font-size: 1.1rem; color: var(--muted); max-width: 36em; }
.hero-card { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 36px 32px 26px; box-shadow: var(--shadow); }
.hero-card img { margin: 0 auto 22px; width: 100%; max-width: 340px; }
.hero-tags { list-style: none; margin: 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.hero-tags li { background: var(--mint); color: var(--green-strong); font-size: .82rem; font-weight: 700; border-radius: 999px; padding: 5px 12px; }

/* Sections */
.section { padding: 56px 0; }
.split { display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; align-items: start; }
.split-body p + p { margin-top: 14px; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 32px; }
.pillar { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; transition: box-shadow .2s, transform .2s; }
.pillar:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.pillar svg { width: 26px; height: 26px; fill: none; stroke: var(--green); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 12px; }
.pillar p { margin-top: 6px; color: var(--muted); font-size: .95rem; }

.section-dark { background: var(--ink); color: rgba(255, 255, 255, .82); }
.section-dark h2, .section-dark h3 { color: var(--white); }
.areas { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.areas li { border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--radius); padding: 22px; background: rgba(255, 255, 255, .03); }
.areas .num { display: block; font-family: var(--serif); font-size: 2rem; color: var(--green-bright); line-height: 1; margin-bottom: 12px; }
.areas p { margin-top: 6px; font-size: .95rem; }

.course { display: grid; grid-template-columns: 1.4fr .9fr; gap: 0; background: var(--white); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.course-copy { padding: 34px; }
.course-copy p { margin: 14px 0 22px; color: var(--muted); }
.course-aside { background: linear-gradient(160deg, var(--mint), #f4f9f6); padding: 34px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.course-domain { font-weight: 700; color: var(--green-strong); letter-spacing: .02em; }
.link-arrow { font-weight: 700; text-decoration: none; }
.link-arrow::after { content: " →"; }

.cta-band { padding: 0 0 56px; }
.cta-inner { background: linear-gradient(135deg, var(--green-strong), var(--green)); border-radius: 20px; padding: 34px; display: flex; align-items: center; justify-content: space-between; gap: 24px; color: rgba(255, 255, 255, .88); }
.cta-inner h2 { color: var(--white); font-size: clamp(1.5rem, 2.6vw, 1.9rem); }
.cta-inner p { margin-top: 8px; max-width: 34em; }

/* Contact */
.contact { display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; }
.mail { display: flex; align-items: center; gap: 10px; margin: 18px 0 22px; font-weight: 600; }
.mail svg { width: 20px; height: 20px; fill: none; stroke: var(--green); stroke-width: 1.8; }
.registry { border-top: 1px solid var(--line); padding-top: 16px; font-size: .95rem; }
.registry .label { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.contact-form { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field-wide { grid-column: 1 / -1; }
.field label { font-size: .88rem; font-weight: 700; color: var(--ink); }
.field input, .field select, .field textarea { font: inherit; font-size: .95rem; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--cream); color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(31, 111, 67, .15); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.check input { margin-top: 4px; accent-color: var(--green); }
.privacy-box { margin: 0; background: var(--mint); border-radius: 10px; padding: 12px 14px; font-size: .85rem; display: grid; gap: 2px; }
.privacy-box div { display: flex; gap: 6px; }
.privacy-box dt { font-weight: 700; color: var(--ink); }
.privacy-box dd { margin: 0; }
.form-status { font-size: .9rem; min-height: 1.2em; color: var(--green-strong); }
.form-status.is-error { color: #a12b2b; }
.contact-form .btn { justify-self: start; }

/* Footer */
.site-footer { background: var(--white); border-top: 1px solid var(--line); padding: 32px 0 20px; font-size: .92rem; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-brand { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; color: var(--ink); }
.footer-legal { display: grid; gap: 4px; text-align: right; }
.footer-legal a { color: var(--muted); text-decoration: none; }
.footer-legal a:hover { color: var(--green); }
.copyright { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .85rem; }

/* Legal pages: literal texts published on socifode.es (27/10/2026) */
.legal { padding: 48px 0 64px; max-width: 760px; }
.legal h1 { font-size: 2rem; margin-bottom: 18px; }
.legal h2 { font-size: 1.3rem; margin: 26px 0 8px; }
.legal p { margin: 0 0 12px; }
.legal ul { margin: 0 0 12px; padding-left: 22px; display: grid; gap: 6px; }
.legal strong { color: var(--ink); }
.legal-back { margin-top: 28px !important; }

/* Secretaría Docente / SEDOCE (same contact as Editorial Mar Menor and EDUCLATES) */
.sedoce { display: grid; gap: 4px; align-content: start; }
.sedoce .btn { justify-self: start; margin-top: 6px; }
.sedoce-card { border-top: 1px solid var(--line); padding: 16px 0 18px; font-size: .95rem; }
.sedoce-card .label { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.sedoce-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sedoce-actions .btn { margin-top: 6px; }
.btn-whatsapp { background: #25D366; color: #fff; border-color: #25D366; gap: 8px; }
.btn-whatsapp:hover { background: #1ebe5b; border-color: #1ebe5b; color: #fff; }
.btn-whatsapp svg { width: 18px; height: 18px; fill: currentColor; }
.whatsapp-float { position: fixed; right: 24px; bottom: 24px; z-index: 60; width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #25D366; color: #fff; box-shadow: 0 10px 25px rgba(22, 48, 42, .25); border: 4px solid rgba(255, 255, 255, .7); transition: transform .2s; }
.whatsapp-float:hover { transform: scale(1.05); background: #1ebe5b; }
.whatsapp-float:focus-visible { outline: 3px solid #128C7E; outline-offset: 2px; }
.whatsapp-float svg { width: 30px; height: 30px; fill: currentColor; }
@media print { .whatsapp-float { display: none; } }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid, .split, .contact, .course { grid-template-columns: 1fr; }
  .hero-grid { gap: 28px; }
  .pillars, .areas { grid-template-columns: 1fr; }
  .course-aside { border-left: 0; border-top: 1px solid var(--line); }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .menu-toggle { display: inline-flex; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); align-items: center; justify-content: center; cursor: pointer; }
  .menu-toggle span[aria-hidden] { width: 18px; height: 2px; background: var(--ink); position: relative; }
  .menu-toggle span[aria-hidden]::before, .menu-toggle span[aria-hidden]::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ink); }
  .menu-toggle span[aria-hidden]::before { top: -6px; }
  .menu-toggle span[aria-hidden]::after { top: 6px; }
  .menu { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--cream); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 18px; }
  .menu.is-open { display: flex; }
  .menu > a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .menu-actions { margin: 14px 0 0; flex-direction: column; }
  .footer-legal { text-align: left; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero { padding: 32px 0 40px; }
  .section { padding: 42px 0; }
  .contact-form { grid-template-columns: 1fr; padding: 20px; }
  .course-copy, .course-aside, .cta-inner { padding: 24px; }
  .brand img { height: 38px; }
  .whatsapp-float { right: 14px; bottom: 14px; width: 54px; height: 54px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
