/**
 * Hospital / medical center profile — premium sections (scoped ep-*)
 *
 * @package aldoctorz-theme
 */

.ep-section-wrap {
    padding: 0;
    margin-top: 1.25rem;
}

.ep-section {
    --ep-ink: #0a305e;
    --ep-ink-soft: #1e3a5f;
    --ep-muted: #64748b;
    --ep-accent: #34c3db;
    --ep-page-bg: #f1f5f9;
    --ep-card-radius: 16px;
    --ep-panel-radius: 20px;
    background: var(--ep-page-bg);
    border-radius: var(--ep-panel-radius);
}

.ep-section__panel {
    background: #fff;
    border-radius: 13px;
    border: 1px solid #e6ecf0;
    padding: 15px;
    animation: epSectionIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
    .ep-section__panel {
        animation: none;
    }
}

@keyframes epSectionIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ep-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.ep-section__title {
    margin: 0 0 0.65rem;
    text-align: start;
}

.ep-section__title-inner {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    max-width: 100%;
}

.ep-section__title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #397296;
    font-size: 28px;
}

.ep-section__title-text {
    font-size: 20px;
    font-weight: 800;
    color: #606267;
    letter-spacing: -0.02em;
    line-height: 1.35;
}

[dir="rtl"] .ep-section__title {
    text-align: right;
}

.ep-section__view-all {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--ep-ink);
    text-decoration: none;
    transition: color 0.25s ease, gap 0.25s ease;
}

.ep-section__view-all:hover {
    color: var(--ep-accent);
    text-decoration: none;
    gap: 0.65rem;
}

.ep-section__view-all--header {
    white-space: nowrap;
}

.ep-section__footer {
    margin-top: 1.25rem;
    text-align: center;
}

@media (min-width: 768px) {
    .ep-section__view-all--header {
        display: inline-flex;
    }
}

@media (max-width: 767.98px) {
    .ep-section__footer {
        display: none;
    }
}

/* —— Articles carousel —— */
.ep-articles__carousel,
.ep-peers__carousel,
.ep-reviews__carousel {
    position: relative;
    margin: 0 -0.35rem;
}

.ep-articles__slick .slick-slide,
.ep-peers__slick .slick-slide,
.ep-reviews__slick .slick-slide {
    padding: 0 0.5rem;
    height: auto;
}

.ep-articles__slick .slick-slide>div,
.ep-peers__slick .slick-slide>div,
.ep-reviews__slick .slick-slide>div {
    height: 100%;
}

.ep-article-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: var(--ep-card-radius);
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
    transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.ep-article-card:hover {
    transform: translateY(-4px);
    border-color: rgba(52, 195, 219, 0.35);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

.ep-article-card__media {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f8fafc;
}

.ep-article-card__media img {
    width: 100% !important;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}

.ep-article-card:hover .ep-article-card__media img {
    transform: scale(1.05);
}

.ep-article-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.55rem;
    padding: 1rem 1rem 1.15rem;
    text-align: start;
}

[dir="rtl"] .ep-article-card__body {
    text-align: right;
}

.ep-article-card__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.4;
}

