/* ============================================
   BLOCO DE NOTÍCIAS - CSS NOVO E LIMPO
   ============================================ */

/* Reset específico para o bloco */
.news-block-container * {
    box-sizing: border-box;
}

.news-block-container {
    width: 100%;
    margin: 20px 0;
    padding: 0 15px;
    font-family: 'Inter', Arial, sans-serif;
}

/* Estilos para página de teste */
.test-page-wrapper {
    max-width: 1200px;
    margin: 50px auto;
    padding: 20px;
    font-family: 'Inter', Arial, sans-serif;
}

.test-page-title {
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 700;
    color: #333;
}

@media (max-width: 768px) {
    .test-page-wrapper {
        padding: 16px;
        margin: 20px auto;
    }
    
    .test-page-title {
        font-size: 22px;
        margin-bottom: 20px;
    }
}

.news-block-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 100%;
}

/* ============================================
   CARROSSEL DE NOTÍCIAS EM DESTAQUE
   ============================================ */
.news-featured-carousel {
    position: relative;
    height: 450px;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.news-featured-carousel:active {
    cursor: grabbing;
}

.news-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.7s ease-in-out;
    pointer-events: none;
    z-index: 1;
}

.news-carousel-badge {
    display: none; /* Oculto por padrão (desktop) */
}

/* Badge visível apenas no mobile */
@media (max-width: 1023px) {
    .news-carousel-badge {
        display: flex;
        position: absolute;
        top: 12px;
        right: 12px;
        z-index: 10;
        background: rgba(0, 0, 0, 0.75);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border-radius: 6px;
        padding: 6px 10px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-width: 45px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .news-badge-day {
        font-size: 18px;
        font-weight: 700;
        color: #fff;
        line-height: 1;
        margin-bottom: 2px;
    }
    
    .news-badge-month {
        font-size: 9px;
        font-weight: 600;
        color: #fff;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        line-height: 1;
        opacity: 0.9;
    }
}

.news-carousel-link {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.news-carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

.news-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-carousel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, 
    rgba(0, 0, 0, 0) 0%, 
    rgba(0, 0, 0, 0) 50%,        /* 60% transparente */
    rgba(0, 0, 0, 0.7) 60%,      /* Já escurece bastante em 10% */
    rgba(0, 0, 0, 0.85) 85%,     /* Muito escuro */
    rgba(0, 0, 0, 0.98) 100%     /* Quase preto total */
    );
    padding: 16px 20px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

@media (min-width: 768px) {
    .news-carousel-overlay {
        padding: 24px 28px;
    }
}

.news-carousel-title {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    padding: 2px 4px;
    line-height: 1.25;
    line-clamp: 2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
    top: 4px;
}

@media (min-width: 768px) {
    .news-carousel-title {
        font-size: 24px;
    }
}

@media (min-width: 1024px) {
    .news-carousel-title {
        font-size: 28px;
    }
}

.news-carousel-description {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    padding: 0;
    line-height: 1.4;
    line-clamp: 2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.3s, background 0.3s;
    z-index: 10;
}

.news-featured-carousel:hover .news-carousel-nav {
    opacity: 1;
}

.news-carousel-nav:hover {
    background: rgba(0, 0, 0, 0.7);
}

.news-carousel-nav.prev {
    left: 15px;
}

.news-carousel-nav.next {
    right: 15px;
}

.news-carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.news-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s;
}

.news-carousel-dot.active {
    background: #fff;
    width: 32px;
    border-radius: 4px;
}

/* ============================================
   LISTA DE ÚLTIMAS NOTÍCIAS
   ============================================ */
.news-latest-list {
    background: #fff;
    border-radius: 8px;
    padding: 18px 20px;
    height: 450px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.news-latest-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 8px 0;
    padding: 0 0 10px 0;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.news-latest-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin: 0;
    padding: 0;
}

.news-latest-title h3 {
    margin: 0;
    padding: 0;
    font-size: 20px;
    font-weight: bold;
    display: inline;
}

.news-latest-title i {
    color: #0066cc;
    font-size: 18px;
}

.news-latest-more {
    font-size: 13px;
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.news-latest-more:hover {
    color: #0066cc;
}

.news-latest-items {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

.news-latest-item {
    padding: 14px 0;
    margin: 0;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
    text-decoration: none;
    display: block;
}

.news-latest-item:first-child {
    padding-top: 10px;
}

.news-latest-item:last-child {
    border-bottom: none;
    padding-bottom: 10px;
}

.news-latest-item:hover {
    background: #f8f8f8;
    border-radius: 4px;
    padding-left: 8px;
    padding-right: 8px;
    margin-left: -8px;
    margin-right: -8px;
}

.news-latest-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 3px 0;
    padding: 0;
    line-height: 1.35;
    line-clamp: 2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.news-latest-item:hover .news-latest-item-title {
    color: #0066cc;
}

.news-latest-item-date {
    font-size: 12px;
    color: #999;
    display: block;
    margin: 0;
    padding: 0;
    line-height: 1.2;
}

/* Scrollbar personalizada */
.news-latest-items::-webkit-scrollbar {
    width: 6px;
}

.news-latest-items::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.news-latest-items::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.news-latest-items::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* ============================================
   VERSÃO MOBILE
   ============================================ */
.news-block-mobile {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.news-mobile-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0;
    padding: 0;
}

.news-mobile-title h3 {
    margin: 0;
    padding: 0;
    font-size: 20px;
    font-weight: 700;
    display: inline;
}

.news-mobile-title i {
    color: #0066cc;
    font-size: 18px;
}

.news-featured-carousel-mobile {
    height: 250px;
}

/* Descrição oculta no mobile */
@media (max-width: 1023px) {
    .news-carousel-description-mobile {
        display: none;
    }
}

@media (min-width: 1024px) {
    .news-carousel-description-mobile {
        display: block;
    }
}

.news-mobile-more {
    display: block;
    text-align: center;
    font-size: 14px;
    color: #737373;
    text-decoration: none;
    padding: 8px 0;
    transition: color 0.2s;
}

.news-mobile-more:hover {
    color: #0066cc;
}

/* Versão Desktop - ocultar mobile */
@media (min-width: 1024px) {
    .news-block-mobile {
        display: none;
    }
    
    .news-block-wrapper {
        display: grid;
    }
}

/* Versão Mobile - ocultar desktop */
@media (max-width: 1023px) {
    .news-block-wrapper {
        display: none;
    }
    
    .news-block-mobile {
        display: flex;
    }
}

/* ============================================
   RESPONSIVE - AJUSTES ADICIONAIS
   ============================================ */
@media (max-width: 992px) {
    .news-featured-carousel-mobile {
        height: 250px;
    }
    
    .news-carousel-title {
        font-size: 18px;
    }
    
    .news-carousel-overlay {
        padding: 16px;
    }
    
    .news-carousel-dots {
        bottom: 8px;
    }
}

@media (max-width: 768px) {
    .news-block-container {
        padding: 0 12px;
    }
    
    .news-featured-carousel-mobile {
        height: 220px;
    }
    
    .news-carousel-title {
        font-size: 16px;
    }
    
    .news-carousel-overlay {
        padding: 12px;
    }
    
    .news-mobile-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .news-block-container {
        padding: 0 10px;
    }
    
    .news-featured-carousel-mobile {
        height: 200px;
    }
    
    .news-carousel-title {
        font-size: 15px;
    }
    
    .news-carousel-overlay {
        padding: 10px;
    }
    
    .news-mobile-title {
        font-size: 16px;
    }
}