/* ==========================================================================
   Blog – Persiguiendo el Viento
   Estilos para breadcrumbs, paginación, tarjetas, sidebar y relacionados
   ========================================================================== */

/* ==========================================================================
   Feature: Barra de progreso de lectura (solo móvil)
   ========================================================================== */
.blog-progress-container {
    position: fixed;
    top: 55px;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 1000;
    display: none; /* Oculta en desktop por defecto */
}

.blog-progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #207B25, #2ecc40);
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
}

/* Solo visible en tablet/móvil */
@media (max-width: 991px) {
    .blog-progress-container {
        display: block;
    }
}

/* ==========================================================================
   Feature: Banner con overlay
   ========================================================================== */
.blog-banner-overlay {
    position: relative;
}

.blog-banner-overlay::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.45) 0%, transparent 100%);
    pointer-events: none;
}

/* ==========================================================================
   Feature: Tiempo de lectura
   ========================================================================== */
.blog-reading-time {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: #888;
    font-size: 0.88rem;
}

.blog-reading-time i {
    font-size: 0.85rem;
}

/* ==========================================================================
   Feature: Botones de compartir
   ========================================================================== */
.blog-share {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1.25rem 0;
    margin-top: 1.5rem;
    border-top: 1px solid #eee;
}

.blog-share-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
    margin-right: 0.25rem;
}

