/* =====================================================================
   واجهة الصفحات (Hero) بهوية مستشفى الكفيل التخصصي
   - تُطبَّق تلقائيًا على كل عنصر .headerPage في الموقع
   - وعلى واجهة البحث .searchHero
   ===================================================================== */

:root {
    --kh-blue-dark: 0, 62, 99;
    --kh-blue: 0, 104, 157;
    --kh-blue-light: 57, 158, 209;
    --kh-page-bg: #F5F5F5;
    /* خط نبض القلب (متحرك) */
    --kh-pulse: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0 60 H380 L410 60 L430 25 L455 100 L480 10 L505 85 L520 60 H760 L780 60 L795 40 L812 78 L828 60 H1200' fill='none' stroke='%23ffffff' stroke-opacity='.18' stroke-width='2.5' stroke-linejoin='round' stroke-linecap='round' stroke-dasharray='1600' stroke-dashoffset='1600'%3E%3Canimate attributeName='stroke-dashoffset' values='1600;0;0' keyTimes='0;.6;1' dur='4s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E");
    /* رموز طبية شفافة: صلبان، قلب، كبسولة، دوائر */
    --kh-icons: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 400' preserveAspectRatio='xMidYMid slice'%3E%3Cg fill='%23ffffff' fill-opacity='.09'%3E%3Cpath d='M80 40h24v30h30v24h-30v30H80V94H50V70h30z'/%3E%3Cpath d='M1090 260h16v20h20v16h-20v20h-16v-20h-20v-16h20z'/%3E%3Cpath d='M560 22h12v15h15v12h-15v15h-12V49h-15V37h15z'/%3E%3Cpath d='M1040 60c-14-24-52-14-46 14 4 18 28 32 46 48 18-16 42-30 46-48 6-28-32-38-46-14z'/%3E%3Crect x='170' y='290' width='90' height='34' rx='17' transform='rotate(-30 215 307)'/%3E%3Cpath d='M300 70h10v12h12v10h-12v12h-10V92h-12V82h12z'/%3E%3Cpath d='M860 330h10v12h12v10h-12v12h-10v-12h-12v-10h12z'/%3E%3C/g%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.08' stroke-width='3'%3E%3Ccircle cx='1140' cy='90' r='60'/%3E%3Ccircle cx='40' cy='330' r='80'/%3E%3Ccircle cx='700' cy='370' r='40'/%3E%3C/g%3E%3C/svg%3E");
    --kh-overlay:
        radial-gradient(circle at 15% 20%, rgba(var(--kh-blue-light), .55), transparent 45%),
        linear-gradient(120deg, rgba(var(--kh-blue-dark), .92) 0%, rgba(var(--kh-blue), .84) 50%, rgba(var(--kh-blue-light), .70) 100%);
}

/* ---------------------------------------------------------------------
   كل رؤوس الصفحات
   --------------------------------------------------------------------- */
.headerPage {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    height: 380px;
    background-color: rgb(var(--kh-blue));
    background-size: cover;
    background-position: center;
}

/* الطبقة الزرقاء + النبض + الرموز */
.headerPage::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        var(--kh-pulse) center 58% / 100% 110px no-repeat,
        var(--kh-icons) center / cover no-repeat,
        var(--kh-overlay);
}

/* انحناء ناعم أسفل الرأس */
.headerPage::after {
    content: "";
    position: absolute;
    left: -5%;
    right: -5%;
    bottom: -40px;
    height: 80px;
    z-index: 3;
    background: var(--kh-page-bg);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    pointer-events: none;
}

.headerPage > video { z-index: 0; }
.headerPage > .container,
.headerPage > div:not(.heroOverlay) { position: relative; z-index: 2; }

/* العنوان في الوسط */
.headerPage .row:has(> .col-auto > .nameHeaderPage) { justify-content: center; }

.headerPage .nameHeaderPage {
    background: none;
    color: #fff;
    text-shadow: 0 4px 18px rgba(0, 30, 50, .35);
    font-size: 2.6rem;
    font-weight: 700;
    padding: 0 0 18px;
    text-align: center;
    position: relative;
    margin-top: -20px;
}
/* شريط زخرفي تحت العنوان */
.headerPage .nameHeaderPage::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 70px;
    height: 4px;
    transform: translateX(-50%);
    border-radius: 4px;
    background: linear-gradient(90deg, rgba(255, 255, 255, .25), #fff, rgba(255, 255, 255, .25));
}

/* بطاقة البحث في صفحة الأطباء: زجاجية فوق الخلفية الزرقاء */
.headerPage .alkafeel_doctors {
    background: rgba(255, 255, 255, .12) !important;
    border: 1px solid rgba(255, 255, 255, .25);
    backdrop-filter: blur(6px);
    border-radius: 20px !important;
}

@media (max-width: 991px) {
    .headerPage .nameHeaderPage { font-size: 2.1rem; }
}

@media (max-width: 650px) {
    .headerPage { height: 200px; }
    .headerPage::after { height: 40px; bottom: -20px; }
    .headerPage .nameHeaderPage { font-size: 1.6rem; padding-bottom: 12px; margin-top: -10px; }
    .headerPage::before {
        background:
            var(--kh-pulse) center 58% / 100% 70px no-repeat,
            var(--kh-overlay);
    }
}

/* ---------------------------------------------------------------------
   واجهة البحث
   --------------------------------------------------------------------- */
