/* Asesorías Enersite — mismos colores y tipografías que enersite.org (navy #0A1628, verde #2ECC71). */

@font-face {
    font-family: "Plus Jakarta Sans";
    src: url("fonts/plus-jakarta-sans.woff2") format("woff2");
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url("fonts/inter.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --navy: #0A1628;
    --navy-2: #13233F;
    --green: #2ECC71;
    --green-hover: #27BC66;
    --green-dark: #1B7F48;
    --green-bg: #E8F8EF;
    --ink: #1A1A2E;
    --muted: #5B6472;
    --line: #E5E7EB;
    --field: #8892A6;
    --bg: #F4F6F9;
    --danger: #B42318;
    --danger-bg: #FEF3F2;
    --info-bg: #EEF4FF;
    --radius: 12px;
    --radius-lg: 16px;
    --shadow: 0 1px 2px rgba(10, 22, 40, .06), 0 10px 28px rgba(10, 22, 40, .08);
    --font-head: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: #fff;
}

[id] {
    scroll-margin-top: 92px;
}

[hidden] {
    display: none !important;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--green-dark);
}

h1,
h2,
h3 {
    font-family: var(--font-head);
    line-height: 1.2;
    margin: 0 0 .5em;
    color: var(--ink);
}

p {
    margin: 0 0 1em;
}

.wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

.narrow {
    max-width: 800px;
}

.sr-only,
.skip:not(:focus) {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip:focus {
    position: fixed;
    left: 12px;
    top: 12px;
    z-index: 100;
    background: #fff;
    color: var(--navy);
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
}

.hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

:focus-visible {
    outline: 3px solid var(--green);
    outline-offset: 2px;
}

/* Encabezado */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: 72px;
    background: var(--navy);
}

.bar {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 72px;
}

.brand {
    display: inline-flex;
    align-items: center;
}

.nav-desktop {
    margin-left: auto;
}

.nav-desktop ul {
    display: flex;
    gap: 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-desktop a {
    color: rgba(255, 255, 255, .85);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
}

.nav-desktop a:hover {
    color: #fff;
}

.nav-mobile {
    display: none;
    margin-left: auto;
    position: relative;
}

.nav-mobile summary {
    list-style: none;
    cursor: pointer;
    color: #fff;
    font-weight: 600;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 8px;
}

.nav-mobile summary::-webkit-details-marker {
    display: none;
}

.nav-mobile .panel {
    position: absolute;
    right: 0;
    top: 52px;
    width: 250px;
    padding: 18px;
    background: var(--navy-2);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.nav-mobile ul {
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}

.nav-mobile li a {
    display: block;
    padding: 9px 0;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
}

@media (max-width: 959px) {
    .bar .nav-desktop,
    .bar .cta-desktop {
        display: none;
    }

    .bar .nav-mobile {
        display: block;
    }
}

/* Botones */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    border: 2px solid transparent;
    border-radius: 10px;
    font-family: var(--font-head);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s, border-color .15s, transform .1s;
}

.btn-primary {
    background: var(--green);
    color: var(--navy);
}

.btn-primary:hover {
    background: var(--green-hover);
}

.btn-secondary {
    background: #fff;
    color: var(--navy);
    border-color: var(--navy);
}

.btn-secondary:hover {
    background: var(--bg);
}

.btn-lg {
    padding: 16px 28px;
    font-size: 17px;
}

.btn-sm {
    padding: 10px 18px;
    font-size: 14px;
}

.btn-block {
    width: 100%;
}

.btn:active {
    transform: translateY(1px);
}

.btn[disabled] {
    opacity: .7;
    cursor: progress;
}

/* Portada */

.hero {
    padding: 72px 0 80px;
    color: #fff;
    background: linear-gradient(135deg, var(--navy) 0%, #0F2342 60%, #14305C 100%);
}

.hero-sm {
    padding: 48px 0 52px;
}

.hero h1 {
    margin-bottom: .4em;
    color: #fff;
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
}

.hero:not(.hero-sm) h1 {
    max-width: 20ch;
}

.hero-sm h1 {
    font-size: clamp(1.7rem, 4vw, 2.5rem);
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--green);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.lead {
    max-width: 62ch;
    margin-bottom: 0;
    color: rgba(255, 255, 255, .8);
    font-size: 1.1rem;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0 32px;
    padding: 0;
    list-style: none;
}

.chips li {
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    font-size: 14px;
}

/* Secciones */

.section {
    padding: 64px 0;
}

.section-alt {
    background: var(--bg);
}

.section-head {
    max-width: 720px;
    margin-bottom: 32px;
}

.section-head h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.section-head p {
    color: var(--muted);
    font-size: 1.05rem;
}

/* Paquetes */

.packages {
    min-width: 0;
    margin: 0 0 32px;
    padding: 0;
    border: 0;
}

.packages legend,
.card legend {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 0;
    font-family: var(--font-head);
    font-size: 1.15rem;
    font-weight: 700;
}

.step {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    font-family: var(--font-head);
    font-size: 14px;
    font-weight: 700;
}

.plans {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 560px) {
    .plans {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 960px) {
    .plans {
        grid-template-columns: repeat(4, 1fr);
    }

    .plan-card {
        padding: 20px;
    }

    .plan-total {
        font-size: 14px;
    }
}

.plan {
    position: relative;
}

.plan input {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.plan-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    height: 100%;
    padding: 22px;
    border: 2px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}

.plan:hover .plan-card {
    border-color: #B8C2D2;
}

.plan input:checked + .plan-card {
    border-color: var(--green);
    background: var(--green-bg);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, .22);
}

.plan input:checked + .plan-card::after {
    content: "✓";
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--green);
    color: var(--navy);
    font-weight: 800;
    font-size: 14px;
}

.plan input:focus-visible + .plan-card {
    outline: 3px solid var(--navy);
    outline-offset: 3px;
}

.plan-hours {
    font-family: var(--font-head);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--navy);
}

