/* ============================================
   ANIMAÇÕES E EFEITOS PARA CORPO.PHP
   ============================================ */

/* Animação de Hover nos Cards */
.news-card-hover {
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
}

.news-card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15) !important;
}

/* Zoom na Imagem */
.news-img-zoom {
    transition: transform 0.5s ease;
}

.news-card-hover:hover .news-img-zoom {
    transform: scale(1.08);
}

/* Container de Imagem com Overflow */
.news-img-container {
    overflow: hidden;
}

/* Animações de Entrada (Fade In Up) */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-section .col-12,
.news-section .col-lg-5,
.news-section .col-lg-3,
.news-section .col-lg-4,
.news-section .col-md-3,
.news-section .col-md-6 {
    animation: fadeInUp 0.6s ease-out forwards;
    animation-delay: var(--animation-delay, 0s);
}

/* Delay para cada coluna */
.news-section .col-12:nth-child(1) { --animation-delay: 0.1s; }
.news-section .col-12:nth-child(2),
.news-section .col-lg-5:nth-child(1) { --animation-delay: 0.2s; }
.news-section .col-12:nth-child(3),
.news-section .col-lg-3:nth-child(2) { --animation-delay: 0.3s; }
.news-section .col-12:nth-child(4),
.news-section .col-lg-4:nth-child(3) { --animation-delay: 0.4s; }
.news-section .col-md-3:nth-child(1) { --animation-delay: 0.1s; }
.news-section .col-md-3:nth-child(2) { --animation-delay: 0.2s; }
.news-section .col-md-3:nth-child(3) { --animation-delay: 0.3s; }
.news-section .col-md-3:nth-child(4) { --animation-delay: 0.4s; }

/* Badges com Animação */
.badge-politica,
.badge-secondary {
    transition: all 0.3s ease;
    display: inline-block;
}

.news-card-hover:hover .badge-politica,
.news-card-hover:hover .badge-secondary {
    transform: translateX(5px);
}

/* Card Politica - Principal */
.card-politica {
    overflow: hidden;
    background: #fff;
    transition: all 0.4s ease;
}
 

/* Card Secondary */
.card-secondary {
    background: #fff; 
    transition: all 0.3s ease;
}
 

/* Responsividade - Mobile First */
@media (max-width: 576px) {
    .news-card-hover:hover {
        transform: translateY(-4px);
    }

    .news-img-container {
        width: 120px !important;
        height: 120px !important;
    }
}

@media (max-width: 768px) {
    .card-politica h3 {
        font-size: 1.25rem !important;
    }

    .fs-7 {
        font-size: 0.85rem !important;
    }
}

/* Grid de 4 Colunas Melhorado */
.row.g-3 {
    row-gap: 1rem !important;
    column-gap: 1rem !important;
}

.row.g-md-4 {
    row-gap: 1.5rem !important;
    column-gap: 1.5rem !important;
}

@media (min-width: 768px) {
    .row.g-md-4 {
        row-gap: 2rem !important;
        column-gap: 1.5rem !important;
    }
}

/* Seções com Títulos Coloridos */
.text-news-1, .text-news-2, .text-news-3, .text-news-4 {
    transition: color 0.3s ease;
}

.bg-news-1, .bg-news-2, .bg-news-3, .bg-news-4 {
    transition: all 0.3s ease;
}

 

/* Mais Lidas - Numeração Animada */
.fs-2.text-warning {
    transition: all 0.3s ease;
}

a:hover .fs-2.text-warning {
    transform: scale(1.1);
    display: inline-block;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Loading State (opcional) */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.loading-shimmer {
    animation: shimmer 2s infinite;
    background: linear-gradient(to right, #f6f7f8 0%, #edeef1 20%, #f6f7f8 40%, #f6f7f8 100%);
    background-size: 1000px 100%;
}

/* Container Principal */
.container-sm {
    max-width: 1200px;
}

/* Espaçamento Consistente */
.py-4 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}

.py-md-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

/* Sombras Suaves */
.shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.shadow-sm:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12) !important;
}

/* ============================================
   LIMITADOR DE TÍTULOS - SEÇÃO DE CATEGORIAS
   ============================================ */

/* Container dos cards de notícias */
.news-item-card {
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

/* Altura mínima apenas em desktop */
@media (min-width: 768px) {
    .news-item-card { 
        min-height: 250px; /* Altura mínima para alinhar todos os cards */
    }
}

/* Limitador de títulos - máximo 3 linhas */
.news-title-limiter {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4em;
    max-height: 4.2em; /* 3 linhas x 1.4em */
    margin-bottom: 0.5rem; 
}

/* Altura fixa do título apenas no desktop */
@media (min-width: 768px) {
    .news-title-limiter {
        min-height: 4.2em; /* Mantém altura fixa para alinhamento */
    }
}

/* Hover no card inteiro */
.news-item-card:hover .news-title-limiter {
    color: var(--bs-danger) !important;
    transition: color 0.3s ease;
}

/* Responsividade Mobile */
@media (max-width: 767px) {
    .news-item-card {
        min-height: auto; /* Remove altura mínima em mobile */ 
    }

    .news-title-limiter {
        -webkit-line-clamp: 2; /* Reduz para 2 linhas em mobile */
        max-height: 2.8em;
        min-height: auto; /* Remove altura mínima fixa */ 
        line-height: 1.4em;
        margin-top: 0.5rem;
    }

    /* Ajusta espaçamento dos títulos de seção */
    .text-news-1, .text-news-2, .text-news-3, .text-news-4 {
 
        margin-bottom: 1rem !important;
    }

    /* Espaçamento entre colunas em mobile */
    .row.mb-3 .col-md-3 {
        margin-bottom: 1.5rem;
    }

    /* Imagens responsivas */
    .news-item-card img {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
        object-fit: cover;
    }
}

/* Grid das 4 colunas de categorias - Desktop */
@media (min-width: 768px) {
    .row.mb-3 .col-md-3 {
        display: flex;
        flex-direction: column;
        margin-bottom: 1.5rem;
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 991px) {
    .news-item-card {
        min-height: 200px;
    }
}

/* ============================================
   ESTILOS PARA SWIPERS
   ============================================ */

/* Swiper Destaque */
.destaque-swiper .swiper-slide {
    height: auto;
}

.destaque-swiper .card {
    height: 100%;
    min-height: 320px;
}

/* Swiper Mais Lidas */
.mais-lidas-swiper .card {
    transition: all 0.3s ease;
}

.mais-lidas-swiper .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
}

.ranking-number {
    font-family: 'Arial Black', sans-serif;
    line-height: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

 
 
/* Paginação do Swiper */
.swiper-pagination-bullet {
    background: var(--bs-warning);
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--bs-warning);
}

/* Responsividade dos Swipers */
@media (max-width: 576px) {
    .swiper-button-next,
    .swiper-button-prev {
        width: 35px;
        height: 35px;
    }

    .swiper-button-next:after,
    .swiper-button-prev:after {
        font-size: 16px;
    }
}
