/* ============================================================
   EBSRV17 — Medical Journey Services
   Namespace  : ebsrv17
   Fonts      : El Messiri (نصوص) + IBM Plex Mono (eyebrow)
============================================================ */

/* 1. Variables & Colors */
.ebsrv17 {
    --ebsrv17-bg:            #F5F8FB;
    --ebsrv17-text:          #4B5C71;
    --ebsrv17-title:         #0B2A4A;
    --ebsrv17-border:        #DDE6EE;

    --ebsrv17-card-bg:       #FFFFFF;
    --ebsrv17-card-title:    #0B2A4A;
    --ebsrv17-card-text:     #55677D;
    --ebsrv17-card-btn:      #0B9AA5;

    --ebsrv17-btn-bg:        #0B2A4A;
    --ebsrv17-btn-bg-hover:  #0B9AA5;
    --ebsrv17-btn-text:      #FFFFFF;
    --ebsrv17-btn-text-hover:#0B2A4A;

    --ebsrv17-padding-top:    2rem;
    --ebsrv17-padding-bottom: 2rem;
}

/* 2. Reset */
.ebsrv17,
.ebsrv17 *,
.ebsrv17 *::before,
.ebsrv17 *::after { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

/* 3. Base Styles — Mobile */
.ebsrv17 {
    background: var(--ebsrv17-bg);
    padding-block: var(--ebsrv17-padding-top) var(--ebsrv17-padding-bottom);
    font-family: "El Messiri", sans-serif;
    direction: rtl;
    overflow: hidden;
}

.ebsrv17 a { 
    text-decoration: none; 
    color: inherit; 
}

.ebsrv17__container {
    width: 100%;
    max-width: 90rem;
    margin-inline: auto;
    padding-inline: 1.5rem;
}

.ebsrv17__header {
    text-align: center;
    max-width: 40rem;
    margin-inline: auto;
    margin-bottom: 2.75rem;
}

.ebsrv17__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    font-family: "IBM Plex Mono", monospace;
    font-size: clamp(0.7rem, 2.6vw, 0.8rem);
    letter-spacing: 0.12em;
    color: #044b52;
    background: #E8F7F8;
    border: 0.0625rem solid #C9EEF0;
    border-radius: 999rem;
    padding: 0.4em 1.1em;
    margin-bottom: 1.25rem;
}

.ebsrv17__title {
    font-size: clamp(1.6rem, 6vw, 2.1rem);
    font-weight: 700;
    color: var(--ebsrv17-title);
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.ebsrv17__subtitle {
    font-size: clamp(0.95rem, 3.6vw, 1.05rem);
    color: var(--ebsrv17-text);
    line-height: 1.75;
}

.ebsrv17__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

/* ---------- الكارت ---------- */
.ebsrv17__card {
    position: relative;
    background: var(--ebsrv17-card-bg);
    border: 0.0625rem solid var(--ebsrv17-border);
    border-radius: 1rem;
    overflow: hidden; /* يمنع بروز القوس جغرافياً خارج حدود الكارت */
    display: flex;
    flex-direction: column;
    transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}

.ebsrv17__card:hover {
    box-shadow: 0 1.25rem 2.5rem -1.5rem rgba(11, 42, 74, 0.35);
    transform: translateY(-0.2rem);
}

/* ---------- الصورة + القوس ---------- */
.ebsrv17__media {
    position: relative;
    height: 11.5rem;
    flex-shrink: 0;
}

.ebsrv17__media-inner {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 1rem 1rem 0 0;
}

.ebsrv17__media-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.ebsrv17__card:hover .ebsrv17__media-inner img {
    transform: scale(1.06);
}

.ebsrv17__media-inner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11, 42, 74, 0.55) 0%, rgba(11, 42, 74, 0) 45%);
}

/* القوس الفاصل */
.ebsrv17__media::after {
    content: "";
    position: absolute;
    inset-inline-start: -10%;
    bottom: -1px;
    width: 120%;
    height: 2.11rem;
    background: var(--ebsrv17-card-bg);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    z-index: 1;
}

/* الأيقونة العائمة فوق القوس */
.ebsrv17__icon {
    position: absolute;
    inset-inline-start: 1.5rem;
    bottom: -1.5rem;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.4rem;
    height: 3.4rem;
    border-radius: 0.9rem;
    background: var(--ebsrv17-title);
    color: var(--ebsrv17-card-btn);
    font-size: 1.3rem;
    box-shadow: 0 0.6rem 1.5rem -0.3rem rgba(11, 42, 74, 0.45);
    border: 0.2rem solid var(--ebsrv17-card-bg);
    transition: background 0.35s ease, color 0.35s ease;
}

.ebsrv17__card:hover .ebsrv17__icon {
    background: var(--ebsrv17-card-btn);
    color: var(--ebsrv17-title);
}

/* ---------- محتوى الكارت ---------- */
.ebsrv17__body {
    padding: 0rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background: var(--ebsrv17-card-bg);
}

.ebsrv17__card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ebsrv17-card-title);
    line-height: 1.5;
    margin-bottom: 0.6rem;
}

.ebsrv17__card-text {
    font-size: 0.9rem;
    color: var(--ebsrv17-card-text);
    line-height: 1.8;
    flex-grow: 1;
}

.ebsrv17__more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    margin-top: 1.25rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ebsrv17-title);
    background: color-mix(in srgb, var(--ebsrv17-card-btn) 14%, transparent);
    border: 0.0625rem solid color-mix(in srgb, var(--ebsrv17-card-btn) 45%, transparent);
    border-radius: 0.6rem;
    padding: 0.6em 1.1em;
    width: fit-content;
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.ebsrv17__more i {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.ebsrv17__more:hover,
.ebsrv17__more:focus-visible {
    background: var(--ebsrv17-card-btn);
    border-color: var(--ebsrv17-card-btn);
    color: #FFFFFF;
    transform: translateY(-0.1rem);
}

.ebsrv17__more:hover i {
    transform: translateX(-0.25rem);
}

.ebsrv17__more:focus-visible {
    outline: 0.125rem solid var(--ebsrv17-title);
    outline-offset: 0.2rem;
}

/* ---------- CTA السفلي ---------- */
.ebsrv17__cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    text-align: center;
    margin-top: 3rem;
    padding-top: 2.5rem;
    border-top: 0.0625rem solid var(--ebsrv17-border);
}

.ebsrv17__cta-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ebsrv17-title);
}

.ebsrv17__cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6em;
    font-family: "El Messiri", sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ebsrv17-btn-text);
    background: var(--ebsrv17-btn-bg);
    border: none;
    border-radius: 0.6rem;
    padding: 0.9em 1.9em;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.ebsrv17__cta-btn:hover,
.ebsrv17__cta-btn:focus-visible {
    background: var(--ebsrv17-btn-bg-hover);
    color: var(--ebsrv17-btn-text-hover);
    transform: translateY(-0.15rem);
}

.ebsrv17__cta-btn:focus-visible {
    outline: 0.125rem solid var(--ebsrv17-card-btn);
    outline-offset: 0.2rem;
}

.ebsrv17__card.ebsrv17--visible {
    animation: ebsrv17-reveal 0.6s ease forwards;
}

@keyframes ebsrv17-reveal {
    from { opacity: 0; transform: translateY(1rem); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .ebsrv17__card,
    .ebsrv17__icon,
    .ebsrv17__media img,
    .ebsrv17__more i,
    .ebsrv17__cta-btn {
        transition: none;
        animation: none;
    }
}

/* 4. Breakpoints */
@media (min-width: 481px) {
    .ebsrv17__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 601px) {
    .ebsrv17__header { margin-bottom: 3.25rem; }
    .ebsrv17__media { height: 12.5rem; }
}

@media (min-width: 769px) {
    .ebsrv17__grid { grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
    .ebsrv17__cta { flex-direction: row; justify-content: space-between; text-align: right; }
}

@media (min-width: 1025px) {
    .ebsrv17 { --ebsrv17-padding-top: 6rem; --ebsrv17-padding-bottom: 6rem; }
}

@media (min-width: 1281px) {
    .ebsrv17__container { padding-inline: 2.5rem; }
}

@media (min-width: 1441px) {
    .ebsrv17 { --ebsrv17-padding-top: 7rem; --ebsrv17-padding-bottom: 7rem; }
}

@media (min-width: 1921px) {
    .ebsrv17__container { max-width: 100rem; }
}
/* Card with no uploaded image yet — show the service icon on a soft brand gradient */
.ebsrv17__media-inner--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #E8F7F8 0%, #CDEDEF 100%);
    color: #0B9AA5;
    font-size: 2.6rem;
}
