/* ==========================================================================
   CreaCV — estilos generales del sitio
   1. Fuentes y variables  2. Base  3. Cabecera  4. Botones y formularios
   5. Inicio  6. Guías y páginas legales  7. Publicidad  8. Pie  9. Utilidades
   ========================================================================== */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("../fonts/Inter-Regular.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("../fonts/Inter-SemiBold.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("../fonts/Inter-Bold.woff") format("woff"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: url("../fonts/Poppins-Medium.woff") format("woff"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-display: swap; src: url("../fonts/Poppins-Bold.woff") format("woff"); }

:root {
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Poppins", "Inter", system-ui, sans-serif;
  --navy: #0d1b3e;
  --navy-2: #16295a;
  --blue: #2563eb;
  --blue-strong: #1d4ed8;
  --blue-soft: #e8efff;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f0f3f9;
  --line: #e1e6ef;
  --line-strong: #cbd3e1;
  --text: #121a2c;
  --text-soft: #3b4560;
  --muted: #5f6880;
  --success: #0f7a4f;
  --success-bg: #e7f6ef;
  --warning: #8a5300;
  --warning-bg: #fff5e0;
  --danger: #b42318;
  --danger-bg: #fdecea;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(13, 27, 62, .06);
  --shadow: 0 1px 2px rgba(13, 27, 62, .05), 0 12px 32px -16px rgba(13, 27, 62, .22);
  --shadow-lg: 0 30px 70px -30px rgba(13, 27, 62, .35);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --container: 1160px;
  --header-h: 66px;
  color-scheme: light;
}

/* 2. Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
img, svg { max-width: 100%; }
a { color: var(--blue-strong); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
h1, h2, h3 { font-family: var(--font-display); color: var(--navy); line-height: 1.15; margin: 0 0 .55em; letter-spacing: -0.015em; }
h1 { font-size: clamp(2rem, 4.4vw, 3.3rem); font-weight: 700; }
h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 500; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
::selection { background: #c7d7ff; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--navy); color: #fff; padding: .6rem 1rem; border-radius: 10px; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; color: #fff; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
[hidden] { display: none !important; }

/* 3. Cabecera */
.site-header { position: sticky; top: 0; z-index: 60; height: var(--header-h); background: rgba(255, 255, 255, .88); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 20px; height: 100%; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); font-family: var(--font-display); font-weight: 700; font-size: 1.22rem; letter-spacing: -0.02em; }
.brand:hover { color: var(--navy); }
.brand svg { width: 34px; height: 34px; flex-shrink: 0; }
.brand b { color: var(--blue); font-weight: 700; }
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.main-nav a { display: block; padding: .5rem .8rem; border-radius: 10px; color: var(--text-soft); text-decoration: none; font-weight: 600; font-size: .94rem; }
.main-nav a:hover, .main-nav a[aria-current="page"] { background: var(--surface-2); color: var(--navy); }
.main-nav .btn { margin-left: 6px; }
.header-inner .menu-toggle { display: none; margin-left: auto; }
@media (max-width: 860px) {
  .header-inner .menu-toggle { display: inline-grid; }
  .main-nav { position: fixed; inset: var(--header-h) 0 auto 0; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); padding: 10px 20px 20px; display: none; margin: 0; }
  .main-nav.is-open { display: block; animation: drop .22s var(--ease); }
  .main-nav ul { flex-direction: column; align-items: stretch; }
  .main-nav a { padding: .8rem 1rem; }
  .main-nav .btn { margin: 8px 0 0; justify-content: center; }
}

