/* ============================================
   KOLPA EDITORES - BLOG PAGE STYLES
   ============================================ */

/* ============================================
   HERO BLOG
   ============================================ */
.hero-blog {
    position: relative;
    height: 50vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-blog-bg {
    position: absolute;
    inset: 0;
    background: url('https://kolpaeditores.edu.pe/assets/img/slider2.png') center/cover no-repeat;
}

.hero-blog-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.85) 0%, rgba(139, 0, 0, 0.7) 100%);
}

.hero-blog-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
}

.hero-blog-content h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease forwards;
}

.hero-blog-content p {
    font-size: 1.25rem;
    color: var(--muted);
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   BLOG LAYOUT
   ============================================ */
.blog-section {
    padding: 5rem 0;
    background: linear-gradient(180deg, #06070a 0%, rgba(196, 30, 58, 0.03) 50%, #06070a 100%);
}

.blog-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
    align-items: start;
}

/* ============================================
   FILTROS DE CATEGORÍAS
   ============================================ */
.blog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 3rem;
    justify-content: center;
}

.filter-btn {
    padding: 0.6rem 1.25rem;
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand2) 100%);
    border-color: var(--brand);
    color: #ffffff;
}

/* ============================================
   ARTÍCULOS DESTACADOS (Cards grandes)
   ============================================ */
.featured-articles {
    margin-bottom: 4rem;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.article-card-featured {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
    position: relative;
}

.article-card-featured:hover {
    transform: translateY(-10px);
    border-color: var(--brand);
    box-shadow: 0 25px 60px rgba(196, 30, 58, 0.2);
}

.article-card-featured:first-child {
    grid-column: span 2;
}

.article-card-featured:first-child .article-featured-image {
    height: 300px;
}

.article-featured-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.article-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card-featured:hover .article-featured-image img {
    transform: scale(1.1);
}

.article-featured-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand2) 100%);
    color: #ffffff;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.article-featured-content {
    padding: 1.5rem;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.article-meta i {
    color: var(--brand);
}

.article-card-featured h3 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.article-card-featured:hover h3 {
    color: var(--brand);
}

.article-excerpt {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.article-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.article-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand2) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
}

.author-info span {
    display: block;
    font-size: 0.85rem;
    color: #ffffff;
    font-weight: 500;
}

.author-info small {
    font-size: 0.75rem;
    color: var(--muted);
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--brand);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    gap: 0.75rem;
}

/* ============================================
   VALORACIÓN CON ESTRELLAS
   ============================================ */
.article-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stars {
    display: flex;
    gap: 0.15rem;
}

.stars i {
    color: #ffc107;
    font-size: 0.9rem;
}

.stars i.empty {
    color: rgba(255, 255, 255, 0.2);
}

.rating-count {
    font-size: 0.8rem;
    color: var(--muted);
}

/* ============================================
   GRID DE ARTÍCULOS
   ============================================ */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.article-card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    border-color: var(--brand);
    box-shadow: var(--shadow);
}

.article-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.1);
}

.article-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: var(--brand);
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(5px);
}

.article-content {
    padding: 1.25rem;
}

.article-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.article-card:hover h4 {
    color: var(--brand);
}

.article-card .article-excerpt {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   SIDEBAR
   ============================================ */
.blog-sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-widget h4 {
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--brand);
}

/* Búsqueda */
.search-box {
    display: flex;
    gap: 0.5rem;
}

.search-box input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.9rem;
}

.search-box input::placeholder {
    color: var(--muted);
}

.search-box input:focus {
    outline: none;
    border-color: var(--brand);
}

.search-box button {
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand2) 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-box button:hover {
    transform: scale(1.05);
}

/* Categorías sidebar */
.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 0.75rem;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    color: var(--muted);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.category-list a:hover {
    background: rgba(196, 30, 58, 0.1);
    color: var(--brand);
    padding-left: 1rem;
}

.category-list span {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* Publicaciones populares */
.popular-post {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.popular-post:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.popular-post-image {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.popular-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-post-content h5 {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.popular-post:hover h5 {
    color: var(--brand);
}

.popular-post-content span {
    font-size: 0.75rem;
    color: var(--muted);
}

/* Tags */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.4rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--muted);
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--brand);
    color: #ffffff;
}

/* CTA Sidebar */
.sidebar-cta {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand2) 100%);
    text-align: center;
}

.sidebar-cta h4 {
    border-bottom: none;
    padding-bottom: 0;
}

.sidebar-cta p {
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
}

.sidebar-cta .btn {
    width: 100%;
    justify-content: center;
}

/* ============================================
   ARTÍCULO INDIVIDUAL (Modal/Expandido)
   ============================================ */
.article-full {
    padding: 5rem 0;
    background: #06070a;
}

.article-full-container {
    max-width: 900px;
    margin: 0 auto;
}

.article-full-header {
    text-align: center;
    margin-bottom: 3rem;
}

.article-full-header h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 1.5rem;
}

.article-full-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.9rem;
}

.article-full-image {
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
}

.article-full-content {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text);
}

.article-full-content p {
    margin-bottom: 1.5rem;
}

.article-full-content h2,
.article-full-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* ============================================
   SECCIÓN DE COMENTARIOS
   ============================================ */
.comments-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.comments-section h3 {
    margin-bottom: 2rem;
}

#disqus_thread {
    background: var(--card);
    padding: 2rem;
    border-radius: var(--radius);
}

/* ============================================
   PAGINACIÓN
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 4rem;
}

.pagination-btn {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--muted);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-btn:hover,
.pagination-btn.active {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand2) 100%);
    border-color: var(--brand);
    color: #ffffff;
}

.pagination-btn.nav-btn {
    width: auto;
    padding: 0 1rem;
    gap: 0.5rem;
}

/* ============================================
   RESPONSIVE BLOG
   ============================================ */
@media (max-width: 1024px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        position: relative;
        top: auto;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .sidebar-widget {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .hero-blog {
        height: 40vh;
        min-height: 300px;
    }

    .featured-grid {
        grid-template-columns: 1fr;
    }

    .article-card-featured:first-child {
        grid-column: span 1;
    }

    .article-card-featured:first-child .article-featured-image {
        height: 200px;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

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

    .blog-filters {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        flex-wrap: nowrap;
    }

    .filter-btn {
        flex-shrink: 0;
    }

    .article-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .article-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .article-full-meta {
        flex-direction: column;
        gap: 0.75rem;
    }

    .pagination-btn {
        width: 40px;
        height: 40px;
    }
}
