/* ============================================================
   RUTAS — Estilos de la página de catálogo de rutas
   maxiprograma.com
============================================================ */

/* ============================================================
   HEADER
============================================================ */
.rutas-header {
    background-color: #1a1a1a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    padding-top: calc(var(--navbar-height) + 52px);
    padding-bottom: 48px;
}

.rutas-header-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: #FCFCFC;
    letter-spacing: -0.5px;
    margin-bottom: 0.4rem;
}

.rutas-header-sub {
    font-size: 1rem;
    color: #8b8b8b;
    margin-bottom: 0;
}

/* ============================================================
   BODY (grid)
============================================================ */
.rutas-body {
    padding-top: 40px;
    padding-bottom: 80px;
}

/* ============================================================
   CARD DE RUTA
============================================================ */
.ruta-card {
    background: linear-gradient(145deg, #1e1e1e 0%, #1a1a1a 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px; /* igual que .course-card */
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.ruta-card:hover {
    transform: translateY(-4px);
    border-color: rgba(251, 251, 154, 0.25);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

/* Thumbnail */
.ruta-thumb-wrap {
    position: relative;
    overflow: hidden;
    background-color: #1a1a1a;
}

.ruta-thumb {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.ruta-card:hover .ruta-thumb {
    transform: scale(1.05);
}

.ruta-thumb-placeholder {
    background: linear-gradient(135deg, #1e1e2e 0%, #2a2a3e 100%);
    min-height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ruta-thumb-icon {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.12);
}

/* Badge de descuento */
.ruta-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 0.4em 0.7em;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 2;
}

.badge-descuento {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #FCFCFC;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

/* Link que envuelve portada + info (las acciones quedan afuera: un form no va dentro de un <a>) */
.ruta-card-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.ruta-card-link:hover { color: inherit; }

/* Info */
.ruta-info {
    padding: 10px 12px 14px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.ruta-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #FCFCFC;
    margin-bottom: 8px;
    letter-spacing: -0.2px;
    line-height: 1.3;
}

/* Datos bajo el título: mismo formato que .course-datos de cursos.css */
.ruta-datos {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    font-size: 0.78rem;
    color: #b5b5b5;
    margin-bottom: 10px;
}

.ruta-datos i {
    margin-right: 3px;
    color: var(--primary-color);
}

/* Precios */
.ruta-price-section {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ruta-price-original {
    font-size: 0.85rem;
    color: #666;
    text-decoration: line-through;
}

.ruta-price-final {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--bs-teal);
}

/* Acciones: Agregar a la izquierda, Ver detalle a la derecha (como .course-actions) */
.ruta-actions {
    display: flex;
    gap: 8px;
    padding: 0 12px 14px;
}

.ruta-actions .btn,
.ruta-actions form {
    flex: 1;
}

.ruta-actions .btn {
    width: 100%;
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
}

/* "Ver detalle" sin línea; el hover lo pinta como el outline */
.ruta-actions .btn-detalle {
    border-color: transparent;
}

/* ============================================================
   SIN RESULTADOS
============================================================ */
.rutas-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.rutas-empty i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
    color: #444;
}

.rutas-empty p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 575px) {
    .rutas-header {
        padding-top: calc(var(--navbar-height) + 36px);
        padding-bottom: 36px;
    }

    .rutas-header-title {
        font-size: 1.75rem;
    }

    .rutas-body {
        padding-top: 28px;
    }
}
