/* MELHORIAS MOBILE PARA SEÇÃO DE CONTATO - MTDNA */

/* ================================================
   FORÇA A SEÇÃO DE CONTATO A CABER EM MOBILE
   ================================================ */

@media (max-width: 768px) {
    /* FORÇA ALTURA MÁXIMA PARA CABER NA VIEWPORT */
    #contacts.ppslide {
        height: 100vh !important;
        max-height: 100vh !important;
        overflow-y: auto !important;
        display: flex !important;
        align-items: flex-start !important;
        padding: 5px 0 !important;
    }
    
    /* CONTAINER PRINCIPAL COMPACTO */
    #contacts .vc_column-inner {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* ITEM HEIGHT REMOVIDO EM MOBILE */
    #contacts .item_height_x2 {
        height: auto !important;
        min-height: auto !important;
    }
    
    /* FORÇA COMPACTAÇÃO DE TODOS OS ELEMENTOS */
    #contacts * {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }
    
    #contacts br {
        display: none !important;
    }
    
    /* ESPAÇAMENTO MÍNIMO ENTRE ELEMENTOS */
    #contacts .oi_vc_heading {
        margin-bottom: 8px !important;
    }
    
    #contacts .oi_heading_border {
        margin: 3px auto 5px !important;
    }
    
    #contacts .oi_icon_sub_titile {
        margin-bottom: 8px !important;
    }
    
    #contacts .wpcf7 {
        margin-top: 5px !important;
    }
    
    /* CAMPOS DE FORMULÁRIO SUPER COMPACTOS */
    #contacts .col-md-12 {
        margin-bottom: 6px !important;
    }
    
    #contacts .col-md-12:last-child {
        margin-bottom: 0 !important;
    }
    
    #contacts .text-center.mb-0 {
        margin-top: 5px !important;
    }

