/* Homepage catalog redesign. Scoped so booking, filters, existing sliders and other pages are untouched. */
[data-home-page] {
    --home-section-gap: 32px;
    --home-section-gutter: 16px;
    --home-section-max: 1160px;
    --home-heading-gap: 16px;
    --home-slider-shadow-gutter: 6px;
}
@media (max-width: 991.98px), (max-width: 1199.98px) and (pointer: coarse) {
    [data-home-page] {
        --home-section-gap: 24px;
        --home-section-gutter: 10px;
        --home-heading-gap: 12px;
    }
}
[data-home-page] .home-modern-catalog {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    row-gap: var(--home-section-gap);
    padding: 0 0 var(--home-section-gap);
    overflow: clip;
    background:
        radial-gradient(ellipse at 0 36%, rgba(185, 217, 255, .28), transparent 39%),
        radial-gradient(ellipse at 100% 60%, rgba(188, 219, 255, .30), transparent 44%),
        linear-gradient(180deg, #f7fbff 0%, #eef5ff 37%, #f8fbff 72%, #ecf4ff 100%);
    color: #142c53;
}
[data-home-page] .home-modern-catalog::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 640px;
    z-index: -1;
    pointer-events: none;
    opacity: .5;
    background: radial-gradient(ellipse at 53% 0%, rgba(255,255,255,.94), transparent 70%);
}
/* All six outer sections share the exact service-card content edges.
   The specialty section's nested wrapper has no extra margin or padding. */
[data-home-page] .home-modern-catalog > .container {
    box-sizing: border-box;
    width: min(var(--home-section-max), calc(100% - 2 * var(--home-section-gutter)));
    max-width: none;
    min-width: 0;
    margin: 0 auto !important;
    padding: 0;
    position: relative;
}
[data-home-page] .home-modern-catalog .home-modern-section {
    margin-block: 0 !important;
    padding-block: 0;
    min-width: 0;
    position: relative;
}
[data-home-page] .home-modern-section-heading {
    direction: rtl;
    align-items: center;
    gap: 16px;
    margin-bottom: var(--home-heading-gap);
}
[data-home-page] .home-modern-title-group {
    min-width: 0;
    position: relative;
    padding-right: 24px;
}
[data-home-page] .home-modern-title-group::before {
    content: "";
    width: 18px;
    height: 3px;
    position: absolute;
    right: 0;
    top: 11px;
    border-radius: 8px;
    background: #178aff;
}
[data-home-page] .home-modern-title-group .section-title,
[data-home-page] .home-modern-title-group h2 {
    font-size: clamp(16px, 1.6vw, 20px);
    font-weight: 800;
    line-height: 1.6;
    color: #0c234b;
    margin: 0;
}
[data-home-page] .home-modern-section-heading .view-more {
    flex: 0 0 auto;
    color: #1165ce;
    background: #f4f8ff;
    border: 1px solid #d4e5ff;
    box-shadow: 0 1px 2px rgba(52, 106, 193, .05);
    border-radius: 99px;
    text-decoration: none;
    min-height: 33px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 13px;
    white-space: nowrap;
}
[data-home-page] .home-modern-section-heading .view-more:hover,
[data-home-page] .home-modern-section-heading .view-more:focus-visible {
    background: #e5f1ff;
    border-color: #93c0ff;
}
[data-home-page] .home-modern-catalog .elementor-section[id^="my-slider-"] {
    scroll-snap-type: x proximity;
    overscroll-behavior-inline: contain;
    gap: 12px !important;
    /* Extra scrollport width is used only for shadows, not card inset. */
    width: calc(100% + 2 * var(--home-slider-shadow-gutter)) !important;
    margin: -4px calc(-1 * var(--home-slider-shadow-gutter)) 0 !important;
    padding: 4px var(--home-slider-shadow-gutter) 16px !important;
    scrollbar-width: none;
}
[data-home-page] .home-modern-catalog .elementor-section[id^="my-slider-"] .card {
    border: 1px solid #e1ecff;
    background: linear-gradient(145deg, #fff, #f2f7ff);
    color: #19335d;
    border-radius: 18px;
    scroll-snap-align: start;
    transition: box-shadow .2s ease, transform .2s ease;
}
[data-home-page] .home-modern-catalog .elementor-section[id^="my-slider-"] a.card:hover,
[data-home-page] .home-modern-catalog .elementor-section[id^="my-slider-"] a.card:focus-visible {
    transform: translateY(-2px);
}
[data-home-page] .home-modern-catalog .elementor-section[id^="my-slider-"] a.card:focus-visible {
    outline: 2px solid #198bfb;
    outline-offset: 2px;
}

/* The existing two-row slider layout and its IDs remain intact. */
[data-home-page] .home-specialties #my-slider-1 .slide-group {
    gap: 11px;
    min-width: 0;
}
[data-home-page] .home-specialties #my-slider-1 .home-specialty-card {
    border-radius: 10px;
    background: #fff;
    min-height: 124px;
    height: 124px;
    padding: 8px 8px 6px !important;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
