/* ===== ESTILOS ESPECÍFICOS DO FORMULÁRIO ===== */

/* Validação de formulário */
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #E74C3C;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-group input.success,
.form-group select.success,
.form-group textarea.success {
    border-color: var(--cor-sucesso);
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

.error-message {
    color: #E74C3C;
    font-size: var(--tamanho-sm);
    margin-top: var(--espacamento-xs);
    display: none;
}

.error-message.show {
    display: block;
}

.success-message {
    color: var(--cor-sucesso);
    font-size: var(--tamanho-sm);
    margin-top: var(--espacamento-xs);
    display: none;
}

.success-message.show {
    display: block;
}

/* Loading state do botão */
.btn-submit.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn-submit.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid var(--cor-branco);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Máscaras de input */
.input-masked {
    font-family: 'Courier New', monospace;
}

/* Placeholder personalizado */
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--cor-cinza-medio);
    opacity: 0.7;
}

/* Estados de foco melhorados */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    transform: translateY(-1px);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1), 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Checkbox customizado */
.checkbox-label input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #E0E0E0;
    border-radius: 3px;
    background: var(--cor-branco);
    cursor: pointer;
    position: relative;
    transition: var(--transicao);
}

.checkbox-label input[type="checkbox"]:checked {
    background: var(--cor-destaque);
    border-color: var(--cor-destaque);
}

.checkbox-label input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--cor-branco);
    font-size: 12px;
    font-weight: bold;
}

.checkbox-label input[type="checkbox"]:focus {
    outline: 2px solid var(--cor-destaque);
    outline-offset: 2px;
}

/* Animações de entrada do formulário */
.contato-form {
    animation: slideInLeft 0.6s ease;
}

.contato-info {
    animation: slideInRight 0.6s ease;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsividade específica do formulário */
@media (max-width: 768px) {
    .contato-content {
        grid-template-columns: 1fr;
        gap: var(--espacamento-2xl);
    }
    
    .contato-form {
        order: 2;
    }
    
    .contato-info {
        order: 1;
    }
    
    .acoes-buttons {
        flex-direction: column;
    }
    
    .acoes-buttons .btn {
        width: 100%;
    }
}

/* Melhorias de acessibilidade */
.form-group label {
    cursor: pointer;
}

.form-group input:required + label::after {
    content: ' *';
    color: #E74C3C;
}

/* Estados de hover para cards de informação */
.info-card {
    cursor: pointer;
}

.info-card:hover .info-icon {
    transform: scale(1.1);
    background: #2980B9;
}

.info-card:hover .info-icon i {
    transform: scale(1.1);
}

/* Animações para elementos de contato */
.info-card {
    animation: fadeInUp 0.6s ease;
    animation-fill-mode: both;
}

.info-card:nth-child(1) { animation-delay: 0.1s; }
.info-card:nth-child(2) { animation-delay: 0.2s; }
.info-card:nth-child(3) { animation-delay: 0.3s; }
.info-card:nth-child(4) { animation-delay: 0.4s; }

/* Estilo para links de contato */
.info-content a {
    position: relative;
    transition: var(--transicao);
}

.info-content a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--cor-destaque);
    transition: width 0.3s ease;
}

.info-content a:hover::after {
    width: 100%;
}

/* Melhorias no mapa */
.mapa-container {
    position: relative;
    background: var(--cor-cinza-claro);
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mapa-container::before {
    content: 'Carregando mapa...';
    position: absolute;
    color: var(--cor-cinza-medio);
    font-size: var(--tamanho-lg);
    z-index: 1;
}

.mapa-container iframe {
    position: relative;
    z-index: 2;
}

/* Estilos para FAQ */
.faq-item {
    transition: var(--transicao);
}

.faq-item:hover {
    box-shadow: 0 5px 15px var(--cor-sombra);
}

.faq-question {
    position: relative;
}

.faq-question::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--cor-destaque);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.faq-question:hover::before,
.faq-question.active::before {
    transform: scaleY(1);
}

/* Animações para FAQ */
.faq-item {
    animation: fadeInUp 0.6s ease;
    animation-fill-mode: both;
}

.faq-item:nth-child(1) { animation-delay: 0.1s; }
.faq-item:nth-child(2) { animation-delay: 0.2s; }
.faq-item:nth-child(3) { animation-delay: 0.3s; }
.faq-item:nth-child(4) { animation-delay: 0.4s; }
.faq-item:nth-child(5) { animation-delay: 0.5s; }

/* Melhorias nos botões de ação rápida */
.acoes-rapidas .btn {
    position: relative;
    overflow: hidden;
}

.acoes-rapidas .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.acoes-rapidas .btn:hover::before {
    left: 100%;
}

/* Estados de loading para botões */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Melhorias de contraste para acessibilidade */
@media (prefers-contrast: high) {
    .form-group input,
    .form-group select,
    .form-group textarea {
        border-width: 3px;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

/* Redução de movimento para usuários sensíveis */
@media (prefers-reduced-motion: reduce) {
    .contato-form,
    .contato-info,
    .info-card,
    .faq-item {
        animation: none;
    }
    
    .acoes-rapidas .btn::before {
        display: none;
    }
    
    .whatsapp-btn {
        animation: none;
    }
}
