.pagina-planes {
    min-height: 100vh;
    background: #000;
    padding: 140px 70px 80px;
}

.titulo-planes {
    margin: 0;
    color: #ffd700;
    font-size: 52px;
    letter-spacing: .02em;
    line-height: 1.05;
}

.pagina-planes > .titulo-planes {
    margin-bottom: 60px;
    text-align: center;
}

.lista-planes {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    gap: 36px;
}

.fila-plan {
    display: grid;
    grid-template-columns: 1fr 80px 1fr;
    align-items: center;
}

.caja-plan {
    position: relative;
    display: grid;
    min-height: 240px;
    overflow: hidden;
    border: 1px solid rgba(255, 215, 0, .35);
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
}

.caja-plan::after {
    position: absolute;
    z-index: 1;
    inset: 0;
    content: "";
    background: linear-gradient(0deg, rgba(0, 0, 0, .82), rgba(0, 0, 0, .08) 72%);
}

.caja-plan img {
    position: absolute;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.caja-plan:hover,
.caja-plan:focus-visible {
    border-color: #ffd700;
}

.caja-plan:focus-visible {
    outline: 2px solid #ffd700;
    outline-offset: 4px;
}

.nombre-plan {
    position: relative;
    z-index: 2;
    align-self: end;
    padding: 24px;
    font-size: 26px;
    font-weight: 800;
}

.caja-plan.con-descripcion {
    grid-template-rows: 1fr auto;
}

.caja-plan.con-descripcion .nombre-plan {
    padding-bottom: 4px;
}

.descripcion-plan {
    position: relative;
    z-index: 2;
    padding: 0 24px 22px;
    color: #d6d6d6;
    font-size: .9rem;
    line-height: 1.35;
}

.descripcion-cabecera {
    margin-top: 12px;
    color: #d6d6d6;
    font-size: .95rem;
    line-height: 1.4;
}

.flecha-plan {
    display: grid;
    place-items: center;
    color: #ffd700;
    font-size: 2.6rem;
    font-weight: 800;
    text-shadow: 0 0 14px rgba(255, 215, 0, .5);
    opacity: 0;
    transform: translateX(-48px);
    pointer-events: none;
    transition: transform .5s cubic-bezier(.22, 1, .36, 1), opacity .35s ease;
}

.fila-plan.abierta .flecha-plan {
    opacity: 1;
    transform: translateX(0);
}

.detalle-plan {
    height: 260px;
    overflow: hidden;
    visibility: hidden;
    border: 1px solid rgba(255, 215, 0, .35);
    border-radius: 10px;
    background: #0d0d0d;
    opacity: 0;
    transform: translateX(-70px);
    transition: transform .55s cubic-bezier(.22, 1, .36, 1) .08s,
                opacity .4s ease .08s,
                visibility 0s linear .55s;
}

.fila-plan.abierta .detalle-plan {
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
    transition-delay: .08s, .08s, 0s;
}

.grilla-detalle {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 1fr;
    gap: 14px;
    height: auto;
    padding: 16px;
}

/* Nombre del plan dentro del panel desplegable: identifica la duración elegida. */
.titulo-detalle {
    margin: 0;
    padding: 14px 16px 4px;
    color: #ffd700;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

/* Botones de duración (<button class="tiempo-plan boton-tiempo">) */
.tiempo-plan {
    display: grid;
    place-items: center;
    align-content: center;
    min-height: 80px;
    padding: 16px;
    background: #000;
    border: 2px solid rgba(255, 215, 0, .45);
    border-radius: 8px;
    color: #ffd700;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: .02em;
    text-align: center;
    cursor: pointer;
    user-select: none;
    transition: background .25s ease, color .25s ease, border-color .25s ease, transform .15s ease;
}

/* Si hay un número impar de duraciones, la última ocupa todo el ancho. */
.grilla-detalle .tiempo-plan:last-child:nth-child(odd),
.grilla-tiempos .tiempo-plan:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.tiempo-plan .precio-tiempo {
    margin-top: 4px;
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
}

.tiempo-plan .boton-tiempo {
    appearance: none;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: inherit;
}

.tiempo-plan.seleccionado .precio-tiempo {
    color: #000;
}

.tiempo-plan:hover,
.tiempo-plan:focus-visible {
    border-color: #ffd700;
    background: rgba(255, 215, 0, .12);
}

.tiempo-plan:focus-visible {
    outline: 2px solid #ffd700;
    outline-offset: 3px;
}

.tiempo-plan:active {
    transform: scale(.97);
}

.tiempo-plan.seleccionado {
    background: #ffd700;
    border-color: #ffd700;
    color: #000;
}

.cabecera-plan {
    width: 100%;
    max-width: 700px;
    margin: 0 auto 40px;
    display: grid;
    grid-template-columns: 200px 1fr;
    align-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 215, 0, .35);
    border-radius: 10px;
    background: #0d0d0d;
}

.cabecera-plan img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.cabecera-plan div {
    padding: 30px;
}

.tipo-plan {
    margin: 0 0 8px;
    color: #b9b9b9;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}


.grilla-tiempos {
    width: 100%;
    max-width: 700px;
    min-height: 300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    padding: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 215, 0, .35);
    border-radius: 10px;
    background: #0d0d0d;
}

@media (min-width: 641px) and (max-width: 1024px) {
    .lista-planes {
        grid-template-columns: repeat(2, 1fr);
        align-items: start;
        gap: 24px;
    }

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

    .flecha-plan {
        display: none;
    }

    .detalle-plan {
        transform: translateY(-16px);
    }

    .fila-plan.abierta .detalle-plan {
        transform: translateY(0);
    }
}

@media (max-width: 640px) {
    .pagina-planes {
        padding: 120px 20px 60px;
    }

    .pagina-planes > .titulo-planes {
        margin-bottom: 36px;
        font-size: 40px;
    }

    .fila-plan {
        grid-template-columns: 1fr;
    }

    .flecha-plan,
    .detalle-plan {
        display: none;
    }

    .caja-plan {
        min-height: 190px;
    }

    .cabecera-plan {
        grid-template-columns: 1fr;
    }

    .cabecera-plan img {
        height: 170px;
    }

    .grilla-tiempos {
        grid-template-columns: 1fr;
    }

    .grilla-tiempos .tiempo-plan {
        min-height: 76px;
    }
}
