/* ===== Planes: tarjetas + tabla comparativa (usa las variables de page.css) ===== */

:root {
    --plan-sticky-bg: #ffffff;
    --plan-col-bg: rgba(105, 36, 255, .06);
    --plan-row-hover: rgba(105, 36, 255, .035);
    --plan-yes: #1f9d63;
}

html.dark-mode,
body.dark-mode {
    --plan-sticky-bg: #0c1126;
    --plan-col-bg: rgba(79, 90, 206, .14);
    --plan-row-hover: rgba(255, 255, 255, .03);
    --plan-yes: #3ddc97;
}

/* ---------- Tarjetas de plan ---------- */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
    align-items: stretch;
}

.plan {
    gap: 14px;
}

.plan.featured::before {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    content: '';
}

.plan-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Dosis', sans-serif;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.1;
}

.plan-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.plan-price .price {
    line-height: 1;
}

.plan-price .per {
    color: var(--light);
    font-size: 15px;
    font-weight: 800;
}

.plan .list {
    margin: 6px 0 14px;
}

.plan .btn {
    margin-top: auto;
    width: 100%;
}

/* ---------- Distintivos ---------- */
.badge-pro {
    display: inline-block;
    padding: 4px 11px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--btn-text);
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.2px;
    line-height: 1.4;
}

.badge-inf {
    font-size: 20px;
    line-height: 1;
}

/* ---------- Tabla comparativa ---------- */
.compare-hint {
    display: none;
    margin-bottom: 12px;
    color: var(--light);
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

.compare-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--glass);
    box-shadow: var(--card-shadow);
    -webkit-overflow-scrolling: touch;
}

table.compare {
    width: 100%;
    min-width: 780px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 15px;
}

table.compare caption {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

table.compare th,
table.compare td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--dropdown-border);
    color: var(--light);
    font-weight: 700;
    line-height: 1.45;
    text-align: center;
    vertical-align: middle;
}

table.compare th[scope="row"],
table.compare thead th:first-child,
table.compare tfoot td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    min-width: 190px;
    background: var(--plan-sticky-bg);
    color: var(--text);
    font-weight: 800;
    text-align: left;
}

table.compare thead th {
    padding-top: 26px;
    padding-bottom: 22px;
    background: var(--plan-sticky-bg);
    vertical-align: bottom;
}

table.compare thead th:not(:first-child),
table.compare tbody td,
table.compare tfoot td:not(:first-child) {
    min-width: 190px;
}

table.compare thead th:first-child {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.col-head .col-name {
    display: block;
    color: var(--text);
    font-family: 'Dosis', sans-serif;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.15;
}

.col-head .col-sub {
    display: block;
    margin-top: 2px;
    color: var(--light);
    font-size: 12px;
    font-weight: 800;
}

.col-head .col-price {
    display: block;
    margin-top: 8px;
    color: var(--primary);
    font-family: 'Dosis', sans-serif;
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
}

.col-head .col-price small {
    color: var(--light);
    font-family: 'Nunito', sans-serif;
    font-size: 13px;
    font-weight: 800;
}

/* Columna destacada (PRO) */
table.compare .col-pro:not(th[scope="row"]) {
    background: var(--plan-col-bg);
}

table.compare thead .col-pro {
    background:
        linear-gradient(var(--plan-col-bg), var(--plan-col-bg)),
        var(--plan-sticky-bg);
}

table.compare tbody tr:hover th[scope="row"],
table.compare tbody tr:hover td:not(.col-pro) {
    background-color: var(--plan-row-hover);
}

table.compare tbody tr:hover th[scope="row"] {
    background: linear-gradient(var(--plan-row-hover), var(--plan-row-hover)), var(--plan-sticky-bg);
}

table.compare tbody tr:last-child th,
table.compare tbody tr:last-child td {
    border-bottom: 1px solid var(--dropdown-border);
}

table.compare tfoot td {
    padding-top: 22px;
    padding-bottom: 24px;
    border-bottom: none;
}

table.compare tfoot td:first-child {
    background: var(--plan-sticky-bg);
}

/* Valores de celda */
.yes {
    color: var(--plan-yes);
    font-weight: 900;
}

.no {
    color: var(--light);
    opacity: .75;
    font-weight: 700;
}

.unl {
    color: var(--primary);
    font-weight: 900;
}

.val {
    color: var(--text);
    font-weight: 800;
}

.btn-sm {
    min-height: 46px;
    padding: 12px 20px;
    font-size: 12px;
}

.plans-note {
    margin-top: 18px;
    color: var(--light);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

@media (max-width: 760px) {
    .compare-hint {
        display: block;
    }

    table.compare th,
    table.compare td {
        padding: 14px 16px;
        font-size: 14px;
    }

    table.compare th[scope="row"],
    table.compare thead th:first-child,
    table.compare tfoot td:first-child {
        min-width: 140px;
    }

    .plan-name {
        font-size: 26px;
    }
}

@media (max-width: 680px) {
    table.compare tfoot .btn {
        width: auto;
    }
}
/* ===== Fin Planes ===== */