[data-home-page] .home-specialties #my-slider-1 .home-specialty-card-icon {
    display: grid;
    place-items: center;
    background: #fff;
    color: #3682d8;
    height: 86px;
    width: 108px;
    max-width: 100%;
    margin: 0 auto 2px;
    border-radius: 14px;
    flex: 0 0 auto;
}
[data-home-page] .home-specialties .home-specialty-card-icon img {
    width: 84px;
    max-width: 100%;
    height: 84px;
    object-fit: contain;
    display: block;
}
[data-home-page] .home-specialties .home-specialty-card-icon svg {
    width: 55px;
    height: 55px;
    stroke-width: 1.5;
}
[data-home-page] .home-specialties .home-specialty-card h3 {
    font-size: 12px;
    color: #102a53;
    line-height: 1.5;
    font-weight: 800;
    margin: 0 auto 4px;
    min-height: 18px;
    max-width: 100%;
    overflow-wrap: anywhere;
}
/* One optimized WebP serves all 20 specialty images (5 columns, 4 rows). */
[data-home-page] .home-specialty-sprite {
    display: block;
    flex: 0 0 auto;
    width: 82px;
    height: 82px;
    max-width: 100%;
    border-radius: 13px;
    background-color: #fff;
    background-image: url("../images/home-specialties-sprite.webp?v=white-1");
    background-size: 500% 400%;
    background-position: var(--home-sprite-x, 0%) var(--home-sprite-y, 0%);
    background-repeat: no-repeat;
}
[data-home-page] .home-modal-specialty-thumb .home-specialty-sprite {
    width: 38px;
    height: 38px;
    border-radius: 10px;
}

