/* Correções de responsividade para flash-news.html e flash-news-en.html */

@media (max-width: 991px) {
    /* Remover espaço branco abaixo do header */
    body {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
    
    header {
        margin-bottom: 0 !important;
        
    }
    
    /* Hero Section Mobile */
    .hero-section,
    .flash-news-hero {
        height: 50vh !important;
        min-height: 300px !important;
        padding-top: 80px !important;
        margin-top: 0px !important;
    }
    
    .hero-section h1,
    .flash-news-hero h1 {
        font-size: 32px !important;
        padding: 0 20px !important;
        line-height: 1.3 !important;
    }
    
    /* Intro Section Mobile */
    .intro-section {
        padding: 40px 20px !important;
    }
    
    .intro-section h2 {
        font-size: 24px !important;
        margin-bottom: 20px !important;
    }
    
    .intro-section p {
        font-size: 15px !important;
        line-height: 1.7 !important;
    }
    
    /* News Grid Mobile - 1 coluna FORÇADA */
    .news-grid,
    .news-cards-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        padding: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .news-grid > *,
    .news-cards-container > *,
    #flash-news-cards-container > * {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        flex: 1 1 100% !important;
    }
    
    /* FORÇAR cards do backoffice em 1 coluna */
    #flash-news-cards-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        padding: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        left: 0 !important;
        right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        position: relative !important;
    }
    
    #flash-news-cards-container .news-card,
    #flash-news-cards-container > div {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        flex: 1 1 100% !important;
        display: flex !important;
        flex-direction: column !important;
        margin-bottom: 40px !important;
        background: transparent !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }
    
    #flash-news-cards-container .news-card > div:first-child,
    #flash-news-cards-container > div > div:first-child {
        height: 350px !important;
        min-height: 350px !important;
        max-height: 350px !important;
        width: 100vw !important;
        min-width: 100vw !important;
        max-width: 100vw !important;
        position: relative !important;
        
        
        margin-bottom: 0 !important;
        order: 1 !important;
    }
    
    #flash-news-cards-container img {
        height: 350px !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        object-fit: cover !important;
        border-radius: 0 !important;
    }
    
    #flash-news-cards-container .news-card-content,
    #flash-news-cards-container > div > div:last-child {
        padding: 30px 20px !important;
        order: 2 !important;
    }
    
    #flash-news-cards-container h3 {
        font-size: 22px !important;
        margin-bottom: 15px !important;
        line-height: 1.3 !important;
        font-weight: 400 !important;
    }
    
    #flash-news-cards-container p {
        font-size: 15px !important;
        line-height: 1.7 !important;
        margin-bottom: 20px !important;
    }
    
    /* News Cards Mobile - LAYOUT VERTICAL (imagem em cima) */
    .news-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        margin: 0 0 40px 0 !important;
        border-radius: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: visible !important;
        background: transparent !important;
        box-shadow: none !important;
        flex: 1 1 100% !important;
    }
    
    /* Imagem direta no card (removido - agora controlado por flash-news-static-cards-fix.css) */
    
    /* Container de imagem (cards do backoffice) */
    .news-card > div:first-child {
        height: 350px !important;
        width: 100vw !important;
        min-width: 100vw !important;
        max-width: 100vw !important;
        position: relative !important;
        left: 50% !important;
        right: 50% !important;
        margin-left: -50vw !important;
        margin-right: -50vw !important;
        margin-bottom: 0 !important;
        overflow: hidden !important;
        order: 1 !important;
    }
    
    .news-card > div:first-child img {
        height: 350px !important;
        width: 100% !important;
        object-fit: cover !important;
        border-radius: 0 !important;
    }
    
    .news-card .news-card-content,
    .news-card-content {
        padding: 30px 20px 40px 20px !important;
        order: 2 !important;
        min-height: 200px !important;
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        flex: none !important;
        justify-content: flex-start !important;
    }
    
    .news-card .news-card-content h3,
    .news-card h3 {
        font-size: 26px !important;
        margin-bottom: 20px !important;
        line-height: 1.2 !important;
        font-weight: 400 !important;
        color: var(--text-dark) !important;
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
    }
    
    .news-card .news-card-content p,
    .news-card p {
        font-size: 17px !important;
        line-height: 1.6 !important;
        margin-bottom: 20px !important;
        color: var(--text-dark) !important;
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
    }
    
    .news-card .read-more,
    .news-card a {
        font-size: 15px !important;
        padding: 10px 20px !important;
        display: inline-block !important;
        margin-top: auto !important;
    }
    
    /* Container geral */
    .container {
        padding: 0 20px !important;
        max-width: 100% !important;
    }
    
    /* Section padding */
    section {
        padding: 40px 20px !important;
    }
    
    /* Títulos gerais */
    h1 {
        font-size: 32px !important;
    }
    
    h2 {
        font-size: 26px !important;
    }
    
    h3 {
        font-size: 20px !important;
    }
    
    /* Texto geral */
    p {
        font-size: 15px !important;
        line-height: 1.7 !important;
    }
    
    
    
    /* Botões mobile */
    .btn,
    button,
    .read-more {
        width: 100% !important;
        max-width: 300px !important;
        margin: 0 auto !important;
        display: block !important;
        text-align: center !important;
    }
    
    /* Imagens responsivas */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Cards com sombra */
    .card,
    .news-card {
        box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
    }
}

/* Ajustes específicos para telas muito pequenas */
@media (max-width: 480px) {
    .hero-section,
    .flash-news-hero {
        height: 60vh !important;
        min-height: 400px !important;
    
    }
    
    .hero-section h1,
    .flash-news-hero h1 {
        font-size: 28px !important;
    }
    
    .news-card img {
        height: 130px !important;
        width: 130px !important;
        min-width: 130px !important;
    }
    
    .news-card h3 {
        font-size: 15px !important;
    }
    
    .news-card p {
        font-size: 12px !important;
        line-clamp: 2 !important;
        -webkit-line-clamp: 2 !important;
    }
    
    .news-card-content {
        padding: 12px !important;
    }
    
    .news-grid {
        gap: 20px !important;
        padding: 30px 15px !important;
    }
    
    .intro-section {
        padding: 30px 15px !important;
    }
}

/* Ajustes para tablets - MANTER 1 COLUNA TAMBÉM */
@media (min-width: 768px) and (max-width: 991px) {
    .news-grid {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
        max-width: 800px !important;
        margin: 0 auto !important;
    }
    
    .news-card {
        max-width: 100% !important;
    }
    
    .news-card img {
        height: 180px !important;
        width: 200px !important;
        min-width: 200px !important;
    }
    
    .news-card h3 {
        font-size: 18px !important;
    }
    
    .news-card p {
        font-size: 14px !important;
    }
}
