/* ===================================================================
   AC SISTEM — Página "Contato"
   CSS Nesting nativo — conforme modelo-css.md
   =================================================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* -------- Banner da página -------- */
.page-banner {
    background: #f2f2f2;
    border-bottom: 8px solid var(--cor-primaria);
    padding-block: 60px;

    .page-banner__inner {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 16px;
        text-align: center;
    }

    .page-banner__eyebrow { justify-content: center; }

    .page-banner__title {
        max-width: 820px;
        font-weight: 700;
        font-size: clamp(1.75rem, 3.4vw, 2.625rem);
        line-height: 1.3;
        color: var(--cor-secundaria);

        .accent { color: var(--cor-primaria); }
    }

    .page-banner__crumb {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 18px;
        color: var(--cor-secundaria);

        a { transition: color 0.2s ease; }
        a:hover { color: var(--cor-primaria); }

        span[aria-hidden] { opacity: 0.5; }
        [aria-current] { opacity: 0.6; }
    }
}

/* -------- Formulário + apresentação -------- */
.contact-hero {
    background: var(--cor-branco);
    padding-block: 100px;

    .contact-hero__grid {
        display: grid;
        grid-template-columns: 1fr 580px;
        gap: 40px;
        align-items: start;
    }

    .contact-hero__intro {
        display: flex;
        flex-direction: column;
        gap: 16px;
        padding-top: 20px;

        .section-title { max-width: 540px; }
    }

    .contact-hero__lead {
        font-weight: 300;
        font-size: clamp(1rem, 1.4vw, 1.25rem);
        line-height: 1.4;
        opacity: 0.8;
    }

    .contact-metrics {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px 20px;
        margin-top: 16px;

        li {
            display: flex;
            align-items: center;
            gap: 12px;
            font-weight: 500;
            font-size: 16px;
        }

        .contact-metrics__ic {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            width: 32px;
            height: 32px;
            border-radius: 16px;
            background: var(--cor-fundo1);

            img { width: 16px; height: 16px; }
        }
    }
}

/* -------- Cartão do formulário -------- */
.form-card {
    background: var(--cor-branco);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);

    .form-card__title {
        font-weight: 700;
        font-size: 24px;
        text-align: center;
        color: var(--cor-primaria);
    }

    .form-card__submit {
        width: 100%;
        margin-top: 8px;
    }
}

.form-alert {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;

    &.form-alert--ok {
        color: #1b6b3a;
        background: #e6f6ec;
        border: 1px solid #b7e3c6;
    }

    &.form-alert--erro {
        color: #a32020;
        background: #fdecec;
        border: 1px solid #f3c2c2;

        p + p { margin-top: 4px; }
    }
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 24px;

    .form-field {
        display: flex;
        flex-direction: column;
        gap: 8px;

        label {
            font-weight: 500;
            font-size: 14px;
            color: var(--cor-secundaria);
        }
    }

    .field-error {
        font-size: 12.5px;
        line-height: 1.35;
        color: #d33;
        min-height: 0;

        &:empty { display: none; }
    }

    input,
    select,
    textarea {
        width: 100%;
        padding: 13px 16px;
        font-family: inherit;
        font-size: 14px;
        color: var(--cor-secundaria);
        background: #f9f9f9;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;

        &::placeholder { color: #999; }

        &:focus {
            outline: none;
            border-color: var(--cor-primaria);
            box-shadow: 0 0 0 3px rgba(34, 144, 205, 0.15);
        }

        &.is-invalid {
            border-color: #e0b4b4;
            background: #fdf6f6;

            &:focus {
                border-color: #d33;
                box-shadow: 0 0 0 3px rgba(221, 51, 51, 0.15);
            }
        }
    }

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

    select {
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23999' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 16px center;
        padding-right: 40px;
        cursor: pointer;
    }
}

/* -------- Canais de contato -------- */
.channels {
    background: var(--cor-fundo1);
    padding-block: 100px;

    .channels__head {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        text-align: center;
        margin-bottom: 40px;

        .section-eyebrow { justify-content: center; }
    }

    .channels__grid {
        display: flex;
        gap: 20px;
    }
}

.contact-card {
    display: flex;
    flex: 1 0 0;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 32px;
    text-align: center;
    background: var(--cor-branco);
    border-radius: 20px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;

    &:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 26px rgba(0, 0, 0, 0.08);
    }

    .contact-card__ic {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 52px;
        height: 52px;
        border-radius: 26px;
        background: var(--cor-fundo1);

        img { width: 24px; height: 24px; }
    }

    h3 {
        font-weight: 700;
        font-size: 16px;
        text-transform: capitalize;
        color: var(--cor-primaria);
    }

    a,
    p {
        font-weight: 400;
        font-size: 18px;
        color: var(--cor-secundaria);
        transition: color 0.2s ease;
    }

    a:hover { color: var(--cor-primaria); }
}

/* -------- Mapa -------- */
.map-section {
    background: var(--cor-branco);
    padding-block: 100px;

    .map-section__head {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        text-align: center;
        margin-bottom: 40px;

        .section-eyebrow { justify-content: center; }
    }

    .map-section__hours {
        margin-top: 8px;
        font-weight: 300;
        font-size: clamp(1rem, 1.4vw, 1.25rem);
        opacity: 0.8;
    }

    .map-section__frame {
        border-radius: 20px;
        overflow: hidden;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
        line-height: 0;

        iframe {
            display: block;
            width: 100%;
            height: clamp(320px, 40vw, 479px);
            border: 0;
        }
    }
}

/* -------- Responsivo -------- */
@media (max-width: 960px) {
    .contact-hero .contact-hero__grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-hero .contact-hero__intro { padding-top: 0; }
    .form-card { max-width: 580px; width: 100%; }

    .channels .channels__grid { flex-wrap: wrap; }
    .channels .contact-card { flex: 1 1 calc(50% - 10px); min-width: 220px; }
}

/* -------- Mobile (Figma: 402px, 50px/20px) -------- */
@media (max-width: 600px) {
    .page-banner .container,
    .contact-hero .container,
    .channels .container,
    .map-section .container { padding-inline: 20px; }

    /* Banner */
    .page-banner {
        padding-block: 40px;

        .page-banner__title { font-size: 26px; }
        .page-banner__crumb { font-size: 16px; }
    }

    /* Formulário + apresentação */
    .contact-hero {
        padding-block: 50px;

        .contact-hero__intro {
            align-items: center;
            text-align: center;

            .section-eyebrow { justify-content: center; }
            .section-title { font-size: 26px; max-width: none; }
        }

        .contact-hero__lead { font-size: clamp(1rem, 5vw, 1.25rem); }

        .contact-metrics {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 12px;
            margin-top: 0;

            li { font-size: 14px; }
        }
    }

    .form-card {
        padding: 24px;

        .form-card__title { font-size: 22px; }

        .form-card__submit {
            width: auto;
            align-self: center;
        }
    }

    /* Canais de contato */
    .channels {
        padding-block: 50px;

        .section-title { font-size: 26px; }
        .channels__grid { flex-direction: column; }
        .contact-card { flex: 1 1 auto; width: 100%; }
    }

    /* Mapa */
    .map-section {
        padding-block: 50px;

        .section-title { font-size: 26px; }
        .map-section__hours { font-size: clamp(1rem, 5vw, 1.25rem); }

        .map-section__frame {
            border-radius: 24px;

            iframe { height: 300px; }
        }
    }
}

/* Honeypot anti-spam — oculto de humanos, visível a bots */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
