:root {
    --bg: #f4f6fb;
    --surface: #ffffff;
    --surface-soft: #e8edf9;
    --text: #0d1835;
    --muted: #58637c;
    --brand: #17359a;
    --brand-dark: #0d246f;
    --brand-soft: #eef3ff;
    --danger: #8b1f1f;
    --line: rgba(23, 53, 154, .14);
    --shadow: 0 24px 60px rgba(23, 53, 154, .14);
    --radius-lg: 28px;
    --radius-md: 18px;
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; }
a { color: inherit; }
main { min-width: 0; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: minmax(190px, 300px) 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: .72rem clamp(1rem, 5vw, 5rem);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.brand {
    display: inline-grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: .25rem;
    min-width: 0;
    text-decoration: none;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: clamp(150px, 15vw, 210px);
    max-width: 100%;
}

.brand-logo img { display: block; width: 100%; }

.brand-slogan-header {
    display: block;
    max-width: 280px;
    color: var(--brand-dark);
    font-size: clamp(.66rem, .75vw, .78rem);
    line-height: 1.15;
    font-weight: 800;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(.45rem, 1vw, 1rem);
    color: var(--muted);
    font-weight: 700;
    font-size: .93rem;
}

.nav a,
.call-button,
.btn,
.table-link,
.forgot-link,
.access-card { text-decoration: none; }

.nav a { padding: .45rem .15rem; white-space: nowrap; }
.nav a:hover { color: var(--brand); }

.nav-login {
    color: var(--brand) !important;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: .55rem .8rem !important;
    background: var(--brand-soft);
}

.call-button {
    background: var(--brand);
    color: #fff;
    padding: .75rem 1.05rem;
    border-radius: 999px;
    font-weight: 800;
    white-space: nowrap;
}

.menu-toggle {
    display: none;
    justify-self: end;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--brand);
    border-radius: 12px;
    padding: .65rem .85rem;
    font-size: 1.2rem;
    cursor: pointer;
}

.hero,
.page-hero,
.section { padding-left: clamp(1rem, 6vw, 6rem); padding-right: clamp(1rem, 6vw, 6rem); }

.hero,
.page-hero { padding-top: clamp(4rem, 7vw, 7rem); padding-bottom: clamp(4rem, 7vw, 7rem); }

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
    gap: clamp(1.5rem, 5vw, 4rem);
    align-items: center;
    min-height: 70vh;
    background:
        radial-gradient(circle at 84% 16%, rgba(23, 53, 154, .16), transparent 30%),
        linear-gradient(135deg, #ffffff 0%, #eef3ff 100%);
}

.hero-copy,
.hero-card,
.page-hero > * { min-width: 0; }

.hero h1,
.page-hero h1 {
    max-width: 920px;
    margin: .75rem 0 1rem;
    font-size: clamp(2.25rem, 6vw, 5.25rem);
    line-height: .97;
    letter-spacing: -.05em;
}

.page-hero.compact h1 { font-size: clamp(2rem, 5vw, 4.05rem); }

.hero p,
.page-hero p,
.section-heading p,
.news-card p,
.form-note {
    color: var(--muted);
    font-size: clamp(1rem, 1.4vw, 1.1rem);
}

.brand-slogan {
    display: inline-flex;
    margin: .65rem 0 .25rem;
    padding: .75rem 1rem;
    max-width: 650px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255,255,255,.78);
    color: var(--brand-dark) !important;
    font-weight: 800;
}

.eyebrow {
    display: inline-flex;
    color: var(--brand);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .78rem;
}

.hero-actions,
.cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: .82rem 1.25rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 900;
    cursor: pointer;
    text-align: center;
}