@media (max-width: 768px) {
    /* LAYOUT GERAL DA SEÇÃO DE CONTATO - ZERO PADDING */
    #contacts {
        min-height: auto !important;
        padding: 10px 0 !important;
        margin: 0 !important;
    }
    
    #contacts .container {
        padding: 0 10px !important;
        margin: 0 !important;
    }
    
    /* REORGANIZAÇÃO DAS COLUNAS EM MOBILE - SEM MARGIN */
    #contacts .row {
        flex-direction: column !important;
        margin: 0 !important;
    }
    
    #contacts .col-md-6 {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* COLUNA DO FORMULÁRIO */
    #contacts .col-md-6:first-child {
        order: 1;
    }
    
    /* COLUNA DOS DETALHES DE CONTATO - ESCONDIDA EM MOBILE */
    #contacts .col-md-6:last-child {
        display: none !important;
    }
    
    /* TÍTULO DA SEÇÃO - COMPACTO */
    #contacts .oi_icon_titile {
        font-size: 20px !important;
        margin: 5px 0 8px 0 !important;
        text-align: center !important;
        line-height: 1.1 !important;
    }
    
    /* SUBTÍTULO - AINDA MAIS COMPACTO */
    #contacts .oi_icon_sub_titile {
        font-size: 12px !important;
        line-height: 1.2 !important;
        margin: 0 0 10px 0 !important;
        text-align: center !important;
        padding: 0 5px !important;
    }
    
    /* BORDA DECORATIVA - MENOR */
    #contacts .oi_heading_border {
        margin: 5px auto 8px !important;
        width: 60px !important;
    }
    
    /* FORMULÁRIO DE CONTATO - SEM PADDING */
    #contacts .wpcf7 {
        padding: 0 5px !important;
        margin: 0 !important;
    }
    
    #contacts .row.text-left {
        margin: 0 !important;
    }
    
    #contacts .row.text-left .col-md-12 {
        padding: 0 !important;
        margin-bottom: 8px !important;
    }
    
    /* CAMPOS DO FORMULÁRIO - COMPACTOS */
    #contacts input[type="text"],
    #contacts input[type="email"],
    #contacts textarea {
        width: 100% !important;
        padding: 8px 10px !important;
        font-size: 16px !important; /* Previne zoom no iOS */
        border: 1px solid #ddd !important;
        border-radius: 4px !important;
        box-sizing: border-box !important;
        margin-bottom: 8px !important;
        height: auto !important;
        -webkit-appearance: none !important; /* Remove estilo padrão iOS */
        -moz-appearance: none !important;
        appearance: none !important;
    }
    
    #contacts input:focus,
    #contacts textarea:focus {
        border-color: #f4c70b !important;
        outline: none !important;
        box-shadow: 0 0 4px rgba(244, 199, 11, 0.3) !important;
    }
    
    #contacts textarea {
        min-height: 60px !important;
        resize: vertical !important;
        font-family: inherit !important;
    }
    
    /* BOTÃO DE ENVIO - COMPACTO */
    #contacts .btn-secondary {
        width: 100% !important;
        padding: 10px !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        border-radius: 4px !important;
        margin-top: 5px !important;
        transition: all 0.3s ease !important;
        border: none !important;
        background: linear-gradient(135deg, #666, #555) !important;
        color: #fff !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        cursor: pointer !important;
    }
    
    #contacts .btn-secondary:hover {
        background: linear-gradient(135deg, #555, #444) !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.25) !important;
    }
    
    /* BOTÃO PARA MOSTRAR DETALHES DE CONTATO - COMPACTO */
    .mobile-contact-details-btn {
        display: block !important;
        width: 100% !important;
        padding: 8px 15px !important;
        background: linear-gradient(135deg, #f4c70b, #e6b800) !important;
        color: #000 !important;
        border: none !important;
        border-radius: 4px !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        margin: 10px 0 8px 0 !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        box-shadow: 0 1px 4px rgba(244, 199, 11, 0.3) !important;
    }
    
    .mobile-contact-details-btn:hover {
        background: linear-gradient(135deg, #e6b800, #d4a600) !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 2px 8px rgba(244, 199, 11, 0.4) !important;
    }
    
    .mobile-contact-details-btn i {
        margin-right: 6px !important;
        font-size: 12px !important;
    }
}

/* ================================================
   MELHORIAS GERAIS PARA MOBILE
   ================================================ */

@media (max-width: 768px) {
    /* NAVEGAÇÃO MOBILE */
    .navbar-nav {
        text-align: center !important;
    }
    
    .navbar-nav li {
        margin: 5px 0 !important;
    }
    
    .navbar-nav a {
        font-size: 16px !important;
        padding: 10px 15px !important;
    }
    
    /* MELHORIAS PARA TÍTULOS EM GERAL */
    .oi_icon_titile {
        font-size: 24px !important;
        line-height: 1.2 !important;
        margin-bottom: 15px !important;
    }
    
    .oi_icon_sub_titile {
        font-size: 14px !important;
        line-height: 1.4 !important;
        margin-bottom: 20px !important;
        padding: 0 15px !important;
    }
    
    /* BOTÕES GERAIS */
    .btn {
        min-height: 44px !important; /* Melhora acessibilidade touch */
        font-size: 16px !important;
        padding: 12px 20px !important;
    }
    
    /* ESPAÇAMENTOS GERAIS */
    .ppslide {
        padding: 20px 0 !important;
    }
    
    .container {
        padding: 0 15px !important;
    }
    
    /* IMAGENS RESPONSIVAS */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
}

/* MODAL PARA DETALHES DE CONTATO EM MOBILE */
@media (max-width: 768px) {
    .mobile-contact-modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.8);
        z-index: 9999;
        animation: fadeIn 0.3s ease;
    }
    
    .mobile-contact-modal.show {
        display: flex !important;
        align-items: center;
        justify-content: center;
        padding: 20px;
    }
    
    .mobile-contact-modal-content {
        background: #fff;
        border-radius: 15px;
        padding: 25px;
        width: 100%;
        max-width: 350px;
        max-height: 80vh;
        overflow-y: auto;
        position: relative;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        animation: slideUp 0.3s ease;
    }
    
    .mobile-contact-modal-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        padding-bottom: 15px;
        border-bottom: 2px solid #f4c70b;
    }
    
    .mobile-contact-modal-title {
        font-size: 18px;
        font-weight: 600;
        color: #333;
        margin: 0;
    }
    
    .mobile-contact-modal-close {
        background: none;
        border: none;
        font-size: 24px;
        color: #666;
        cursor: pointer;
        padding: 0;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: all 0.3s ease;
    }
    
    .mobile-contact-modal-close:hover {
        background: #f0f0f0;
        color: #333;
    }
    
    .mobile-contact-info {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .mobile-contact-info li {
        margin-bottom: 20px;
        padding: 15px;
        background: #f8f9fa;
        border-radius: 10px;
        border-left: 4px solid #f4c70b;
    }
    
    .mobile-contact-info li:last-child {
        margin-bottom: 0;
    }
    
    .mobile-contact-info strong {
        display: block;
        font-size: 14px;
        font-weight: 600;
        color: #333;
        margin-bottom: 8px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .mobile-contact-info p {
        margin: 0;
        font-size: 14px;
        line-height: 1.5;
        color: #555;
    }
    
    .mobile-contact-info a {
        color: #f4c70b;
        text-decoration: none;
        font-weight: 500;
    }
    
    .mobile-contact-info a:hover {
        text-decoration: underline;
    }
    
    /* Animações */
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    
    @keyframes slideUp {
        from { 
            opacity: 0;
            transform: translateY(30px);
        }
        to { 
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* MELHORIAS PARA TABLETS */
@media (min-width: 769px) and (max-width: 1024px) {
    #contacts .col-md-6 {
        padding: 0 15px !important;
    }
    
    #contacts .oi_icon_titile {
        font-size: 28px !important;
    }
    
    #contacts .oi_icon_sub_titile {
        font-size: 15px !important;
    }
    
    #contacts input[type="text"],
    #contacts input[type="email"],
    #contacts textarea {
        padding: 12px !important;
        font-size: 15px !important;
    }
    
    /* Esconde o botão mobile em tablets */
    .mobile-contact-details-btn {
        display: none !important;
    }
}

