/* ===== BLOG MODERNO - PANADERÍA TRUBIA ===== */

:root {
    --blog-primary: #8B5A2B;
    --blog-secondary: #D6AD60;
    --blog-accent: #88502B;
    --blog-text: #2D3748;
    --blog-text-light: #718096;
    --blog-bg: #FAFAFA;
    --blog-card-bg: #FFFFFF;
    --blog-border: #E2E8F0;
    --blog-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --blog-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --blog-gradient: linear-gradient(135deg, var(--blog-primary) 0%, var(--blog-secondary) 50%, var(--blog-accent) 100%);
}

/* ===== TIPOGRAFÍA ===== */
.blog-modern {
    font-family: 'Inter', sans-serif;
    background-color: var(--blog-bg);
    color: var(--blog-text);
    line-height: 1.6;
}

.blog-title {
    font-family: 'Playfair Display', serif;
    font-weight: 800;
}

/* ===== HERO SECTION ===== */
.blog-hero {
    background: var(--blog-gradient);
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
    color: white;
}

.hero-stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    font-family: 'Playfair Display', serif;
}

.hero-stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== FILTROS AVANZADOS ===== */
.filters-section {
    background: var(--blog-card-bg);
    border-bottom: 1px solid var(--blog-border);
    padding: 2rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.filter-group {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--blog-border);
    background: var(--blog-card-bg);
    color: var(--blog-text);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-btn:hover, 
.filter-btn.active {
    background: var(--blog-primary);
    color: white;
    border-color: var(--blog-primary);
    transform: translateY(-2px);
}

.search-box {
    position: relative;
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid var(--blog-border);
    border-radius: 50px;
    background: var(--blog-card-bg);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--blog-primary);
    box-shadow: 0 0 0 3px rgba(139, 90, 43, 0.1);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--blog-text-light);
}

/* ===== GRID DE BLOG ===== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.blog-card {
    background: var(--blog-card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--blog-shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--blog-border);
    position: relative;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--blog-shadow-lg);
}

.blog-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

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

.blog-card-overlay {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.blog-card-category {
    background: rgba(139, 90, 43, 0.9);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-card-time {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.blog-card-content {
    padding: 1.5rem;
}

.blog-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--blog-text);
    margin-bottom: 0.75rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-excerpt {
    color: var(--blog-text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--blog-text-light);
}

.blog-card-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-card-read {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ===== SECCIÓN DESTACADOS ===== */
.featured-section {
    margin: 4rem 0;
}

.featured-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1.5rem;
    height: 400px;
}

.featured-main {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--blog-shadow-lg);
}

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

.featured-main-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 2rem;
    color: white;
}

.featured-main-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.featured-main-excerpt {
    font-size: 0.95rem;
    opacity: 0.9;
}

.featured-side {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.featured-side-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--blog-shadow);
    flex: 1;
}

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

.featured-side-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    padding: 1rem;
    color: white;
}

.featured-side-title {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: sticky;
    top: 120px;
}

.sidebar-widget {
    background: var(--blog-card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--blog-shadow);
    border: 1px solid var(--blog-border);
}

.widget-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--blog-text);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.category-item {
    margin-bottom: 0.75rem;
}

.category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--blog-bg);
    border-radius: 8px;
    color: var(--blog-text);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.category-link:hover {
    background: var(--blog-primary);
    color: white;
    transform: translateX(5px);
}

.category-count {
    background: var(--blog-secondary);
    color: var(--blog-primary);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.recent-post {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--blog-border);
}

.recent-post:last-child {
    border-bottom: none;
}

.recent-post-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

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

.recent-post-content h6 {
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.recent-post-content small {
    color: var(--blog-text-light);
    font-size: 0.8rem;
}

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

.tag {
    background: var(--blog-bg);
    color: var(--blog-text);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid var(--blog-border);
}

.tag:hover {
    background: var(--blog-primary);
    color: white;
    transform: translateY(-2px);
}

/* ===== PAGINACIÓN ===== */
.pagination-custom {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 3rem 0;
}

.page-link-custom {
    padding: 0.75rem 1rem;
    border: 2px solid var(--blog-border);
    background: var(--blog-card-bg);
    color: var(--blog-text);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.page-link-custom:hover, 
.page-link-custom.active {
    background: var(--blog-primary);
    color: white;
    border-color: var(--blog-primary);
}

/* ===== ESTADO VACÍO ===== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--blog-text-light);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* ===== NEWSLETTER ===== */
.newsletter-section {
    background: var(--blog-gradient);
    padding: 4rem 0;
    margin-top: 4rem;
}

.newsletter-content {
    text-align: center;
    color: white;
}

.newsletter-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.newsletter-form {
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-input {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    width: 100%;
    margin-bottom: 1rem;
}

.newsletter-btn {
    background: white;
    color: var(--blog-primary);
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.newsletter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .hero-stats {
        gap: 1rem;
    }
    
    .hero-stat-number {
        font-size: 2rem;
    }
    
    .filters-section {
        padding: 1rem 0;
    }
    
    .filter-group {
        justify-content: center;
    }
    
    .search-box {
        max-width: 100%;
        margin-top: 1rem;
    }
}

@media (max-width: 576px) {
    .blog-card {
        margin: 0 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .newsletter-title {
        font-size: 2rem;
    }
}

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

.blog-card {
    animation: fadeInUp 0.6s ease-out;
}

.blog-card:nth-child(2) { 
    animation-delay: 0.1s; 
}

.blog-card:nth-child(3) { 
    animation-delay: 0.2s; 
}

.blog-card:nth-child(4) { 
    animation-delay: 0.3s; 
}

.blog-card:nth-child(5) { 
    animation-delay: 0.4s; 
}

.blog-card:nth-child(6) { 
    animation-delay: 0.5s; 
}

/* ===== EFECTOS HOVER ===== */
.blog-card:hover .blog-card-title {
    color: var(--blog-primary);
}

.filter-btn:hover {
    box-shadow: 0 4px 12px rgba(139, 90, 43, 0.3);
}

.tag:hover {
    box-shadow: 0 4px 12px rgba(139, 90, 43, 0.3);
}

/* ===== LOADING STATES ===== */
.blog-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

.blog-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--blog-border);
    border-top: 2px solid var(--blog-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { 
        transform: rotate(0deg); 
    }
    100% { 
        transform: rotate(360deg); 
    }
} 