/************************************************************
 * 3LEGANT — CONTACT PAGE
 * CSS DO ZERO · DETALHADO · PADRONIZADO
 * - Paleta: preto #0F172A, azul #2563EB, cinzas suaves
 * - Tipos: Inter (sistema fallback)
 * - Breakpoints oficiais: ≤1100px (tablet), ≤550px (mobile)
 ************************************************************/

/* ==========================================================
   0) TOKENS / VARIÁVEIS
   ========================================================== */
:root {
    /* layout */
    --container-max: 1200px;
    --container-x: 16px;
    --radius-lg: 12px;
    --radius-md: 10px;
    --radius-sm: 8px;
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, .10);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, .08);
    --shadow-sm: 0 4px 10px rgba(0, 0, 0, .06);

    /* cores base */
    --ink: #0F172A;
    /* principal */
    --ink-2: #334155;
    /* texto secundário */
    --muted: #6B7280;
    /* texto fraco */
    --line: rgba(15, 23, 42, .12);
    --bg: #FFFFFF;
    --bg-alt: #F6F7F9;
    /* blocos suaves */

    /* marca */
    --brand: #2563EB;
    /* azul */
    --accent: #0F172A;
    /* botões escuros */

    /* estados */
    --success: #16A34A;
    --danger: #DC2626;
    --warning: #F59E0B;
}

/* ==========================================================
   1) RESET & FUNDAMENTOS
   ========================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* Utilitários rápidos */
.container {
    width: 100%;
    max-width: var(--container-max);
    padding-left: var(--container-x);
    padding-right: var(--container-x);
    margin-inline: auto;
}

.hidden {
    display: none !important;
}

/* ==========================================================
   2) HEADER (PADRÃO DO SITE)
   ========================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
}

.logo {
    font-size: 1.28rem;
    font-weight: 800;
    letter-spacing: .2px;
}

.main-nav {
    display: flex;
    gap: 22px;
}

.main-nav a {
    color: var(--ink-2);
    font-size: .95rem;
}

.main-nav a:hover {
    color: var(--brand);
}

.main-nav a[aria-current="page"] {
    color: var(--ink);
    font-weight: 700;
}

.header-icons {
    display: flex;
    gap: 14px;
    font-size: 1.1rem;
}

.header-icons .icon {
    padding: 6px 8px;
    border-radius: var(--radius-sm);
}

.header-icons .icon:hover {
    background: rgba(15, 23, 42, .06);
}

/* Mobile: simplifica o header ocultando a nav (sem menu hambúrguer) */
@media (max-width: 550px) {
    .header-inner {
        padding: 12px 0;
    }

    .main-nav {
        display: none;
    }
}

/* ==========================================================
   3) HERO DA PÁGINA DE CONTATO
   ========================================================== */
.contact-hero {
    background: var(--bg-alt) url('contact-hero.jpg') center/cover no-repeat;
    border-bottom: 1px solid var(--line);
}

.contact-hero .container {
    padding: 48px 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: .92rem;
    margin-bottom: 6px;
}

.breadcrumb a {
    color: var(--muted);
}

.contact-hero h1 {
    font-size: 2rem;
    margin: 6px 0 4px;
}

.hero-sub {
    color: #475569;
}

/* Ajuste responsivo hero */
@media (max-width: 550px) {
    .contact-hero .container {
        padding: 28px 0;
    }

    .contact-hero h1 {
        font-size: 1.6rem;
    }
}

/* ==========================================================
   4) CARDS DE CONTATO (telefone, email, endereço)
   ========================================================== */
.contact-cards {
    background: var(--bg);
}

.contact-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    padding: 24px 0;
}

.c-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 18px;
    transition: box-shadow .2s ease, transform .2s ease;
}

