/* vn-photo-cards — Home care cards (panel) + Memory Care neighborhood (open)
   Source: Latest mockups/corrected/index.html (.care-cards-section)
           + mem-care/index.html (.gallery-section). */

.vn-cards {
    --vn-cards-rule: #DFE6EF;
    margin: clamp(28px, 3.6vw, 44px) clamp(20px, 4vw, 48px);
    padding: clamp(28px, 3.6vw, 44px) clamp(20px, 3vw, 32px);
    background-color: #F2F2F2;
    border-radius: 10px;
    font-family: var(--vn-font-body);
    color: var(--vn-ink);
}

/* Dividers: right rule on every card, the clipped list hides the outer one */
.vn-cards__inner {
    max-width: 1704px;
    margin: 0 auto;
    overflow: hidden;
}

.vn-cards__list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
    margin-right: -1px;
}

.vn-cards__item {
    min-width: 0;
    padding: 0 clamp(10px, 1.1vw, 20px);
    border-right: 1px solid var(--vn-cards-rule);
}

.vn-cards .vn-cards__link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.vn-cards__link:focus-visible { outline: 3px solid var(--vn-navy); outline-offset: 4px; border-radius: 10px; }

.vn-cards__photo {
    position: relative;
    overflow: hidden;
    aspect-ratio: 403 / 303;
    border-radius: 10px;
    background-color: var(--vn-card);
}

.vn-cards__photo .vn-img-cover {
    position: absolute;
    inset: 0;
    transition: transform 0.6s ease;
}

.vn-cards__link:hover .vn-img-cover,
.vn-cards__link:focus-visible .vn-img-cover { transform: scale(1.03); }

.vn-cards .vn-cards__title {
    margin: 24px 0 14px;
    font-family: var(--vn-font-body);
    font-size: clamp(1rem, 1vw, 1.625rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.04em;
    text-align: center;
    text-transform: uppercase;
    color: var(--vn-navy);
}

.vn-cards .vn-cards__text {
    margin: 0;
    font-size: clamp(1.1875rem, 1.25vw, 2.265rem);
    font-weight: 500;
    line-height: 1.34;
    text-align: center;
}

/* ── Open (Memory Care) ── */

.vn-cards-style-open .vn-cards {
    margin: 0;
    padding: clamp(30px, 3.5vw, 40px) clamp(20px, 3.85vw, 74px) clamp(50px, 5vw, 90px);
    background-color: transparent;
    border-radius: 0;
    color: var(--vn-navy);
}

.vn-cards-style-open .vn-cards__inner { max-width: 1780px; overflow: visible; }

.vn-cards-style-open .vn-cards__list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(14px, 1.7vw, 32px);
    align-items: stretch;
    margin-right: 0;
}

.vn-cards-style-open .vn-cards__item { padding: 0; border-right: none; }

.vn-cards-style-open .vn-cards__photo { aspect-ratio: 336 / 242; border-radius: 14px; }

.vn-cards-style-open .vn-cards .vn-cards__title {
    margin: clamp(16px, 1.5vw, 24px) 0 10px;
    font-size: clamp(0.85rem, 1.04vw, 1.25rem);
}

.vn-cards-style-open .vn-cards .vn-cards__text {
    max-width: 234px;
    margin: 0 auto;
    font-size: clamp(0.9rem, 0.99vw, 1.1875rem);
    font-weight: 400;
    line-height: 1.35;
}

@media (max-width: 1024px) {
    .vn-cards { margin: 32px 24px; padding: 32px 20px; }
    .vn-cards__list { row-gap: 36px; }
    .vn-cards .vn-cards__title { margin: 18px 0 10px; font-size: 1rem; }
    .vn-cards .vn-cards__text { font-size: 1.05rem; }

    .vn-cards-style-open .vn-cards { margin: 0; padding: 28px 32px 56px; }
    .vn-cards-style-open .vn-cards__list { gap: 28px 20px; }
    .vn-cards-style-open .vn-cards .vn-cards__title { font-size: 0.9rem; }
    .vn-cards-style-open .vn-cards .vn-cards__text { font-size: 0.95rem; }
}

@media (max-width: 767px) {
    .vn-cards { margin: 24px 16px; padding: 24px 16px; }
    .vn-cards__list { gap: 28px 0; }

    .vn-cards-style-open .vn-cards { margin: 0; padding: 24px 20px 48px; }
    .vn-cards-style-open .vn-cards__list { gap: 24px 16px; }
    .vn-cards-style-open .vn-cards .vn-cards__text { max-width: none; }
}

@media (max-width: 480px) {
    /* !important beats the Elementor-generated mobile column count */
    .vn-cards .vn-cards__list { grid-template-columns: 1fr !important; }
    .vn-cards-style-open .vn-cards__list { gap: 26px; }
}

/* One column: no dividers */
@media (max-width: 767px) {
    .vn-cards__inner { overflow: visible; }
    .vn-cards__list { margin-right: 0; }
    .vn-cards-style-panel .vn-cards__item { padding: 0; border-right: none; }
}
