/* =========================================================
  CONTATO — OUÇA MAIS • VIVA MELHOR
  =========================================================
  Arquivo: public/assets/css/contato.css
  Mobile first + Bootstrap 5
  Versão: 260505-CORRIGIDA

  Responsável por:
  - Seção de contato com grid responsivo
  - Mapa do Google Maps
  - Formulário de contato estilizado
  - Links de contato e redes sociais
  - Correção dos ícones sociais alinhados, exibindo apenas ícones

  Dependências:
  - Bootstrap 5
  - style.css / variáveis globais do projeto

  HTML relacionado:
  - public/components/contato.html

  Observações:
  - A seção de links mantém o texto no HTML por acessibilidade,
    mas exibe visualmente apenas os ícones.
  - Não remova os textos de .contact-links__content no HTML,
    pois eles ajudam leitores de tela e tecnologias assistivas.
  ========================================================= */


/* =========================================================
   0. VARIÁVEIS LOCAIS DE SEGURANÇA
   ---------------------------------------------------------
   Usa as variáveis globais do projeto quando existirem.
   Caso não existam, aplica valores de fallback.
   ========================================================= */

#contato {
    --contact-bg: var(--color-background, #ffffff);
    --contact-surface: #ffffff;
    --contact-text: var(--color-text, #1a1a2e);
    --contact-muted: var(--color-text-muted, #4a5568);
    --contact-cta: var(--color-cta, #8b5cf6);
    --contact-cta-dark: #6d28d9;
    --contact-border: rgba(139, 92, 246, 0.15);
    --contact-shadow-sm: 0 4px 20px rgba(15, 23, 42, 0.06);
    --contact-shadow-md: 0 12px 28px rgba(139, 92, 246, 0.18);

    background: var(--contact-bg);
    padding: 80px 0;
}

@media (max-width: 767.98px) {
    #contato {
        padding: 60px 0;
    }
}


/* =========================================================
   1. GRID PRINCIPAL DO CONTATO
   ========================================================= */

.contact-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 992px) {
    .contact-section {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 48px;
        align-items: start;
    }
}


/* =========================================================
   2. MAPA
   ========================================================= */

.contact-section__map {
    width: 100%;
    height: 320px;
    overflow: hidden;

    border: 1px solid var(--contact-border);
    border-radius: 24px;
    background: #f8fafc;
    box-shadow: var(--contact-shadow-sm);
}

@media (min-width: 768px) {
    .contact-section__map {
        height: 380px;
    }
}

@media (min-width: 992px) {
    .contact-section__map {
        height: 520px;
        position: sticky;
        top: calc(var(--header-h, 80px) + 20px);
    }
}

.contact-section__map iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}


/* =========================================================
   3. CONTEÚDO DO CONTATO
   ========================================================= */

.contact-section__content {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 32px;
}

.contact-quick {
    padding: 24px;
    border: 1px solid var(--contact-border);
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(255, 255, 255, 0.92));
    box-shadow: var(--contact-shadow-sm);
}

.contact-quick__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 18px;
}

@media (min-width: 576px) {
    .contact-quick__grid {
        grid-template-columns: 1fr 1fr;
    }
}

.contact-quick__card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px;
    border-radius: 18px;
    border: 1px solid rgba(139, 92, 246, 0.16);
    background: #ffffff;
    color: var(--contact-text);
    text-decoration: none;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.contact-quick__card:hover,
.contact-quick__card:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(139, 92, 246, 0.32);
    box-shadow: var(--contact-shadow-md);
    outline: none;
}

.contact-quick__icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #a78bfa 0%, var(--contact-cta-dark) 100%);
    color: #ffffff;
    box-shadow:
        inset 0 0 0 4px rgba(255, 255, 255, 0.18),
        0 6px 16px rgba(109, 40, 217, 0.22);
}

.contact-quick__icon svg {
    display: block;
    width: 22px;
    height: 22px;
}

.contact-quick__body strong {
    display: block;
    font-weight: 850;
    line-height: 1.2;
}

.contact-quick__body span {
    display: block;
    color: var(--contact-muted);
    font-size: 0.92rem;
    line-height: 1.35;
}

.contact-quick__details {
    display: grid;
    gap: 12px;
    margin: 0;
}

.contact-quick__detail {
    display: grid;
    gap: 4px;
}

.contact-quick__detail dt {
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--contact-cta-dark);
}

.contact-quick__detail dd {
    margin: 0;
    color: var(--contact-muted);
    font-size: 0.98rem;
    line-height: 1.55;
}

.contact-feedback {
    min-height: 1.25rem;
    margin: -8px 0 0;
    color: var(--contact-cta-dark);
    font-weight: 750;
    font-size: 0.92rem;
}

.contact-section__header {
    text-align: left;
}

.contact-section__header .h2 {
    margin: 0 0 16px;

    color: var(--contact-text);
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 800;
    line-height: 1.15;
}

.contact-section__header .lead {
    color: var(--contact-muted);
    font-size: 1rem;
    line-height: 1.65;
}

@media (min-width: 768px) {
    .contact-section__header .lead {
        font-size: 1.1rem;
    }
}