.c-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.c-icon {
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.c-card h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.c-card p {
    margin: 2px 0;
    color: var(--ink);
}

.c-card small {
    color: var(--muted);
}

/* Responsivo dos cards */
@media (max-width: 1100px) {
    .contact-cards-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 550px) {
    .contact-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================
   5) MAIN: FORMULÁRIO + MAPA
   ========================================================== */
.contact-main {
    background: var(--bg);
    padding: 10px 0 56px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 28px;
}

/* ----- FORM ----- */
.contact-form {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 22px;
}

.contact-form h2 {
    font-size: 1.25rem;
    margin: 0 0 14px;
}

/* fileiras e campos */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.form-field label {
    font-weight: 700;
    font-size: .92rem;
    color: var(--ink);
}

.form-field input,
.form-field textarea {
    background: #fff;
    border: 1px solid #D1D5DB;
    border-radius: var(--radius-md);
    padding: 12px 14px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.form-field textarea {
    resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

/* checkbox de consentimento */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 6px 0 14px;
    color: var(--ink-2);
}

.form-check input {
    margin-top: 3px;
    accent-color: var(--accent);
}

/* botão principal */
.btn-primary {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    font-weight: 800;
    transition: background .2s ease, transform .1s ease;
}

.btn-primary:hover {
    background: var(--brand);
}

.btn-primary:active {
    transform: translateY(1px);
}

/* mensagens de validação */
.error {
    color: var(--danger);
    font-size: .82rem;
    min-height: 1.1em;
}

.form-success {
    margin-top: 10px;
    color: var(--success);
    font-weight: 700;
}

/* ----- MAPA / LATERAL ----- */
.contact-map {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.map-embed {
    background: #E5E7EB;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 16 / 12;
}

.map-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.visit-box {
    background: #F9FAFB;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 18px;
    color: var(--ink);
}

.visit-box h3 {
    margin: 0 0 6px;
}

.visit-btn {
    display: inline-block;
    margin-top: 10px;
    background: var(--accent);
    color: #fff;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-weight: 800;
    transition: background .2s ease, transform .1s ease;
}

.visit-btn:hover {
    background: var(--brand);
}

.visit-btn:active {
    transform: translateY(1px);
}

/* Responsivo do main */
@media (max-width: 1100px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .map-embed {
        aspect-ratio: 16 / 9;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================
   6) FAQ (opcional)
   ========================================================== */
.contact-faq {
    background: var(--bg);
    padding: 16px 0 60px;
}

.contact-faq h2 {
    font-size: 1.25rem;
    margin: 0 0 12px;
}

.faq-item {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    margin-bottom: 10px;
    transition: box-shadow .2s ease;
}

.faq-item summary {
    cursor: pointer;
    font-weight: 700;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item[open] {
    box-shadow: var(--shadow-sm);
}

.faq-item p {
    margin-top: 10px;
    color: var(--ink-2);
}

/* ==========================================================
   7) NEWSLETTER (MESMO TEMPLATE)
   ========================================================== */
.newsletter {
    background: #fff;
    padding: 60px 0;
}

.newsletter-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.newsletter-image img {
    max-height: 160px;
    object-fit: contain;
}

.newsletter-content {
    text-align: center;
    max-width: 520px;
    margin-inline: auto;
}

.newsletter-content h2 {
    font-size: 1.9rem;
    font-weight: 800;
    margin: 0 0 8px;
}

.newsletter-content p {
    color: var(--muted);
    margin-bottom: 20px;
}

.newsletter-form {
    display: flex;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid #D1D5DB;
    border-radius: var(--radius-md);
}

.newsletter-form input {
    flex: 1;
    min-width: 0;
    /* evita overflow */
    border: none;
    padding: 12px 14px;
    background: #fff;
}

.newsletter-form button {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 12px 20px;
    font-weight: 800;
    transition: background .2s ease;
}

.newsletter-form button:hover {
    background: var(--brand);
}

/* Responsivo newsletter */
@media (max-width: 1100px) {
    .newsletter-inner {
        flex-direction: column;
    }

    .newsletter-image img {
        max-height: 140px;
    }
}

@media (max-width: 550px) {
    .newsletter {
        padding: 44px 0;
    }

    .newsletter-content {
        max-width: 92%;
    }

    .newsletter-form {
        flex-direction: column;
        border-radius: var(--radius-lg);
    }

    .newsletter-form button {
        width: 100%;
    }
}

/* ==========================================================
   8) FOOTER (MESMO TEMPLATE)
   ========================================================== */
.site-footer {
    background: var(--ink);
    color: #fff;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.footer-brand .logo {
    color: #fff;
    font-weight: 900;
    font-size: 1.25rem;
}

.footer-brand span {
    color: #cbd5e1;
    margin-left: 8px;
}

.footer-nav {
    display: flex;
    gap: 20px;
}

.footer-nav a {
    color: #fff;
}

.footer-nav a:hover {
    color: #cbd5e1;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .12);
    padding-top: 16px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #cbd5e1;
    margin-left: 16px;
}

.footer-links a:hover {
    color: #fff;
}

.footer-social a {
    margin-left: 14px;
    color: #fff;
    font-size: 1.15rem;
}

.footer-social a:hover {
    color: #cbd5e1;
}

/* Responsivo footer */
@media (max-width: 550px) {

    .footer-inner,
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-links a,
    .footer-social a {
        margin-left: 10px;
    }
}

/* ==========================================================
   9) AJUSTES FINOS (ACESSIBILIDADE/INTERAÇÃO)
   ========================================================== */
::selection {
    background: rgba(37, 99, 235, .2);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline-color: var(--brand);
}

/* Estados inválidos (HTML5 validation) */
input:invalid,
textarea:invalid {
    border-color: rgba(220, 38, 38, .8);
}

input:invalid:focus,
textarea:invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, .15);
}