.ep-article-card__title a {
    color: var(--ep-ink-soft);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ep-article-card__title a:hover {
    color: var(--ep-accent);
}

.ep-article-card__excerpt {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.55;
    color: var(--ep-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.ep-article-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: auto;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--ep-ink);
    text-decoration: none;
    transition: color 0.25s ease, gap 0.25s ease;
}

.ep-article-card__cta:hover {
    color: var(--ep-accent);
    gap: 0.6rem;
}

/* —— Peer entity cards —— */
.ep-peer-card {
    height: 100%;
}

.ep-peer-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: var(--ep-card-radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
    transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.ep-peer-card__link:hover {
    text-decoration: none;
    color: inherit;
    transform: translateY(-4px);
    border-color: rgba(52, 195, 219, 0.3);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

.ep-peer-card__media {
    aspect-ratio: 16 / 10;
    background: #f8fafc;
    overflow: hidden;
}

.ep-peer-card__media img {
    width: 100% !important;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ep-peer-card__body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
    text-align: start;
}

[dir="rtl"] .ep-peer-card__body {
    text-align: right;
}

.ep-peer-card__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    margin-bottom: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--ep-ink);
    background: rgba(52, 195, 219, 0.12);
    border: 1px solid rgba(52, 195, 219, 0.25);
}

.ep-peer-card__name {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--ep-ink-soft);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ep-peer-card__name .dr-prefix {
    color: var(--ep-accent);
    font-weight: 700;
}

.ep-peer-card__meta {
    margin: 0;
    font-size: 0.8rem;
    color: var(--ep-muted);
    padding-block: 7px;
}

.ep-peer-card__meta-label {
    display: block;
    font-weight: 600;
    color: #94a3b8;
    font-size: 0.72rem;
}

.ep-peer-card__location {
    margin: 0;
    font-size: 0.8rem;
    color: var(--ep-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.ep-peer-card__location i {
    color: var(--ep-accent);
}

.ep-peer-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: auto;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #34c3db 0%, #0a305e 100%);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    justify-content: center;
}

.ep-peer-card__link:hover .ep-peer-card__cta {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(10, 48, 94, 0.2);
}

/* —— Services grid / mobile slider —— */
.ep-services__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.ep-services__item--hidden {
    display: none;
}

.ep-services__grid.is-expanded .ep-services__item--hidden {
    display: block;
}

.ep-services__mobile {
    display: none;
    margin-top: 0.5rem;
}

.ep-service-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    height: 100%;
    min-height: 96px;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.ep-service-card:hover {
    text-decoration: none;
    color: inherit;
    transform: translateY(-3px);
    border-color: rgba(52, 195, 219, 0.35);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.ep-service-card__icon-wrap {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(52, 195, 219, 0.15), rgba(10, 48, 94, 0.08));
    color: var(--ep-ink);
    font-size: 1.35rem;
}

.ep-service-card__thumb {
    width: 40px !important;
    height: 40px !important;
    object-fit: contain;
    border-radius: 8px;
}

.ep-service-card__body {
    flex: 1;
    min-width: 0;
    text-align: start;
}

[dir="rtl"] .ep-service-card__body {
    text-align: right;
}

.ep-service-card__title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--ep-ink-soft);
    line-height: 1.35;
}

.ep-service-card__desc {
    margin: 0.25rem 0 0;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--ep-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ep-service-card__chevron {
    flex-shrink: 0;
    color: var(--ep-accent);
    font-size: 0.85rem;
}

.ep-services__more-wrap {
    margin-top: 0.85rem;
    text-align: center;
}

.ep-services__more-btn {
    border: 1px solid #dbe3ea;
    background: #f8fafc;
    color: var(--ep-ink);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.ep-services__more-btn:hover {
    background: #fff;
    border-color: var(--ep-accent);
}

.ep-services-ad {
    margin-top: 0.5rem;
}

/* —— Ask doctor CTA —— */
.ep-ask-cta-wrap {
    margin-top: 1.25rem;
}

.ep-ask-cta__card {
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(135deg, #34c3db 0%, #00507e 55%, #0a305e 100%);
    position: relative;
    box-shadow: 0 16px 40px rgba(10, 48, 94, 0.18);
}

.ep-ask-cta__card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.ep-ask-cta__inner {
    display: flex;
    align-items: center;
    min-height: 240px;
    position: relative;
    z-index: 1;
}

.ep-ask-cta__content {
    flex: 1;
    padding: 1.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.ep-ask-cta__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    margin-bottom: 0.65rem;
}

.ep-ask-cta__title {
    margin: 0 0 0.5rem;
    font-size: clamp(1.25rem, 2.4vw, 1.85rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.25;
    text-align: start;
}

.ep-ask-cta__desc {
    margin: 0 0 1.1rem;
    font-size: 0.92rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.92);
    max-width: 36rem;
    text-align: start;
}

.ep-ask-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.35rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--ep-ink);
    background: #fff;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ep-ask-cta__btn:hover {
    color: var(--ep-ink);
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}

.ep-ask-cta__visual {
    flex-shrink: 0;
    padding: 0.5rem 1.25rem 0 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.ep-ask-cta__visual img {
    max-width: min(220px, 38vw);
    height: auto;
    display: block;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.15));
}

[dir="rtl"] .ep-ask-cta__visual {
    padding: 0.5rem 0 0 1.25rem;
}

/* —— Google reviews —— */
.ep-review-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 1.1rem 1.15rem;
    border-radius: var(--ep-card-radius);
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.ep-review-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.ep-review-card__author {
    margin: 0 0 0.25rem;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--ep-ink-soft);
}

