/* ========================================
   CORREÇÕES DE LAYOUT E CENTRALIZAÇÃO
======================================== */

/* Garantir que o hero seja centralizado em todas as telas */
.hero {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 70vh !important;
}

.hero-content {
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 2rem !important;
    display: grid !important;
    align-items: center !important;
    justify-items: center !important;
    text-align: center !important;
}

/* Desktop Layout */
@media (min-width: 992px) {
    .hero-content {
        grid-template-columns: auto 1fr !important;
        gap: 4rem !important;
        text-align: left !important;
        justify-items: start !important;
        align-items: center !important;
        max-width: 1200px !important;
    }
    
    .hero-image {
        justify-self: start !important;
        align-self: center !important;
    }
    
    .hero-text {
        text-align: left !important;
        justify-self: start !important;
    }
    
    .hero-title {
        font-size: 3.2rem !important;
        line-height: 1.1 !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-position {
        font-size: 1.4rem !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-slogan {
        font-size: 1.1rem !important;
        margin-bottom: 2.5rem !important;
    }
    
    .hero-actions {
        justify-content: flex-start !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 1.25rem !important;
    }
    
    .hero-button {
        flex: none !important;
        width: auto !important;
        min-width: 200px !important;
    }
}

/* Tablet Layout */
@media (min-width: 769px) and (max-width: 991px) {
    .hero-content {
        grid-template-columns: auto 1fr !important;
        gap: 3rem !important;
        text-align: left !important;
        justify-items: start !important;
        align-items: center !important;
    }
    
    .hero-image {
        justify-self: start !important;
        align-self: center !important;
    }
    
    .hero-text {
        text-align: left !important;
        justify-self: start !important;
    }
    
    .hero-title {
        font-size: 2.8rem !important;
        line-height: 1.1 !important;
    }
    
    .hero-position {
        font-size: 1.3rem !important;
    }
    
    .hero-actions {
        justify-content: flex-start !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 1rem !important;
    }
    
    .hero-button {
        flex: 1 !important;
        min-width: 180px !important;
        max-width: 220px !important;
    }
}

/* Mobile Layout */
@media (max-width: 768px) {
    .hero {
        padding: 4rem 0 !important;
    }
    
    .hero-content {
        grid-template-columns: 1fr !important;
        gap: 2.5rem !important;
        text-align: center !important;
        justify-items: center !important;
        align-items: center !important;
        padding: 0 1.5rem !important;
        max-width: 500px !important;
    }
    
    .hero-text {
        text-align: center !important;
        width: 100% !important;
    }
    
    .hero-text h1,
    .hero-title {
        text-align: center !important;
        font-size: 2.2rem !important;
        line-height: 1.2 !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-text p,
    .hero-position {
        text-align: center !important;
        font-size: 1.1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-slogan {
        text-align: center !important;
        font-size: 1rem !important;
        margin-bottom: 2rem !important;
    }
    
    .hero-image {
        order: -1 !important;
        justify-self: center !important;
    }
    
    .foto-vereador,
    .vereador-photo {
        margin: 0 auto !important;
        display: block !important;
    }
    
    .hero-actions {
        justify-content: center !important;
        align-items: center !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 1rem !important;
        width: 100% !important;
        max-width: 400px !important;
        margin: 0 auto !important;
    }
    
    .hero-button {
        flex: 1 !important;
        min-width: 160px !important;
        max-width: 200px !important;
        text-align: center !important;
        justify-content: center !important;
        display: flex !important;
        align-items: center !important;
        padding: 0.9rem 1.2rem !important;
        font-size: 0.85rem !important;
    }
    
    /* Para botões que precisam ocupar linha inteira */
    .hero-button:nth-child(5) {
        flex: 1 1 100% !important;
        max-width: 350px !important;
    }
}

/* Mobile pequeno */
@media (max-width: 480px) {
    .hero-content {
        padding: 0 1rem !important;
        max-width: 90vw !important;
    }
    
    .hero-text h1,
    .hero-title {
        font-size: 1.9rem !important;
    }
    
    .hero-text p,
    .hero-position {
        font-size: 1rem !important;
    }
    
    .hero-actions {
        max-width: 320px !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    
    .hero-button {
        width: 100% !important;
        max-width: 280px !important;
        padding: 0.8rem 1rem !important;
        font-size: 0.8rem !important;
        min-width: auto !important;
        flex: none !important;
    }
}

/* Correções gerais para evitar quebra de layout */
.container {
    width: 100% !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
}

/* Prevent horizontal scroll */
body, html {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
}

/* Centralizar seções em geral */
.section {
    width: 100% !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 3rem 2rem !important;
}

@media (max-width: 768px) {
    .section {
        padding: 2rem 1rem !important;
    }
}