/* =============================================================================
   Related Posts Slider — related-posts-slider.css
   Toma referencia visual de la imagen: cards con imagen arriba,
   badge de categoría, título bold, fecha + tiempo de lectura abajo.
   ============================================================================= */

/* ── Wrapper general ─────────────────────────────────────────────────────────── */
.rps-wrapper {
    width: 100%;
    overflow: hidden;
    padding: 0 0 40px;
    position: relative;
    box-sizing: border-box;
}

/* ── Swiper override: permitir espacio para la paginación ─────────────────────── */
.rps-swiper {
    overflow: visible !important;
    padding-bottom: 40px !important;
}

/* ── Slide ────────────────────────────────────────────────────────────────────── */
.rps-slide {
    height: auto;
}

/* ── Card ─────────────────────────────────────────────────────────────────────── */
.rps-card {
    height: 100%;
    background: #FFFFFF !important;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.10);
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07), 0 4px 16px rgba(0, 0, 0, 0.05) !important;
}

.rps-card:hover,
.rps-card:focus-visible {
    transform: translateY(1.1);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
    outline: none;
}

/* ── Imagen ───────────────────────────────────────────────────────────────────── */
.rps-card__image {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f0ede8;
    flex-shrink: 0;
}

.rps-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.4s ease;
}

.rps-card:hover .rps-card__image img {
    transform: scale(1.04);
}

/* Placeholder sin imagen */
.rps-card__image--placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c5c2bc;
}

/* ── Cuerpo de la card ────────────────────────────────────────────────────────── */
.rps-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 16px 18px 18px;
    gap: 6px;
}

/* ── Badge de categoría ───────────────────────────────────────────────────────── */
.rps-card__category {
    border: 1px solid #6D809D !important;
    white-space: nowrap;
    margin-bottom: 2px;
    display: inline-flex;
    align-items: center;
    width: fit-content;
    text-decoration: none;
    color: #6D809D !important;
    font-family: "Helvetica LST";
    font-size: 12px;
    font-style: normal;
    font-weight: 300;
    line-height: 12px;
    border-radius: 30px;
    padding: 4px 10px;
}

/* ── Título ───────────────────────────────────────────────────────────────────── */
.rps-card__title {
    margin: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #002559 !important;
    font-family: 'Helvetica LST';
    font-size: 22px;
    font-weight: 700;
    line-height: 30px;
    margin-bottom: 10px;
    transition: .3s all;
}

/* ── Meta: fecha + tiempo de lectura ─────────────────────────────────────────── */
.rps-card__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 10px;
}

.rps-card__date {
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #6D809D !important;
    font-family: 'Helvetica LST';
    font-size: 14px;
    font-style: normal;
    font-weight: 300;
    line-height: 20px;
}

.rps-card__reading-time {
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #6D809D !important;
    font-family: 'Helvetica LST';
    font-size: 14px;
    font-style: normal;
    font-weight: 300;
    line-height: 20px;
}

.rps-card__reading-time svg {
    flex-shrink: 0;
    vertical-align: middle;
}

/* ── Paginación (puntos) ──────────────────────────────────────────────────────── */
.rps-pagination {
    text-align: center;
    margin-top: 20px;
}

/* Overrides de colores de puntos Swiper */
.rps-swiper .swiper-pagination-bullet {
    transition: background 0.2s ease, transform 0.2s ease;
    border: 2px solid #6D809D;
    opacity: 0.4;
    width: 12px;
    height: 12px;
    background: transparent;
}

.rps-swiper .swiper-pagination-bullet-active {
    background: #01696f;
    transform: scale(1.25);
}

/* ── Botones de navegación ────────────────────────────────────────────────────── */
.rps-btn-prev,
.rps-btn-next {
    color: #01696f !important;
    --swiper-navigation-size: 20px;
}

.rps-btn-prev::after,
.rps-btn-next::after {
    font-size: 18px !important;
    font-weight: 700;
}

.rps-swiper .swiper-pagination-bullet-active {
	background: #01C5C6;
	opacity: 1;
	border: 2px solid #01C5C6;
	width: 10px;
	height: 10px;
}

/* Ocultar flechas en mobile */
@media (max-width: 639px) {
    .rps-btn-prev,
    .rps-btn-next {
        display: none !important;
    }
}

/* ── Modo oscuro (respeta prefers-color-scheme del sitio) ─────────────────────── */
@media (prefers-color-scheme: dark) {
    .rps-card {
        background: #1c1b19;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .rps-card__image {
        background: #2a2926;
    }

    .rps-card__title {
        color: #e8e7e3;
    }

    .rps-card__category {
        color: #aaa;
        border-color: #444;
    }

    .rps-card__date,
    .rps-card__reading-time {
        color: #888;
    }

    .rps-card__image--placeholder {
        color: #555;
    }

    .rps-swiper .swiper-pagination-bullet-active {
        background: #01C5C6;
        opacity: 1;
        border: 2px solid #01C5C6;
        width: 13px;
        height: 13px;
    }

    .rps-btn-prev,
    .rps-btn-next {
        color: #4f98a3 !important;
    }
}
