/* =========================================================================
   ESTILOS PARA LA PLANTILLA INDIVIDUAL DEL BLOG 
========================================================================= */

.blog-details-page {
    padding: 120px 0 120px;
    background-color: #ffffff;
}

/* Imagen Principal Superior */
.blog-details__main-image {
    margin-bottom: 40px;
}

.blog-details__main-image img {
    width: 100%;
    border-radius: 8px; /* Opcional: bordes redondeados */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Titular de la nota */
.blog-details__title {
    font-size: 36px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 20px;
    color: var(--pitoon-black, #18191d); 
    font-family: 'Syne', sans-serif;
}

/* Meta-datos (Fecha, Autor) */
.blog-details__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eef2f5;
    color: #7a7a7a;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.blog-details__meta span i {
    color: var(--pitoon-base, #e17e05); /* Ajusta al color naranja de tu theme */
    margin-right: 8px;
}

/* Textos principales */
.blog-details__content h4 {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 20px;
    color: var(--pitoon-black, #18191d);
}

.blog-details__content p {
    font-size: 16px;
    line-height: 1.8;
    color: #6a6a8e; /* Manteniendo el tono sobrio */
    margin-bottom: 25px;
    font-family: 'Manrope', sans-serif;
}

/* Video Embebido Responsivo (16:9) */
.blog-details__video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* Relaci贸n de aspecto 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    margin: 45px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.blog-details__video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Tarjetas peque帽as de blogs relacionados */
.related-posts {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #e5e5e5;
}

.related-posts__title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 25px;
    color: #081b1f;
}

.blog-card-small {
    background: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card-small:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.blog-card-small__img {
    height: 160px;
    overflow: hidden;
}

.blog-card-small__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card-small:hover .blog-card-small__img img {
    transform: scale(1.05);
}

.blog-card-small__content {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-small__category {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #e17e05;
    margin-bottom: 6px;
}

.blog-card-small__title {
    font-size: 16px;
    line-height: 1.4;
    font-weight: 600;
    margin-bottom: 12px;
}

.blog-card-small__title a {
    color: #081b1f;
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-card-small__title a:hover {
    color: #e17e05;
}

.blog-card-small__read-time {
    font-size: 13px;
    color: #888;
    margin-top: auto;
}

/* Banner CTA Contacto al final */
.blog-contact-cta {
    margin-top: 40px;
    padding: 35px 25px;
    background-color: #081b1f;
    border-radius: 10px;
    text-align: center;
    color: #ffffff;
}

.blog-contact-cta__subtitle {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
}

.blog-contact-cta__text {
    font-size: 15px;
    color: #d0d0d0;
    margin-bottom: 20px;
}

.blog-contact-cta__btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #e17e05;
    color: #ffffff;
    border-radius: 5px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.blog-contact-cta__btn:hover {
    background-color: #e17e05;
    color: #ffffff;
}

/* =========================================================================
   BARRA LATERAL (SIDEBAR) ESTILO IMAGEN DE REFERENCIA 
========================================================================= */
.blog-sidebar {
    margin-left: 20px;
}

.blog-sidebar__widget {
    background: #ffffff;
    padding: 0;
    margin-bottom: 50px;
}

/* Buscador del Sidebar */
.blog-sidebar__search-form {
    position: relative;
    display: flex;
}

.blog-sidebar__search-form input[type="text"] {
    width: 100%;
    background-color: #f6f8fa;
    border: 1px solid #e5e5e5;
    padding: 15px 30px;
    outline: none;
    font-size: 15px;
    color: #6a6a8e;
    font-family: 'Manrope', sans-serif;
    transition: all 0.3s ease;
}

.blog-sidebar__search-form input[type="text"]:focus {
    border-color: var(--pitoon-base, #e17e05);
}

.blog-sidebar__search-form button {
    background-color: var(--pitoon-base, #e17e05);
    color: #fff;
    border: none;
    width: 60px;
    height: 100%;
    position: absolute;
    top: 0;
    right: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-sidebar__search-form button:hover {
    background-color: var(--pitoon-black, #18191d);
}

/* Archivos de la Sidebar */
.blog-sidebar__widget-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--pitoon-black, #18191d);
    font-family: 'Syne', sans-serif;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 10px;
}

/* L铆nea naranja debajo de 'Archivos' (Igual a tu imagen de referencia) */
.blog-sidebar__widget-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--pitoon-base, #e17e05);
}

.blog-sidebar__archives-list li {
    display: block;
    margin-bottom: 15px;
}

.blog-sidebar__archives-list li a {
    color: #6a6a8e;
    font-size: 16px;
    font-family: 'Manrope', sans-serif;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.blog-sidebar__archives-list li a:hover {
    color: var(--pitoon-base, #e17e05);
}

/* Responsividad de la barra lateral en m贸vil */
@media (max-width: 991px) {
    .blog-sidebar {
        margin-left: 0;
        margin-top: 50px;
    }
}

/* =========================================================================
   NUEVA ESTRUCTURA: CABECERA Y METADATOS
========================================================================= */
.blog-header-section {
    max-width: 950px;
    margin: 0 auto;
}

.blog-details__meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8%; /* Identación hacia adentro para los extremos */
    border-bottom: 1px solid #eef2f5;
    padding-bottom: 20px;
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    color: #7a7a7a;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.blog-details__meta-row span i {
    color: var(--pitoon-base, #e17e05);
    margin-right: 8px;
}

/* Espaciado para dispositivos móviles en los metadatos */
@media (max-width: 767px) {
    .blog-details__meta-row {
        flex-direction: column;
        gap: 15px;
        padding: 0;
        text-align: center;
    }
    .blog-details__meta-row .meta-right span {
        display: block;
        margin-left: 0 !important;
        margin-top: 5px;
    }
}

/* =========================================================================
   BARRA LATERAL IZQUIERDA: SUMARIO (TABLE OF CONTENTS)
========================================================================= */
.toc-sidebar-wrapper {
    position: sticky;
    top: 130px; /* Hace que el menú baje al hacer scroll (Sticky) */
    margin-right: 20px;
    background: #ffffff;
    padding-right: 15px;
}

.toc-title {
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #888888;
    margin-bottom: 25px;
    font-weight: 700;
    font-family: 'Syne', sans-serif;
}

.toc-list {
    list-style: none;
    padding-left: 0;
    border-left: 2px solid #f1f1f1; /* Línea tenue base */
    margin: 0;
}

.toc-list li {
    margin-bottom: 20px;
}

.toc-list a {
    display: block;
    padding-left: 20px;
    color: #6a6a8e;
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.toc-list a:hover {
    color: var(--pitoon-black, #18191d);
}

/* Estado activo del Sumario (indicador naranja al lado izquierdo) */
.toc-list a.active {
    color: var(--pitoon-base, #e17e05);
    font-weight: 700;
}

.toc-list a.active::before {
    content: '';
    position: absolute;
    left: -2px; /* Se solapa sobre la línea gris base */
    top: -2px;
    height: calc(100% + 4px);
    width: 2px;
    background-color: var(--pitoon-base, #e17e05);
    transition: all 0.3s ease;
}

/* Ajustes de espaciado visual para el contenido principal */
@media (min-width: 992px) {
    .pl-lg-4 {
        padding-left: 1.5rem;
    }
}

/* =========================================================================
   IMÁGENES ENTRE EL TEXTO DEL BLOG
========================================================================= */
/* =========================================================================
   IMÁGENES ENTRE EL TEXTO DEL BLOG
========================================================================= */
.blog-details__image-inline {
    margin: 40px auto;
    text-align: center;
    width: 100%;
}

.blog-details__image-inline img {
    width: 50% !important;       /* Fuerza el tamaño exactamente al 50% */
    max-width: 50% !important;   /* Asegura que ninguna otra regla lo sobrescriba */
    height: auto !important;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: block;
    margin: 0 auto;              /* Centra la imagen */
}

.blog-details__image-caption {
    display: block;
    margin-top: 15px;
    font-size: 14px;
    color: #888888;
    font-family: 'Manrope', sans-serif;
    font-style: italic;
}

/* Ajuste para dispositivos móviles */
@media (max-width: 767px) {
    .blog-details__image-inline img {
        width: 90% !important;      /* En celulares vuelve a ocupar el 90% */
        max-width: 90% !important;
    }
}

/* =========================================================================
   AJUSTE DE SCROLL PARA EL SUMARIO
   Evita que el header fijo o sticky tape el inicio de cada sección
========================================================================= */

html {
    scroll-behavior: smooth;
}

.article-section[id] {
    scroll-margin-top: 150px;
}