/* ---------- واجهة البحث ---------- */
.searchHero {
    position: relative; overflow: hidden; color: #fff;
    padding: 70px 0 80px; min-height: 360px;
    background: var(--hero-img) center / cover no-repeat, #00689D;
}
.searchHero .heroOverlay {
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(57, 158, 209, .55), transparent 45%),
        linear-gradient(120deg, rgba(0, 62, 99, .93) 0%, rgba(0, 104, 157, .86) 50%, rgba(57, 158, 209, .72) 100%);
}
.searchHero::after { /* انحناء ناعم أسفل الواجهة */
    content: ""; position: absolute; left: -5%; right: -5%; bottom: -40px; height: 80px;
    background: var(--kh-page-bg); border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.heroPulse {
    position: absolute; left: 0; right: 0; top: 50%; width: 100%; height: 120px;
    transform: translateY(-50%); color: rgba(255, 255, 255, .16);
}
.heroPulse path { stroke-dasharray: 1600; stroke-dashoffset: 1600; animation: heroPulse 4s ease-in-out infinite; }
@keyframes heroPulse { 0% { stroke-dashoffset: 1600; } 60%, 100% { stroke-dashoffset: 0; } }

.heroCrosses i { position: absolute; color: rgba(255, 255, 255, .09); animation: heroFloat 7s ease-in-out infinite; }
.heroCrosses .c1 { font-size: 70px; top: 12%; left: 6%; }
.heroCrosses .c2 { font-size: 54px; bottom: 22%; left: 16%; animation-delay: 1s; }
.heroCrosses .c3 { font-size: 64px; top: 14%; right: 8%; animation-delay: 2s; }
.heroCrosses .c4 { font-size: 36px; bottom: 26%; right: 20%; animation-delay: 3s; }
.heroCrosses .c5 { font-size: 46px; top: 55%; right: 4%; animation-delay: 1.5s; }
.heroCrosses .c6 { font-size: 40px; top: 8%; left: 42%; animation-delay: 2.5s; }
@keyframes heroFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

.heroInner { position: relative; z-index: 2; text-align: center; max-width: 860px; }
.heroBadge {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: 30px;
    background: rgba(255, 255, 255, .15); border: 1px solid rgba(255, 255, 255, .3);
    font-size: .9rem; backdrop-filter: blur(4px);
}
.heroTitle { color: #fff; font-size: 2.3rem; font-weight: 700; margin: 18px 0 8px; }
.heroSub { color: rgba(255, 255, 255, .85); font-size: 1.05rem; margin-bottom: 28px; }

.heroForm {
    display: flex; align-items: center; background: #fff; border-radius: 60px;
    padding: 6px; box-shadow: 0 18px 40px rgba(0, 40, 70, .35);
}
.heroForm .heroIcon { color: #00689D; font-size: 1.15rem; padding: 0 18px; }
.heroForm input {
    flex: 1; min-width: 0; border: 0; outline: 0; font-size: 1.05rem; padding: 12px 4px; color: #222; background: transparent;
}
.heroForm select {
    border: 0; border-inline-start: 1px solid #e2e8ee; outline: 0; background: transparent;
    color: #00689D; padding: 10px 14px; max-width: 190px; cursor: pointer;
}
.heroForm button {
    border: 0; border-radius: 50px; padding: 12px 32px; color: #fff; font-weight: 600;
    background: linear-gradient(266.43deg, #00689D 0.87%, #399ED1 100%); transition: transform .15s, box-shadow .15s;
}
.heroForm button:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 104, 157, .4); }

@media (max-width: 767px) {
    .searchHero { padding: 45px 0 60px; min-height: 0; }
    .heroTitle { font-size: 1.6rem; }
    .heroForm { flex-wrap: wrap; border-radius: 20px; gap: 6px; }
    .heroForm .heroIcon { display: none; }
    .heroForm input { flex-basis: 100%; padding: 10px 12px; }
    .heroForm select { flex: 1; max-width: none; border-inline-start: 0; border: 1px solid #e2e8ee; border-radius: 12px; }
    .heroForm button { padding: 10px 22px; }
    .heroCrosses { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .heroPulse path, .heroCrosses i { animation: none; stroke-dashoffset: 0; }
}


/* ---------------------------------------------------------------------
   نص رأس صفحة "اتصل بنا"
   --------------------------------------------------------------------- */
.headerPage .contact_us_text {
    background: none !important;
    color: #fff !important;
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.5;
    text-shadow: 0 4px 18px rgba(0, 30, 50, .35);
    margin-top: -20px;
}
@media (max-width: 650px) {
    .headerPage .contact_us_text { font-size: 1.3rem; margin-top: -10px; }
}

/* ---------------------------------------------------------------------
   مسار التنقل داخل الرأس (صفحات التفاصيل)
   --------------------------------------------------------------------- */
.headerPage .heroCrumbs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 7px 20px;
    border-radius: 30px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .25);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: .95rem;
    max-width: 90vw;
}
.headerPage .heroCrumbs a { color: #fff; text-decoration: none; opacity: .85; transition: opacity .15s; }
.headerPage .heroCrumbs a:hover { opacity: 1; text-decoration: underline; }
.headerPage .heroCrumbs .sep { font-size: .65rem; opacity: .6; }
.headerPage .heroCrumbs span {
    font-weight: 600;
    max-width: 420px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.headerPage.heroDetails .col-auto { display: flex; flex-direction: column; align-items: center; }

@media (max-width: 650px) {
    .headerPage.heroDetails { height: 230px; }
    .headerPage .heroCrumbs { font-size: .8rem; gap: 6px; padding: 5px 12px; margin-top: 10px; }
    .headerPage .heroCrumbs span { max-width: 170px; }
}
