/* O cartão de corretor (`public_site/parts/cartao_corretor.html`).
 *
 * Vale no site e na prévia da aba de Meu site. As medidas de dentro são em
 * `cqw` (largura do cartão): o cartão se desenha igual, só maior ou menor,
 * na coluna do imóvel, na grade da página "Corretores" e na prévia.
 * As cores chegam por `--cc-principal` / `--cc-destaque` (macro `estilo`); as
 * fontes são as do site (`--font-titulo` / `--font-corpo`). */

.cc {
    --p: var(--cc-principal, #0B1F3A);
    --d: var(--cc-destaque, #C9A24A);
    --cc-tinta: #1D2433;
    --cc-suave: #5B6372;
    --cc-fonte-titulo: var(--font-titulo, "Montserrat", system-ui, sans-serif);
    --cc-fonte: var(--font-corpo, system-ui, sans-serif);
    container-type: inline-size;
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 22px 44px -26px rgba(15, 23, 42, .45);
    color: var(--cc-tinta);
    font-family: var(--cc-fonte);
    text-align: center;
}
.cc *, .cc *::before, .cc *::after { box-sizing: border-box; }
.cc img { display: block; max-width: 100%; }
.cc p, .cc h3 { margin: 0; }
.cc a { color: inherit; text-decoration: none; }

.cc-ico { width: 1.15em; height: 1.15em; flex-shrink: 0; }
.cc-contato {
    display: inline-flex; align-items: center; justify-content: center;
    gap: .4em; min-width: 0; max-width: 100%;
}
.cc-contato > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.cc-contato:hover > span { text-decoration: underline; text-underline-offset: 2px; }

.cc-iniciais {
    display: grid; place-items: center; width: 100%; height: 100%;
    background: var(--p); color: var(--d);
    font-family: var(--cc-fonte-titulo); font-weight: 700; font-size: 14cqw;
    letter-spacing: .04em;
}

/* O nome em duas linhas: o primeiro forte, o resto embaixo. `h3.cc-nome`
   para vencer o `h3` dos temas (`body.tema-interior h3`). */
.cc h3.cc-nome {
    font-family: var(--cc-fonte-titulo); color: var(--p); font-weight: 800;
    line-height: 1.02; text-transform: uppercase; letter-spacing: .01em;
    overflow-wrap: anywhere;
}
.cc-nome strong, .cc-nome span { display: block; font-weight: inherit; }

/* ── Botões (no pé de todos os layouts) ── */
.cc-acoes {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
    gap: 8px 18px; padding: 14px 16px;
}
.cc-btn {
    display: inline-flex; align-items: center; gap: 4px;
    font: 600 clamp(12px, 3.6cqw, 15px)/1.1 var(--cc-fonte);
    padding: 10px 18px; border-radius: 999px; color: var(--p);
    transition: background-color .2s, color .2s;
}
.cc-btn small { font-weight: 500; opacity: .7; }
.cc-btn--contorno { border: 1.5px solid var(--p); }
a.cc-btn--contorno:hover { background: var(--p); color: #fff; }
.cc-btn--texto { padding-inline: 4px; }
a.cc-btn--texto:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================
   Deitado
   ============================================================ */
.cc-h { position: relative; display: flex; flex-direction: column; aspect-ratio: 4 / 3; }
.cc-h__faixa { position: absolute; inset: 0 auto 0 0; width: 25%; background: var(--p); }
.cc-h__faixa::after {
    content: ""; position: absolute; top: 0; bottom: 0; right: -.7cqw; width: .7cqw;
    background: linear-gradient(180deg, var(--d), color-mix(in srgb, var(--d) 55%, #fff), var(--d));
}
.cc-h__foto {
    position: absolute; left: 5%; top: 44%; transform: translateY(-50%);
    width: 40%; aspect-ratio: 1; border-radius: 50%; padding: 1.2cqw;
    background: linear-gradient(135deg, var(--d), color-mix(in srgb, var(--d) 45%, #fff) 45%, var(--d));
    box-shadow: 0 12px 26px -14px rgba(0, 0, 0, .55);
}
.cc-h__foto img, .cc-h__foto .cc-iniciais {
    width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
    border: .8cqw solid #fff;
}
.cc-h__corpo {
    flex: 1; margin-left: 49%; padding: 5cqw 4cqw 2cqw 3cqw;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 1cqw; min-width: 0;
}
.cc-h__logo { margin-bottom: 1.6cqw; }
.cc-h__logo img { max-height: 9cqw; max-width: 36cqw; object-fit: contain; margin: 0 auto; }
.cc-h__logo span, .cc-r__logo span, .cc-m__logo span {
    font-family: var(--cc-fonte-titulo); font-weight: 700; color: var(--p);
    text-transform: uppercase; letter-spacing: .08em; font-size: 3.2cqw;
}
/* O nome encolhe pela maior palavra (`--letras`, do serviço) para caber na
   largura que tem — uma letra maiúscula larga mede perto de .72em. */
.cc-h__nome { font-size: min(8cqw, calc(44cqw / (var(--letras, 6) * .72))); }
.cc .cc-h__nome span { font-weight: 400; }
.cc-h__cargo { font-size: max(10px, 3.5cqw); color: var(--cc-suave); margin-top: .4cqw; }
.cc-h__whats { font-size: max(11px, 3.9cqw); font-weight: 700; color: var(--p); margin-top: 1.6cqw; max-width: 100%; }
.cc-h__creci {
    font-size: max(10px, 3.1cqw); font-weight: 600; letter-spacing: .06em;
    margin-top: .4cqw;
}
.cc-h__rodape {
    position: relative; margin-left: 27%; padding: 0 3cqw 3.6cqw;
    display: flex; flex-wrap: wrap; justify-content: center; gap: .6cqw 3cqw;
    font-size: max(10px, 2.9cqw);
}
.cc-h__rodape .cc-ico { color: var(--p); }
.cc--horizontal .cc-acoes { border-top: 1px solid #ECEEF2; }

/* ============================================================
   Retrato
   ============================================================ */
/* No próprio `.cc` o cqw mediria o pai dele: a folga vai em %, que é a
   largura do pai — e o cartão ocupa o pai inteiro. */
.cc--retrato { padding: 5% 6%; border-radius: 22px; }
.cc-r__logo { margin-bottom: 4cqw; }
.cc-r__logo img { max-height: 9cqw; max-width: 44cqw; object-fit: contain; margin: 0 auto; }
.cc-r__foto, .cc-m__foto {
    position: relative; aspect-ratio: 10 / 9; overflow: hidden; background: #EEF0F3;
}
.cc-r__foto { border-radius: 3cqw 3cqw 0 0; }
.cc-r__foto::after, .cc-m__foto::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.3cqw;
    background: linear-gradient(90deg, var(--p) 0 50%, var(--d));
}
.cc-r__foto img, .cc-m__foto img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.cc-r__foto .cc-iniciais, .cc-m__foto .cc-iniciais { font-size: 22cqw; }
.cc-r__nome { font-size: min(10cqw, calc(86cqw / (var(--letras, 6) * .72))); margin-top: 6cqw; }
.cc-r__cargo, .cc-m__cargo {
    margin-top: 2cqw; font-size: max(11px, 3.9cqw);
    text-transform: uppercase; letter-spacing: .07em; color: var(--cc-suave);
}
.cc-r__whats { margin-top: 4cqw; font-size: max(15px, 6.2cqw); font-weight: 600; }
.cc-r__whats .cc-ico { color: var(--p); }
.cc-r__extras, .cc-m__extras {
    display: flex; flex-direction: column; align-items: center; gap: 1cqw;
    margin-top: 2.6cqw; font-size: max(11px, 3.5cqw); color: var(--cc-suave);
}
.cc-r__extras .cc-ico, .cc-m__extras .cc-ico { color: var(--p); }
.cc-r__linha {
    border: 0; height: 1.5px; margin: 5cqw 0 0;
    background: linear-gradient(90deg, var(--p), var(--d));
}
.cc--retrato .cc-acoes, .cc--moderno .cc-acoes { padding: 3.5cqw 0 0; }
.cc-r__creci {
    margin-top: 4cqw; font-size: max(10px, 3.2cqw); font-weight: 600;
    letter-spacing: .08em; color: var(--cc-suave);
}

/* ============================================================
   Retrato moderno
   ============================================================ */
.cc--moderno {
    padding: 5% 6% 0; border-radius: 22px;
    background: linear-gradient(180deg, #fff 55%, color-mix(in srgb, var(--d) 9%, #fff));
}
.cc-m__topo { position: relative; }
.cc-m__logo {
    position: absolute; z-index: 1; top: -5cqw; left: 50%; transform: translateX(-50%);
    min-width: 48cqw; padding: 2.4cqw 8cqw 2.8cqw; background: #fff;
    clip-path: polygon(0 0, 100% 0, 88% 100%, 12% 100%);
}
.cc-m__logo img { max-height: 8cqw; max-width: 34cqw; object-fit: contain; margin: 0 auto; }
.cc-m__foto { border-radius: 4cqw; }
.cc-m__foto::after { height: 1.8cqw; background: linear-gradient(90deg, var(--d), var(--p)); }
.cc-m__nome { font-size: min(10.5cqw, calc(86cqw / (var(--letras, 6) * .72))); margin-top: 6cqw; }
.cc-m__whats { margin-top: 4.5cqw; }
.cc-m__whats .cc-contato {
    padding: 2.4cqw 6cqw; border-radius: 999px; color: #fff;
    font-size: max(15px, 5.6cqw); font-weight: 700;
    background: linear-gradient(90deg, var(--d), var(--p));
    box-shadow: 0 12px 22px -12px color-mix(in srgb, var(--p) 80%, transparent);
}
.cc-m__rodape {
    display: flex; flex-direction: column; gap: .6cqw;
    margin: 4cqw -6cqw 0; padding: 5cqw 6cqw;
    font-size: max(10px, 3.1cqw); letter-spacing: .08em; text-transform: uppercase;
    color: var(--cc-suave);
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--d) 12%, transparent) 25%, transparent 25%) 0 0 / 16cqw 16cqw,
        linear-gradient(225deg, color-mix(in srgb, var(--p) 8%, transparent) 25%, transparent 25%) 0 0 / 16cqw 16cqw;
    border-bottom: 1.8cqw solid; border-image: linear-gradient(90deg, var(--d), var(--p)) 1;
}
.cc-m__rodape strong { color: var(--cc-tinta); font-size: max(11px, 3.6cqw); }

/* ============================================================
   Grade (página "Corretores")
   ============================================================ */
.cc-grade {
    display: grid; gap: clamp(20px, 3vw, 36px); justify-content: center;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 340px));
}
.cc-grade--horizontal { grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 460px)); }
