/* ==========================================================================
   iPlay Moradias - página de conversão (casa própria / financiamento)
   Cores tiradas da identidade da marca no Instagram (@iplaymoradias)
   ========================================================================== */

.moradias {
    --m-navy: #241a63;
    --m-navy-escuro: #170f45;
    --m-rosa: #e5197e;
    --m-laranja: #ff6a13;
    --m-azul: #1f5bff;
    --m-verde-whats: #1faa53;
    --m-fundo: #f6f5fb;
    --m-texto: #1d1b33;
    --m-suave: #5e5b78;
    --m-borda: #e6e3f1;
    --m-largura: min(1200px, 100% - 48px);
    background: #fff;
    color: var(--m-texto);
    font-family: var(--fonte-texto);
}

.moradias h1,
.moradias h2,
.moradias h3 {
    font-family: var(--fonte-texto);
    color: var(--m-navy);
    letter-spacing: -.01em;
}

/* ---------- Botões ---------- */
.m-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 12px;
    border: 0;
    font: 700 15px/1.1 var(--fonte-texto);
    text-decoration: none;
    cursor: pointer;
    transition: background-color .25s ease, color .25s ease, border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}

.m-btn svg {
    width: 20px;
    height: 20px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.m-btn-grande {
    min-height: 56px;
    padding: 0 28px;
    font-size: 16px;
}

.m-btn-bloco {
    width: 100%;
}

.m-btn-primario {
    background: var(--m-laranja);
    color: #fff;
    box-shadow: 0 12px 24px -14px rgba(255, 106, 19, .95);
}

.m-btn-primario:hover {
    background: #f05800;
    transform: translateY(-2px);
}

.m-btn-whats {
    background: var(--m-verde-whats);
    color: #fff;
}

.m-btn-whats:hover {
    background: #188e45;
    transform: translateY(-2px);
}

.m-btn-contorno {
    border: 1.5px solid var(--m-navy);
    color: var(--m-navy);
    background: transparent;
}

.m-btn-contorno:hover {
    background: var(--m-navy);
    color: #fff;
}

/* ---------- Cabeçalho ---------- */
.m-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s ease, box-shadow .3s ease;
}

.m-header.is-scrolled {
    border-bottom-color: var(--m-borda);
    box-shadow: 0 10px 24px -20px rgba(36, 26, 99, .5);
}

.m-header-inner {
    width: var(--m-largura);
    margin: 0 auto;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.m-brand img {
    width: 150px;
    height: auto;
}

.m-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.m-nav a:not(.m-btn) {
    color: var(--m-texto);
    text-decoration: none;
    font: 600 15px/1 var(--fonte-texto);
    transition: color .2s ease;
}

.m-nav a:not(.m-btn):hover {
    color: var(--m-rosa);
}

.m-nav-cta {
    min-height: 42px;
}

.m-toggle {
    display: none;
    background: var(--m-fundo);
}

.m-toggle span {
    background: var(--m-navy);
}

/* ---------- Hero ---------- */
.m-hero {
    width: var(--m-largura);
    margin: 0 auto;
    padding: 56px 0 64px;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    align-items: center;
    gap: 56px;
}

.m-etiqueta {
    display: inline-block;
    margin: 0 0 18px;
    padding: 7px 14px;
    border-radius: 999px;
    background: #fde8f2;
    color: var(--m-rosa);
    font: 600 13px/1.2 var(--fonte-texto);
}

.m-hero h1 {
    margin: 0;
    font-size: clamp(2.2rem, 4.2vw, 3.6rem);
    font-weight: 800;
    line-height: 1.08;
}

.m-hero h1 span {
    color: var(--m-laranja);
}

.m-hero-sub {
    margin: 18px 0 0;
    font-size: clamp(1.02rem, 1.4vw, 1.18rem);
    line-height: 1.6;
    color: var(--m-suave);
    max-width: 560px;
}

.m-hero-sub strong {
    color: var(--m-navy);
}

.m-acoes {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.m-acoes-centro {
    justify-content: center;
}

.m-hero-provas {
    list-style: none;
    margin: 34px 0 0;
    padding: 22px 0 0;
    border-top: 1px solid var(--m-borda);
    display: grid;
    grid-template-columns: repeat(3, auto);
    justify-content: start;
    gap: 12px 40px;
}

.m-hero-provas strong {
    display: block;
    font: 800 26px/1.1 var(--fonte-texto);
    color: var(--m-navy);
}

.m-hero-provas span {
    font-size: 13px;
    color: var(--m-suave);
}

.m-nota {
    margin: 12px 0 0;
    font-size: 12px;
    color: #8a87a3;
}

.m-hero-foto {
    position: relative;
    margin: 0;
}

.m-hero-foto img {
    width: 100%;
    aspect-ratio: 4 / 3.4;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 30px 60px -36px rgba(36, 26, 99, .6);
}

.m-hero-foto figcaption {
    position: absolute;
    left: 18px;
    bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #fff;
    color: var(--m-navy);
    font: 600 14px/1.2 var(--fonte-texto);
    box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .45);
}

.m-hero-foto figcaption svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--m-rosa);
    stroke-width: 2;
}

