/**
 * MiComercio - Blog Styles
 * Incluye sidebar con scroll interno
 */

/* ==================== 
   BLOG HERO 
   ==================== */
.blog-hero {
    background: linear-gradient(135deg, var(--mc-dark) 0%, var(--mc-dark-soft) 100%);
    padding: 60px 0 50px;
    text-align: center;
}

.blog-hero h1 {
    color: var(--mc-white);
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-family: var(--font-display);
}

.blog-hero p {
    color: rgba(255,255,255,0.85);
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ==================== 
   BLOG LAYOUT 
   ==================== */
.blog-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
}

/* ==================== 
   MAIN CONTENT 
   ==================== */
.blog-main {
    min-width: 0;
}

.section-title-blog {
    font-size: 1.5rem;
    color: var(--mc-gray-700);
    margin: 40px 0 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--mc-gray-200);
}

/* Featured Article */
.featured-article {
    background: var(--mc-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 40px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.featured-article:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.featured-article a {
    text-decoration: none;
    color: inherit;
    display: block;
}

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

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

.featured-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--mc-orange);
    color: var(--mc-white);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
}

.featured-content {
    padding: 25px 30px 30px;
}

.featured-content h2 {
    font-size: 1.6rem;
    color: var(--mc-gray-700);
    margin: 10px 0 15px;
    line-height: 1.3;
}

.featured-content p {
    color: var(--mc-gray-600);
    margin-bottom: 15px;
    line-height: 1.6;
}

/* Article Category */
.article-category {
    display: inline-block;
    background: var(--mc-orange-subtle);
    color: var(--mc-orange);
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.article-category.small {
    font-size: 0.7rem;
    padding: 3px 10px;
}

/* Article Meta */
.article-meta {
    display: flex;
    gap: 20px;
    color: var(--mc-gray-500);
    font-size: 0.9rem;
}

.article-meta.small {
    font-size: 0.8rem;
    gap: 15px;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.article-card {
    background: var(--mc-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s, box-shadow 0.3s;
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.article-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

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

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

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

.article-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1rem;
}

.article-content {
    padding: 18px;
}

.article-content h3 {
    font-size: 1rem;
    color: var(--mc-gray-700);
    margin: 8px 0 10px;
    line-height: 1.35;
}

.article-content p {
    color: var(--mc-gray-600);
    font-size: 0.85rem;
    margin-bottom: 12px;
    line-height: 1.5;
}

/* ==================== 
   SIDEBAR 
   ==================== */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-widget {
    background: var(--mc-white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.sidebar-widget h3 {
    font-size: 1.1rem;
    color: var(--mc-gray-700);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--mc-orange);
}

/* SIDEBAR: Articles Navigation with Scroll */
.articles-nav-widget {
    position: sticky;
    top: calc(var(--header-height) + 20px);
}

.articles-scroll-container {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
    
    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--mc-orange) var(--mc-gray-100);
}

.articles-scroll-container::-webkit-scrollbar {
    width: 6px;
}

.articles-scroll-container::-webkit-scrollbar-track {
    background: var(--mc-gray-100);
    border-radius: 3px;
}

.articles-scroll-container::-webkit-scrollbar-thumb {
    background: var(--mc-orange);
    border-radius: 3px;
}

.articles-scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--mc-orange-dark);
}

.articles-section {
    margin-bottom: 20px;
}

.articles-section:last-child {
    margin-bottom: 0;
}

.articles-section-title {
    font-size: 0.85rem;
    color: var(--mc-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    font-weight: 600;
}

.articles-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.articles-list li {
    margin-bottom: 8px;
}

.article-link {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--mc-gray-600);
    font-size: 0.85rem;
    line-height: 1.4;
    transition: all 0.2s;
}

.article-link:hover {
    background: var(--mc-orange-subtle);
    color: var(--mc-orange);
}

.article-link .star {
    flex-shrink: 0;
    font-size: 0.75rem;
}

.article-link .article-title {
    flex: 1;
}

.article-link .article-time {
    flex-shrink: 0;
    font-size: 0.75rem;
    color: var(--mc-gray-400);
}

/* Upcoming articles */
.articles-section.upcoming .articles-list li {
    color: var(--mc-gray-400);
    font-size: 0.8rem;
    padding: 6px 10px;
    font-style: italic;
}

.upcoming-article .article-title {
    color: var(--mc-gray-400);
}

/* Categories List */
.categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.categories-list li {
    margin-bottom: 8px;
}

.categories-list a {
    display: block;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--mc-gray-600);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.categories-list a:hover {
    background: var(--mc-orange-subtle);
    color: var(--mc-orange);
}

/* CTA Widget */
.cta-widget {
    background: linear-gradient(135deg, var(--mc-dark) 0%, var(--mc-dark-soft) 100%);
    color: var(--mc-white);
}

.cta-widget h3 {
    color: var(--mc-orange);
    border-bottom-color: rgba(255,255,255,0.2);
}

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

.cta-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

.cta-benefits li {
    color: rgba(255,255,255,0.85);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.cta-button {
    display: block;
    background: var(--mc-orange);
    color: var(--mc-white);
    text-align: center;
    padding: 12px 20px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.cta-button:hover {
    background: var(--mc-orange-dark);
    transform: translateY(-2px);
}

/* ==================== 
   CARDS SIN IMAGEN 
   ==================== */
.featured-article.no-image {
    background: linear-gradient(135deg, var(--mc-dark) 0%, var(--mc-dark-soft) 100%);
}

.featured-article.no-image .featured-content {
    padding: 30px 35px;
}

.featured-article.no-image .featured-badge {
    position: static;
    display: inline-block;
    margin-bottom: 12px;
}

.featured-article.no-image h2 {
    color: var(--mc-white);
    font-size: 1.8rem;
}

.featured-article.no-image p {
    color: rgba(255,255,255,0.85);
}

.featured-article.no-image .article-category {
    background: rgba(255,102,0,0.2);
    color: var(--mc-orange);
}

.featured-article.no-image .article-meta {
    color: rgba(255,255,255,0.7);
}

/* Article Cards sin imagen */
.article-card.no-image {
    border-left: 4px solid var(--mc-orange);
}

.article-card.no-image .article-content {
    padding: 20px 22px;
    position: relative;
}

.article-card.no-image .article-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 0.9rem;
}

.article-card.no-image h3 {
    font-size: 1.05rem;
    margin: 5px 0 12px;
    padding-right: 25px;
}

.article-card.no-image p {
    font-size: 0.9rem;
    margin-bottom: 15px;
}

/* ==================== 
   RESPONSIVE 
   ==================== */
@media (max-width: 968px) {
    .blog-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .blog-sidebar {
        order: -1;
    }
    
    .articles-nav-widget {
        position: static;
    }
    
    .articles-scroll-container {
        max-height: 250px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-image {
        height: 200px;
    }
    
    .blog-hero h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .blog-hero {
        padding: 40px 0 35px;
    }
    
    .blog-hero h1 {
        font-size: 1.75rem;
    }
    
    .featured-content {
        padding: 20px;
    }
    
    .featured-content h2 {
        font-size: 1.3rem;
    }
}
