/* ========================================
   BLOG - ESTILOS ESPECÍFICOS
======================================== */

/* ========================================
   SEÇÃO DE PREVIEW DO BLOG (HOME)
======================================== */

.blog-preview {
    padding: 5rem 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.blog-header {
    text-align: center;
    margin-bottom: 3rem;
}

.blog-label {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 20px;
    color: #3b82f6;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.blog-header h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: #1e293b;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.blog-header p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ========================================
   CARDS DE POSTS (PREVIEW)
======================================== */

.blog-posts-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.blog-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.blog-card.featured {
    grid-column: 1 / -1;
    flex-direction: row;
    max-height: 300px;
}

.blog-image {
    position: relative;
    overflow: hidden;
    height: 200px;
    flex-shrink: 0;
}

.blog-card.featured .blog-image {
    width: 50%;
    height: auto;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: linear-gradient(45deg, #3b82f6, #60a5fa);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.blog-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card.featured .blog-content {
    width: 50%;
    justify-content: center;
    padding: 2rem;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #64748b;
}

.blog-date::before {
    content: '📅 ';
    margin-right: 0.3rem;
}

.blog-read-time::before {
    content: '⏱️ ';
    margin-right: 0.3rem;
}

.blog-content h3 {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: #1e293b;
    margin-bottom: 1rem;
    line-height: 1.3;
    flex-shrink: 0;
}

.blog-card.featured .blog-content h3 {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
}

.blog-content p {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: clamp(0.9rem, 2vw, 1rem);
    flex-grow: 1;
}

.read-more {
    color: #3b82f6;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.read-more::after {
    content: '→';
    transition: transform 0.3s ease;
}

.read-more:hover {
    color: #1d4ed8;
    gap: 0.8rem;
}

.read-more:hover::after {
    transform: translateX(5px);
}

.blog-cta {
    text-align: center;
}

.cta-button-secondary {
    background: transparent;
    color: #3b82f6;
    padding: 1rem 2rem;
    border: 2px solid #3b82f6;
    border-radius: 50px;
    font-size: clamp(1rem, 2vw, 1.1rem);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
}

.cta-button-secondary:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

/* ========================================
   PÁGINA PRINCIPAL DO BLOG
======================================== */

.blog-page {
    min-height: 100vh;
    background: #f8fafc;
}

.blog-hero {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 8rem 1rem 4rem;
    text-align: center;
}

.blog-hero h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.blog-hero p {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ========================================
   BUSCA E FILTROS DO BLOG
======================================== */

.blog-filters {
    background: white;
    padding: 2rem 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 80px;
    z-index: 100;
}

.blog-filters .container {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    align-items: center;
}

.search-container {
    position: relative;
    flex-grow: 1;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-input::placeholder {
    color: #94a3b8;
}

.search-icon {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 1rem;
}

.category-filter {
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    background: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.category-filter:hover,
.category-filter:focus {
    border-color: #3b82f6;
    outline: none;
}

.sort-filter {
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    background: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.sort-filter:hover,
.sort-filter:focus {
    border-color: #3b82f6;
    outline: none;
}

/* ========================================
   LISTA DE POSTS DO BLOG
======================================== */

.blog-content {
    padding: 3rem 1rem;
}

.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.blog-post-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.blog-post-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.blog-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-post-card:hover .blog-post-image img {
    transform: scale(1.05);
}

.blog-post-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: linear-gradient(45deg, #3b82f6, #60a5fa);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.blog-post-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-post-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #64748b;
}

.blog-post-title {
    font-size: 1.3rem;
    color: #1e293b;
    margin-bottom: 1rem;
    line-height: 1.3;
    font-weight: 600;
}

.blog-post-excerpt {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    flex-grow: 1;
}

.blog-post-link {
    color: #3b82f6;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.blog-post-link::after {
    content: '→';
    transition: transform 0.3s ease;
}

.blog-post-link:hover {
    color: #1d4ed8;
    gap: 0.8rem;
}

.blog-post-link:hover::after {
    transform: translateX(5px);
}

/* ========================================
   PAGINAÇÃO (movida para seção própria)
======================================== */

.blog-pagination-section {
    padding: 3rem 1rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.pagination-btn {
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    background: white;
    color: #64748b;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: 500;
    min-width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
}

.pagination-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-ellipsis {
    padding: 0.75rem;
    color: #94a3b8;
}

/* ========================================
   PÁGINA INDIVIDUAL DO POST
======================================== */

.post-page {
    min-height: 100vh;
    background: #f8fafc;
}

.post-hero {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 8rem 1rem 3rem;
}

.post-hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.post-category-badge {
    display: inline-block;
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.post-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: bold;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.post-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
}

.post-excerpt {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   CONTEÚDO DO POST
======================================== */

.post-content {
    padding: 4rem 1rem;
}

.post-container {
    max-width: 800px;
    margin: 0 auto;
}

.post-image {
    width: 100%;
    max-width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.post-body {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    line-height: 1.7;
    font-size: 1.1rem;
    color: #374151;
}

.post-body h2 {
    font-size: 1.8rem;
    color: #1e293b;
    margin: 2rem 0 1rem;
    font-weight: 600;
}

.post-body h3 {
    font-size: 1.4rem;
    color: #1e293b;
    margin: 1.5rem 0 0.8rem;
    font-weight: 600;
}

.post-body p {
    margin-bottom: 1.5rem;
}

.post-body ul, .post-body ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.post-body li {
    margin-bottom: 0.5rem;
}

.post-body blockquote {
    border-left: 4px solid #3b82f6;
    padding: 1rem 1.5rem;
    background: #f1f5f9;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.post-body code {
    background: #f1f5f9;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #dc2626;
}

.post-body pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
}

.post-body pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* ========================================
   NAVEGAÇÃO ENTRE POSTS
======================================== */

.post-navigation {
    background: white;
    padding: 2rem;
    margin-top: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.nav-posts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.nav-post {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    padding: 1rem;
    border-radius: 10px;
    border: 2px solid transparent;
}

.nav-post:hover {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
}

.nav-post-label {
    font-size: 0.8rem;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
}

.nav-post-title {
    font-size: 1.1rem;
    color: #1e293b;
    margin-top: 0.5rem;
    font-weight: 500;
}

.nav-post.prev .nav-post-label::before {
    content: '← ';
}

.nav-post.next .nav-post-label::after {
    content: ' →';
}

.nav-post.next {
    text-align: right;
}

/* ========================================
   ESTADOS DE CARREGAMENTO E VAZIO
======================================== */

.blog-loading {
    text-align: center;
    padding: 3rem;
    color: #64748b;
}

.blog-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.blog-empty {
    text-align: center;
    padding: 4rem 1rem;
    color: #64748b;
}

.blog-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.blog-empty h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #374151;
}

.blog-empty p {
    font-size: 1rem;
    line-height: 1.6;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   BREADCRUMBS
======================================== */

.breadcrumbs {
    padding: 1rem 1rem 0;
    background: #f8fafc;
}

.breadcrumbs-container {
    max-width: 1200px;
    margin: 0 auto;
}

.breadcrumb-list {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.9rem;
    color: #64748b;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
    content: '/';
    margin: 0 0.5rem;
    color: #94a3b8;
}

.breadcrumb-link {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-link:hover {
    color: #1d4ed8;
}

.breadcrumb-current {
    color: #374151;
}

/* ========================================
   TAGS DO POST
======================================== */

.post-tags {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.post-tags h4 {
    font-size: 1rem;
    color: #374151;
    margin-bottom: 1rem;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag:hover {
    background: #3b82f6;
    color: white;
}

/* ========================================
   COMPARTILHAMENTO SOCIAL
======================================== */

.social-share {
    background: white;
    padding: 2rem;
    margin-top: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.social-share h4 {
    font-size: 1.1rem;
    color: #374151;
    margin-bottom: 1rem;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.share-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.share-btn.linkedin {
    background: #0077b5;
}

.share-btn.twitter {
    background: #1da1f2;
}

.share-btn.facebook {
    background: #4267b2;
}

.share-btn.whatsapp {
    background: #25d366;
}

/* ========================================
   ESTADOS DE CARREGAMENTO E VAZIO
======================================== */

.blog-loading {
    text-align: center;
    padding: 3rem;
    color: #64748b;
}

.blog-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.blog-empty {
    text-align: center;
    padding: 4rem 1rem;
    color: #64748b;
    grid-column: 1 / -1;
}

.blog-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.blog-empty h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #374151;
}

.blog-empty p {
    font-size: 1rem;
    line-height: 1.6;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   ANIMAÇÕES BÁSICAS
======================================== */

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-post-card.reveal-active {
    animation: slideInUp 0.6s ease forwards;
}

@media (max-width: 768px) {
    .blog-posts-preview {
        grid-template-columns: 1fr;
    }

    .blog-card.featured {
        flex-direction: column;
        max-height: none;
    }

    .blog-card.featured .blog-image {
        width: 100%;
        height: 200px;
    }

    .blog-card.featured .blog-content {
        width: 100%;
        padding: 1.5rem;
    }

    .blog-filters .container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .blog-posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .nav-posts {
        grid-template-columns: 1fr;
    }

    .nav-post.next {
        text-align: left;
    }

    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .share-buttons {
        flex-wrap: wrap;
    }

    .blog-hero {
        padding: 6rem 1rem 3rem;
    }

    .post-content {
        padding: 2rem 1rem;
    }

    .post-body {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .blog-posts-grid {
        grid-template-columns: 1fr;
    }

    .blog-filters {
        position: static;
    }

    .blog-pagination {
        flex-wrap: wrap;
        gap: 0.3rem;
    }

    .pagination-btn {
        padding: 0.5rem 0.8rem;
        min-width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .post-body {
        padding: 1.5rem;
    }

    .social-share {
        padding: 1.5rem;
    }

    .share-buttons {
        gap: 0.8rem;
    }

    .share-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}