/* ---------- Faixa de garantias ---------- */
.m-faixa {
    background: var(--m-navy);
    color: #fff;
}

.m-faixa ul {
    list-style: none;
    margin: 0 auto;
    padding: 22px 0;
    width: var(--m-largura);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px 24px;
}

.m-faixa li {
    display: flex;
    align-items: center;
    gap: 12px;
    font: 600 14px/1.3 var(--fonte-texto);
}

.m-faixa svg {
    width: 26px;
    height: 26px;
    flex: none;
    fill: none;
    stroke: #ffb37a;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- Seções ---------- */
.m-secao {
    padding: 88px 0;
}

.m-secao-clara {
    background: var(--m-fundo);
}

.m-cabecalho {
    width: min(720px, 100% - 48px);
    margin: 0 auto 48px;
    text-align: center;
}

.m-sobretitulo {
    margin: 0 0 10px;
    color: var(--m-rosa);
    font: 700 13px/1 var(--fonte-texto);
    letter-spacing: .12em;
    text-transform: uppercase;
}

.m-cabecalho h2,
.m-mcmv h2,
.m-simulacao h2 {
    margin: 0 0 14px;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    font-weight: 800;
    line-height: 1.15;
}

.m-cabecalho p:not(.m-sobretitulo) {
    margin: 0;
    color: var(--m-suave);
    font-size: 16px;
    line-height: 1.6;
}

.m-centro {
    text-align: center;
    margin-top: 40px;
}

/* Passo a passo */
.m-passos {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    width: var(--m-largura);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    counter-reset: passo;
}

.m-passos li {
    position: relative;
    padding: 28px 24px;
    border: 1px solid var(--m-borda);
    border-radius: 18px;
    background: #fff;
    transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}

.m-passos li:hover {
    border-color: #cfc8ec;
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -30px rgba(36, 26, 99, .6);
}

.m-passo-num {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-bottom: 18px;
    border-radius: 12px;
    background: var(--m-navy);
    color: #fff;
    font: 800 17px/1 var(--fonte-texto);
}

.m-passos li:last-child .m-passo-num {
    background: var(--m-laranja);
}

.m-passos h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
}

.m-passos p {
    margin: 0;
    color: var(--m-suave);
    font-size: 14.5px;
    line-height: 1.6;
}

/* Imóveis */
.m-imoveis {
    width: var(--m-largura);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.m-imovel {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--m-borda);
    border-radius: 20px;
    overflow: hidden;
    transition: transform .35s ease, box-shadow .35s ease;
}

.m-imovel:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 50px -32px rgba(36, 26, 99, .6);
}

.m-imovel-foto {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.m-imovel-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}

.m-imovel:hover .m-imovel-foto img {
    transform: scale(1.05);
}

.m-selo {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--m-rosa);
    color: #fff;
    font: 700 12px/1 var(--fonte-texto);
}

.m-selo-verde {
    background: #13915a;
}

.m-imovel-corpo {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 22px 22px 24px;
}

.m-imovel-corpo h3 {
    margin: 0 0 4px;
    font-size: 19px;
    font-weight: 700;
}

.m-imovel-local {
    margin: 0 0 16px;
    color: var(--m-rosa);
    font: 600 14px/1.3 var(--fonte-texto);
}

.m-lista,
.m-check {
    list-style: none;
    margin: 0 0 22px;
    padding: 0;
    display: grid;
    gap: 9px;
}

