/* ============================================================
   Guías gratuitas para autónomos — estilos compartidos
   Tono limpio, poca letra, mucho aire. Paleta VP (rojo/negro).
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --red: #be1e2d; --red-dark: #8c1622; --red-soft: #fbe9eb;
  --black: #0d0d0d; --white: #ffffff;
  --gray-900: #1a1a1a; --gray-700: #404040; --gray-500: #737373;
  --gray-300: #d4d4d4; --gray-100: #f0f0f0; --gray-50: #fafafa;
  --shadow: 0 4px 12px rgba(0,0,0,.06);
  --shadow-lg: 0 20px 40px rgba(0,0,0,.10);
  --radius: 14px; --radius-lg: 22px;
  --transition: .25s cubic-bezier(.4,0,.2,1);
  --header-h: 72px;
  --maxw: 780px;
}
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body { font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 17px; line-height: 1.7; color: var(--gray-900); background: var(--white); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--red); }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
h1, h2, h3 { line-height: 1.2; color: var(--black); font-weight: 800; letter-spacing: -0.02em; }
h1 { font-size: clamp(1.9rem, 5vw, 2.9rem); }
h2 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); margin: 0 0 12px; }
h3 { font-size: 1.15rem; font-weight: 700; margin: 0 0 6px; }
strong { color: var(--black); font-weight: 700; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 26px; border-radius: 12px; font-weight: 700; font-size: .98rem; transition: all var(--transition); white-space: nowrap; }
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); color: var(--white); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(190,30,45,.3); }
.btn-outline { background: transparent; color: var(--black); border: 2px solid var(--black); }
.btn-outline:hover { background: var(--black); color: var(--white); }
.btn-lg { padding: 16px 30px; font-size: 1.02rem; }
.btn-block { width: 100%; }

/* Header */
.header { position: fixed; inset: 0 0 auto 0; height: var(--header-h); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); border-bottom: 1px solid var(--gray-100); z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; max-width: 1100px; margin: 0 auto; padding: 0 22px; }
.logo-full { height: 44px; width: auto; }
.header-nav { display: flex; align-items: center; gap: 6px; }
.header-nav a.navlink { padding: 8px 12px; font-size: .92rem; color: var(--gray-700); border-radius: 8px; }
.header-nav a.navlink:hover { color: var(--black); background: var(--gray-100); }
@media (max-width: 640px) { .header-nav a.navlink { display: none; } .logo-full { height: 38px; } }

/* Hero */
.ghero { padding: calc(var(--header-h) + 40px) 0 24px; background: linear-gradient(180deg, var(--gray-50), var(--white)); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; background: var(--red-soft); color: var(--red); border-radius: 100px; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 18px; }
.ghero h1 { margin-bottom: 14px; }
.ghero .lead { font-size: 1.15rem; color: var(--gray-700); max-width: 640px; }
.ghero .hero-actions { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; }
.meta-note { margin-top: 18px; font-size: .85rem; color: var(--gray-500); }

/* Prose / contenido */
.prose { padding: 32px 0 8px; }
.prose section { margin-bottom: 34px; }
.prose p { color: var(--gray-700); margin: 0 0 14px; }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 4px; list-style: none; }
.prose ul li { position: relative; padding: 4px 0 4px 30px; color: var(--gray-700); }
.prose ul li::before { content: ''; position: absolute; left: 4px; top: 12px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); }
.prose ol { counter-reset: step; }
.prose ol li { position: relative; padding: 4px 0 4px 40px; margin-bottom: 8px; color: var(--gray-700); counter-increment: step; }
.prose ol li::before { content: counter(step); position: absolute; left: 0; top: 3px; width: 26px; height: 26px; border-radius: 50%; background: var(--red); color: #fff; font-size: .85rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* Callout / caja destacada */
.callout { background: var(--red-soft); border-left: 4px solid var(--red); border-radius: 12px; padding: 18px 20px; margin: 0 0 18px; }
.callout p { color: var(--gray-900); margin: 0; }
.callout.note { background: var(--gray-50); border-left-color: var(--gray-300); }
.callout.note p { color: var(--gray-700); font-size: .95rem; }

/* Caja de costes */
.cost-box { border: 1px solid var(--gray-100); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin: 8px 0 18px; }
.cost-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--gray-100); }
.cost-row:last-child { border-bottom: 0; }
.cost-row .label { font-weight: 600; color: var(--black); }
.cost-row .sub { display: block; font-size: .84rem; color: var(--gray-500); font-weight: 400; }
.cost-row .amount { font-weight: 800; color: var(--red); font-size: 1.15rem; white-space: nowrap; }

