/* Layout Principal */
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 20px 60px;
    /* Padding top para menú fijo */
}

.blog-header {
    text-align: center;
    margin-bottom: 50px;
}

.blog-header h1 {
    font-size: 2.5rem;
    color: #0d47a1;
    margin-bottom: 10px;
}

.blog-header p {
    color: #666;
    font-size: 1.1rem;
}

/* Post Destacado */
.featured-post {
    display: flex;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    margin-bottom: 50px;
    border: 1px solid #eee;
}

.fp-image {
    flex: 1.5;
    min-height: 350px;
    position: relative;
    overflow: hidden;
}

.fp-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.fp-image:hover img {
    transform: scale(1.05);
}

.fp-content {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.blog-date {
    color: #888;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    display: block;
}

.fp-content h2 {
    font-size: 2rem;
    margin: 0 0 15px;
    line-height: 1.2;
}

.fp-content h2 a {
    color: #333;
    text-decoration: none;
}

.fp-content h2 a:hover {
    color: #0d47a1;
}

.fp-content p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 25px;
}

.read-more {
    color: #0d47a1;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9rem;
}

/* Layout Grid + Sidebar */
.blog-layout {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 40px;
}

/* Grid de Posts */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.post-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #eee;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

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

.pc-image {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.pc-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pc-date {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 8px;
    display: block;
}

.pc-title {
    font-size: 1.2rem;
    margin: 0 0 10px;
    line-height: 1.3;
}

.pc-title a {
    color: #333;
    text-decoration: none;
}

.pc-title a:hover {
    color: #0d47a1;
}

.pc-excerpt {
    font-size: 0.95rem;
    color: #666;
    flex: 1;
    margin-bottom: 15px;
}

.pc-link {
    color: #0d47a1;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
}

/* Sidebar Widgets */
.widget {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #eee;
}

.search-widget form {
    display: flex;
}

.search-widget input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    outline: none;
}

.search-widget button {
    background: #0d47a1;
    color: white;
    border: none;
    padding: 0 15px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.widget h3,
.widget h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.archive-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.archive-widget li {
    margin-bottom: 8px;
}

.archive-widget a {
    text-decoration: none;
    color: #555;
    display: flex;
    justify-content: space-between;
    transition: color 0.2s;
}

.archive-widget a:hover,
.archive-widget a.active {
    color: #0d47a1;
    font-weight: 600;
}

.count {
    background: #e3f2fd;
    color: #0d47a1;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
}

/* Promo Widget */
.promo-widget {
    background: #e3f2fd;
    border-color: #bbdefb;
    text-align: center;
}

.btn-promo {
    display: inline-block;
    margin-top: 10px;
    background: #0d47a1;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
}

/* Paginación */
.blog-pagination {
    margin-top: 40px;
    text-align: center;
}

.page-num {
    display: inline-block;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #ddd;
    color: #333;
    text-decoration: none;
    margin: 0 3px;
    border-radius: 4px;
    transition: all 0.2s;
}

.page-num.active,
.page-num:hover {
    background: #0d47a1;
    color: white;
    border-color: #0d47a1;
}

/* Responsive */
@media (max-width: 900px) {
    .featured-post {
        flex-direction: column;
    }

    .fp-image {
        min-height: 250px;
    }

    .blog-layout {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        order: -1;
    }

    /* Sidebar arriba en móvil o quitar para abajo */
}

/* --- ESTILOS DE DETALLE DE BLOG --- */

.blog-detail-container {
    max-width: 900px;
    /* Ancho lectura cómodo */
    margin: 0 auto;
    padding: 120px 20px 60px;
}

.bd-breadcrumbs {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 30px;
}

.bd-breadcrumbs a {
    color: #666;
    text-decoration: none;
}

.bd-breadcrumbs .current {
    color: #333;
    font-weight: 600;
}

.bd-header {
    margin-bottom: 30px;
    text-align: center;
}

.bd-date {
    color: #0d47a1;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.bd-header h1 {
    font-size: 2.5rem;
    margin-top: 10px;
    line-height: 1.2;
    color: #1a1a1a;
}

.bd-cover {
    width: 100%;
    height: auto;
    margin-bottom: 40px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.bd-cover img {
    width: 100%;
    display: block;
}

/* Tipografía del contenido */
.bd-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 50px;
}

.bd-content p {
    margin-bottom: 20px;
}

.bd-content h2 {
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 1.8rem;
    color: #0d47a1;
}

.bd-content h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.bd-content ul,
.bd-content ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.bd-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.bd-content blockquote {
    border-left: 4px solid #0d47a1;
    margin: 30px 0;
    padding-left: 20px;
    font-style: italic;
    color: #555;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 0 8px 8px 0;
}

/* Compartir */
.bd-share {
    border-top: 1px solid #eee;
    padding-top: 30px;
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 60px;
}

.share-btn {
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    color: white;
    font-weight: 600;
}

.share-btn.fb {
    background: #1877f2;
}

.share-btn.x {
    background: #000;
}

.share-btn.wa {
    background: #25d366;
}

/* Navegación Prev/Next */
.blog-navigation {
    display: flex;
    justify-content: space-between;
    margin-bottom: 80px;
    gap: 20px;
}

.nav-item {
    flex: 1;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
    background: #fff;
}

.nav-item:hover {
    border-color: #0d47a1;
    background: #f8faff;
}

.nav-item.next {
    text-align: right;
}

.nav-label {
    display: block;
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.nav-title {
    display: block;
    font-weight: 700;
    color: #333;
    font-size: 1.1rem;
    line-height: 1.3;
}

/* Carrusel de Recomendados */
.recommended-section {
    margin-bottom: 50px;
}

.recommended-section h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
    border-left: 4px solid #0d47a1;
    padding-left: 15px;
}

.carousel-wrapper {
    overflow-x: auto;
    padding-bottom: 20px;
    /* Espacio para scrollbar */
    /* Ocultar scrollbar visualmente pero permitir scroll */
    scrollbar-width: thin;
}

.carousel-track {
    display: flex;
    gap: 20px;
}

.carousel-card {
    min-width: 280px;
    width: 280px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    /* Evita que se encojan */
    transition: transform 0.2s;
}

.carousel-card:hover {
    transform: translateY(-5px);
}

.cc-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.cc-image {
    height: 160px;
    background-size: cover;
    background-position: center;
}

.cc-body {
    padding: 15px;
}

.cc-date {
    font-size: 0.8rem;
    color: #999;
    display: block;
    margin-bottom: 5px;
}

.cc-body h4 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.4;
    color: #333;
}

.cc-link:hover h4 {
    color: #0d47a1;
}

@media (max-width: 768px) {
    .bd-header h1 {
        font-size: 2rem;
    }

    .blog-navigation {
        flex-direction: column;
    }

    .nav-item.next {
        text-align: left;
    }
}