.btn-primary { background: var(--brand); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--brand-dark); border-color: var(--line); }
.btn-dark { background: var(--text); color: #fff; }
.btn-light { background: #fff; color: var(--brand-dark); }
.btn-outline { border-color: var(--brand); color: var(--brand); }

.trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 2rem;
    color: var(--muted);
}

.trust-row span {
    padding: .7rem .95rem;
    background: rgba(255,255,255,.78);
    border-radius: 999px;
    border: 1px solid var(--line);
}

.hero-card,
.info-card,
.path-card,
.plan-card,
.service-grid article,
.steps article,
.news-card,
.access-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.hero-card,
.path-card,
.service-grid article,
.steps article,
.info-card,
.news-card,
.access-card { padding: clamp(1.25rem, 2vw, 2rem); }

.hero-card ol { padding-left: 1.25rem; color: var(--muted); }

.section { padding-top: clamp(3.5rem, 6vw, 5.5rem); padding-bottom: clamp(3.5rem, 6vw, 5.5rem); }

.split {
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: start;
}

.section h2 {
    font-size: clamp(1.85rem, 4vw, 3.3rem);
    line-height: 1.03;
    letter-spacing: -.04em;
    margin: .7rem 0 1rem;
}

.path-grid,
.plan-grid,
.service-grid,
.steps { display: grid; gap: 1rem; }

.path-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.path-card.urgent { background: var(--brand); color: #fff; }
.path-card p,
.service-grid p,
.info-card p,
.info-card li,
.steps p,
.plan-card ul { color: var(--muted); }
.path-card.urgent p { color: rgba(255,255,255,.78); }
.path-card a { font-weight: 900; }

.muted { background: var(--surface-soft); }

.section-heading { max-width: 850px; margin-bottom: 2rem; }
.compact-heading { margin-bottom: 1rem; }

.plan-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.plan-card { position: relative; padding: clamp(1.25rem, 2vw, 2rem); }
.plan-card.featured { border-color: rgba(23, 53, 154, .42); transform: translateY(-10px); }

.badge,
.news-tag {
    display: inline-flex;
    padding: .35rem .7rem;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-weight: 900;
    font-size: .78rem;
}

.plan-focus { color: var(--brand); font-weight: 900; }
.price { display: block; margin: 1rem 0; font-size: 1.4rem; }
.plan-card ul { padding-left: 1.1rem; }

.services .service-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.cta-band {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    align-items: center;
    background: linear-gradient(135deg, var(--brand-dark), var(--brand));
    color: #fff;
}

.cta-band p,
.cta-band .eyebrow { color: rgba(255,255,255,.78); }

.page-hero.emergency,
.login-hero { background: linear-gradient(135deg, #ffffff, #dfe7ff); }

.steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.steps span {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-weight: 900;
}

.comparison-table {
    overflow-x: auto;
    background: var(--surface);
    border-radius: 24px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    -webkit-overflow-scrolling: touch;
}

table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 1.1rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--brand); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; }
.table-link { color: var(--brand); font-weight: 900; }

.form-section,
.login-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
    gap: 2rem;
    align-items: start;
}

.login-section { grid-template-columns: minmax(250px, 430px) minmax(0, 1fr); }

.contact-form {
    display: grid;
    gap: .75rem;
    background: var(--surface);
    padding: clamp(1.25rem, 3vw, 2rem);
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.login-form { max-width: 620px; width: 100%; }
.form-header h2 { margin: .35rem 0; }

label { font-weight: 900; }

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: .95rem 1rem;
    font: inherit;
    background: #fff;
}

textarea { resize: vertical; }

.field-validation-error,
.validation-summary-errors { color: var(--danger); font-size: .9rem; }

.success-message {
    padding: 1rem;
    border-radius: 16px;
    background: #e9efff;
    color: var(--brand-dark);
    font-weight: 800;
}

.check-row {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-weight: 700;
}

.check-row input { width: auto; }
.forgot-link { color: var(--brand); font-weight: 900; justify-self: start; }
.form-note { font-size: .92rem; margin: .4rem 0 0; }

.login-options {
    display: grid;
    gap: 1rem;
}

.access-card {
    display: grid;
    gap: .3rem;
    color: var(--text);
}

.access-card span {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--brand-soft);
    color: var(--brand);
    font-weight: 900;
}

.access-card.active,
.access-card:hover { border-color: rgba(23, 53, 154, .42); transform: translateY(-2px); }
.access-card small { color: var(--muted); }

.news-module { position: relative; }
.carousel-shell { position: relative; display: grid; align-items: center; }
.news-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(280px, 33.33%);
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 1rem .25rem 1.5rem;
    scrollbar-width: thin;
}

.news-card { scroll-snap-align: start; min-height: 300px; display: flex; flex-direction: column; gap: .65rem; }
.news-card h3 { margin: .25rem 0; font-size: 1.45rem; line-height: 1.1; }
.news-card small { color: var(--brand); font-weight: 900; }
.news-card em { margin-top: auto; color: var(--muted); font-size: .9rem; }

.carousel-btn {
    position: absolute;
    z-index: 2;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--brand);
    box-shadow: var(--shadow);
    cursor: pointer;
    font-size: 1.7rem;
    font-weight: 900;
}

.carousel-btn.prev { left: -.5rem; }
.carousel-btn.next { right: -.5rem; }

