/* ==============================================
   SEÇÃO DE CONTATO - APM TEMPLATE
   ============================================== */

/* Container principal */
.contact-section {
    background-color: #F9FAFB;
    padding: 56px 24px;
}

.contact-container {
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
}

/* Cabeçalho */
.contact-header {
    text-align: center;
    margin-bottom: 32px;
}

.contact-title {
    font-family: 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #1D2939;
    margin: 0 0 10px;
    letter-spacing: -0.5px;
}

.contact-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: #667085;
    margin: 0;
    line-height: 1.55;
}

/* Cards de contato (E-mail e Telefone) */
.contact-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 36px;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.contact-card__header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.contact-card__icon {
    color: var(--apm-tema-500);
    display: flex;
    align-items: center;
}

.contact-card__icon svg {
    width: 18px;
    height: 18px;
}

.contact-card__label {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--apm-tema-500);
}

.contact-card__value {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #1D2939;
    font-weight: 500;
    word-break: break-word;
}

/* Mensagens de feedback */
.contact-messages {
    margin-bottom: 20px;
}

.contact-messages .message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
}

/* Wrapper do formulário */
.contact-form-wrapper {
    background-color: transparent;
    padding: 0;
    box-shadow: none;
    border: none;
}

/* Formulário */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form__row {
    width: 100%;
}

.contact-form__row--two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.contact-form__group {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Garante que divs geradas pelo CakePHP não quebrem o layout */
.contact-form__group .input,
.contact-form__group .input.text,
.contact-form__group .input.email,
.contact-form__group .input.textarea {
    width: 100%;
}

.contact-form__group > div {
    width: 100%;
}

.contact-form__label {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #344054;
    margin-bottom: 6px;
}

.contact-form__required {
    font-weight: 400;
    color: #9CA3AF;
    font-size: 13px;
}

.contact-form__input,
.contact-form__textarea {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #1D2939;
    background-color: #fff;
    border: 1px solid #D0D5DD;
    border-radius: 8px;
    padding: 12px 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.contact-form__input:focus,
.contact-form__textarea:focus {
    outline: none;
    border-color: var(--apm-tema-500);
    box-shadow: 0 0 0 3px rgba(var(--apm-tema-rgb), 0.1);
}

.contact-form__input::placeholder,
.contact-form__textarea::placeholder {
    color: #98A2B3;
}

/* Input com ícone */
.contact-form__input-icon {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.contact-form__input-icon > svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #98A2B3;
    pointer-events: none;
    z-index: 1;
}

.contact-form__input-icon .input {
    width: 100%;
}

.contact-form__input--with-icon {
    padding-left: 44px;
}

/* Textarea */
.contact-form__textarea {
    resize: vertical;
    min-height: 140px;
}

/* Captcha oculto */
.contact-form__captcha-hidden {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

/* Checkbox de termos */
.contact-form__group--checkbox {
    margin-top: 4px;
}

.contact-form__checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #535862;
    font-style: normal;
    cursor: pointer;
    line-height: 1.5;
}

.contact-form__checkbox-label span {
    color: #535862;
    font-style: normal;
}

.contact-form__checkbox {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--apm-tema-500);
    cursor: pointer;
    flex-shrink: 0;
}

.contact-form__link {
    color: #1D2939;
    font-weight: 600;
    text-decoration: none;
}

.contact-form__link:hover {
    color: var(--apm-tema-500);
    text-decoration: underline;
}

/* Recaptcha */
.contact-form__recaptcha {
    margin-top: 4px;
}

/* Botão Enviar */
.contact-form__submit {
    width: 100%;
    padding: 14px 24px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background-color: var(--apm-tema-500);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
    margin-top: 4px;
}

.contact-form__submit:hover:not(:disabled) {
    background-color: var(--apm-tema-700);
}

.contact-form__submit:disabled {
    cursor: not-allowed;
}

/* Mensagens de erro */
.contact-form__group.error .contact-form__input,
.contact-form__group.error .contact-form__textarea,
.contact-form__group.has-error .contact-form__input,
.contact-form__group.has-error .contact-form__textarea {
    border-color: #F04438;
}

.contact-form__group.has-error .contact-form__input:focus,
.contact-form__group.has-error .contact-form__textarea:focus {
    box-shadow: 0 0 0 3px rgba(240, 68, 56, 0.12);
}

.contact-form__group.has-error .contact-form__label {
    color: #F04438;
}

.contact-form__group.has-error .contact-form__checkbox-label {
    color: #F04438;
}

.contact-form__error {
    font-size: 13px;
    color: #F04438;
    margin-top: 6px;
    line-height: 1.4;
}

.contact-form__error[aria-hidden="true"] {
    display: none;
}

.live-error-message {
    color: #F04438;
    font-size: 13px;
    margin-top: 6px;
}

.contact-form__group:not(.error) .live-error-message {
    display: none;
}

/* Remove estilos antigos que possam interferir */
.contact-section .panel,
.contact-section .panel-default,
.contact-section .tex-box {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* ==============================================
   RESPONSIVO - TABLET
   ============================================== */
@media (max-width: 992px) {
    .contact-section {
        padding: 48px 24px;
    }

    .contact-container {
        max-width: 600px;
    }

    .contact-title {
        font-size: 24px;
    }
}

/* ==============================================
   RESPONSIVO - MOBILE
   ============================================== */
@media (max-width: 768px) {
    .contact-section {
        padding: 40px 20px;
    }

    .contact-container {
        max-width: 100%;
    }

    .contact-title {
        font-size: 24px;
    }

    .contact-subtitle {
        font-size: 14px;
    }

    .contact-cards {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 28px;
    }

    .contact-form__row--two-cols {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .contact-form__input,
    .contact-form__textarea {
        padding: 11px 14px;
    }

    .contact-form__input--with-icon {
        padding-left: 42px;
    }

    .contact-form__submit {
        padding: 13px 20px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .contact-section {
        padding: 32px 16px;
    }

    .contact-title {
        font-size: 22px;
    }

    .contact-subtitle {
        font-size: 14px;
    }

    .contact-cards {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 24px;
    }

    .contact-form {
        gap: 16px;
    }

    .contact-form__label {
        font-size: 14px;
    }

    .contact-form__checkbox-label {
        font-size: 14px;
    }
}
