@import "../fonts/circular/circular.css";

@font-face {
    font-family: "MuseoSans";
    src: url("../simulador/fonts/MuseoSans-300.woff") format("woff");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "MuseoSans";
    src: url("../simulador/fonts/MuseoSans-500.woff") format("woff");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "MuseoSans";
    src: url("../simulador/fonts/MuseoSans-700.woff") format("woff");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --sim-blue: #006d4e;
    --sim-green: #4ed176;
    --sim-ink: #4f4f4f;
    --sim-muted: #829494;
    --sim-bg: #f0f6fd;
    --sim-smoke: #f1f2f7;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Circular", Arial, sans-serif;
    color: #4f4f4f;
    background: #006d4e;
}

body::before,
body::after {
    content: "";
    position: fixed;
    width: 18rem;
    height: 18rem;
    border-radius: 9999px;
    background: #4ed176;
    z-index: 0;
    pointer-events: none;
}

body::before { top: -5rem; left: -5rem; }
body::after { right: -5rem; bottom: -11rem; }

main {
    width: min(1024px, calc(100% - 80px));
    margin: 40px auto;
    position: relative;
    z-index: 1;
}

a { color: var(--sim-blue); }

.sim-card {
    background: #fff;
    border-radius: 8px;
    padding: 40px 56px;
    box-shadow: none;
}

.sim-heading,
.sim-results-head {
    display: flex;
    gap: 24px;
    align-items: center;
}

.sim-heading img { height: 55px; max-height: 55px; width: auto; }

h1 {
    margin: 0 0 8px;
    color: #006d4e;
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.2;
}

p { line-height: 1.45; }

.sim-progress {
    display: none;
}

#sim-progress-bar {
    width: 0;
    height: 100%;
    background: #52deff;
    transition: width 0.25s ease;
}

.sim-grid {
    display: grid;
    grid-template-columns: 283px 1fr;
    gap: 32px;
    align-items: stretch;
}

.sim-aside,
.sim-grid > div {
    border: 2px solid #006d4e;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    padding: 24px 24px 12px;
    min-height: 313px;
}

.sim-aside {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.sim-aside img { display: block; width: 231px; height: 193px; object-fit: cover; border-radius: 16px 16px 0 0; }
.sim-aside p img { display: none; }
.sim-aside p { margin: 8px 0 0; padding: 0; font-size: 16px; }

.sim-grid > div {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sim-question { margin: 0 0 16px; font-size: 1.25rem; font-weight: 700; line-height: 28px; color: #006d4e; }

label { display: block; margin-bottom: 8px; font-weight: 400; font-size: 18px; color: #4f4f4f; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select {
    display: block;
    width: 100%;
    margin-top: 6px;
    height: 40px;
    padding: 0 8px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    font: inherit;
    color: inherit;
    background: #fff;
}

.sim-choice {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 0;
    font-size: 18px;
    font-weight: 400;
    line-height: 28px;
    cursor: pointer;
}

.sim-choice input { margin-top: 4px; }

.sim-nav {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.sim-btn {
    border: 0;
    border-radius: 6px;
    padding: 4px 12px;
    font: inherit;
    font-weight: 400;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.sim-btn-primary { background: var(--sim-green); color: #fff; }
.sim-btn-ghost { background: var(--sim-smoke); color: var(--sim-blue); }
.sim-btn[disabled] { opacity: 0.6; cursor: wait; }

.sim-error {
    color: #b42318;
    font-weight: 700;
}

.sim-note,
.sim-asesor {
    background: var(--sim-blue);
    color: #fff;
    border-radius: 10px;
    padding: 14px 16px;
}

.sim-sort { margin: 20px 0; }

.sim-opciones {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 16px;
}

.sim-opcion {
    border: 1px solid #e3eaf3;
    border-radius: 16px;
    padding: 16px;
    background: #fff;
}

.sim-opcion:first-child {
    grid-row: span 2;
    border: 2px solid var(--sim-blue);
}

.sim-opcion:nth-child(n + 4) { grid-column: 1 / -1; }

.sim-opcion-top,
.sim-opcion-actions,
.sim-favoritos form,
.sim-bancos,
.sim-tips {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.sim-rank {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--sim-blue);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
}

.sim-opcion img { max-height: 42px; width: auto; }

.sim-star {
    margin-left: auto;
    border: 0;
    background: transparent;
    font-size: 1.6rem;
    color: var(--sim-blue);
    cursor: pointer;
}

.sim-star.is-on { color: #e0a100; }

dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 12px 0;
}

dt { font-size: 0.85rem; color: var(--sim-muted); }
dd { margin: 0; font-weight: 700; }

.sim-favoritos {
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1px solid #e3eaf3;
}

.sim-favoritos h2,
.sim-cierre h2 { color: var(--sim-blue); }

.sim-modal {
    position: fixed;
    inset: 0;
    background: rgba(64, 81, 111, 0.45);
    display: grid;
    place-items: center;
    padding: 16px;
    z-index: 20;
}

.sim-modal[hidden] { display: none; }

.sim-modal-card {
    width: min(980px, 100%);
    max-height: 90vh;
    overflow: auto;
    background: #fff;
    border-radius: 16px;
    padding: 24px;
}

.sim-modal-close {
    float: right;
    border: 0;
    background: transparent;
    font-size: 1.8rem;
    cursor: pointer;
}

.sim-table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { padding: 8px; text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th { color: var(--sim-blue); }

.sim-cierre { text-align: center; }
.sim-cierre img { margin-bottom: 12px; }

.sim-resumen,
.sim-motivo {
    max-width: 460px;
    margin: 20px auto;
    padding: 16px;
    background: var(--sim-bg);
    border-radius: 16px;
}

.sim-motivo { border: 2px solid var(--sim-blue); background: #fff; }

.sim-bancos {
    justify-content: center;
    margin: 20px 0;
}

.sim-bancos img { height: 36px; width: auto; background: #fff; padding: 6px 10px; border-radius: 8px; }

.sim-tips { justify-content: center; align-items: stretch; }
.sim-tips a {
    width: 220px;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    color: var(--sim-ink);
    box-shadow: 0 6px 16px rgba(1, 86, 148, 0.08);
}
.sim-tips img { width: 100%; height: 120px; object-fit: cover; }
.sim-tips span { display: block; padding: 12px; }

.sim-footer {
    text-align: center;
    background: #f1f2f7;
    width: min(1024px, calc(100% - 80px));
    margin: 40px auto 0;
    padding-top: 20px;
    border-radius: 8px;
    position: relative;
    z-index: 1;
}
.sim-footer img { height: 48px; width: auto; }
.sim-copy { background: #006d4e; color: #fff; padding: 8px; border-radius: 0 0 8px 8px; }

@media (max-width: 800px) {
    .sim-card { padding: 24px; }
    main, .sim-footer { width: calc(100% - 16px); }
    .sim-heading,
    .sim-results-head,
    .sim-grid,
    .sim-opciones { display: block; }
    .sim-aside { margin-bottom: 16px; }
    dl { grid-template-columns: 1fr 1fr; }
    .sim-opcion { margin-bottom: 12px; }
}