/* DESKTOP - ESCONDE ELEMENTOS MOBILE */
@media (min-width: 1025px) {
    .mobile-contact-details-btn {
        display: none !important;
    }
    
    .mobile-contact-modal {
        display: none !important;
    }
}

/* ================================================
   COMPACTAÇÃO EXTREMA PARA MOBILE - FORÇA CABER
   ================================================ */

@media (max-width: 768px) {
    /* FORÇA ALTURA MÁXIMA PARA CABER NA VIEWPORT */
    #contacts.ppslide {
        height: 100vh !important;
        max-height: 100vh !important;
        overflow-y: auto !important;
        display: flex !important;
        align-items: flex-start !important;
        padding: 2px 0 !important;
    }
    
    /* REMOVE TODOS OS ESPAÇAMENTOS DESNECESSÁRIOS */
    #contacts .vc_column-inner,
    #contacts .oi_vc_text,
    #contacts .oi_vc_text_span,
    #contacts .oi_custom_heading_holder {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* ITEM HEIGHT REMOVIDO COMPLETAMENTE */
    #contacts .item_height_x2 {
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
    }
    
    /* FORÇA COMPACTAÇÃO DE TODOS OS ELEMENTOS */
    #contacts br {
        display: none !important;
    }
    
    /* ESPAÇAMENTO MÍNIMO ENTRE SEÇÕES */
    #contacts .oi_vc_heading {
        margin: 0 0 5px 0 !important;
        padding: 0 !important;
    }
    
    #contacts .oi_heading_border {
        margin: 2px auto 3px !important;
        height: 2px !important;
    }
    
    #contacts .oi_heading_border span {
        height: 2px !important;
    }
    
    /* COMPACTA FORMULÁRIO AO MÁXIMO */
    #contacts .wpcf7 {
        margin: 3px 0 0 0 !important;
    }
    
    #contacts .row.text-left .col-md-12 {
        margin-bottom: 4px !important;
        padding: 0 !important;
    }
    
    #contacts .row.text-left .col-md-12:last-child {
        margin-bottom: 0 !important;
    }
    
    /* CAMPOS ULTRA COMPACTOS */
    #contacts input[type="text"],
    #contacts input[type="email"],
    #contacts textarea {
        padding: 6px 8px !important;
        margin-bottom: 4px !important;
        border-width: 1px !important;
        line-height: 1.2 !important;
    }
    
    #contacts textarea {
        min-height: 50px !important;
    }
    
    /* BOTÕES MÍNIMOS */
    #contacts .btn-secondary {
        padding: 8px !important;
        font-size: 12px !important;
        margin-top: 3px !important;
    }
    
    .mobile-contact-details-btn {
        padding: 6px 12px !important;
        font-size: 11px !important;
        margin: 5px 0 3px 0 !important;
    }
    
    /* FORÇA O CONTAINER A NÃO SAIR DA TELA */
    #contacts .container {
        max-height: 95vh !important;
        overflow-y: auto !important;
    }
}