.blog-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.blog-share-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.blog-share-btn.whatsapp  { background-color: #fff; color: #25D366; border: 1px solid #e0e0e0; }
.blog-share-btn.facebook  { background-color: #fff; color: #1877F2; border: 1px solid #e0e0e0; }
.blog-share-btn.copy-link { background-color: #fff; color: #555; border: 1px solid #e0e0e0; }

.blog-share-btn.whatsapp:hover  { background-color: #25D366; color: #fff !important; border-color: #25D366; }
.blog-share-btn.facebook:hover  { background-color: #1877F2; color: #fff !important; border-color: #1877F2; }
.blog-share-btn.copy-link:hover { background-color: #555; color: #fff !important; border-color: #555; }

.blog-share-btn.whatsapp:hover  i,
.blog-share-btn.facebook:hover  i,
.blog-share-btn.copy-link:hover i { color: #fff !important; }

.blog-share-btn.copy-link.copied {
    background-color: #207B25;
    color: #fff;
    border-color: #207B25;
}

/* ==========================================================================
   Feature: Botón volver arriba
   ========================================================================== */
.blog-btn-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background-color: #207B25;
    color: #fff !important;
    border: none;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background-color 0.2s;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(32, 123, 37, 0.35);
}

.blog-btn-top i {
    color: #fff !important;
}

.blog-btn-top:hover {
    background-color: #1a6320;
}

.blog-btn-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Breadcrumbs */
.blog-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    font-size: 0.95rem;
}

.blog-breadcrumb li {
    display: inline-flex;
    align-items: center;
}

.blog-breadcrumb li + li::before {
    content: "›";
    margin: 0 0.5rem;
    color: #999;
}

.blog-breadcrumb a {
    color: #207B25;
    text-decoration: none;
}

.blog-breadcrumb a:hover {
    text-decoration: underline;
}

.blog-breadcrumb .active {
    color: #666;
}

/* Paginación numérica */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 2rem 0 0;
    list-style: none;
    margin: 0;
}

.blog-pagination li a,
.blog-pagination li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.6rem;
    border-radius: 0.42rem;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background-color 0.15s, color 0.15s;
}

.blog-pagination li a {
    color: #207B25;
    background-color: #f3f6f9;
}

.blog-pagination li a:hover {
    background-color: #207B25;
    color: #fff;
}

.blog-pagination li .active {
    background-color: #207B25;
    color: #fff;
    pointer-events: none;
}

.blog-pagination li .disabled {
    color: #ccc;
    pointer-events: none;
    background-color: #f9f9f9;
}

/* ==========================================================================
   Tarjetas del listado de blog — UX simétrico
   ========================================================================== */
.blog-card {
    display: flex;
    flex-direction: column;
    flex: 1; /* ocupa toda la altura del col-flex-column padre */
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    overflow: hidden;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.blog-card .blog-card-img {
    height: 240px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #1B283F;
    flex-shrink: 0;
}

.blog-card .card-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 180px;
}

.blog-card .card-body .titulo-blog {
    flex-shrink: 0;
}

.blog-card .card-body .blog-card-excerpt {
    flex: 1 1 auto;
}

.blog-card .card-footer {
    flex-shrink: 0;
}

/* Extracto truncado */
.blog-card-excerpt {
    color: #555;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

/* Título de tarjeta clicable */
.blog-card-title-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-card-title-link:hover {
    color: #207B25;
    text-decoration: none;
    cursor: pointer;
}

/* Imagen de tarjeta como enlace */
.blog-card-img-link {
    display: block;
    text-decoration: none;
    overflow: hidden;
}

.blog-card-img-link:hover .blog-card-img {
    transform: scale(1.03);
    transition: transform 0.35s ease;
}

/* Columnas del listado: igualar alturas */
.blog-listing-row {
    display: flex;
    flex-wrap: wrap;
}

.blog-listing-row > [class*="col-"] {
    display: flex;
    flex-direction: column; /* Permite que la tarjeta hijo llene toda la altura */
    margin-bottom: 1.75rem;
}

/* Categoría badge en tarjeta */
.blog-card-category {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #207B25;
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   Artículos relacionados (footer de entrada)
   ========================================================================== */
.blog-related {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.blog-related h2 {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
}

.blog-related-row {
    display: flex;
    flex-wrap: wrap;
}

.blog-related-row > [class*="col-"] {
    display: flex;
    flex-direction: column;
}

.blog-related-card {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    border-radius: 0.42rem;
}

.blog-related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.blog-related-img {
    height: 140px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #1B283F;
    flex-shrink: 0;
}

.blog-related-title {
    font-family: verveinecorp;
    font-size: 16pt;
    line-height: 1.25;
    margin-bottom: 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-related-card .card-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

/* Entrada individual - metadatos */
.blog-entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.blog-entry-meta time {
    font-weight: 500;
}

.blog-entry-category {
    display: inline-block;
    background-color: #e8f5e9;
    color: #207B25;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.15rem 0.65rem;
    border-radius: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ==========================================================================
   Sidebar del blog — Sticky en escritorio
   ========================================================================== */

/* El row que contiene contenido + sidebar: impedir stretch */
.blog-entry-row,
.blog-listing-outer-row {
    align-items: flex-start !important;
}

.blog-sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: 85px; /* 65px header fijo + 20px margen */
}

/* Columna que contiene el sidebar */
.blog-sidebar-col {
    /* No necesita estilos extra, el row ya controla alignment */
}

.blog-sidebar .blog-sidebar-widget {
    background: #fff;
    border-radius: 0.42rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 13px 0 rgba(82, 63, 105, 0.05);
    border: 1px solid #f0f0f0;
}

.blog-sidebar-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #207B25;
    color: #333;
}

.blog-sidebar-title i {
    margin-right: 0.4rem;
    color: #207B25;
}

/* Widget destinos */
.blog-sidebar-destinos {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-sidebar-destinos li {
    margin-bottom: 0;
}

.blog-sidebar-destinos a {
    display: flex;
    align-items: center;
    padding: 0.55rem 0.5rem;
    color: #444;
    text-decoration: none;
    border-radius: 0.3rem;
    transition: background-color 0.15s, color 0.15s;
    font-size: 0.95rem;
}

.blog-sidebar-destinos a:hover {
    background-color: #f3f6f9;
    color: #207B25;
}

.blog-sidebar-destinos .destino-icono {
    margin-right: 0.6rem;
    font-size: 1.15rem;
    width: 24px;
    text-align: center;
}

.blog-sidebar-destinos a i.fa-chevron-right {
    margin-left: auto;
    font-size: 0.7rem;
    color: #ccc;
    transition: color 0.15s;
}

.blog-sidebar-destinos a:hover i.fa-chevron-right {
    color: #207B25;
}

/* Widget categorías */
.blog-sidebar-categorias {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-sidebar-categorias li {
    margin-bottom: 0;
}

.blog-sidebar-categorias li.active a {
    background-color: #e8f5e9;
    color: #207B25;
    font-weight: 600;
}

.blog-sidebar-categorias a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.5rem;
    color: #444;
    text-decoration: none;
    border-radius: 0.3rem;
    transition: background-color 0.15s, color 0.15s;
    font-size: 0.95rem;
}

.blog-sidebar-categorias a:hover {
    background-color: #f3f6f9;
    color: #207B25;
}

.blog-sidebar-count {
    background-color: #f3f6f9;
    color: #666;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 1rem;
    min-width: 1.6rem;
    text-align: center;
}

/* Widget entradas misma categoría */
.blog-sidebar-entradas {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-sidebar-entradas li {
    margin-bottom: 0.5rem;
}

.blog-sidebar-entradas li:last-child {
    margin-bottom: 0;
}

.blog-sidebar-entradas a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    color: #444;
    text-decoration: none;
    border-radius: 0.3rem;
    transition: background-color 0.15s;
}

.blog-sidebar-entradas a:hover {
    background-color: #f3f6f9;
}

.blog-sidebar-thumb {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: 0.25rem;
    flex-shrink: 0;
}

.blog-sidebar-entrada-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.blog-sidebar-entrada-titulo {
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Widget turismo responsable */
.blog-sidebar-turismo {
    text-align: center;
}

.blog-sidebar-turismo-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.blog-sidebar-turismo-link:hover {
    text-decoration: none;
    color: inherit;
}

.blog-sidebar-turismo-img {
    max-width: 100%;
    height: auto;
    max-height: 60px;
}

.blog-sidebar-turismo-text {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: #777;
    line-height: 1.5;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Tablet y móvil: sidebar apilada debajo, no sticky */
@media (max-width: 991px) {
    .blog-entry-row,
    .blog-listing-outer-row {
        align-items: stretch !important;
    }

    .blog-sidebar {
        position: static;
        margin-top: 2rem;
    }

    .blog-card .blog-card-img {
        height: 200px;
    }

    .blog-related-img {
        height: 180px;
    }
}

/* Móvil: tarjetas relacionadas apiladas */
@media (max-width: 767px) {
    .blog-related .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .blog-related-card {
        flex-direction: column;
        height: auto;
    }

    .blog-related-img {
        width: 100%;
        height: 180px;
    }

    .blog-related-title {
        -webkit-line-clamp: 2;
    }

    .blog-related h2 {
        font-size: 1.3rem;
    }
}

@media (max-width: 575px) {
    .blog-card .blog-card-img {
        height: 180px;
    }

    .blog-card .card-body {
        min-height: auto;
    }

    .blog-pagination li a,
    .blog-pagination li span {
        min-width: 2rem;
        height: 2rem;
        font-size: 0.85rem;
    }

    .blog-sidebar-widget {
        padding: 1rem;
    }

    .blog-sidebar-thumb {
        width: 50px;
        height: 38px;
    }

    .blog-share-btn {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }

    .blog-btn-top {
        bottom: 20px;
        left: 16px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .blog-progress-container {
        top: 55px;
    }
}
