/**
 * Blog List Dynamic Elementor - Estilos del Frontend
 *
 * Estructura visual que respeta el diseño del JSON de Elementor
 * con soporte responsive para tablet y mobile.
 *
 * @package BlogListDynamicElementor
 */

/* ============================================
   GOOGLE FONTS
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Epilogue:wght@400;700;900&display=swap');

/* ============================================
   VARIABLES CSS
   ============================================ */
:root {
    --blde-font-family: 'Epilogue', sans-serif;
    --blde-transition: 0.3s ease;
    --blde-border-radius: 40px;
}

/* ============================================
   WRAPPER PRINCIPAL
   ============================================ */
.blde-blog-list-wrapper {
    font-family: var(--blde-font-family);
    box-sizing: border-box;
    line-height: 1.6;
}

.blde-blog-list-wrapper *,
.blde-blog-list-wrapper *::before,
.blde-blog-list-wrapper *::after {
    box-sizing: inherit;
}

/* ============================================
   CONTENEDORES (FLEX LAYOUT)
   ============================================ */
.blde-container {
    display: flex;
    width: 100%;
}

.blde-flex-column {
    flex-direction: column;
}

.blde-flex-row {
    flex-direction: row;
}

.blde-justify-space-between {
    justify-content: space-between;
}

.blde-justify-start,
.blde-justify-flex-start {
    justify-content: flex-start;
}

.blde-justify-center {
    justify-content: center;
}

.blde-align-center {
    align-items: center;
}

.blde-align-start,
.blde-align-flex-start {
    align-items: flex-start;
}

.blde-full-width {
    width: 100%;
}

/* ============================================
   GRID DE POSTS
   ============================================ */
.blde-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
}

.blde-posts-grid > .blde-post-card {
    min-width: 0;
}

/* ============================================
   TARJETA DE POST
   ============================================ */
.blde-post-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform var(--blde-transition), box-shadow var(--blde-transition);
}

.blde-post-card:hover {
    transform: translateY(-4px);
}

a.blde-post-card,
a.blde-link-container {
    text-decoration: none;
    color: inherit;
}

/* ============================================
   WIDGET: IMAGEN
   ============================================ */
.blde-image-wrapper {
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.blde-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: filter var(--blde-transition), transform var(--blde-transition);
}

.blde-post-card:hover .blde-image {
    transform: scale(1.02);
}

/* ============================================
   WIDGET: HEADING
   ============================================ */
.blde-heading {
    margin: 0;
    padding: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.blde-heading a {
    text-decoration: none;
    color: inherit;
    transition: color var(--blde-transition);
}

.blde-heading a:hover {
    opacity: 0.8;
}

/* ============================================
   WIDGET: TEXT EDITOR
   ============================================ */
.blde-text-editor {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.blde-text-editor p {
    margin: 0;
}

/* ============================================
   WIDGET: DIVIDER
   ============================================ */
.blde-divider {
    width: 100%;
    margin: 1rem 0;
}

.blde-divider hr {
    border: none;
    border-top-style: solid;
    border-top-color: currentColor;
    opacity: 0.2;
    margin: 0;
}

/* ============================================
   RESPONSIVE: TABLET (<=1024px)
   ============================================ */
@media (max-width: 1024px) {
    .blde-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .blde-tablet-wrap {
        flex-wrap: wrap;
    }
}

/* ============================================
   RESPONSIVE: MOBILE (<=768px)
   ============================================ */
@media (max-width: 768px) {
    .blde-posts-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .blde-flex-row {
        flex-direction: column;
    }
}