.ep-review-card__stars {
    color: #f59e0b;
    font-size: 0.82rem;
    display: inline-flex;
    gap: 0.12rem;
}

.ep-review-card__google-badge {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #4285f4;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.ep-review-card__text {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.65;
    color: var(--ep-muted);
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ep-review-card__date {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* —— Shared Slick overrides —— */
.ep-articles__slick .slick-prev,
.ep-articles__slick .slick-next,
.ep-peers__slick .slick-prev,
.ep-peers__slick .slick-next,
.ep-reviews__slick .slick-prev,
.ep-reviews__slick .slick-next {
    z-index: 3;
    width: 44px;
    height: 44px;
    font-size: 0;
    line-height: 0;
    color: transparent;
    border-radius: 50%;
    background: #fff !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1) !important;
    border: 1px solid rgba(15, 23, 42, 0.06) !important;
}

.ep-articles__slick .slick-prev:before,
.ep-articles__slick .slick-next:before,
.ep-peers__slick .slick-prev:before,
.ep-peers__slick .slick-next:before,
.ep-reviews__slick .slick-prev:before,
.ep-reviews__slick .slick-next:before {
    font-size: 20px;
    color: var(--ep-ink) !important;
    opacity: 0.85 !important;
}

.ep-articles__slick .slick-prev,
.ep-peers__slick .slick-prev,
.ep-reviews__slick .slick-prev {
    left: -6px;
}

.ep-articles__slick .slick-next,
.ep-peers__slick .slick-next,
.ep-reviews__slick .slick-next {
    right: -6px;
}

[dir="rtl"] .ep-articles__slick .slick-prev,
[dir="rtl"] .ep-peers__slick .slick-prev,
[dir="rtl"] .ep-reviews__slick .slick-prev {
    left: auto;
    right: -6px;
}

[dir="rtl"] .ep-articles__slick .slick-next,
[dir="rtl"] .ep-peers__slick .slick-next,
[dir="rtl"] .ep-reviews__slick .slick-next {
    right: auto;
    left: -6px;
}

.ep-articles__dots,
.ep-peers__dots,
.ep-reviews__dots,
.ep-services__dots {
    position: relative !important;
    bottom: auto !important;
    margin-top: 0.85rem !important;
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 0.45rem;
    list-style: none !important;
    width: 100% !important;
    padding: 0 !important;
}

.ep-articles__dots li,
.ep-peers__dots li,
.ep-reviews__dots li,
.ep-services__dots li {
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
}

.ep-articles__dots li button,
.ep-peers__dots li button,
.ep-reviews__dots li button,
.ep-services__dots li button {
    width: 8px !important;
    height: 8px !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 999px !important;
    background: #cbd5e1 !important;
    font-size: 0 !important;
}

.ep-articles__dots li.slick-active button,
.ep-peers__dots li.slick-active button,
.ep-reviews__dots li.slick-active button,
.ep-services__dots li.slick-active button {
    width: 22px !important;
    background: var(--ep-accent) !important;
}

.ep-articles__dots li button:before,
.ep-peers__dots li button:before,
.ep-reviews__dots li button:before,
.ep-services__dots li button:before {
    display: none !important;
}

/* —— Responsive —— */
@media (max-width: 991.98px) {
    .ep-services__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .ep-services__grid {
        display: none;
    }

    .ep-services__more-wrap {
        display: none;
    }

    .ep-services__mobile {
        display: block;
    }

    .ep-ask-cta__inner {
        flex-direction: column;
        text-align: center;
    }

    .ep-ask-cta__content {
        padding: 1.5rem 1.25rem 0.5rem;
    }

    .ep-ask-cta__desc {
        margin-left: auto;
        margin-right: auto;
    }

    .ep-ask-cta__visual {
        padding: 0 1rem 1rem;
    }

    [dir="rtl"] .ep-ask-cta__visual {
        padding: 0 1rem 1rem;
    }

    .ep-articles__slick .slick-prev,
    .ep-articles__slick .slick-next,
    .ep-peers__slick .slick-prev,
    .ep-peers__slick .slick-next,
    .ep-reviews__slick .slick-prev,
    .ep-reviews__slick .slick-next {
        display: none !important;
    }
}

@media (max-width: 575.98px) {
    .ep-section__panel {
        padding: 12px;
    }
}

@media (min-width: 768px) {
    .ep-services__mobile {
        display: none !important;
    }
}