/* ABOUTME: Community card — Zeplin Community Search Page - Map (316px). */
/* ABOUTME: Heart control: pages/hub/save-heart.css */

.community-cards-section {
    max-width: var(--max-width);
}

.community-cards-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 13px;
    justify-content: center;
    margin-top: 40px;
}

.community-card {
    display: flex;
    flex-direction: column;
    width: 316px;
    max-width: 100%;
    border: none;
    border-radius: 0;
    overflow: hidden;
}

.community-card__media {
    position: relative;
    flex: none;
    isolation: isolate;
    border: none;
}

.community-card__media a {
    display: block;
}

.community-card:not(.community-card--compact) .community-card__media .hoa-photo-frame {
    aspect-ratio: auto;
    height: 211px;
}

.community-card:not(.community-card--compact) .community-card__media .hoa-photo-frame__img {
    display: block;
    width: 100%;
    height: 211px;
    object-fit: cover;
    border-top-right-radius: 10px;
}

.community-card__availability {
    position: absolute;
    top: 11px;
    left: 11px;
    z-index: 4;
    background: rgba(24, 29, 36, 0.8);
    color: #fff;
    border-radius: 12.5px;
    padding: 5px 12px;
    border: 1px solid #fff;
    font-size: 12px;
    font-weight: 500;
    line-height: 14px;
}

.community-card:not(.community-card--compact) .community-card__media > .community-card__favorite {
    position: absolute;
    top: 11px;
    right: 11px;
    z-index: 4;
    margin: 0;
}

.community-card__stat-pills {
    display: grid;
    grid-template-columns: minmax(0, 96fr) minmax(0, 117fr) minmax(0, 96fr);
    column-gap: 2px;
    row-gap: 0;
    min-height: 27px;
    margin: 0;
    padding: 0;
}

.community-card__stat {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 4px;
    min-height: 27px;
    background-color: rgba(137, 152, 166, 0.1);
    font-size: 10px;
    line-height: 14px;
    color: var(--hoa-dark-blue);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@supports (background: color-mix(in srgb, red, blue)) {
    .community-card__stat {
        background-color: color-mix(in srgb, var(--hoa-medium-grey) 10%, #fff);
    }
}

.community-card__stat-value {
    font-weight: 700;
}

.community-card__stat-label {
    font-weight: 400;
}

.community-card__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 0;
    background: #fff;
    border: 1px solid var(--hoa-light-grey);
    border-radius: 0 0 20px 20px;
    overflow: hidden;
}

.community-card__body-inner {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 11px;
}

.community-card__headline {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.community-card__headline h2,
.community-card__headline h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    line-height: 14px;
}

.community-card__headline-link {
    color: inherit;
    text-decoration: none;
}

.community-card__location {
    margin: 0;
}

.community-card__homes-count {
    margin: 0;
}

.community-card__price {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 14px;
    color: var(--hoa-rust);
}

.community-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    color: var(--hoa-medium-grey);
    font-size: 12px;
    font-weight: 700;
    line-height: 14px;
}

.community-card__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.community-card__meta-item .material-symbols-outlined {
    font-size: 14px;
    color: var(--hoa-medium-grey);
}

.community-card__copy {
    margin: 0;
    font-size: 10px;
    font-weight: 500;
    line-height: 14px;
    color: var(--hoa-dark-blue);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    overflow: hidden;
}

.community-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
}

.community-card__tag {
    border: 1px solid var(--hoa-medium-grey);
    border-radius: 4px;
    padding: 6px 11px;
    color: var(--hoa-medium-grey);
    font-size: 12px;
    font-weight: 700;
    line-height: 14px;
    text-transform: uppercase;
    background: #fff;
}

.community-card__link {
    font-size: 10px;
    font-weight: 700;
    line-height: 14px;
    color: var(--hoa-rust);
    text-decoration: underline;
}

/* Compact (nearby communities) */
.community-card--compact {
    border-top-left-radius: 0;
}

.community-card--compact .community-card__media .hoa-photo-frame {
    aspect-ratio: auto;
    height: 211px;
}

.community-card--compact .hoa-photo-frame__img {
    width: 100%;
    height: 211px;
    object-fit: cover;
    border-top-right-radius: 10px;
}

.community-card--compact .community-card__body-inner {
    padding: 20px;
}

@media (max-width: 768px) {
    .community-card,
    .community-card--compact {
        width: 100%;
    }

    .community-cards-section h2 {
        font-size: 24px;
    }
}