/* Three rows per scrollable city column, preserving the original slider ID. */
[data-home-page] .home-cities #my-slider-2 .slide-group {
    min-width: 0;
    gap: 11px;
}
[data-home-page] .home-cities #my-slider-2 .home-city-card {
    display: block !important;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 0 !important;
    aspect-ratio: auto;
    height: 124px;
    min-height: 124px;
    border: 0.5px solid #fff;
    border-radius: 10px;
    text-align: right;
}
[data-home-page] .home-cities #my-slider-2 .city-box {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 0;
    background: linear-gradient(150deg, #80bbf3, #c4dcff);
}
/* Rasht fallback stays visible even if an older city-image setting is empty or points at a missing file. */
[data-home-page] .home-cities #my-slider-2 .city-box--rasht {
    background-image: url("../images/home-rasht.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
[data-home-page] .home-cities #my-slider-2 .city-box img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}
[data-home-page] .home-cities #my-slider-2 .home-city-sprite {
    display: block;
    width: 100%;
    height: 100%;
    background-color: #d3e7ff;
    background-image: url("../images/home-cities-sprite.webp");
    background-size: 600% 500%;
    background-position: var(--home-city-sprite-x, 0%) var(--home-city-sprite-y, 0%);
    background-repeat: no-repeat;
    transition: transform .25s ease;
}
[data-home-page] .home-cities #my-slider-2 a:hover .home-city-sprite {
    transform: scale(1.035);
}
[data-home-page] .home-cities #my-slider-2 a:hover .city-box img {
    transform: scale(1.035);
}
[data-home-page] .home-cities #my-slider-2 .city-box svg {
    width: 48px;
    height: 48px;
    color: #fff;
    display: block;
    margin: 32px auto;
}
[data-home-page] .home-cities #my-slider-2 .city-info {
    display: flex;
    position: absolute;
    z-index: 1;
    inset: auto 0 0;
    height: 26px;
    padding: 4px 14px;
    box-sizing: border-box;
    direction: rtl;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 6px;
    background: linear-gradient(to bottom, rgb(255 255 255) 0%, #f7faff 50%);
    border-radius: 77% 8% 0 0 / 100% 28% 0 0;
}
[data-home-page] .home-cities #my-slider-2 .city-info h3 {
    font-size: 13px;
    font-weight: 800;
    color: #102b50;
    margin: 0 !important;
    line-height: 15px;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
[data-home-page] .home-cities #my-slider-2 .city-info p {
    display: none;
}
[data-home-page] .home-cities #my-slider-2 .city-info svg {
    display: block;
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    color: #1786e9;
    margin: 0;
}

/* Four borderless benefit rows, matching the reference's blue outline icons and red underline. */
/* Full-bleed white panel, with its content aligned to the existing catalog gutters. */
[data-home-page] .home-modern-catalog > .container.home-benefits {
    width: 100%;
    padding-inline: max(var(--home-section-gutter), calc((100% - var(--home-section-max)) / 2));
    padding-block: 48px;
    background: #fff;
}

[data-home-page] .home-benefits-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
    direction: rtl;
}
[data-home-page] .home-benefit-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    min-width: 0;
}
[data-home-page] .home-benefit-icon-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding-top: 2px;
}
[data-home-page] .home-benefit-icon {
    display: block;
    width: 48px;
    height: 48px;
    color: #416fa5;
    flex: 0 0 auto;
}
[data-home-page] .home-benefit-icon-line {
    display: block;
    width: 35px;
    height: 3px;
    background: var(--home-search-submit-red);
}
[data-home-page] .home-benefit-copy {
    min-width: 0;
    text-align: right;
}
[data-home-page] .home-benefit-copy h3 {
    margin: 0 0 5px;
    color: #6b6b6b;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.4;
}
[data-home-page] .home-benefit-copy p {
    margin: 0;
    color: #767676;
    font-size: 17px;
    line-height: 1.65;
}
@media (max-width: 991.98px), (max-width: 1199.98px) and (pointer: coarse) {
    [data-home-page] .home-modern-catalog > .container.home-benefits { padding-block: 40px; }
    [data-home-page] .home-benefits-list { gap: 28px; }
    [data-home-page] .home-benefit-row {
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 12px;
    }
    [data-home-page] .home-benefit-icon { width: 38px; height: 38px; }
    [data-home-page] .home-benefit-icon-line { width: 28px; height: 2px; }
    [data-home-page] .home-benefit-copy h3 { font-size: 18px; margin-bottom: 4px; }
    [data-home-page] .home-benefit-copy p { font-size: 15px; }
}