.plan-name {
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 14px;
}

.plan-price {
    font-family: var(--font-head);
    font-size: 1.5rem;
    font-weight: 800;
}

.plan-tax {
    color: var(--muted);
    font-size: 14px;
}

.plan-total {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #B8C2D2;
    font-size: 15px;
    font-weight: 700;
}

/* Formulario */

.checkout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 370px;
    gap: 32px;
    align-items: start;
}

@media (max-width: 959px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }
}

.checkout-main {
    display: grid;
    gap: 24px;
}

.card {
    min-width: 0;
    margin: 0;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
}

.card-note {
    margin: -6px 0 16px;
    color: var(--muted);
    font-size: 14px;
}

.two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}

@media (max-width: 640px) {
    .two {
        grid-template-columns: 1fr;
    }
}

.field {
    margin-bottom: 16px;
}

.field label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
}

.field .optional {
    color: var(--muted);
    font-weight: 400;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--field);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 15px;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--green-dark);
    outline: 3px solid rgba(46, 204, 113, .35);
    outline-offset: 0;
}

.has-error input,
.has-error select,
.has-error textarea {
    border-color: var(--danger);
}

.hint {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.error {
    margin: 6px 0 0;
    color: var(--danger);
    font-size: 14px;
    font-weight: 500;
}

/* Resumen */

.summary {
    position: sticky;
    top: 92px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow);
}

@media (max-width: 959px) {
    .summary {
        position: static;
    }
}

.summary h2 {
    font-size: 1.15rem;
}

.muted {
    color: var(--muted);
}

.sum {
    margin: 0 0 20px;
}

.sum > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
}

.sum dt {
    color: var(--muted);
}

.sum dd {
    margin: 0;
    font-weight: 600;
    text-align: right;
}

.sum .sum-total {
    align-items: baseline;
    padding: 14px 0 0;
    border-bottom: 0;
}

.sum .sum-total dt {
    color: var(--ink);
    font-weight: 700;
}

.sum .sum-total dt {
    white-space: nowrap;
}

.sum .sum-total dd {
    font-family: var(--font-head);
    font-size: 1.35rem;
    font-weight: 800;
}

