/* ========================================
   CONTATO.CSS - MichelDouglas.dev
   ======================================== */


/* ========== HERO SECTION ========== */
.contact-hero {
    padding: var(--space-36) 0 var(--space-20);
    background-color: var(--bg-primary);
    position: relative;
    overflow-x: clip;
}

.contact-hero .container {
    position: relative;
}

/* --- CONTEÚDO CENTRAL --- */
.contact-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- TEXTOS --- */
.contact-label {
    display: inline-block;
    text-transform: uppercase;
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    color: var(--primary-accent);
    margin-bottom: var(--space-4);
}

.contact-title {
    font-size: var(--text-4xl);
    font-weight: var(--font-bold);
    color: var(--text-white);
    line-height: var(--leading-tight);
    margin-bottom: var(--space-6);
}

.contact-text {
    font-size: var(--text-base);
    color: var(--text-gray);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-10);
}

/* ========== FORM SECTION ========== */
.form-section {
    padding: var(--space-20) 0;
    background: var(--bg-white);
}

.form-section .container {
    max-width: 1000px;
}

.form-contact {
    background: var(--bg-light);
    border: 1px solid var(--bg-tertiary);
    border-radius: var(--radius-2xl);
    overflow: hidden;
}

/* ========== FORM BLOCKS ========== */
.form-block {
    padding: var(--space-10);
    border-bottom: 2px dashed rgba(0, 0, 0, 0.1);
}

.form-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-block-title {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--text-dark);
    margin-bottom: var(--space-3);
    letter-spacing: var(--tracking-tight);
}

.form-block-description {
    font-size: var(--text-base);
    color: var(--text-gray-dark);
    line-height: var(--leading-relaxed);
}

/* ========== FORM FIELDS ========== */
.form-field {
    margin-bottom: var(--space-4);
}

.form-field-full {
    width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
}

.form-label {
    display: block;
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--text-dark);
    margin-bottom: var(--space-2);
}

.form-label.required::after,
.form-block-description.required::after {
    content: ' *';
    color: var(--primary-accent);
    font-weight: var(--font-extrabold);
    margin-left: 2px;
}

/* ========== INPUTS ========== */
.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: var(--space-4);
    font-size: var(--text-base);
    font-family: var(--font-primary);
    color: var(--text-dark);
    background: var(--bg-white);
    border: 1px solid #E5E7EB;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--text-dark);
    box-shadow: 0 0 0 3px rgba(42, 2, 11, 0.1);
}

.form-input.error,
.form-textarea.error,
.form-select.error {
    border-color: #EF4444 !important;
    background: rgba(239, 68, 68, 0.02);
}

.form-input.error:focus,
.form-textarea.error:focus,
.form-select.error:focus {
    border-color: #EF4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.form-error-message {
    display: none;
    margin-top: var(--space-2);
    padding: var(--space-3);
    font-size: var(--text-xs);
    color: #991B1B;
    background: rgba(254, 226, 226, 0.8);
    border-radius: var(--radius-md);
}

.form-field.has-error .form-error-message {
    display: block;
}

.form-services-error {
    display: none;
    margin-bottom: var(--space-4);
    padding: var(--space-3);
    font-size: var(--text-xs);
    color: #991B1B;
    background: rgba(254, 226, 226, 0.8);
    border-radius: var(--radius-md);
}

.form-services-error.active {
    display: block;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-gray);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-4) center;
    padding-right: var(--space-10);
}

/* ========== CHECKBOX CARDS (SERVIÇOS) ========== */
.form-services {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
    margin: var(--space-8) 0;
}

.form-service-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
}

.form-service-item input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    margin-top: 3px;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    background: var(--bg-white);
    border: 2px solid #D1D5DB;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.form-service-item input[type="checkbox"]:hover {
    border-color: var(--primary-accent);
    background: rgba(241, 19, 72, 0.02);
}

.form-service-item input[type="checkbox"]:checked {
    background: var(--primary-accent);
    border-color: var(--primary-accent);
}

.form-service-item input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 0px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.form-service-item input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(241, 19, 72, 0.15);
}

.form-service-item input[type="checkbox"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-service-item label {
    cursor: pointer;
}

.form-service-item label strong {
    display: block;
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--text-dark);
}

.form-service-item label p {
    font-size: var(--text-sm);
    color: var(--text-gray-dark);
    line-height: var(--leading-relaxed);
    margin: 0;
}

/* ========== CHECKBOX SIMPLES (TERMOS) ========== */
.form-checkbox-simple {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    margin-bottom: 0;
}

.form-checkbox-simple .form-checkbox-input {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-accent);
    flex-shrink: 0;
}

.form-checkbox-simple .form-checkbox-label {
    font-size: var(--text-sm);
    color: var(--text-gray-dark);
    line-height: var(--leading-relaxed);
}

.form-checkbox-simple a {
    color: var(--primary-accent);
    text-decoration: none;
    font-weight: var(--font-semibold);
}

.form-checkbox-simple a:hover {
    text-decoration: underline;
}

/* ========== FOOTER DO FORMULÁRIO (Termos + Botão) ========== */
.form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
    margin-top: var(--space-6);
    margin-bottom: var(--space-6);
}

.form-footer .form-checkbox-simple {
    flex: 1;
}

.form-footer .form-btn-submit {
    width: auto;
    flex-shrink: 0;
    white-space: nowrap;
}

/* ========== CAPTCHA ========== */
.form-field-captcha {
    max-width: 300px;
}

.form-captcha-question {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--text-dark);
    margin: var(--space-3) 0;
}

/* ========== SUBMIT BUTTON ========== */
.form-btn-submit {
    width: 100%;
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-base);
    font-weight: var(--font-bold);
    color: var(--text-white);
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-accent);
}

.form-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-secondary);
}

.form-btn-submit:active {
    transform: translateY(0);
}

.form-btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Estados do botão de envio */
/* Container do ícone permanece no DOM - animação aplicada aqui */
.btn-icon.spinning {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Estados do botão */
.form-btn-submit {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.form-btn-submit.loading {
    opacity: 0.9;
    cursor: wait;
}

.form-btn-submit.success {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%) !important;
    box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.4) !important;
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-2px) scale(1.02);
    }
}

/* ========== SUCCESS MESSAGE ========== */
.form-success {
    padding: var(--space-6);
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid #10B981;
    border-radius: var(--radius-lg);
    text-align: center;
    margin-bottom: var(--space-8);
}

.form-success h3 {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: #10B981;
    margin-bottom: var(--space-2);
}

.form-success p {
    font-size: var(--text-base);
    color: var(--text-gray-dark);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .hero-contact {
        padding: calc(var(--header-height) + var(--space-12)) 0 var(--space-12);
    }

    .hero-contact .section-title {
        font-size: var(--text-3xl);
    }

    .hero-contact .section-description {
        font-size: var(--text-base);
    }

    .form-contact {
        padding: var(--space-8);
    }

    .form-block {
        padding: var(--space-8);
    }

    .form-block-title {
        font-size: var(--text-xl);
    }

    .form-row,
    .form-services {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    .form-btn-submit {
        padding: var(--space-4);
    }

    .form-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .form-footer .form-btn-submit {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .form-contact {
        padding: var(--space-6);
        border-radius: var(--radius-lg);
    }

    .form-block-title {
        font-size: var(--text-lg);
    }
}