.carousel-dots { display: flex; gap: .45rem; justify-content: center; margin-top: .75rem; }
.carousel-dots button {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 50%;
    background: rgba(23, 53, 154, .25);
    cursor: pointer;
}
.carousel-dots button.active { background: var(--brand); }

.footer {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    padding: 3rem clamp(1rem, 6vw, 6rem) 6rem;
    background: #071248;
    color: #fff;
}

.footer p { color: rgba(255,255,255,.66); }

.sticky-actions {
    position: fixed;
    left: 50%;
    bottom: 1rem;
    z-index: 30;
    transform: translateX(-50%);
    display: none;
    overflow: hidden;
    border-radius: 999px;
    box-shadow: var(--shadow);
    background: var(--surface);
    border: 1px solid var(--line);
}

.sticky-actions a {
    padding: .85rem .9rem;
    text-decoration: none;
    font-weight: 900;
    color: var(--brand);
    white-space: nowrap;
}

@media (max-width: 1180px) {
    .topbar { grid-template-columns: 1fr auto auto; }
    .brand-logo { width: clamp(145px, 24vw, 190px); }
    .brand-slogan-header { max-width: 340px; }
    .nav {
        position: absolute;
        left: clamp(1rem, 5vw, 5rem);
        right: clamp(1rem, 5vw, 5rem);
        top: calc(100% + .5rem);
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 20px;
        box-shadow: var(--shadow);
    }
    .nav.open { display: flex; }
    .nav a { padding: .85rem 1rem; border-radius: 12px; }
    .nav a:hover { background: var(--brand-soft); }
    .menu-toggle { display: inline-flex; }
}

@media (max-width: 980px) {
    .call-button { display: none; }
    .topbar { grid-template-columns: 1fr auto; }
    .hero,
    .split,
    .form-section,
    .login-section { grid-template-columns: 1fr; }
    .plan-grid,
    .services .service-grid,
    .steps,
    .footer { grid-template-columns: 1fr; }
    .path-grid { grid-template-columns: 1fr; }
    .plan-card.featured { transform: none; }
    .news-track { grid-auto-columns: minmax(260px, 50%); }
    .sticky-actions { display: flex; }
}


@media (max-width: 760px) {
    .comparison-table { background: transparent; border: 0; box-shadow: none; overflow: visible; }
    table, thead, tbody, th, td, tr { display: block; width: 100%; min-width: 0; }
    thead { display: none; }
    tbody { display: grid; gap: 1rem; }
    tr {
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 20px;
        box-shadow: var(--shadow);
        overflow: hidden;
    }
    td { border-bottom: 1px solid var(--line); padding: .9rem 1rem; }
    td:last-child { border-bottom: 0; }
    td:nth-child(1)::before { content: "Plan"; }
    td:nth-child(2)::before { content: "Enfoque"; }
    td:nth-child(3)::before { content: "Precio"; }
    td:nth-child(4)::before { content: "Beneficios"; }
    td::before {
        display: block;
        color: var(--brand);
        font-size: .72rem;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: .08em;
        margin-bottom: .2rem;
    }
}

@media (max-width: 700px) {
    .topbar { gap: .65rem; padding-top: .65rem; padding-bottom: .65rem; }
    .brand-logo { width: clamp(132px, 42vw, 170px); }
    .brand-slogan-header { max-width: min(70vw, 265px); font-size: .62rem; }
    .hero, .page-hero { padding-top: 3rem; padding-bottom: 3rem; }
    .hero h1, .page-hero h1 { font-size: clamp(2.05rem, 11vw, 3.1rem); }
    .hero-actions,
    .cta-actions { flex-direction: column; align-items: stretch; }
    .btn { width: 100%; }
    .brand-slogan { border-radius: 18px; }
    .hero-card,
    .path-card,
    .plan-card,
    .service-grid article,
    .steps article,
    .news-card,
    .contact-form,
    .info-card { border-radius: 20px; }
    .news-track { grid-auto-columns: minmax(248px, 88%); }
    .carousel-btn { display: none; }
    .footer { padding-bottom: 6.5rem; }
}

@media (max-width: 430px) {
    .brand-logo { width: 126px; }
    .brand-slogan-header { font-size: .58rem; max-width: 210px; }
    .menu-toggle { padding: .55rem .7rem; }
    .trust-row span { width: 100%; border-radius: 16px; }
    .sticky-actions { width: calc(100% - 1rem); justify-content: space-around; }
    .sticky-actions a { flex: 1; text-align: center; padding-left: .45rem; padding-right: .45rem; font-size: .88rem; }
    .page-hero.compact h1,
    .hero h1 { letter-spacing: -.035em; }
}