@media (max-width: 480px) {
    .sum .sum-total dd {
        font-size: 1.15rem;
    }
}

.check {
    margin: 4px 0 18px;
}

.check label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.5;
}

.check input {
    flex: none;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    accent-color: var(--navy);
}

.fine {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 13px;
}

/* Avisos */

.alert {
    margin: 0 0 24px;
    padding: 16px 18px;
    border-left: 4px solid;
    border-radius: var(--radius);
}

.alert ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

.alert-error {
    border-color: var(--danger);
    background: var(--danger-bg);
    color: #7A1710;
}

.alert-error a {
    color: #7A1710;
}

.alert-ok {
    border-color: var(--green-dark);
    background: var(--green-bg);
}

.alert-info {
    border-color: #2E5BCC;
    background: var(--info-bg);
}

/* Aviso de entorno de pruebas (test_mode) */
.test-banner {
    padding: 8px 0;
    border-bottom: 1px solid #F2D58A;
    background: #FFF4D6;
    color: #5C4300;
    font-size: .92rem;
    text-align: center;
}

.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    border: 3px solid rgba(10, 22, 40, .2);
    border-top-color: var(--navy);
    border-radius: 50%;
    vertical-align: -3px;
    animation: spin .9s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Cómo funciona, incluye, preguntas */

.how {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 560px) {
    .how {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 960px) {
    .how {
        grid-template-columns: repeat(4, 1fr);
    }
}

.how li {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
}

.how h3 {
    margin: 12px 0 6px;
    font-size: 1.05rem;
}

.how p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

@media (max-width: 800px) {
    .two-col {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

.ticks,
.crosses {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ticks li,
.crosses li {
    position: relative;
    margin-bottom: 12px;
    padding-left: 30px;
}

.ticks li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--green-dark);
    font-weight: 800;
}

.crosses li::before {
    content: "–";
    position: absolute;
    left: 4px;
    color: var(--muted);
    font-weight: 800;
}

.faq {
    margin-bottom: 10px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.faq summary {
    padding: 16px 0;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "+";
    float: right;
    font-weight: 700;
    color: var(--muted);
}

.faq[open] summary::after {
    content: "–";
}

.faq p {
    margin: 0 0 16px;
    color: var(--muted);
}

.faq-contact {
    margin-top: 20px;
}

/* Estado del pago y confirmación de factura */

.facts {
    margin: 0 0 28px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.facts > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
}

.facts > div:last-child {
    border-bottom: 0;
}

.facts dt {
    color: var(--muted);
}

.facts dd {
    margin: 0;
    font-weight: 600;
    text-align: right;
}

.next {
    padding-left: 22px;
}

.next li {
    margin-bottom: 10px;
}

/* Textos legales */

.legal h2 {
    margin: 2.2rem 0 .6rem;
    font-size: 1.25rem;
}

.legal p,
.legal li {
    line-height: 1.75;
}

.legal ul {
    padding-left: 1.2rem;
}

.table-wrap {
    margin: 0 0 1.2rem;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

th,
td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

thead th {
    background: var(--bg);
}

/* Pie */

.site-footer {
    background: var(--navy);
    color: #CBD2DC;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 40px;
    padding-top: 64px;
    padding-bottom: 48px;
}

.footer-tagline {
    margin: 12px 0 0;
    color: #9CA3AF;
    font-size: 14px;
}

.site-footer h2 {
    margin-bottom: 14px;
    color: var(--green);
    font-size: 14px;
    font-weight: 600;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer li {
    margin-bottom: 8px;
    font-size: 14px;
}

.site-footer a {
    color: #9CA3AF;
    text-decoration: none;
}

.site-footer a:hover {
    color: #fff;
}

.offices strong {
    display: block;
    color: #fff;
    font-weight: 500;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.bottom-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px 24px;
    padding-top: 16px;
    padding-bottom: 16px;
    color: #9CA3AF;
    font-size: 14px;
}

.bottom-bar p {
    margin: 0;
}

.legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}

.legal-links li {
    margin: 0;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}
