/* Home Overview integrated stats cards.
 * Scoped to the Doctor Bio home_overview template so legacy/default layouts remain unchanged.
 */

.acdb-template-home_overview {
    --acdb-home-image-height: 320px;
}

/* Keep the homepage image frame compact regardless of the source image aspect ratio.
 * The source file itself is never resized or recompressed; object-fit preserves proportions.
 * :where() intentionally keeps this fallback less specific than Elementor's per-widget
 * image controls, so the existing Style > Doctor Image controls always win when edited.
 */
.acdb-template-home_overview .acdb-template-media {
    min-height: 0;
}

:where(.acdb-template-home_overview) .acdb-template-image-frame {
    height: var(--acdb-home-image-height);
    min-height: 0;
}

:where(.acdb-template-home_overview) .acdb-template-image-frame img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
    object-position: center;
}

.acdb-template-home_overview.acdb-template-has-home-stats .acdb-template-shell {
    row-gap: 18px;
    padding-bottom: 20px;
}

.acdb-template-home_overview .acdb-home-stats {
    --acdb-home-stats-columns: 4;
    --acdb-home-stats-gap: 0px;
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(var(--acdb-home-stats-columns), minmax(0, 1fr));
    gap: var(--acdb-home-stats-gap);
    width: 100%;
    margin-top: 2px;
    padding: 10px 8px;
    border: 1px solid rgba(23, 105, 232, .07);
    border-radius: 18px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 12px 28px rgba(34, 72, 120, .06);
}

.acdb-template[dir="rtl"] .acdb-home-stats {
    direction: rtl;
}

.acdb-template[dir="ltr"] .acdb-home-stats {
    direction: ltr;
}

.acdb-template-home_overview .acdb-home-stat {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 92px;
    padding: 12px 18px;
    text-align: center;
}

.acdb-template-home_overview .acdb-home-stat-value {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    min-width: 0;
    color: #1769e8;
    font-size: clamp(25px, 2.2vw, 34px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.02em;
    white-space: nowrap;
}

.acdb-template-home_overview .acdb-home-stat-title {
    margin-top: 9px;
    color: #29384a;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.7;
}

.acdb-template-home_overview .acdb-home-stat-description {
    max-width: 190px;
    margin-top: 2px;
    color: #697789;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.65;
}

@media (min-width: 1025px) {
    .acdb-template-home_overview .acdb-home-stat + .acdb-home-stat::before {
        content: "";
        position: absolute;
        inset-block: 18%;
        inset-inline-start: calc(var(--acdb-home-stats-gap) / -2);
        width: 1px;
        border-radius: 999px;
        background: rgba(64, 99, 143, .15);
        pointer-events: none;
    }
}

@media (max-width: 1024px) {
    .acdb-template-home_overview {
        --acdb-home-image-height: 300px;
    }

    .acdb-template-home_overview.acdb-template-has-home-stats .acdb-template-shell {
        row-gap: 16px;
        padding-bottom: 18px;
    }

    .acdb-template-home_overview .acdb-home-stats {
        --acdb-home-stats-columns: 2;
        --acdb-home-stats-gap: 12px;
        padding: 10px;
        border-radius: 16px;
    }

    .acdb-template-home_overview .acdb-home-stat {
        min-height: 88px;
        padding: 12px 14px;
        border: 1px solid rgba(23, 105, 232, .065);
        border-radius: 13px;
        background: #fff;
    }

    .acdb-template-home_overview .acdb-home-stat-value {
        font-size: clamp(24px, 3.5vw, 30px);
    }
}

@media (max-width: 767px) {
    .acdb-template-home_overview {
        --acdb-home-image-height: 280px;
    }

    .acdb-template-home_overview.acdb-template-has-home-stats .acdb-template-shell {
        gap: 22px;
        padding-bottom: 16px;
    }

    .acdb-template-home_overview .acdb-home-stats {
        order: 3;
        --acdb-home-stats-columns: 2;
        --acdb-home-stats-gap: 10px;
        margin-top: 0;
        padding: 8px;
        border-radius: 15px;
    }

    .acdb-template-home_overview .acdb-home-stat {
        min-height: 84px;
        padding: 11px 9px;
        border-radius: 12px;
    }

    .acdb-template-home_overview .acdb-home-stat-value {
        font-size: clamp(23px, 7vw, 28px);
    }

    .acdb-template-home_overview .acdb-home-stat-title {
        margin-top: 7px;
        font-size: 11.5px;
    }

    .acdb-template-home_overview .acdb-home-stat-description {
        font-size: 10.5px;
    }
}

@media (max-width: 420px) {
    .acdb-template-home_overview .acdb-home-stats {
        --acdb-home-stats-columns: 1;
    }

    .acdb-template-home_overview .acdb-home-stat {
        min-height: 76px;
    }
}
