/* SVL BLOG GRID FILTERS — custom card grid */

.svl-bgf { position: relative; max-width: 100%; }

/* Neutralizar contenedores heredados del template clasico */
.svl-bgf .container,
.svl-bgf .blog-container .container,
.svl-bgf .blog-categories .container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}
.svl-bgf .row { margin-left: 0; margin-right: 0; }
.svl-bgf .col-12 { padding-left: 0; padding-right: 0; }

/* ===== Tabs / filtros (carrusel horizontal estilo blog clasico) ===== */
.svl-bgf .hidden-list {
    position: relative;
    overflow: hidden;
    padding: 0 40px;
    border-bottom: solid 1px #707070;
    margin-bottom: 10px;
}
.svl-bgf .category-navigation {
    display: flex !important;
    flex-wrap: nowrap !important;
    white-space: nowrap;
    justify-content: flex-start !important;
    position: relative;
    transition: left .3s ease;
    border-bottom: 0 !important;
    margin-bottom: 0 !important;
    padding: 0;
    margin-top: 0;
}
.svl-bgf .category-navigation li {
    flex: 0 0 auto;
    list-style: none;
    padding: 20px 16px;
}
.svl-bgf .category-navigation li:first-child { padding-left: 0; }
.svl-bgf .category-navigation li.active .svl-bgf-tab { font-weight: 500; }
.svl-bgf .category-navigation .svl-bgf-tab {
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font: inherit;
    color: #0d1331;
    font-size: 16px;
    line-height: inherit;
    text-decoration: none;
    transition: color .2s ease;
    white-space: nowrap;
}
.svl-bgf .category-navigation .svl-bgf-tab:hover { color: #1fe5b1; }

/* ===== Grid (CSS Grid, 4 columnas max) ===== */
.svl-bgf .svl-bgf-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px 24px;
    align-items: start;
    margin: 0;
    width: 100%;
    max-width: 100%;
}
@media (min-width: 640px) {
    .svl-bgf .svl-bgf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .svl-bgf .svl-bgf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
    .svl-bgf .svl-bgf-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ===== Card ===== */
.svl-bgf .svl-bgf-item--card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
    margin: 0;
}

/* Imagen con aspect ratio reservado y badge encima */
.svl-bgf .svl-bgf-card-image {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 800 / 500;
    background-color: rgba(13,19,49,.05);
    border-radius: 15px;
    overflow: hidden;
    line-height: 0;
}
.svl-bgf .svl-bgf-card-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 15px;
}

/* Badge pastilla */
.svl-bgf .svl-bgf-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: inline-block;
    background-color: #fff;
    color: #0d1331;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    max-width: calc(100% - 24px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Titulo */
.svl-bgf .svl-bgf-card-title {
    margin: 22px 0 0;
    font-size: 26px;
    line-height: 1.2;
    font-family: "Uxum Grotesque", sans-serif;
    font-weight: 400;
    color: #0d1331;
}
.svl-bgf .svl-bgf-card-title a {
    color: #0d1331;
    text-decoration: none;
}
.svl-bgf .svl-bgf-card-title a:hover { color: #1fe5b1; }

/* Extracto + fecha */
.svl-bgf .svl-bgf-card-excerpt {
    margin-top: 10px;
    color: #0d1331;
    font-size: 16px;
    line-height: 1.5;
}
.svl-bgf .svl-bgf-card-meta {
    margin-top: 10px;
    color: #0d1331;
    font-size: 14px;
    opacity: .8;
}

/* ===== Aislar del CSS del template clasico ===== */
.svl-bgf .blog-container { padding-bottom: 0 !important; margin-bottom: 0 !important; }
.svl-bgf-grid-section { padding-bottom: 60px; }

/* ===== Loading ===== */
.svl-bgf .svl-bgf-grid[aria-busy="true"] {
    opacity: .55;
    pointer-events: none;
    transition: opacity .2s ease;
}
.svl-bgf .svl-bgf-loader { display: none; text-align: center; padding: 1.5rem 0; }
.svl-bgf.is-loading .svl-bgf-loader { display: block; }
.svl-bgf .svl-bgf-loader span {
    display: inline-block;
    width: 28px; height: 28px;
    border: 3px solid rgba(13,19,49,.15);
    border-top-color: #0d1331;
    border-radius: 50%;
    animation: svl-bgf-spin .8s linear infinite;
}
@keyframes svl-bgf-spin { to { transform: rotate(360deg); } }

/* ===== Load more ===== */
.svl-bgf .svl-bgf-more-wrap {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
    width: 100%;
}
.svl-bgf .svl-bgf-more-wrap[hidden] { display: none !important; }
.svl-bgf .svl-bgf-load-more {
    background: #0d1331;
    color: #fff;
    border: 0;
    padding: .9rem 2.2rem;
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    font-size: 18px;
    line-height: 1.1;
    transition: background-color .2s ease, color .2s ease;
}
.svl-bgf .svl-bgf-load-more:hover { background: #1fe5b1; color: #0d1331; }
.svl-bgf .svl-bgf-load-more[disabled] { opacity: .55; cursor: default; }

/* ===== Empty ===== */
.svl-bgf .svl-bgf-empty { padding: 3rem 0; text-align: center; opacity: .7; grid-column: 1 / -1; }
