/* ===== RELATED NEWS COMPONENT STYLES ===== */
/* Arquivo CSS específico para o componente de Notícias Relacionadas */
/* Seguindo padrões visuais da Meelion */

.related-news-section {
    padding: 1.5rem 0;
    background-color: #f8f9fa;
}

.related-news-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    padding: 2rem;
    margin-bottom: 2rem;
}

.related-news-header {
    margin-bottom: 2rem;
}

.related-news-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #004475;
    margin-bottom: 0.5rem;
    font-family: 'Montserrat', sans-serif;
}

.related-news-title i {
    color: #004475;
    font-size: 1.25rem;
}

.related-news-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.news-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 0 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #C3F53C #f1f5f9;
    align-items: stretch; /* Garante que todos os cards tenham a mesma altura */
}

/* Scrollbar customizada para webkit */
.news-grid::-webkit-scrollbar {
    height: 6px;
}

.news-grid::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.news-grid::-webkit-scrollbar-thumb {
    background: #C3F53C;
    border-radius: 3px;
}

.news-grid::-webkit-scrollbar-thumb:hover {
    background: #b8f029;
}

@media (min-width: 768px) {
    .news-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        overflow-x: visible;
        scroll-snap-type: none;
        padding: 0;
        align-items: stretch; /* Mantém altura uniforme no grid */
    }
}

.news-card {
    background: white;
    border: 1px solid rgba(229, 231, 235, 0.5);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    min-width: 280px;
    flex-shrink: 0;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    height: 100%; /* Garante que o card ocupe toda a altura disponível */
    min-height: 250px;
    user-select: none; /* Evita seleção de texto ao clicar */
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

@media (min-width: 768px) {
    .news-card {
        min-width: auto;
        flex-shrink: 1;
        scroll-snap-align: none;
        height: 100%; /* Mantém altura uniforme no desktop */
    }
}

.news-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    border-color: #004475;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.news-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Cores específicas para cada tipo de badge */
.news-badge-market {
    background-color: #dbeafe !important;
    color: #1d4ed8 !important;
}

.news-badge-education {
    background-color: #fed7aa !important;
    color: #ea580c !important;
}

.news-badge-analysis {
    background-color: #dcfce7 !important;
    color: #16a34a !important;
}

.news-badge-wordpress {
    background-color: #e0f2fe !important;
    color: #0277bd !important;
}

.news-badge-category {
    background-color: #f3f4f6 !important;
    color: #374151 !important;
}

.news-badge-meelion {
    background-color: #e3f2fd !important;
    color: #004475 !important;
}

.news-time {
    font-size: 0.75rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.news-time::before {
    content: '•';
    color: #d1d5db;
}

.news-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin: 0.75rem 0 0.5rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.news-description {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.news-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto; /* Empurra o footer para o final do card */
}

.news-date {
    font-size: 0.75rem;
    color: #9ca3af;
}

.news-link-icon {
    color: #004475;
    font-size: 0.875rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.news-link-icon:hover {
    color: #2E6C86;
}

.news-more-button-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

/* Botão Ver Mais Notícias - Cores da Meelion */
.btn-news-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: #C3F53C !important; /* Verde-limão oficial Meelion */
    border: 1px solid #C3F53C !important;
    border-radius: 0.5rem;
    color: #004475 !important; /* Azul-escuro oficial Meelion */
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: 'Montserrat', sans-serif;
}

.btn-news-more:hover {
    background-color: #b8f029 !important; /* Verde-limão mais escuro no hover */
    border-color: #b8f029 !important;
    color: #003366 !important; /* Azul ainda mais escuro no hover */
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(195, 245, 60, 0.3);
    transform: translateY(-1px);
}

.btn-news-more i {
    font-size: 0.75rem;
    color: inherit;
}

/* Responsividade para mobile */
@media (max-width: 767px) {
    .related-news-card {
        padding: 1.5rem;
        margin: 0 1rem 2rem 1rem;
        border-radius: 0.75rem;
    }
    
    .related-news-title {
        font-size: 1.25rem;
    }
    
    .news-card {
        padding: 1rem; /* Reduzido o padding interno */
        min-width: 220px; /* Reduzido ainda mais para melhor ajuste */
        max-width: calc(100vw - 3rem); /* Reduzido a margem lateral */
        width: calc(100vw - 3rem); /* Força o card a usar toda a largura disponível */
    }
    
    .news-grid {
        gap: 0.75rem; /* Reduzido o gap entre cards */
        padding: 0 0.25rem; /* Reduzido ainda mais o padding lateral */
        overflow-x: auto;
        scroll-snap-type: x mandatory;
    }
    
    .news-title {
        font-size: 0.9rem; /* Reduzido um pouco mais */
        line-height: 1.25; /* Reduzido o line-height */
        -webkit-line-clamp: 4; /* Aumentado para permitir mais linhas */
        margin: 0.5rem 0 0.25rem 0; /* Reduzido as margens */
    }
    
    .news-description {
        font-size: 0.75rem; /* Reduzido um pouco mais */
        line-height: 1.3; /* Reduzido o line-height */
        -webkit-line-clamp: 5; /* Aumentado para permitir mais linhas */
        margin-bottom: 0.75rem; /* Reduzido a margem inferior */
    }
    
    .btn-news-more {
        padding: 0.875rem 1.25rem;
        font-size: 0.8rem;
    }
}

/* Estados de foco para acessibilidade */
.news-card:focus {
    outline: 2px solid #C3F53C;
    outline-offset: 2px;
}

.btn-news-more:focus {
    outline: 2px solid #004475;
    outline-offset: 2px;
}

/* Animações suaves */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-card {
    animation: fadeInUp 0.3s ease-out;
}

.news-card:nth-child(1) { 
    animation-delay: 0.1s; 
}
.news-card:nth-child(2) { 
    animation-delay: 0.2s; 
}
.news-card:nth-child(3) { 
    animation-delay: 0.3s; 
}