/*
 * CORREÇÃO FINAL UNIFICADA PARA CARDS E IMAGENS - PRIORIDADE MÁXIMA
 * Este arquivo deve ser carregado por último para garantir que suas regras tenham prioridade
 */

/* Container de imagem dos cards - background-image approach */
.service-image {
    width: 100% !important;
    height: 350px !important;
    display: block !important;
    overflow: hidden !important;
    position: relative !important;
    padding: 0 !important;
    margin: 0 !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-color: #f5f5f5 !important;
    border-top-left-radius: 10px !important;
    border-top-right-radius: 10px !important;
}

/* Esconde a imagem <img> real, mantém para acessibilidade */
.service-image img {
    opacity: 0 !important;
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Container do card (pacotes, flash news, etc) */
.service-item, .service-item.pacote-card, .news-card {
    display: block !important;
    width: 100% !important;
    overflow: hidden !important;
    border-radius: 10px !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important;
    background: #fff !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    margin-bottom: 0 !important;
}

.service-item:hover, .news-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15) !important;
}

/* Grid de cards (pacotes, flash news, etc) */
.services-grid, .services-grid.pacotes-container, #flash-news-cards-container, .news-cards-container {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
    width: 100% !important;
    margin: 30px 0 !important;
    max-width: 1200px !important;
    justify-items: stretch !important;
}

/* Ajustes responsivos */
@media (max-width: 991px) {
    .service-image {
        height: 200px !important;
    }
    .services-grid, .services-grid.pacotes-container, #flash-news-cards-container, .news-cards-container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 30px !important;
    }
}
@media (max-width: 767px) {
    .service-image {
        height: 120px !important;
        min-height: 100px !important;
        max-height: 160px !important;
        overflow: hidden !important;
        border-radius: 10px 10px 0 0 !important;
    }
    .services-grid,
    .services-grid.pacotes-container,
    #flash-news-cards-container,
    .news-cards-container {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        padding: 0 5px !important;
        width: 100vw !important;
        box-sizing: border-box !important;
        overflow: visible !important;
    }
    .service-item,
    .service-item.pacote-card,
    .news-card {
        width: 100% !important;
        max-width: 100vw !important;
        margin: 0 auto 0 auto !important;
        box-sizing: border-box !important;
    }
}

/* Garantir títulos e textos alinhados e iguais */
.service-item h3, .news-card h3 {
    font-size: 20px !important;
    font-weight: 600 !important;
    margin: 15px 15px 5px !important;
    color: #333 !important;
    text-align: center !important;
}
.service-item p, .news-card p {
    font-size: 14px !important;
    color: #666 !important;
    line-height: 1.5 !important;
    margin: 0 15px 15px !important;
    text-align: center !important;
}

/* Remover qualquer pseudo-elemento que possa estar interferindo */
.service-image::before, .service-image::after {
    display: none !important;
    content: none !important;
}
