/* ============================================
   CORREÇÃO DEFINITIVA GALERIA - TABLET 768px-1023px
   Baseado na análise da captura de tela
   ============================================ */

@media (min-width: 768px) and (max-width: 1023px) {
    
    /* === SECTION DA GALERIA === */
    .gallery-section {
        width: 100% !important;
        overflow-x: hidden !important;
    }
    
    /* === CONTAINER === */
    .gallery-section .container {
        max-width: 100% !important;
        padding: 0 20px !important;
        margin: 0 auto !important;
    }
    
    /* === GRID DA GALERIA - CENTRALIZADO === */
    .gallery-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        justify-items: center !important; /* Centraliza os items no grid */
        align-items: start !important;
    }
    
    /* === CARD DA GALERIA === */
    .gallery-item {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
    
    /* === CARROSSEL === */
    .gallery-image-carousel {
        width: 100% !important;
        height: 250px !important;
        border-radius: 15px 15px 0 0 !important;
    }
    
    /* === DETALHES - TODOS CENTRALIZADOS === */
    .gallery-details {
        width: 100% !important;
        padding: 1.5rem !important;
        text-align: center !important;
        height: auto !important;
        overflow: visible !important;
        border-radius: 0 0 15px 15px !important;
    }
    
    .gallery-details h4 {
        text-align: center !important;
        width: 100% !important;
        margin: 0 auto 0.8rem auto !important;
    }
    
    .gallery-description {
        text-align: center !important;
        width: 100% !important;
        margin: 0 auto 1rem auto !important;
    }
    
    /* === SPECS - CENTRALIZADOS EM COLUNA === */
    .gallery-specs {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        width: 100% !important;
        text-align: center !important;
    }
    
    .gallery-specs span {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        margin: 0 auto !important;
    }
    
    /* === OVERLAY E INFO === */
    .gallery-info {
        text-align: center !important;
        width: 100% !important;
    }
    
    .gallery-info h3,
    .gallery-info p {
        text-align: center !important;
    }
}

/* === AJUSTE ESPECÍFICO PARA 768px-900px === */
@media (min-width: 768px) and (max-width: 900px) {
    .gallery-grid {
        gap: 15px !important;
    }
    
    .gallery-section .container {
        padding: 0 15px !important;
    }
}
