:root {
    --navy: #001b3a;
    --navy-2: #06284c;
    --blue: #0667f9;
    --blue-dark: #0053d6;
    --green: #10b981;
    --amber: #f0630b;
    --ink: #162b44;
    --muted: #65758a;
    --line: #dfe8f2;
    --soft: #f5f9ff;
    --white: #fff;
    --shadow: 0 24px 70px rgba(0,54,121,.12);
    --radius-sm: 16px;
    --radius: 26px;
    --shell: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--white);
    font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--navy); line-height: 1.12; letter-spacing: -.035em; }
.shell { position: relative; width: min(calc(100% - 40px), var(--shell)); margin-inline: auto; }
.eyebrow { margin-bottom: 13px; color: var(--green); font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }

.guides-page { min-height: 100vh; overflow: hidden; background: #fff; }

/* ---------- Hero ---------- */

.guides-hero { position: relative; padding: 78px 0 60px; overflow: hidden; background: radial-gradient(circle at 87% 12%, rgba(16,185,129,.1), transparent 28%), linear-gradient(180deg, #fff, #f7faff); }
.guides-hero::before { content: ""; position: absolute; top: -270px; right: -175px; width: 630px; height: 630px; border: 1px solid rgba(6,103,249,.08); border-radius: 50%; box-shadow: 0 0 0 74px rgba(6,103,249,.025), 0 0 0 148px rgba(16,185,129,.018); }
.guides-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; align-items: center; gap: 70px; }
.guides-hero__copy { position: relative; z-index: 2; }
.guides-hero h1 { max-width: 720px; margin-bottom: 22px; font-size: clamp(2.9rem, 5.6vw, 4.7rem); font-weight: 800; }
.guides-hero h1 span { color: transparent; background: linear-gradient(100deg, var(--green), var(--blue)); background-clip: text; -webkit-background-clip: text; }
.guides-hero__copy > p:last-child { max-width: 620px; margin-bottom: 0; color: var(--muted); font-size: 1.05rem; }

.guides-hero__visual { position: relative; z-index: 2; height: 380px; }
.guides-hero__visual img { position: absolute; z-index: 2; left: 50%; bottom: -40px; width: 335px; max-width: none; transform: translateX(-50%); }
.guides-hero .visual-ring { position: absolute; top: 38px; left: 50%; width: 290px; height: 290px; border: 1px solid rgba(6,103,249,.1); border-radius: 50%; transform: translateX(-50%); box-shadow: 0 0 0 38px rgba(6,103,249,.025), 0 0 0 76px rgba(16,185,129,.018); }
.guides-hero .visual-badge { position: absolute; z-index: 3; padding: 9px 14px; color: var(--navy-2); border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.96); box-shadow: 0 9px 24px rgba(0,27,58,.09); font-size: .69rem; font-weight: 800; }
.guides-hero .visual-badge::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; background: var(--green); border-radius: 50%; }
.guides-hero .visual-badge--top { top: 34px; right: -4px; }
.guides-hero .visual-badge--bottom { bottom: 30px; left: -18px; }

/* ---------- Section heading ---------- */

.guides-section { padding: 66px 0 24px; background: #fff; }
.section-heading { max-width: 700px; margin-bottom: 40px; }
.section-heading h2 { margin-bottom: 13px; font-size: clamp(1.9rem, 3.6vw, 2.85rem); }
.section-heading > p:last-child { margin-bottom: 0; color: var(--muted); font-size: .98rem; }

/* ---------- Guides grid ---------- */

.guides-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }

.guide-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: 0 12px 32px rgba(0,27,58,.06); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.guide-card:hover { transform: translateY(-5px); border-color: #c7dbf5; box-shadow: 0 20px 44px rgba(0,27,58,.12); }
.guide-card:hover .guide-card__media img { transform: scale(1.06); }

.guide-card__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--soft); }
.guide-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.guide-card__tag { --tag-color: var(--blue); position: absolute; top: 13px; left: 13px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; background: rgba(255,255,255,.95); box-shadow: 0 6px 16px rgba(0,27,58,.14); color: var(--navy-2); font-size: .64rem; font-weight: 800; letter-spacing: .02em; }
.guide-card__tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--tag-color); }
.guide-card--paqueteria .guide-card__tag { --tag-color: var(--green); }
.guide-card--negocio .guide-card__tag { --tag-color: var(--amber); }

.guide-card__body { display: flex; flex: 1; flex-direction: column; padding: 19px 19px 21px; }
.guide-card__body h3 { margin-bottom: 8px; font-size: .98rem; line-height: 1.32; letter-spacing: -.015em; }
.guide-card__body p { flex: 1; margin-bottom: 0; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.guide-card__cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 15px; color: var(--blue); font-size: .73rem; font-weight: 800; }
.guide-card__cta svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s ease; }
.guide-card:hover .guide-card__cta svg { transform: translateX(3px); }

/* ---------- Closing CTA ---------- */