/* 4. Botones y formularios */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line-strong); background: #fff; color: var(--navy); font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .2s, border-color .2s, box-shadow .2s, transform .15s var(--ease); }
.btn:hover { border-color: var(--navy); color: var(--navy); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 8px 20px -10px rgba(37, 99, 235, .8); }
.btn-primary:hover { background: var(--blue-strong); border-color: var(--blue-strong); color: #fff; }
.btn-navy { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; }
.btn-danger { color: var(--danger); }
.btn-danger:hover { border-color: var(--danger); color: var(--danger); }
.btn-lg { min-height: 54px; padding: 0 26px; font-size: 1.05rem; border-radius: 14px; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: .86rem; border-radius: 9px; }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--navy); cursor: pointer; }
.icon-btn svg { width: 20px; height: 20px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* 5. Inicio */
.hero { position: relative; overflow: hidden; padding: 64px 0 56px; background: radial-gradient(1200px 500px at 85% -10%, #dce7ff 0%, transparent 60%), radial-gradient(800px 400px at -10% 110%, #e9f0ff 0%, transparent 60%), var(--bg); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; } .hero-visual { order: 2; } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--text-soft); font-size: .86rem; font-weight: 600; margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.eyebrow svg { width: 16px; height: 16px; color: var(--success); }
.hero h1 .accent { color: var(--blue); }
.hero-lead { font-size: clamp(1.03rem, 1.5vw, 1.18rem); color: var(--text-soft); max-width: 560px; margin-bottom: 28px; }
.hero-points { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--text-soft); font-size: .94rem; }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points svg { width: 18px; height: 18px; color: var(--blue); }
.hero-visual { position: relative; min-height: 420px; }
.paper { position: absolute; background: #fff; border-radius: 10px; box-shadow: var(--shadow-lg); overflow: hidden; border: 1px solid var(--line); }
.paper-a { width: 66%; right: 4%; top: 0; transform: rotate(2.5deg); animation: float 7s ease-in-out infinite alternate; }
.paper-b { width: 58%; left: 0; top: 18%; transform: rotate(-4deg); animation: float 8s ease-in-out infinite alternate-reverse; }
.paper-label { position: absolute; right: 4%; bottom: -6px; background: var(--navy); color: #fff; font-size: .78rem; font-weight: 600; padding: 6px 10px; border-radius: 8px; }
@media (max-width: 920px) { .hero-visual { min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .paper { position: relative; width: auto; inset: auto; transform: none; animation: none; } .paper-label { position: static; grid-column: 1 / -1; justify-self: center; } }

.section { padding: 64px 0; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 32px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--muted); margin: 0; }
.kicker { display: block; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); margin-bottom: 10px; }

.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm); }
.card h3 { margin-bottom: 6px; }
.card p { color: var(--muted); margin: 0; font-size: .95rem; }
.card-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--blue-soft); color: var(--blue-strong); display: grid; place-items: center; margin-bottom: 14px; }
.card-icon svg { width: 22px; height: 22px; }

.steps-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); counter-reset: s; }
.step { position: relative; padding: 26px 24px 24px; border-radius: var(--radius-lg); background: var(--bg); border: 1px solid var(--line); }
.step-num { width: 36px; height: 36px; border-radius: 10px; background: var(--navy); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; margin-bottom: 14px; }
.step p { color: var(--muted); margin: 0; }

.gallery { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.tpl-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--text); transition: transform .25s var(--ease), box-shadow .25s, border-color .25s; }
.tpl-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--blue); color: var(--text); }
.tpl-card .cv-thumb { border-bottom: 1px solid var(--line); }
.tpl-card-body { padding: 14px 16px 16px; }
.tpl-card-body strong { display: block; font-family: var(--font-display); font-weight: 500; color: var(--navy); }
.tpl-card-body span { display: block; color: var(--muted); font-size: .88rem; margin-top: 2px; }
.tpl-card-body em { display: inline-block; margin-top: 10px; font-style: normal; font-weight: 600; font-size: .88rem; color: var(--blue-strong); }

.guide-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.guide-card { display: block; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); transition: border-color .2s, transform .2s var(--ease); }
.guide-card:hover { border-color: var(--blue); transform: translateY(-2px); color: var(--text); }
.guide-card strong { display: block; font-family: var(--font-display); font-weight: 500; color: var(--navy); margin-bottom: 4px; }
.guide-card span { color: var(--muted); font-size: .92rem; }

.faq { display: grid; gap: 10px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 50px 18px 20px; font-weight: 600; position: relative; color: var(--navy); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--blue); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq .faq-body { padding: 0 20px 18px; color: var(--text-soft); }
.faq .faq-body p:last-child { margin: 0; }

