/* =========================================================
   Core Departments — responsive equal-height cards
   Last incomplete row (e.g. final 2 cards) stays centered
========================================================= */

.vh-core-depts .vh-core-grid {
    --vh-core-gap: 20px;
    --vh-core-cols: 4;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: var(--vh-core-gap);
    margin-bottom: 28px;
}

.vh-core-depts .vh-core-card {
    display: flex;
    flex-direction: column;
    flex: 0 1 calc((100% - (var(--vh-core-cols) - 1) * var(--vh-core-gap)) / var(--vh-core-cols));
    width: calc((100% - (var(--vh-core-cols) - 1) * var(--vh-core-gap)) / var(--vh-core-cols));
    max-width: calc((100% - (var(--vh-core-cols) - 1) * var(--vh-core-gap)) / var(--vh-core-cols));
    min-width: 0;
    height: auto;
    margin: 0;
    padding: 26px 22px;
    gap: 0;
    min-height: 0;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.vh-core-depts .vh-core-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(254, 109, 2, 0.35);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

.vh-core-depts .conditions-item-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
}

.vh-core-depts .vh-core-card .icon-box {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    margin: 0 0 18px;
    background: #fe6d02;
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    overflow: hidden;
}

.vh-core-depts .vh-core-card .icon-box::before {
    background: #025fbe;
}

.vh-core-depts .vh-core-card .icon-box i {
    position: relative;
    z-index: 1;
    color: #fff;
    transition: color 0.3s ease;
}

.vh-core-depts .vh-core-card:hover .icon-box i {
    color: #fff;
}

.vh-core-depts .vh-core-card .icon-box img {
    display: none;
}

.vh-core-depts .conditions-item-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
}

.vh-core-depts .conditions-item-content h3 {
    margin: 0 0 10px;
    color: #fff;
    font-family: var(--accent-font, "Sora", sans-serif);
    font-size: clamp(16px, 1.35vw, 18px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.vh-core-depts .conditions-item-content p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    line-height: 1.55;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.vh-core-depts .section-footer-text {
    margin-top: 8px;
}

/* Laptop — 3 columns (14 cards → last 2 centered) */
@media (max-width: 1199px) {
    .vh-core-depts .vh-core-grid {
        --vh-core-cols: 3;
        --vh-core-gap: 18px;
    }

    .vh-core-depts .vh-core-card {
        padding: 22px 18px;
    }
}

/* Tablet — 2 columns */
@media (max-width: 991px) {
    .vh-core-depts.our-conditions {
        padding: 72px 0;
    }

    .vh-core-depts .vh-core-grid {
        --vh-core-cols: 2;
        --vh-core-gap: 16px;
        margin-bottom: 22px;
    }

    .vh-core-depts .vh-core-card {
        padding: 20px 16px;
        border-radius: 16px;
    }

    .vh-core-depts .vh-core-card .icon-box {
        width: 46px;
        height: 46px;
        margin-bottom: 14px;
        font-size: 17px;
    }

    .vh-core-depts .conditions-item-content h3 {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .vh-core-depts .conditions-item-content p {
        font-size: 13.5px;
    }
}

/* Mobile — 1 column */
@media (max-width: 575px) {
    .vh-core-depts.our-conditions {
        padding: 56px 0;
    }

    .vh-core-depts .vh-core-grid {
        --vh-core-cols: 1;
        --vh-core-gap: 12px;
        margin-bottom: 18px;
    }

    .vh-core-depts .vh-core-card {
        flex-basis: 100%;
        width: 100%;
        max-width: 100%;
        padding: 18px 16px;
        border-radius: 14px;
    }

    .vh-core-depts .conditions-item-header {
        flex-direction: row;
        align-items: flex-start;
        gap: 14px;
    }

    .vh-core-depts .vh-core-card .icon-box {
        width: 44px;
        height: 44px;
        margin: 0;
        flex: 0 0 44px;
        font-size: 16px;
    }

    .vh-core-depts .conditions-item-content h3 {
        font-size: 15px;
        margin-bottom: 6px;
    }

    .vh-core-depts .conditions-item-content p {
        font-size: 13px;
        line-height: 1.5;
    }
}