.m-lista li,
.m-check li {
    position: relative;
    padding-left: 26px;
    font-size: 14.5px;
    line-height: 1.45;
    color: var(--m-texto);
}

.m-lista li::before,
.m-check li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fde8f2 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e5197e' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.m-imovel-corpo .m-btn {
    margin-top: auto;
}

/* Minha Casa, Minha Vida */
.m-mcmv-grid,
.m-simulacao-grid {
    width: var(--m-largura);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    align-items: center;
    gap: 64px;
}

.m-mcmv-texto > p:not(.m-sobretitulo) {
    margin: 0 0 22px;
    color: var(--m-suave);
    font-size: 16px;
    line-height: 1.65;
}

.m-mcmv-foto {
    margin: 0;
}

.m-mcmv-foto img {
    width: 100%;
    border-radius: 24px;
    box-shadow: 0 30px 60px -38px rgba(36, 26, 99, .65);
}

/* Histórias */
.m-historias {
    width: var(--m-largura);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.m-historias figure {
    margin: 0;
    background: #fff;
    border: 1px solid var(--m-borda);
    border-radius: 20px;
    overflow: hidden;
}

.m-historias img {
    width: 100%;
    aspect-ratio: 1 / 1.05;
    object-fit: cover;
}

.m-historias figcaption {
    padding: 16px 18px 18px;
    color: var(--m-navy);
    font: 600 14.5px/1.4 var(--fonte-texto);
}

/* Simulação */
.m-simulacao {
    background:
        radial-gradient(circle at 85% 10%, rgba(229, 25, 126, .28), transparent 40%),
        var(--m-navy);
    color: #fff;
}

.m-simulacao h2 {
    color: #fff;
}

.m-simulacao .m-sobretitulo {
    color: #ff9cc9;
}

.m-simulacao-texto > p:not(.m-sobretitulo) {
    margin: 0 0 22px;
    color: #d9d5f3;
    font-size: 16px;
    line-height: 1.65;
}

.m-check-claro li {
    color: #fff;
}

.m-check-claro li::before {
    background-color: rgba(255, 255, 255, .14);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffb37a' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E");
}

.m-form {
    display: grid;
    gap: 14px;
    padding: 28px;
    border-radius: 22px;
    background: #fff;
    color: var(--m-texto);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6);
}

.m-campo {
    display: grid;
    gap: 6px;
}

.m-campo span {
    font: 600 14px/1.2 var(--fonte-texto);
    color: var(--m-navy);
}

.m-campo input,
.m-campo select {
    width: 100%;
    height: 50px;
    padding: 0 14px;
    border: 1.5px solid var(--m-borda);
    border-radius: 12px;
    background: #fbfaff;
    color: var(--m-texto);
    font: 400 15px/1.2 var(--fonte-texto);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.m-campo input:focus,
.m-campo select:focus {
    outline: none;
    border-color: var(--m-navy);
    box-shadow: 0 0 0 4px rgba(36, 26, 99, .12);
}

.m-campos-duplos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.m-consentimento {
    color: var(--m-suave) !important;
    font-size: 13px !important;
}

.m-consentimento a {
    color: var(--m-navy) !important;
}

.m-form-nota {
    margin: 0;
    text-align: center;
    color: #8a87a3;
    font-size: 12.5px;
}

/* Dúvidas */
.m-duvidas {
    width: min(820px, 100% - 48px);
    margin: 0 auto;
    display: grid;
    gap: 12px;
}

.m-duvidas details {
    background: #fff;
    border: 1px solid var(--m-borda);
    border-radius: 16px;
    padding: 0 22px;
    transition: border-color .25s ease;
}

.m-duvidas details[open] {
    border-color: #cfc8ec;
}

.m-duvidas summary {
    position: relative;
    padding: 20px 32px 20px 0;
    list-style: none;
    cursor: pointer;
    color: var(--m-navy);
    font: 700 16px/1.35 var(--fonte-texto);
}

.m-duvidas summary::-webkit-details-marker {
    display: none;
}

.m-duvidas summary::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    width: 12px;
    height: 12px;
    border-right: 2.2px solid var(--m-rosa);
    border-bottom: 2.2px solid var(--m-rosa);
    transform: translateY(-70%) rotate(45deg);
    transition: transform .25s ease;
}