.cta-band { background: var(--navy); color: #fff; border-radius: var(--radius-lg); padding: 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.cta-band h2 { color: #fff; margin: 0 0 6px; }
.cta-band p { color: #c6d1ea; margin: 0; }

/* 6. Guías y páginas legales */
.page-hero { padding: 48px 0 18px; }
.page-hero p { color: var(--text-soft); font-size: 1.08rem; }
.breadcrumb { font-size: .88rem; color: var(--muted); padding-top: 24px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; opacity: .5; }
.breadcrumb a { color: var(--muted); }
.meta { color: var(--muted); font-size: .88rem; }
.prose { font-size: 1.04rem; color: var(--text-soft); }
.prose h2 { margin-top: 1.7em; }
.prose h3 { margin-top: 1.4em; color: var(--navy); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .45em; }
.prose strong { color: var(--text); }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0 1.4em; font-size: .95rem; background: #fff; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--surface-2); color: var(--navy); }
.table-scroll { overflow-x: auto; }
.example { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 10px; padding: 16px 18px; margin: 1em 0 1.4em; }
.example-label { display: block; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); margin-bottom: 6px; }
.compare { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 1em 0 1.4em; }
.compare > div { border-radius: 10px; padding: 14px 16px; font-size: .96rem; }
.compare .bad { background: var(--danger-bg); border: 1px solid #f4c7c1; }
.compare .good { background: var(--success-bg); border: 1px solid #bfe5d2; }
.compare b { display: block; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; }
.compare .bad b { color: var(--danger); } .compare .good b { color: var(--success); }
.card-legal { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; }
.review-note { background: var(--warning-bg); border: 1px dashed #e0b25a; border-radius: 10px; padding: 14px 16px; color: var(--warning); font-size: .92rem; margin-bottom: 20px; }
.article-cta { margin: 2em 0; padding: 22px; border-radius: var(--radius); background: var(--blue-soft); border: 1px solid #c9d8ff; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.article-cta p { margin: 0; color: var(--navy); font-weight: 600; }

/* 7. Publicidad: oculta mientras no haya un bloque real configurado */
.ad-slot { display: none; }
.ad-slot.is-active { display: block; margin: 36px auto; text-align: center; clear: both; padding-top: 8px; border-top: 1px solid var(--line); }
.ad-slot.is-active::before { content: "Publicidad"; display: block; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.ad-slot ins.adsbygoogle { display: block; min-height: 100px; }
.ad-slot.is-debug { display: grid; place-items: center; min-height: 100px; margin: 32px auto; border: 2px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); font-size: .82rem; padding: 10px; }

/* 8. Pie */
.site-footer { background: var(--navy); color: #c6d1ea; padding: 48px 0 26px; margin-top: 48px; font-size: .94rem; }
.site-footer .brand { color: #fff; }
.site-footer .brand b { color: #7fa6ff; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1.5fr 1fr 1fr 1fr; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
.site-footer h2 { font-family: var(--font); font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: #8fa0c6; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: #e3e9f7; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { margin-top: 34px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: .86rem; color: #8fa0c6; }

/* 9. Avisos, diálogos y utilidades */
.notice { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; font-size: .92rem; line-height: 1.5; border: 1px solid transparent; }
.notice svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }
.notice p { margin: 0; }
.notice-info { background: var(--blue-soft); border-color: #c9d8ff; color: var(--navy); }
.notice-warning { background: var(--warning-bg); border-color: #f1d39a; color: var(--warning); }
.notice-error { background: var(--danger-bg); border-color: #f4c7c1; color: var(--danger); }
.notice-success { background: var(--success-bg); border-color: #bfe5d2; color: var(--success); }
.toast-region { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 300; display: grid; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { padding: 12px 16px; border-radius: 12px; background: var(--navy); color: #fff; font-weight: 600; font-size: .92rem; box-shadow: var(--shadow-lg); animation: rise .25s var(--ease) both; }
.toast.is-error { background: var(--danger); }
dialog.modal { border: 0; border-radius: var(--radius-lg); padding: 0; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); box-shadow: var(--shadow-lg); color: var(--text); }
dialog.modal::backdrop { background: rgba(13, 27, 62, .45); }
.modal-head { padding: 22px 24px 0; }
.modal-head h2 { font-size: 1.3rem; margin: 0; }
.modal-body { padding: 14px 24px; color: var(--text-soft); overflow-y: auto; max-height: 60vh; }
.modal-body ul { padding-left: 1.2em; }
.modal-foot { padding: 14px 24px 22px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@keyframes float { from { translate: 0 0; } to { translate: 0 -10px; } }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } .reveal { opacity: 1; transform: none; } }
@media print { .site-header, .site-footer, .ad-slot { display: none !important; } }