/* Desktop: four compact RTL columns, with each outline icon above its own copy. */
@media (min-width: 992px) and (pointer: fine), (min-width: 992px) and (pointer: none), (min-width: 1200px) {
    [data-home-page] .home-modern-catalog > .container.home-benefits {
        padding-block: 28px 30px;
    }
    [data-home-page] .home-benefits-list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        column-gap: clamp(20px, 3vw, 40px);
        align-items: start;
    }
    [data-home-page] .home-benefit-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 11px;
        justify-items: stretch;
    }
    [data-home-page] .home-benefit-icon-wrap {
        justify-self: start;
        align-items: center;
        gap: 4px;
        padding-top: 0;
    }
    [data-home-page] .home-benefit-icon {
        width: 30px;
        height: 30px;
    }
    [data-home-page] .home-benefit-icon-line {
        width: 22px;
        height: 2px;
    }
    [data-home-page] .home-benefit-copy h3 {
        font-size: 16px;
        line-height: 1.4;
        min-height: 0;
        margin: 0 0 3px;
        font-weight: 700;
    }
    [data-home-page] .home-benefit-copy p {
        font-size: 13px;
        line-height: 1.5;
    }
}

/* Testimonials: preserve real user names and comments; never fabricate ratings. */
[data-home-page] .home-testimonials #my-slider-3 .home-testimonial-card {
    padding: 15px !important;
    min-height: 135px !important;
    height: var(--home-review-card-height, auto) !important;
    box-sizing: border-box;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 10px;
    text-align: right;
}
[data-home-page] .home-testimonial-card .home-review-header {
    direction: rtl;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}
