/* ===========================================================================
   OS CARTÕES DO SITE, NUM DESENHO SÓ: O DE IMÓVEL (partials/cartao-imovel.php: DESTAQUES DA HOME E LISTAGEM) E O
   DE POST DO BLOG (partials/cartao-post.php: HOME E /blog), E A GRADE EM QUE ELES FICAM.
   =========================================================================== */

/* A GRADE DOS CARTÕES: QUATRO POR LINHA A PARTIR DE 992px, DOIS NO TABLET E UM NO CELULAR, TODOS DA MESMA ALTURA. */
.grade-cartoes {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
    padding: 0;
    list-style: none;
}

.grade-cartoes__item {
    display: flex;
    width: 100%;
    margin-bottom: 20px;
    padding: 0 10px;
}

@media (min-width: 768px) {
    .grade-cartoes__item { width: 50%; }
}

@media (min-width: 992px) {
    .grade-cartoes__item { width: 25%; }
}

/* O CARTÃO (property-item item-grid). */
/* A FOTO VAI DE PONTA A PONTA NO TOPO; O ESPAÇO INTERNO FICA SÓ NO CORPO. */
.cartao {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    border: 1px solid #dedede;
    border-radius: 5px;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
    transition: box-shadow .2s ease-out;
}

.cartao:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, .14);
}

.cartao__foto {
    position: relative;
    z-index: 1;
    height: 200px;
    margin: 0;
    overflow: hidden;
}

.cartao__link-foto {
    position: relative;
    display: block;
    height: 100%;
    overflow: hidden;
}

.cartao__link-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* O DEGRADÊ ESCURO EMBAIXO DA FOTO, QUE SOME NO HOVER; NO LUGAR DELE, UM VÉU BRANCO DE 50%. */
.cartao__link-foto::before,
.cartao__link-foto::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.cartao__link-foto::before {
    z-index: 2;
    background-color: rgba(255, 255, 255, .5);
    opacity: 0;
    transition: all .2s ease-out;
}

.cartao__link-foto::after {
    z-index: 1;
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .2) 65%, rgba(0, 0, 0, .8) 100%);
    transition: all .5s ease-out;
}

.cartao__foto:hover .cartao__link-foto::before { opacity: .5; }
.cartao__foto:hover .cartao__link-foto::after { opacity: 0; }

.cartao__etiquetas {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    font-size: 0;
}

.cartao__etiqueta {
    display: inline-block;
    padding: 3px 6px;
    border-radius: 2px;
    background-color: #777;
    color: #fff;
    font-size: 10px;
    font-weight: 500;
    line-height: 11px;
    text-transform: uppercase;
    white-space: nowrap;
}

.cartao__destaque {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    padding: .2em .6em .3em;
    border-radius: .25em;
    background-color: #6bb31d;
    color: #fff;
    font-size: 10px;
    font-weight: 500;
    line-height: 11px;
    text-transform: uppercase;
    white-space: nowrap;
}

.cartao__preco {
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 4;
}

.cartao__preco span {
    display: block;
    padding: 5px 10px;
    background-color: rgba(0, 0, 0, .5);
    color: #fff;
    font-size: 18px;
    font-weight: 500;
    line-height: 18px;
}

.cartao__corpo {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px 20px 16px;
    overflow: hidden;
}

/* ATÉ DUAS LINHAS, COM "…" (O TÍTULO DO ANÚNCIO NO ERP COSTUMA SER LONGO). */
.cartao__titulo {
    display: -webkit-box;
    min-height: 40px;
    margin: 0 0 8px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    font-size: 16px;
    font-weight: 500;
    line-height: 20px;
    text-overflow: ellipsis;
}

.cartao__local {
    margin: 0 0 16px;
    overflow: hidden;
    color: #9b9b9b;
    font-size: 13px;
    font-weight: 300;
    line-height: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* OS NÚMEROS NO PÉ DO CARTÃO (ALINHADOS ENTRE OS CARTÕES DA FILEIRA), ABAIXO DE UMA LINHA FINA:
   TRÊS COLUNAS IGUAIS, O VALOR EM CIMA E O RÓTULO PEQUENO EMBAIXO. */
.cartao__numeros {
    display: flex;
    margin: auto 0 0;
    padding: 14px 0 0;
    border-top: 1px solid #eee;
    list-style: none;
}

.cartao__numeros li {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 12px;
    border-left: 1px solid #eee;
    color: #8a8a8a;
    font-size: 11px;
    font-weight: 400;
    line-height: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cartao__numeros li:first-child {
    padding-left: 0;
    border-left: 0;
}

.cartao__numeros span {
    display: block;
    margin-bottom: 2px;
    color: var(--texto-link);
    font-size: 16px;
    font-weight: 500;
    line-height: 20px;
}

@media (max-width: 767px) {
    .cartao__preco span { font-size: 14px; line-height: 14px; }
    .cartao__titulo { min-height: 36px; margin-bottom: 16px; font-size: 14px; line-height: 18px; }
}

/* O ÍCONE ANTES DE CADA NÚMERO (CAMA, CARRO E RÉGUA, OS DO CARTÃO DO SITE ANTIGO), NA ALTURA DO VALOR. */
.cartao__numeros span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cartao__icone {
    flex: none;
    width: 16px;
    height: 16px;
    opacity: .75;
}

.cartao__numeros .icone.cartao__icone {
    width: auto;
    height: 1em;
    color: #2d2d2d;
    font-size: 16px;
    vertical-align: 0;
}
