/* ==========================================================
   Planes y precios - Klasplus
   ========================================================== */

.planes-section {
    padding: 110px 20px 80px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 100%);
    min-height: 100vh;
}

.planes-section .container {
    max-width: 1250px;
    margin: 0 auto;
}

/* ---------- Encabezado ---------- */
.planes-header {
    text-align: center;
    max-width: 780px;
    margin: 0 auto 20px;
}

.planes-header h1 {
    font-size: 2.4rem;
    color: #0047AB;
    font-weight: 700;
    margin-bottom: 14px;
    line-height: 1.2;
}

.planes-header p {
    font-size: 1.05rem;
    color: #555;
    line-height: 1.7;
}

/* ---------- Grid de planes ---------- */
.planes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: stretch;
}

@media (max-width: 1024px) {
    .planes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.plan-card {
    position: relative;
    background: #ffffff;
    border: 2px solid #e4eaf7;
    border-radius: 16px;
    padding: 26px 22px 22px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 28px rgba(0, 71, 171, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.plan-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 38px rgba(0, 71, 171, 0.16);
    border-color: #c9d9f5;
}

.plan-card.destacado {
    border-color: #0047AB;
    box-shadow: 0 14px 40px rgba(0, 71, 171, 0.22);
}

.plan-tag {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: #0047AB;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 6px 16px;
    border-radius: 20px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 71, 171, 0.3);
}

/* Encabezado compacto: ícono + nombre en la misma fila */
.plan-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.plan-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef3ff;
    color: #0047AB;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.plan-card.destacado .plan-icon {
    background: #0047AB;
    color: #fff;
}

.plan-name {
    font-size: 1.2rem;
    color: #10233d;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.plan-desc {
    font-size: 0.88rem;
    color: #6a7686;
    line-height: 1.5;
    min-height: 40px;
    margin: 0 0 14px;
}

.plan-price {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-bottom: 14px;
    border-bottom: 1px solid #eef1f6;
    margin-bottom: 16px;
}

.plan-price .amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0047AB;
    line-height: 1.1;
}

.plan-price .period {
    font-size: 0.8rem;
    color: #8b95a3;
}

/* Fila de precios en la comparativa */
.planes-tabla .fila-precio td {
    font-weight: 700;
    color: #0047AB;
    background: #f7f9ff;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    flex-grow: 1;
}

.plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 0.88rem;
    color: #3d4a5c;
    line-height: 1.45;
}

.plan-features li i {
    font-size: 0.95rem;
    margin-top: 3px;
    flex-shrink: 0;
}

.plan-features li i.fa-circle-check {
    color: #28a745;
}

.plan-features li.no i.fa-circle-xmark {
    color: #c8ced8;
}

.plan-features li.no {
    color: #a3abb7;
}

/* ---------- Botón ---------- */
.plan-btn {
    width: 100%;
    margin-top: auto;
    border: none;
    border-radius: 9px;
    padding: 12px 16px;
    font-size: 0.92rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    background: #eaf0fb;
    color: #0047AB;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.plan-btn:hover {
    background: #dbe6f8;
}

.plan-btn:active {
    transform: scale(0.98);
}

.plan-btn.primario {
    background: #0047AB;
    color: #fff;
}

.plan-btn.primario:hover {
    background: #003a8c;
}

.plan-btn.libre {
    background: #28a745;
    color: #fff;
}

.plan-btn.libre:hover {
    background: #218838;
}

/* ---------- Comparativa ---------- */
.planes-nota {
    text-align: center;
    margin: 26px 0 0;
    font-size: 0.9rem;
    color: #6a7686;
}

.planes-nota i {
    color: #0047AB;
    margin-right: 6px;
}

.planes-tabla-wrapper {
    margin-top: 54px;
}

.planes-tabla-wrapper h2 {
    text-align: center;
    color: #0047AB;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.planes-tabla-wrapper .subtitulo {
    text-align: center;
    color: #6a7686;
    margin-bottom: 34px;
}

.tabla-scroll {
    overflow-x: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(0, 71, 171, 0.1);
}

.planes-tabla {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.planes-tabla th,
.planes-tabla td {
    padding: 16px 18px;
    text-align: center;
    border-bottom: 1px solid #eef1f6;
    font-size: 0.93rem;
}

.planes-tabla thead th {
    background: #0047AB;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
}

.planes-tabla thead th:first-child {
    text-align: left;
}

.planes-tabla tbody td:first-child {
    text-align: left;
    font-weight: 600;
    color: #26364d;
}

.planes-tabla tbody tr:hover {
    background: #f7f9ff;
}

.planes-tabla .si {
    color: #28a745;
}

.planes-tabla .no {
    color: #c8ced8;
}

/* ---------- Notificación ---------- */
.planes-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translate(-50%, 140%);
    background: #10233d;
    color: #fff;
    padding: 15px 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
    font-size: 0.95rem;
    z-index: 4000;
    max-width: calc(100% - 40px);
    transition: transform 0.35s ease;
}

.planes-toast.visible {
    transform: translate(-50%, 0);
}

.planes-toast i {
    color: #ffc94d;
    font-size: 1.15rem;
    flex-shrink: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
    .planes-header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 600px) {
    .planes-section {
        padding: 90px 16px 60px;
    }

    .planes-header h1 {
        font-size: 1.65rem;
    }

    .plan-desc {
        min-height: auto;
    }

    .planes-aviso {
        margin-bottom: 38px;
    }
}