.m-duvidas details[open] summary::after {
    transform: translateY(-30%) rotate(-135deg);
}

.m-duvidas details p {
    margin: 0 0 20px;
    color: var(--m-suave);
    line-height: 1.65;
}

/* Chamada final */
.m-final {
    padding: 80px 24px;
    text-align: center;
    background: linear-gradient(135deg, var(--m-laranja), var(--m-rosa));
    color: #fff;
}

.m-final h2 {
    margin: 0 0 10px;
    color: #fff;
    font-size: clamp(1.7rem, 3.2vw, 2.5rem);
    font-weight: 800;
}

.m-final p {
    margin: 0;
    font-size: 17px;
    opacity: .95;
}

.m-final .m-btn-primario {
    background: #fff;
    color: var(--m-navy);
    box-shadow: none;
}

.m-final .m-btn-primario:hover {
    background: #f3f1ff;
}

/* Rodapé */
.m-footer {
    background: var(--m-navy-escuro);
    color: #cfcaef;
}

.m-footer-inner {
    width: var(--m-largura);
    margin: 0 auto;
    padding: 56px 0 36px;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 32px;
}

.m-footer-logo {
    width: 160px;
    padding: 10px 14px;
    background: #fff;
    border-radius: 12px;
    margin-bottom: 14px;
}

.m-footer p {
    margin: 0;
    font-size: 14px;
}

.m-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.m-footer-contato span {
    display: block;
    color: #ff9cc9;
    font: 700 12px/1.4 var(--fonte-texto);
    letter-spacing: .08em;
    text-transform: uppercase;
}

.m-footer a,
.m-footer address {
    color: #fff;
    font-style: normal;
    text-decoration: none;
    font-size: 15px;
}

.m-footer a:hover {
    color: #ffb37a;
}

.m-footer-base {
    padding: 18px 24px 24px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    text-align: center;
    font-size: 13px !important;
}

.m-credito-dev {
    margin: -14px 0 0;
    padding: 0 24px 24px;
    text-align: center;
    font-size: 11px;
    opacity: .55;
    transition: opacity .2s ease;
}

.m-credito-dev:hover,
.m-credito-dev:focus-within {
    opacity: 1;
}

.m-credito-dev a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted currentColor;
}

/* Barra fixa de ação (só no celular) */
.m-barra-acao {
    display: none;
}

/* ---------- Responsivo ---------- */
@media (max-width: 1024px) {
    .m-toggle {
        display: inline-flex;
    }

    .m-nav {
        position: absolute;
        top: 76px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px 24px 24px;
        background: #fff;
        border-bottom: 1px solid var(--m-borda);
        box-shadow: 0 20px 30px -20px rgba(36, 26, 99, .4);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity .3s ease, transform .3s ease, visibility .3s;
    }

    .m-nav.is-open {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .m-nav a:not(.m-btn) {
        padding: 14px 0;
        font-size: 17px;
        border-bottom: 1px solid var(--m-borda);
    }

    .m-nav-cta {
        margin-top: 16px;
    }

    .m-hero,
    .m-mcmv-grid,
    .m-simulacao-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .m-hero {
        padding-top: 36px;
    }

    .m-faixa ul,
    .m-passos {
        grid-template-columns: repeat(2, 1fr);
    }

    .m-imoveis,
    .m-historias {
        grid-template-columns: 1fr;
        max-width: 520px;
    }

    .m-footer-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .moradias {
        --m-largura: calc(100% - 32px);
    }

    .m-secao {
        padding: 64px 0;
    }

    .m-acoes .m-btn {
        width: 100%;
    }

    .m-hero-provas {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .m-hero-provas strong {
        font-size: 20px;
    }

    .m-faixa ul,
    .m-passos,
    .m-campos-duplos {
        grid-template-columns: 1fr;
    }

    .m-form {
        padding: 22px;
    }

    /* Barra de ação fixa: simular e WhatsApp sempre ao alcance do polegar */
    .m-barra-acao {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 60;
        display: grid;
        grid-template-columns: 1.4fr 1fr;
        gap: 10px;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, .97);
        border-top: 1px solid var(--m-borda);
        box-shadow: 0 -10px 24px -18px rgba(36, 26, 99, .5);
    }

    .moradias {
        padding-bottom: 72px;
    }

    .moradias .cookies {
        bottom: 84px;
    }
}
