/* === SEÇÃO META ADS - HOME CINNDI ===
   Bloco editorial (sem grade de cards): fluxo em faixa + blocos alternados
   texto/imagem com prints reais da plataforma. Paleta clara do site, com
   acento em gradiente Meta (azul -> magenta). */

/* Fundo tingido de propósito: a seção de cima (Calling) é branca e a de baixo
   é escura — este bloco precisa se separar das duas. */
.mads {
    position: relative;
    padding: 90px 20px;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    background:
        radial-gradient(900px 420px at 12% -10%, rgba(37, 99, 235, .10), transparent 60%),
        radial-gradient(800px 420px at 92% 8%, rgba(219, 39, 119, .10), transparent 60%),
        linear-gradient(180deg, #eef2f9 0%, #f5f3ff 55%, #fdf2f8 100%);
    overflow: hidden;
}

.mads-container {
    position: relative;
    max-width: 1120px;
    margin: 0 auto;
}

/* ---- Cabeçalho ---- */
.mads-header {
    max-width: 780px;
    margin: 0 auto 54px;
    text-align: center;
}

.mads-eyebrow {
    display: inline-block;
    margin-bottom: 16px;
    padding: 7px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #ffffff;
    color: #2563eb;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.mads-titulo {
    margin: 0 0 16px;
    color: #0f172a;
    font-size: 40px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.02em;
}

.mads-titulo span {
    background: linear-gradient(90deg, #2563eb, #7c3aed 55%, #db2777);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.mads-subtitulo {
    margin: 0;
    color: #475569;
    font-size: 17px;
    line-height: 1.65;
}

/* ---- Trilha das etapas (linha contínua, sem cards) ---- */
.mads-trilha {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    margin: 0 0 72px;
    padding: 0;
    list-style: none;
}

/* linha que liga os números, do centro do 1º ao centro do último */
.mads-trilha::before {
    content: '';
    position: absolute;
    top: 21px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, #2563eb, #7c3aed 55%, #db2777);
    opacity: .35;
}

.mads-trilha li {
    position: relative;
    padding: 0 10px;
    text-align: center;
}

.mads-trilha-num {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    box-shadow: 0 6px 16px rgba(37, 99, 235, .28);
}

.mads-trilha li:nth-child(4) .mads-trilha-num { background: linear-gradient(135deg, #7c3aed, #c026d3); }
.mads-trilha li:nth-child(5) .mads-trilha-num { background: linear-gradient(135deg, #c026d3, #db2777); }

.mads-trilha-texto {
    display: block;
    max-width: 160px;
    margin: 0 auto;
    color: #0f172a;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
}

/* ---- Blocos alternados ---- */
.mads-bloco {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 48px;
    margin-bottom: 64px;
}

/* alternância explícita (classe, não nth-child: a faixa no meio quebraria a contagem) */
.mads-bloco-invertido .mads-bloco-visual { order: -1; }

/* ---- Faixa de destaque ---- */
.mads-faixa {
    padding: 40px 44px;
    margin-bottom: 64px;
    border-radius: 20px;
    background: linear-gradient(120deg, #1d4ed8, #7c3aed 55%, #db2777);
    color: #ffffff;
    text-align: center;
    box-shadow: 0 20px 44px rgba(124, 58, 237, .28);
}

.mads-faixa h3 {
    margin: 0 0 14px;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.01em;
}

/* texto centralizado e com medida de leitura: sem sobra vazia de um lado só */
.mads-faixa p {
    max-width: 720px;
    margin: 0 auto;
    color: rgba(255, 255, 255, .93);
    font-size: 16px;
    line-height: 1.7;
}

.mads-bloco-selo {
    display: block;
    margin-bottom: 10px;
    color: #db2777;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.mads-bloco-titulo {
    margin: 0 0 14px;
    color: #0f172a;
    font-size: 27px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.01em;
}

.mads-bloco-texto {
    margin: 0 0 20px;
    color: #475569;
    font-size: 16px;
    line-height: 1.7;
}

.mads-lista {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Itens curtos de propósito: todos cabem em uma linha só, sem quebra
   irregular entre um e outro. */
.mads-lista div {
    display: flex;
    align-items: center;
    gap: 11px;
    color: #0f172a;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
}

.mads-lista svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    padding: 3px;
    box-sizing: border-box;
    border-radius: 50%;
    background: #eff6ff;
    color: #2563eb;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* ---- Visual ---- */
.mads-bloco-visual { position: relative; }

.mads-print {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 24px 50px rgba(15, 23, 42, .12);
}

.mads-legenda {
    margin: 12px 0 0;
    color: #94a3b8;
    font-size: 13px;
    text-align: center;
}

/* Frame dos anúncios criados pela IA (crossfade simples) */
.mads-banners {
    position: relative;
    aspect-ratio: 1 / 1;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #f8fafc;
    box-shadow: 0 24px 50px rgba(15, 23, 42, .12);
    overflow: hidden;
}

.mads-banner {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    animation: mads-troca 15s infinite;
}

.mads-banner.b2 { animation-delay: 5s; }
.mads-banner.b3 { animation-delay: 10s; }

@keyframes mads-troca {
    0%, 2%    { opacity: 0; }
    6%, 31%   { opacity: 1; }
    35%, 100% { opacity: 0; }
}

.mads-banners-selo {
    position: absolute;
    left: 14px;
    bottom: 14px;
    z-index: 2;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(15, 23, 42, .82);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
}

/* ---- Faixa do clique ao cliente ---- */
.mads-conexao {
    position: relative;
    padding: 38px 40px;
    margin-bottom: 44px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #ffffff;
    text-align: center;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .06);
    overflow: hidden;
}

.mads-conexao::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #7c3aed 55%, #db2777);
}

.mads-conexao h3 {
    margin: 0 0 12px;
    color: #0f172a;
    font-size: 24px;
    font-weight: 800;
}

.mads-conexao p {
    max-width: 720px;
    margin: 0 auto;
    color: #475569;
    font-size: 16px;
    line-height: 1.7;
}

/* ---- CTA ---- */
.mads-cta {
    text-align: center;
}

.mads-cta-botoes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.mads-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 15px 28px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s;
}

.mads-btn-primario {
    background: linear-gradient(90deg, #2563eb, #7c3aed 55%, #db2777);
    color: #ffffff;
    box-shadow: 0 12px 26px rgba(124, 58, 237, .28);
}

.mads-btn-secundario {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #0f172a;
}

.mads-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, .14);
}

/* ---- Animação de entrada ---- */
.mads-anim {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .55s ease, transform .55s ease;
}

.mads-anim.visivel {
    opacity: 1;
    transform: none;
}

/* ---- Responsivo ---- */
@media (max-width: 980px) {
    .mads { padding: 70px 18px; }
    .mads-titulo { font-size: 32px; }

    .mads-trilha {
        grid-template-columns: 1fr;
        gap: 22px;
        max-width: 420px;
        margin: 0 auto 56px;
        text-align: left;
    }

    .mads-trilha::before {
        top: 12px;
        bottom: 12px;
        left: 21px;
        right: auto;
        width: 2px;
        height: auto;
        background: linear-gradient(180deg, #2563eb, #7c3aed 55%, #db2777);
    }

    .mads-trilha li {
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 0;
        text-align: left;
    }

    .mads-trilha-num {
        flex-shrink: 0;
        margin: 0;
    }

    .mads-trilha-texto {
        max-width: none;
        margin: 0;
        font-size: 15px;
    }

    .mads-bloco {
        grid-template-columns: 1fr;
        gap: 28px;
        margin-bottom: 52px;
    }

    .mads-bloco-invertido .mads-bloco-visual { order: 0; }

    .mads-faixa {
        padding: 28px 24px;
        margin-bottom: 52px;
    }

    .mads-faixa h3 { font-size: 23px; }
}

@media (max-width: 640px) {
    .mads { padding: 56px 16px; }
    .mads-titulo { font-size: 26px; }
    .mads-subtitulo { font-size: 15px; }
    .mads-bloco-titulo { font-size: 22px; }
    .mads-lista div { font-size: 14px; gap: 9px; }
    .mads-faixa { padding: 24px 20px; }
    .mads-faixa h3 { font-size: 20px; }
    .mads-faixa p { font-size: 15px; }
    .mads-conexao { padding: 24px 20px; }
    .mads-conexao h3 { font-size: 19px; }
    .mads-btn { width: 100%; justify-content: center; box-sizing: border-box; }
}

@media (prefers-reduced-motion: reduce) {
    .mads-anim { opacity: 1; transform: none; transition: none; }
    .mads-banner { animation: none; }
    .mads-banner.b1 { opacity: 1; }
}