.guides-cta-section { padding: 46px 0 78px; background: linear-gradient(180deg, #fff, #f5f9ff); }
.guides-cta-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 22px; padding: 31px 34px; overflow: hidden; color: #fff; border-radius: var(--radius); background: radial-gradient(circle at 18% 0%, #1284ff 0, transparent 38%), linear-gradient(135deg, #0066ed, #00377f); box-shadow: var(--shadow); }
.guides-cta-card::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 38px 38px; }
.guides-cta-card > * { position: relative; z-index: 1; }
.guides-cta-card__icon { width: 62px; height: 62px; display: grid; place-items: center; color: #fff; border-radius: 18px; background: rgba(255,255,255,.13); }
.guides-cta-card__icon svg { width: 32px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.guides-cta-card .eyebrow { margin-bottom: 5px; color: #72f0bd; }
.guides-cta-card h2 { margin-bottom: 6px; color: #fff; font-size: clamp(1.5rem, 2.9vw, 2.1rem); }
.guides-cta-card__copy > p:last-child { margin-bottom: 0; color: #d9ebff; font-size: .85rem; }
.guides-cta-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 50px; padding: 12px 21px; color: var(--blue); border-radius: 999px; background: #fff; box-shadow: 0 9px 24px rgba(0,0,0,.14); font-size: .8rem; font-weight: 800; white-space: nowrap; }
.guides-cta-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Guide detail (vista de detalle, CSS-only vía :target) ---------- */

.guide-detail { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: center; padding: 48px 20px; overflow-y: auto; background: rgba(6,20,40,.6); backdrop-filter: blur(4px); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .25s ease, visibility .25s ease; }
.guide-detail:target { opacity: 1; visibility: visible; pointer-events: auto; }

.guide-detail__panel { position: relative; width: min(100%, 760px); height: max-content; margin: auto 0; background: #fff; border-radius: var(--radius); box-shadow: 0 30px 90px rgba(0,20,50,.35); overflow: hidden; }

.guide-detail__close { position: absolute; top: 18px; right: 18px; z-index: 2; width: 40px; height: 40px; display: grid; place-items: center; color: var(--navy-2); border-radius: 50%; background: rgba(255,255,255,.92); box-shadow: 0 8px 20px rgba(0,27,58,.18); }
.guide-detail__close svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.guide-detail__media { aspect-ratio: 16 / 7; overflow: hidden; background: var(--soft); }
.guide-detail__media img { display: block; width: 100%; height: 100%; object-fit: cover; }

.guide-detail__content { padding: 34px 40px 46px; }
.guide-detail__tag { --tag-color: var(--blue); display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; padding: 6px 12px; border-radius: 999px; background: var(--soft); color: var(--navy-2); font-size: .66rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.guide-detail__tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--tag-color); }
.guide-detail--paqueteria .guide-detail__tag { --tag-color: var(--green); }
.guide-detail--negocio .guide-detail__tag { --tag-color: var(--amber); }

.guide-detail__content h2 { max-width: 34ch; margin-bottom: 22px; font-size: clamp(1.5rem, 3vw, 2rem); }

.guide-detail__body p { margin-bottom: 18px; color: var(--ink); font-size: .98rem; line-height: 1.75; }
.guide-detail__body p:last-child { margin-bottom: 0; }
.guide-detail__body h3 { margin: 30px 0 12px; font-size: 1.08rem; }
.guide-detail__body ul, .guide-detail__body ol { display: grid; gap: 10px; padding: 0; margin: 0 0 20px; list-style: none; counter-reset: guide-step; }
.guide-detail__body ul li, .guide-detail__body ol li { position: relative; padding: 12px 16px 12px 44px; border-radius: 12px; background: var(--soft); color: var(--ink); font-size: .93rem; line-height: 1.55; }
.guide-detail__body ul li::before { content: ""; position: absolute; top: 18px; left: 16px; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.guide-detail__body ol li { counter-increment: guide-step; }
.guide-detail__body ol li::before { content: counter(guide-step); position: absolute; top: 10px; left: 12px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; background: #fff; color: var(--blue); font-size: .72rem; font-weight: 800; box-shadow: 0 0 0 1px var(--line) inset; }
.guide-detail__body strong { color: var(--navy); }
.guide-detail__formula { margin: 6px 0 20px; padding: 16px 20px; border-radius: 14px; background: #eaf2ff; color: var(--navy-2); font-size: .95rem; font-weight: 700; text-align: center; letter-spacing: .01em; }

@media (max-width: 1180px) {
    .guides-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .guides-hero { padding: 62px 0 46px; }
    .guides-hero__grid { grid-template-columns: 1fr; gap: 22px; }
    .guides-hero__visual { height: 280px; }
    .guides-hero__visual img { bottom: -66px; width: 270px; }
    .guides-hero .visual-ring { top: 10px; width: 230px; height: 230px; }
    .guides-hero .visual-badge--top { right: 10%; }
    .guides-hero .visual-badge--bottom { bottom: 18px; left: 12%; }
    .guides-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .guides-cta-card { grid-template-columns: auto 1fr; }
    .guides-cta-button { grid-column: 1 / -1; width: 100%; }
}

@media (max-width: 650px) {
    .shell { width: min(calc(100% - 28px), var(--shell)); }
    .guides-hero { padding: 50px 0 36px; }
    .guides-hero h1 { font-size: clamp(2.5rem, 12vw, 3.6rem); }
    .guides-hero__visual { height: 235px; }
    .guides-hero__visual img { bottom: -52px; width: 220px; }
    .guides-section { padding: 46px 0 12px; }
    .guides-grid { grid-template-columns: 1fr; gap: 18px; }
    .guides-cta-section { padding: 38px 0 54px; }
    .guides-cta-card { grid-template-columns: 1fr; padding: 27px 22px; text-align: center; }
    .guides-cta-card__icon { margin: 0 auto; }

    .guide-detail { align-items: flex-end; padding: 0; overflow: hidden; }
    .guide-detail__panel { width: 100%; max-height: 92vh; margin: 0; overflow-y: auto; border-radius: 22px 22px 0 0; }
    .guide-detail__media { aspect-ratio: 16 / 9; }
    .guide-detail__content { padding: 26px 22px 34px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: .01ms !important; }
}