/* =========================================================
   4. FORMULÁRIO DE CONTATO
   ========================================================= */

.contact-form {
    padding: 32px;

    border: 1px solid var(--contact-border);
    border-radius: 24px;
    background: var(--contact-surface);
    box-shadow: var(--contact-shadow-sm);
}

@media (max-width: 767.98px) {
    .contact-form {
        padding: 24px;
    }
}

.contact-form__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (min-width: 576px) {
    .contact-form__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.contact-form__field {
    margin-bottom: 20px;
}

.contact-form__field label {
    display: block;
    margin-bottom: 8px;

    color: var(--contact-text);
    font-size: 0.85rem;
    font-weight: 700;
}

.contact-form__field input,
.contact-form__field textarea {
    width: 100%;
    padding: 12px 16px;

    border: 2px solid #e2e8f0;
    border-radius: 16px;
    background: #ffffff;
    color: var(--contact-text);

    font: inherit;
    font-size: 1rem;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.contact-form__field input:focus,
.contact-form__field textarea:focus {
    outline: none;
    border-color: var(--contact-cta);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
}

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

/* Botão do formulário */
.contact-form__actions {
    margin-top: 8px;
    text-align: center;
}

.contact-form__submit {
    min-width: 180px;
}

.fineprint {
    color: #94a3b8;
    font-size: 0.75rem;
    line-height: 1.5;
    text-align: center;
}


/* =========================================================
   5. LINKS DE CONTATO E REDES SOCIAIS — SOMENTE ÍCONES
   ---------------------------------------------------------
   O HTML continua com título e texto para acessibilidade.
   Visualmente, apenas os ícones aparecem, alinhados em grade.
   ========================================================= */

.contact-links {
    display: grid;
    grid-template-columns: repeat(4, 64px);
    gap: 18px;
    justify-content: center;
    align-items: center;

    margin-top: 4px;
}

/*
  Cada link vira um botão circular.
  O texto interno é ocultado visualmente mais abaixo.
*/
.contact-links__item {
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    cursor: pointer;
    position: relative;

    width: 64px;
    height: 64px;
    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(139, 92, 246, 0.14);
    border-radius: 999px;
    background: #ffffff;
    color: var(--contact-cta);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.10);

    text-decoration: none;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease,
        background-color 0.2s ease;
}

.contact-links__item:hover {
    transform: translateY(-3px);
    border-color: rgba(139, 92, 246, 0.30);
    background: #f8f5ff;
    box-shadow: var(--contact-shadow-md);
}

.contact-links__item:focus-visible {
    outline: 3px solid rgba(139, 92, 246, 0.35);
    outline-offset: 4px;
}

/* Círculo roxo interno do ícone */
.contact-links__icon {
    width: 46px;
    height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 999px;
    background: linear-gradient(135deg, #a78bfa 0%, var(--contact-cta-dark) 100%);
    color: #ffffff;

    box-shadow:
        inset 0 0 0 4px rgba(255, 255, 255, 0.18),
        0 6px 16px rgba(109, 40, 217, 0.22);
}

.contact-links__icon svg {
    display: block;
    width: 24px;
    height: 24px;
}

/*
  Texto oculto apenas visualmente.
  Mantém o conteúdo disponível para leitores de tela.
*/
.contact-links__content {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;

    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;

    border: 0 !important;
    white-space: nowrap !important;
}

.contact-links__content strong,
.contact-links__content span {
    font-size: inherit;
    color: inherit;
}


/* =========================================================
   6. RESPONSIVIDADE DOS ÍCONES
   ========================================================= */

@media (min-width: 768px) {
    .contact-links {
        justify-content: flex-start;
    }
}

@media (max-width: 575.98px) {
    .contact-links {
        grid-template-columns: repeat(4, 58px);
        gap: 14px;
        justify-content: center;
    }

    .contact-links__item {
        width: 58px;
        height: 58px;
    }

    .contact-links__icon {
        width: 42px;
        height: 42px;
    }

    .contact-links__icon svg {
        width: 22px;
        height: 22px;
    }
}

@media (max-width: 360px) {
    .contact-links {
        grid-template-columns: repeat(4, 52px);
        gap: 12px;
    }

    .contact-links__item {
        width: 52px;
        height: 52px;
    }

    .contact-links__icon {
        width: 38px;
        height: 38px;
    }

    .contact-links__icon svg {
        width: 20px;
        height: 20px;
    }
}


/* =========================================================
   7. RESPONSIVIDADE ADICIONAL DO FORMULÁRIO
   ========================================================= */

@media (max-width: 480px) {
    .contact-form {
        padding: 20px;
    }

    .contact-form__field input,
    .contact-form__field textarea {
        padding: 10px 14px;
    }

    .contact-form__submit {
        width: 100%;
        justify-content: center;
    }
}


/* =========================================================
   8. ACESSIBILIDADE — REDUÇÃO DE MOVIMENTO
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .contact-links__item,
    .contact-form__field input,
    .contact-form__field textarea {
        transition: none;
    }

    .contact-links__item:hover {
        transform: none;
    }
}


/* =========================================================
   FIM — CONTATO.CSS
   ========================================================= */
