/* Blog Styles */
.blog-header {
    background: linear-gradient(135deg, rgba(183, 130, 47, 0.64) 0%, rgba(217, 172, 67, 0.62) 100%);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
    height: 60vh;
    min-height: 400px;
    max-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-header::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    background-image: 
        linear-gradient(180deg, rgba(31, 35, 40, 0.72) 0%, rgba(31, 35, 40, 0.5) 50%, rgba(217, 172, 67, 0.24) 100%),
        url('https://images.unsplash.com/photo-1460925895917-afdab827c52f?w=1200&q=80');
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-position: center 90%;
    background-size: cover;
    z-index: -2;
    will-change: transform;
    animation: parallaxZoom 25s ease-in-out infinite;
    box-shadow: inset 0 0 140px rgba(0, 0, 0, 0.55);
    opacity: 0.92;
}

@keyframes parallaxZoom {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1) contrast(1);
    }
    50% {
        transform: scale(1.08);
        filter: brightness(0.95) contrast(1.1);
    }
}

.blog-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(31, 35, 40, 0.35), rgba(31, 35, 40, 0.2));
    animation: vignetteWave 18s ease-in-out infinite;
    z-index: -1;
}

@keyframes vignetteWave {
    0%, 100% { opacity: 0.75; }
    50% { opacity: 0.92; }
}

.blog-header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 6px 16px rgba(0,0,0,0.45);
    animation: fadeInUp 1s ease-out;
}

.blog-header p {
    font-size: 1.3rem;
    margin-bottom: 0;
    opacity: 0.95;
    text-shadow: 1px 4px 12px rgba(0,0,0,0.45);
    animation: fadeInUp 1s ease-out 0.3s both;
}

.blog-header-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1.5rem;
    animation: bounce 2s infinite;
    cursor: pointer;
    z-index: 3;
    transition: opacity 0.3s ease;
    opacity: 1;
}

/* Animações para o parallax */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px;
    background: radial-gradient(circle at top, #ffffff 0%, var(--bone-50) 60%, var(--sand-100) 100%);
    position: relative;
    z-index: 1;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.blog-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid rgba(217, 172, 67, 0.14);
    position: relative;
}

.blog-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(240, 214, 139, 0) 25%, rgba(240, 214, 139, 0.22) 50%, rgba(240, 214, 139, 0) 75%);
    transform: translateX(-120%);
    transition: transform 0.6s ease;
    pointer-events: none;
    z-index: 1;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.blog-card:hover::before {
    transform: translateX(120%);
}

.blog-card-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

.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-content {
    padding: 30px;
}

.blog-card-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--slate-500);
}

.blog-card-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-card-author {
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ink-900);
    margin-bottom: 15px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-resume {
    color: var(--slate-500);
    line-height: 1.6;
    margin-bottom: 25px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gold-600);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.blog-card-link:hover {
    color: var(--copper-500);
    gap: 12px;
}

.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 60px;
}

.pagination-item {
    padding: 12px 16px;
    border: 2px solid var(--gold-600);
    color: var(--gold-600);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 48px;
    text-align: center;
}

.pagination-item:hover,
.pagination-item.active {
    background: var(--gold-600);
    color: white;
}

.pagination-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #ccc;
    color: #ccc;
}

.blog-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--slate-500);
}

.blog-empty i {
    font-size: 4rem;
    color: var(--gold-600);
    margin-bottom: 20px;
}

.blog-empty h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--ink-900);
}

.debug-info {
    background: var(--mist-100);
    padding: 15px;
    margin: 20px 0;
    border-radius: 8px;
    font-family: monospace;
}

/* Responsivo */
@media (max-width: 768px) {
    .blog-header {
        height: 50vh;
        min-height: 350px;
        max-height: 400px;
        padding: 80px 0 60px;
    }
    
    .blog-header::before {
        background: url('../images/blog/gallery/header-blog.jpg') center 30%/cover no-repeat;
        background-attachment: scroll; /* Desativa parallax em mobile para performance */
        position: absolute; /* Muda de fixed para absolute em mobile */
        height: 100%;
    }
    
    .blog-header h1 {
        font-size: 2.5rem;
    }
    
    .blog-header p {
        font-size: 1.1rem;
    }
    
    .blog-container {
        padding: 60px 20px;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .blog-card-content {
        padding: 25px;
    }
    
    .blog-card-title {
        font-size: 1.2rem;
    }
    
    .blog-pagination {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .pagination-item {
        padding: 10px 14px;
        min-width: 44px;
    }
}

@media (max-width: 480px) {
    .blog-header {
        height: 45vh;
        min-height: 300px;
        max-height: 350px;
    }
    
    .blog-header h1 {
        font-size: 2rem;
    }
    
    .blog-header p {
        font-size: 1rem;
    }
    
    .scroll-indicator {
        bottom: 20px;
        font-size: 1.2rem;
    }
    
    .blog-card-content {
        padding: 20px;
    }
}