/* Tabla */
.table-wrap { overflow-x: auto; margin: 0 0 18px; }
table.simple { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.simple th, table.simple td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--gray-100); }
table.simple th { background: var(--gray-50); color: var(--black); font-weight: 700; }
table.simple td { color: var(--gray-700); }

/* Descarga / captación */
.download { background: var(--black); color: #fff; border-radius: var(--radius-lg); padding: 34px 28px; margin: 24px 0; text-align: center; }
.download h2 { color: #fff; }
.download p { color: var(--gray-300); max-width: 520px; margin: 0 auto 22px; }
.dl-form { max-width: 440px; margin: 0 auto; text-align: left; }
.dl-form .fg { margin-bottom: 12px; }
.dl-form input[type=text], .dl-form input[type=email] { width: 100%; padding: 13px 15px; border: 1.5px solid #333; border-radius: 10px; background: #141414; color: #fff; font-family: inherit; font-size: .98rem; }
.dl-form input::placeholder { color: #888; }
.dl-form input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(190,30,45,.25); }
.dl-check { display: flex; align-items: flex-start; gap: 8px; font-size: .82rem; color: var(--gray-300); margin: 6px 0 16px; }
.dl-check a { color: #fff; text-decoration: underline; }
.dl-privacy { font-size: .78rem; color: var(--gray-500); text-align: center; margin-top: 12px; }

/* CTA final */
.cta { background: linear-gradient(135deg, var(--red), var(--red-dark)); color: #fff; border-radius: var(--radius-lg); padding: 40px 28px; text-align: center; margin: 24px 0; }
.cta h2 { color: #fff; }
.cta p { color: rgba(255,255,255,.92); max-width: 520px; margin: 0 auto 22px; }
.cta .btn-primary { background: #fff; color: var(--red); }
.cta .btn-primary:hover { background: var(--gray-100); color: var(--red-dark); }
.cta .btn-outline { color: #fff; border-color: #fff; }
.cta .btn-outline:hover { background: #fff; color: var(--red); }

/* Otras guías */
.more-guides { padding: 8px 0 40px; }
.mg-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 14px; }
.mg-card { border: 1px solid var(--gray-100); border-radius: var(--radius); padding: 18px 20px; transition: all var(--transition); color: var(--black); font-weight: 600; }
.mg-card:hover { border-color: var(--red); box-shadow: var(--shadow); transform: translateY(-2px); color: var(--red); }
.mg-card span { display: block; font-size: .82rem; color: var(--gray-500); font-weight: 500; margin-top: 4px; }
@media (max-width: 640px) { .mg-grid { grid-template-columns: 1fr; } }

/* Footer */
.footer { background: var(--black); color: var(--gray-300); padding: 48px 0 24px; }
.footer .container { max-width: 1100px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; margin-bottom: 32px; }
.footer h4 { color: #fff; font-size: .9rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 14px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: var(--gray-300); font-size: .9rem; }
.footer-links a:hover { color: var(--red); }
.footer-brand p { font-size: .9rem; margin-top: 12px; max-width: 300px; }
.footer-bottom { padding-top: 18px; border-top: 1px solid #222; font-size: .8rem; color: var(--gray-500); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } .footer-bottom { flex-direction: column; } }

/* WhatsApp */
.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 99; width: 58px; height: 58px; border-radius: 50%; background: #25D366; color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(37,211,102,.4); transition: transform var(--transition); }
.wa-float:hover { transform: scale(1.08); color: #fff; }

/* Toast */
.toast-overlay { position: fixed; inset: 0; background: rgba(13,13,13,.55); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; z-index: 200; padding: 20px; }
.toast-overlay.show { display: flex; }
.toast-modal { background: #fff; border-radius: var(--radius-lg); padding: 36px 30px; max-width: 440px; width: 100%; text-align: center; box-shadow: 0 30px 60px rgba(0,0,0,.25); }
.toast-modal .tick { width: 66px; height: 66px; margin: 0 auto 18px; border-radius: 50%; background: linear-gradient(135deg,#4ade80,#16a34a); display: flex; align-items: center; justify-content: center; }
.toast-modal h3 { font-size: 1.35rem; margin-bottom: 10px; }
.toast-modal p { color: var(--gray-700); margin-bottom: 20px; }
.toast-close { background: var(--red); color: #fff; padding: 12px 26px; border-radius: 10px; font-weight: 700; }

:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }
