:root { --primary: #1e3a8a; --primary-dark: #1e3a8a; --light: #f8fafc; --text: #1f2937; --muted: #4b5563; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif; color: var(--text); background: #fff; line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Top bar */
.topbar { background: var(--primary); color: #fff; font-size: .85rem; padding: 8px 0; }
.topbar .wrap { display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: center; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }

/* Header */
.site-header { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.1); position: sticky; top: 0; z-index: 40; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 16px; }
.brand { display: flex; align-items: center; text-decoration: none; color: var(--primary); font-weight: 800; font-size: 1.15rem; letter-spacing: .01em; }
.brand img { height: 46px; width: auto; margin-right: 12px; }
.main-nav { display: flex; align-items: center; gap: 22px; }
.main-nav a { color: #4b5563; text-decoration: none; font-size: .95rem; font-weight: 500; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--primary); }
.main-nav a.btn-contact { background: var(--primary); color: #fff; padding: 9px 20px; border-radius: 999px; }
.nav-toggle { display: none; background: #f9fafb; border: 0; border-radius: 6px; padding: 8px; color: var(--primary); cursor: pointer; }
.nav-toggle svg { width: 26px; height: 26px; display: block; }

/* Breadcrumb */
.breadcrumb { font-size: .85rem; color: #6b7280; padding: 14px 0 0; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: #9ca3af; }
.breadcrumb a { color: #6b7280; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* Hero */
.hero { padding: 28px 0 48px; background: linear-gradient(180deg, #fff 0%, var(--light) 100%); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.eyebrow { color: var(--primary); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; margin: 0 0 8px; }
h1 { font-size: 2.6rem; line-height: 1.15; font-weight: 800; margin: 0 0 18px; color: #111827; }
.lead { font-size: 1.15rem; color: var(--muted); margin: 0 0 26px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border-radius: 8px; font-weight: 600; text-decoration: none; font-size: 1rem; border: 2px solid transparent; transition: all .2s; }
.btn svg { width: 20px; height: 20px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: #1e3a8a; box-shadow: 0 6px 16px rgba(30,58,138,.25); }
.btn-whatsapp { background: #0E7A4D; color: #fff; }
.btn-whatsapp:hover { background: #0B6640; }
.btn-outline { background: #fff; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: #eff6ff; }
.hero-img { border-radius: 14px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.15); aspect-ratio: 4 / 3; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Content */
.content { padding: 40px 0 20px; }
.content-grid { display: grid; grid-template-columns: 1fr 320px; gap: 48px; align-items: start; }
article h2 { font-size: 1.7rem; color: #111827; margin: 2.2rem 0 .8rem; line-height: 1.25; }
article h3 { font-size: 1.2rem; color: var(--primary); margin: 1.6rem 0 .5rem; }
article p { margin: 0 0 1rem; }
article ul, article ol { padding-left: 1.3rem; margin: 0 0 1rem; }
article li { margin-bottom: .4rem; }
.feature-list { list-style: none; padding: 0 !important; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.feature-list li { position: relative; padding-left: 30px; }
.feature-list li::before { content: ""; position: absolute; left: 0; top: .35em; width: 18px; height: 18px; border-radius: 50%; background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/12px no-repeat; }

/* Sidebar */
.sidebar { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 20px; }
.card { background: var(--light); border: 1px solid #e5e7eb; border-radius: 12px; padding: 22px; }
.card h2, .card h3 { font-size: 1.1rem; margin: 0 0 12px; color: var(--primary); }
.card ul { list-style: none; padding: 0; margin: 0; }
.card li { margin-bottom: 8px; }
.card li a { text-decoration: none; }
.card li a:hover { text-decoration: underline; }
.card-cta { background: var(--primary); color: #fff; }
.card-cta h2 { color: #fff; }
.card-cta p { margin: 0 0 14px; color: #dbeafe; }
.card-cta .btn { width: 100%; margin-bottom: 10px; }
.card-cta .btn-outline { background: transparent; color: #fff; border-color: #fff; }
.card-cta a.link { color: #fff; }

/* FAQ */
.faq details { border: 1px solid #e5e7eb; border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; background: #fff; }
.faq summary { cursor: pointer; font-weight: 600; color: #111827; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

/* CTA band */
.cta-band { background: var(--primary); color: #fff; padding: 48px 0; margin-top: 40px; text-align: center; }
.cta-band h2 { color: #fff; font-size: 1.9rem; margin: 0 0 10px; }
.cta-band p { color: #dbeafe; margin: 0 0 22px; }
.cta-band .cta-row { justify-content: center; }
.cta-band .btn-outline { background: transparent; color: #fff; border-color: #fff; }

/* Related */
.related { padding: 48px 0; background: var(--light); }
.related h2 { text-align: center; font-size: 1.7rem; margin: 0 0 26px; }
.related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.related-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 18px; text-decoration: none; color: var(--text); display: block; transition: box-shadow .2s; }
.related-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.related-card strong { display: block; color: var(--primary); margin-bottom: 4px; }
.related-card span { font-size: .9rem; color: var(--muted); }

/* Footer */
.site-footer { background: var(--primary); color: #dbeafe; padding: 40px 0 24px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 32px; }
.site-footer h3 { color: #93c5fd; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a, .site-footer button.linklike { color: #dbeafe; text-decoration: none; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.site-footer a:hover, .site-footer button.linklike:hover { color: #fff; text-decoration: underline; }
.footer-brand { display: flex; align-items: center; color: #fff; font-weight: 700; font-size: 1.1rem; margin-bottom: 12px; }
.footer-brand img { height: 40px; margin-right: 10px; }
.footer-bottom { border-top: 1px solid #1e40af; margin-top: 28px; padding-top: 18px; display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: space-between; font-size: .88rem; }
.footer-bottom .legal a, .footer-bottom .legal button { margin-right: 16px; }

/* Floating WhatsApp */
.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 45; width: 56px; height: 56px; border-radius: 50%; background: #0E7A4D; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(0,0,0,.2); }
.wa-float svg { width: 32px; height: 32px; fill: #fff; }

/* Cookie banner */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: #fff; border-top: 1px solid #e5e7eb; box-shadow: 0 -4px 6px -1px rgba(0,0,0,.1); padding: 16px; }
.cookie-banner .wrap { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cookie-banner p { margin: 0; font-size: .9rem; color: #4b5563; }
.cookie-banner .title { font-weight: 600; color: #111827; margin-bottom: 4px; }
.cookie-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cookie-actions button { padding: 8px 16px; border-radius: 6px; font-size: .9rem; font-weight: 500; cursor: pointer; border: 1px solid var(--primary); background: var(--primary); color: #fff; }
.cookie-actions button.secondary { background: #fff; color: #374151; border-color: #d1d5db; }

@media (max-width: 900px) {
  .hero-grid, .content-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 2.1rem; }
}
@media (max-width: 640px) {
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; flex-direction: column; align-items: stretch; padding: 10px 20px 16px; border-top: 1px solid #e5e7eb; box-shadow: 0 4px 8px rgba(0,0,0,.06); gap: 4px; }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 10px 6px; }
  .nav-toggle { display: block; }
  .site-header { position: relative; }
  .feature-list { grid-template-columns: 1fr; }
  .related-grid, .footer-grid { grid-template-columns: 1fr; }
  h1 { font-size: 1.85rem; }
  .cta-row .btn { width: 100%; }
}

/* Botón flotante de WhatsApp: tamaño fijo (sin CLS). Si el banner de cookies está visible, se coloca por encima para no taparlo. */
body:has(#cookie-banner:not([hidden])) .wa-float { bottom: calc(var(--cookie-h, 150px) + 16px); }
.wa-float:focus-visible { outline: 3px solid #1e3a8a; outline-offset: 3px; }
/* En móvil, mientras el banner de cookies está visible, se oculta el botón flotante para no tapar los botones de llamada/presupuesto */
@media (max-width: 767px) {
  body:has(#cookie-banner:not([hidden])) .wa-float { visibility: hidden; pointer-events: none; }
}