[data-home-page] .home-testimonial-card .avatar-box {
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    margin: 0;
    background: linear-gradient(145deg, #cce3ff, #eaf4ff);
    color: #3886da;
    border-radius: 50%;
}
[data-home-page] .home-testimonial-card .avatar-box {
    position: relative;
    overflow: visible;
}
[data-home-page] .home-testimonial-card .avatar-box .home-review-profile-icon {
    width: 27px;
    height: 27px;
}
[data-home-page] .home-testimonial-card .avatar-box .home-review-instagram-icon {
    position: absolute;
    right: -3px;
    bottom: -2px;
    width: 15px;
    height: 15px;
    box-sizing: border-box;
    padding: 1px;
    background: #fff;
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
}
[data-home-page] .home-testimonial-card .user-meta { align-items: flex-start; gap: 2px; }
[data-home-page] .home-testimonial-card .user-meta strong { font-size: 12px; color: #173760; }
[data-home-page] .home-testimonial-card .user-meta span { font-size: 10px; color: #8095ae; }
[data-home-page] .home-testimonial-card .home-quote-mark {
    margin-inline-start: auto;
    color: #a8caff;
    font-size: 43px;
    line-height: 1;
}
[data-home-page] .home-testimonial-card .desc {
    color: #405a7e;
    margin: 0;
    font-size: 11px;
    line-height: 1.9;
    text-align: right;
}

/* Final CTA matches the reference's soft-blue heart rate banner. */
[data-home-page] .home-final-banner {
    display: flex;
    position: relative;
    overflow: hidden;
    direction: rtl;
    align-items: center;
    justify-content: space-between;
    min-height: 130px;
    padding: 23px 27px;
    gap: 22px;
    box-sizing: border-box;
    border: 2px solid #fff;
    border-radius: 20px;
    background:
        radial-gradient(ellipse at 5% 70%, rgba(42,143,248,.58), transparent 34%),
        linear-gradient(115deg, #a1caff 0%, #e2efff 43%, #c8defe 100%);
    box-shadow: 0 8px 22px rgba(39, 108, 195, .14);
}
[data-home-page] .home-final-copy { z-index: 1; }
[data-home-page] .home-final-copy h2 { font-size: clamp(17px,2vw,24px); font-weight: 800; margin: 0 0 5px; color: #0c2b56; }
[data-home-page] .home-final-link {
    z-index: 1;
    flex: 0 0 auto;
    padding: 11px 18px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    border-radius: 99px;
    background: #086fe4;
    color: #fff;
    box-shadow: 0 5px 15px rgba(9,103,212,.25);
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
}
[data-home-page] .home-final-link:hover { background: #075abc; }
[data-home-page] .home-final-pulse {
    position: absolute;
    width: 220px;
    height: 75px;
    left: 24px;
    bottom: 8px;
    opacity: .8;
    pointer-events: none;
}
[data-home-page] .home-modern-empty { font-size: 12px; color: #6e819a; }

/* Specialty catalog modal shows a real lightweight image for every specialty. */
[data-home-page] .home-modal-specialty-thumb {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 11px;
    overflow: hidden;
    display: inline-grid;
    place-items: center;
    background: #ebf5ff;
    margin-inline-end: 7px;
}
[data-home-page] .home-modal-specialty-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
[data-home-page] .home-modal-specialty-thumb svg {
    width: 22px;
    height: 22px;
    stroke: #2885e8;
    stroke-width: 1.6;
}
[data-home-page] .nn-modal-list [data-kind="specialty"] {
    display: flex;
    align-items: center;
    gap: 5px;
}
[data-home-page] .nn-modal-list [data-kind="specialty"] .home-item-count {
    margin-inline-start: auto;
}

@media (min-width: 992px) and (pointer: fine), (min-width: 992px) and (pointer: none), (min-width: 1200px) {
    /* First paint uses the exact same 5.5 cards as Swiper after initialization. */
    [data-home-page] .home-specialties #my-slider-1 .slide-group,
    [data-home-page] .home-cities #my-slider-2 .slide-group {
        flex: 0 0 calc((100% - 4.5 * 12px) / 5.5) !important;
    }
    [data-home-page] .home-articles #my-slider-4 > .card,
    [data-home-page] .home-testimonials #my-slider-3 > .card {
        flex: 0 0 calc((100% - 2.1 * 12px) / 3.1) !important;
    }
}
@media (min-width: 768px) and (max-width: 991.98px), (min-width: 768px) and (max-width: 1199.98px) and (pointer: coarse) {
    [data-home-page] .home-cities #my-slider-2 {
        gap: 10px !important;
    }
    [data-home-page] .home-cities #my-slider-2 .slide-group {
        flex: 0 0 calc((100% - 3.5 * 10px) / 4.5) !important;
    }
}
@media (max-width: 991.98px), (max-width: 1199.98px) and (pointer: coarse) {
    [data-home-page] .home-modern-section-heading { gap: 8px; }
    [data-home-page] .home-modern-title-group { padding-right: 17px; }
    [data-home-page] .home-modern-title-group::before { width: 12px; top: 10px; }
    [data-home-page] .home-modern-title-group .section-title,
    [data-home-page] .home-modern-title-group h2 { font-size: 15px; }
    [data-home-page] .home-modern-section-heading .view-more { font-size: 10px; min-height: 30px; padding-inline: 9px; }
    [data-home-page] .home-modern-catalog .elementor-section[id^="my-slider-"] {
        gap: 9px !important;
        /* No CSS snapping during the brief pre-Swiper render. */
        scroll-snap-type: none !important;
    }
    [data-home-page] .home-modern-catalog .elementor-section[id^="my-slider-"] .card {
        scroll-snap-align: none;
    }
    [data-home-page] .home-specialties #my-slider-1 .home-specialty-card { min-height: 110px; height: 110px; padding: 5px 5px 4px !important; }
    [data-home-page] .home-specialties #my-slider-1 .home-specialty-card-icon { width: 84px; height: 74px; }
    [data-home-page] .home-specialties .home-specialty-card-icon img { width: 72px; height: 72px; }
    [data-home-page] .home-specialties .home-specialty-sprite { width: 72px; height: 72px; }
    [data-home-page] .home-specialties .home-specialty-card h3 { font-size: 11px; }
    [data-home-page] .home-cities #my-slider-2 .home-city-card { min-height: 110px; height: 110px; }
    [data-home-page] .home-articles #my-slider-4 { gap: 8px !important; }
    [data-home-page] .home-articles #my-slider-4 > .card { flex: 0 0 calc((100% - 8px) / 2) !important; }
    [data-home-page] .home-testimonials #my-slider-3 > .card { flex: 0 0 calc((100% - 9px) / 1.4) !important; }
    [data-home-page] .home-final-banner { min-height: 144px; padding: 16px; flex-wrap: wrap; gap: 12px; }
    [data-home-page] .home-final-copy { width: 100%; }
    [data-home-page] .home-final-copy h2 { font-size: 17px; }
    [data-home-page] .home-final-link { font-size: 11px; padding: 9px 12px; }
    [data-home-page] .home-final-pulse { width: 150px; bottom: 1px; left: 6px; }
}
/* Match the specialty slider's visible column count at both mobile breakpoints. */
@media (max-width: 479px) {
    [data-home-page] .home-cities #my-slider-2 { gap: 6px !important; }
    [data-home-page] .home-cities #my-slider-2 .slide-group {
        flex: 0 0 calc((100% - 1.6 * 6px) / 2.6) !important;
    }
}
@media (min-width: 480px) and (max-width: 767px) {
    [data-home-page] .home-cities #my-slider-2 { gap: 8px !important; }
    [data-home-page] .home-cities #my-slider-2 .slide-group {
        flex: 0 0 calc((100% - 1.7 * 8px) / 2.7) !important;
    }
}
@media (prefers-reduced-motion: reduce) {
    [data-home-page] .home-modern-catalog .elementor-section[id^="my-slider-"] .card,
    [data-home-page] .home-cities #my-slider-2 .city-box img,
    [data-home-page] .home-cities #my-slider-2 .home-city-sprite { transition: none; }
}

/* The first review's natural height is the sole reference, even after Swiper
   reorders slides. Only the comment area can scroll, never the card itself. */
[data-home-page] .home-testimonials #my-slider-3 .home-testimonial-card.is-measuring {
    height: auto !important;
}
[data-home-page] .home-testimonial-card .home-review-header { flex: 0 0 auto; min-width: 0; }
[data-home-page] .home-testimonial-card .user-meta { min-width: 0; }
[data-home-page] .home-testimonial-card .user-meta strong {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
[data-home-page] .home-testimonial-card .home-review-body {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    overflow-wrap: anywhere;
    direction: rtl;
}
[data-home-page] .home-testimonial-card.is-measuring .home-review-body {
    flex: 0 0 auto;
    overflow: visible;
}
[data-home-page] .home-testimonial-card .home-review-body.is-expanded {
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}
[data-home-page] .home-testimonial-card .home-review-more {
    display: inline;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    color: #2477d3;
    font: inherit;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}
[data-home-page] .home-testimonial-card .home-review-more[hidden] { display: none !important; }
[data-home-page] .home-testimonial-card .home-review-more:focus-visible {
    outline: 1px solid #2477d3;
    outline-offset: 1px;
    border-radius: 2px;
}

/* Homepage city and specialty pickers use the mobile menu's exact row rhythm.
   Center-type picker, cards and the actual navigation menu are unaffected. */
[data-home-page] .nn-modal-list > :is([data-home-list="city"], [data-home-list="specialty"]) {
    gap: 0;
}
[data-home-page] .nn-modal-list > :is([data-home-list="city"], [data-home-list="specialty"]) > .nn-modal-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    min-height: 40px;
    box-sizing: border-box;
    padding: 10px 5px;
    margin: 0;
    border: 0;
    border-bottom: 0.5px solid var(--primary-color, #4187ff);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #333;
    font-size: 13px;
    font-weight: 400;
    text-align: right;
    text-decoration: none;
}
[data-home-page] .nn-modal-list > :is([data-home-list="city"], [data-home-list="specialty"]) > .nn-modal-item:hover {
    background: #f9f9f9;
    box-shadow: none;
}
[data-home-page] .nn-modal-list > :is([data-home-list="city"], [data-home-list="specialty"]) > .nn-modal-item.active {
    color: var(--primary-color, #4187ff);
    background: #f8faff;
    box-shadow: none;
}
[data-home-page] .nn-modal-list > :is([data-home-list="city"], [data-home-list="specialty"]) > .nn-modal-item:focus-visible {
    outline: 2px solid var(--primary-color, #4187ff);
    outline-offset: -2px;
}
[data-home-page] .nn-modal-list > :is([data-home-list="city"], [data-home-list="specialty"]) .home-item-count {
    margin-inline-start: auto;
    flex-shrink: 0;
    font-size: .85em;
}
[data-home-page] .nn-modal-list [data-home-list="specialty"] .home-modal-specialty-thumb {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    margin: 0;
    border-radius: 0;
    background: transparent;
}
[data-home-page] .nn-modal-list [data-home-list="specialty"] .home-modal-specialty-thumb .home-specialty-sprite,
[data-home-page] .nn-modal-list [data-home-list="specialty"] .home-modal-specialty-thumb svg {
    width: 20px;
    height: 20px;
    border-radius: 0;
}

/* RTL header: title on the right, close control on the left. */
[data-home-page] #home-catalog .home-catalog-header {
    display: flex;
    direction: rtl;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-bottom: 0;
}
[data-home-page] #home-catalog .home-catalog-header h2 {
    flex: 1 1 auto;
    text-align: right;
    margin: 0;
}
[data-home-page] #home-catalog .home-catalog-header [data-home-close] {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
}
[data-home-page] #home-catalog .home-catalog-header [data-home-close]:focus-visible {
    outline: 2px solid #2477d3;
    outline-offset: 2px;
}
[data-home-page] .home-catalog-doctor-total {
    display: flex;
    align-items: center;
    direction: rtl;
    gap: 9px;
    padding: 10px;
    border: 1px solid #e0eaf5;
    border-radius: 9px;
    background: #f5f9fe;
    color: #354b65;
}
[data-home-page] .home-catalog-doctor-total[hidden] { display: none !important; }
[data-home-page] .home-catalog-doctor-total-icon {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    color: #2477d3;
}
[data-home-page] .home-catalog-doctor-glyph {
    display: block;
    width: 23px;
    height: 23px;
    background-color: currentColor;
    -webkit-mask: url('../images/home-doctor-search.svg') center / contain no-repeat;
    mask: url('../images/home-doctor-search.svg') center / contain no-repeat;
}
[data-home-page] .home-catalog-doctor-total-label {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    line-height: 1.5;
}
[data-home-page] .home-catalog-doctor-total strong {
    color: #2477d3;
    font-size: 13px;
    line-height: 1.4;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
[data-home-page] .home-catalog-doctor-total small {
    font-size: inherit;
    font-weight: 400;
    color: #526780;
}
@media (max-width: 420px) {
    [data-home-page] .home-catalog-doctor-total { padding: 8px; gap: 6px; }
    [data-home-page] .home-catalog-doctor-total-label,
    [data-home-page] .home-catalog-doctor-total strong { font-size: 13px; }
}

/* Mobile only: a crisp, full-width surface transition in the existing
   32px gap below the search button, before the service cards. */
@media (max-width: 991.98px), (max-width: 1199.98px) and (pointer: coarse) {
    [data-home-page] {
        --home-lower-surface: #f7f8f9;
        background: var(--home-lower-surface);
    }
    [data-home-page] > .hero {
        background: linear-gradient(to bottom, #fff 0, #fff calc(100% - 16px), var(--home-lower-surface) calc(100% - 16px), var(--home-lower-surface) 100%);
    }
    [data-home-page] .home-modern-catalog {
        background: var(--home-lower-surface);
    }
}

/* Keep the tablet first paint aligned with Swiper's tablet review count. */
@media (min-width: 768px) and (max-width: 991.98px), (min-width: 768px) and (max-width: 1199.98px) and (pointer: coarse) {
    [data-home-page] .home-testimonials #my-slider-3 { gap: 10px !important; }
    [data-home-page] .home-testimonials #my-slider-3 > .card { flex: 0 0 calc((100% - 1.5 * 10px) / 2.5) !important; }
}
