﻿/* =========================
   TOKENS
========================= */
:root {
    --text: #0b0f1a;
    --radius: 20px;
    --shadow: 0 20px 60px rgba(0,0,0,.18);
    --maxw: 1200px;
    --heroH: 100vh; /* medical header height */
    --splitBlack: 35%; /* left black width */
    --splitWhite: 65%; /* right white width */
}

/* =========================
   BASE
========================= */
body {
    background: var(--bg);
    width: 100%;
    color: var(--text);
}

/* =========================
   TOP SPLIT SECTION (NOT FIXED)
   black LEFT / white RIGHT (button + caption on right)
========================= */
.medical-hero {
    width: 100%;
    height: var(--heroH);
    display: flex;
    position: relative; /* مهم */
    overflow: hidden;
}

.medical-hero__left {
    height:80%;
    width: var(--splitBlack);
    background: #000;
}

.medical-hero__right {
    width: var(--splitWhite);
    display: flex;
    flex-direction: column;
    padding: 250px 64px;
    /* بدل center العمودي، هنطلعهم لفوق شوية */
    gap: 18px;
    align-items: flex-start;
}


.medical-hero__title {
    margin: 0;
    font-size: 48px;
    font-weight: 900;
    color: var(--text);
}

/* Button animation */
.medical-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: fit-content;
    padding: 14px 38px;
    background: #000;
    font-size: 18px;
    font-weight: 800;
    text-decoration: none;
    text-decoration-line:none;
    border-radius: 999px;
    transform: translateZ(0);
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
    box-shadow: 0 10px 25px rgba(0,0,0,.18);
    overflow: hidden;
}

    .medical-btn::after {
        content: "";
        position: absolute;
        inset: -2px;
        transform: translateX(-120%);
        transition: transform .6s ease;
        pointer-events: none;
    }

    .medical-btn:hover {
        background: #111;
        transform: translateY(-2px);
        box-shadow: 0 16px 35px rgba(0,0,0,.22);
    }

        .medical-btn:hover::after {
            transform: translateX(120%);
        }

    .medical-btn:active {
        transform: translateY(0);
    }

    .medical-btn:focus-visible {
        outline: 3px solid rgba(0,0,0,.25);
        outline-offset: 4px;
    }

/* =========================
   DOCTORS LIST
========================= */
.doctors-content {
    position: relative;
    z-index: 0;
}

/* =========================
   SECTION (FULL SCREEN)
========================= */
.doc-hero {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    isolation: isolate;
    margin-block: 5px;
}

.doc-hero__content {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 48px 20px;
    display: flex;
    justify-content: space-between;
    gap: 40px;
    direction: rtl;
    align-items: stretch;
}

/* =========================
   TEXT
========================= */
.doc-text {
    flex: 1;
    min-width: 260px;
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.doc-title {
    margin: 0 0 22px 0;
    font-size: 56px;
    font-weight: 900;
    letter-spacing: .2px;
}

.doc-name {
    margin: 0 0 10px 0;
    font-size: 34px;
    font-weight: 800;
}

.doc-role {
    margin: 5px;
    font-size: 22px;
    color: var(--muted);
    font-weight: 800;
}

/* =========================
   MEDIA
========================= */
.doc-media {
    position: relative;
    height: 20%;
    width: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    border-radius: 50px;
}

.doc-media__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    transform: scale(2.5);
    transform-origin: center;
    filter: blur(1px);
    opacity: 5;
    z-index: 0;
    pointer-events: none;
    padding: 10px;
}

.doc-media__fade {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* =========================
   CARD
========================= */
.doc-card-wrap {
    position: relative;
    z-index: 2;
    width: 360px;
    max-width: 92vw;
    perspective: 1200px;
}
/* initial hidden state */
.doc-hero .doc-card,
.doc-hero .doc-text {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s ease, transform .7s ease;
    will-change: opacity, transform;
}
.doc-hero .doc-card {
    transform-style: preserve-3d;
    transform: translateY(24px) rotateY(180deg); /* hidden + flipped */
    transition: transform .9s cubic-bezier(.22,.61,.36,1), opacity .7s ease;
    backface-visibility: hidden;
}
/* when visible */
.doc-hero.is-inview .doc-text {
    opacity: 1;
    transform: translateY(0);
}

.doc-hero.is-inview .doc-card {
    opacity: 1;
    transform: translateY(0) rotateY(0deg); /* flip back */
}

/* accessibility: reduce motion */
@media (prefers-reduced-motion: reduce) {
    .doc-hero .doc-card,
    .doc-hero .doc-text {
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}
.doc-card {
    position: relative;
    width: 100%;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    isolation: isolate;
}

    .doc-card::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 1;
        pointer-events: none;
        opacity: .9;
    }

.doc-card__img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 420px;
    object-fit: cover;
    border-radius: calc(var(--radius) - 6px);
    display: block;
    background: #f3f4f6;
}

/* =========================
   ENTRY ANIMATION
========================= */
/*.doc-card,
.doc-text {
    animation: in .55s ease both;
}*/

@keyframes in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width:900px) {
    .medical-hero {
        height: auto;
        min-height: 380px;
        flex-direction: column;
    }

    .medical-hero__left {
        width: 100%;
        height: 140px;
    }

    .medical-hero__right {
        width: 100%;
        padding: 28px 16px;
        align-items: center;
        text-align: center;
    }

    .medical-hero__title {
        font-size: 36px;
    }

    .doc-hero {
        min-height: auto;
        padding: 40px 0;
    }

    .doc-hero__content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 30px 16px;
        gap: 22px;
    }

    .doc-text {
        text-align: center;
    }

    .doc-title {
        font-size: 40px;
        margin-bottom: 14px;
    }

    .doc-name {
        font-size: 26px;
    }

    .doc-role {
        font-size: 16px;
    }

    .doc-media {
        width: 100%;
        height: auto;
        border-radius: 18px;
        position: relative;
        overflow: hidden;
    }

    .doc-card-wrap {
        width: 340px;
    }

    .doc-card__img {
        height: 380px;
    }
}
.medical-hero__divider-img {
    position: absolute;
    top: 35%;
    right: var(--splitWhite); /* مهم مع RTL */
    transform: translate(50%, -50%);
    height: 66%;
    width: auto;
    z-index: 3;
    filter: drop-shadow(0 18px 45px rgba(0,0,0,.22));
    border-radius: 18px;
    border: 3px solid rgba(255,255,255,.35);
    pointer-events: auto; /* مهم عشان hover */

    transition: transform .45s cubic-bezier(.22,.61,.36,1), filter .45s ease, box-shadow .45s ease;
}
    .medical-hero__divider-img:hover {
        transform: translate(50%, -55%) scale(1.05);
        filter: drop-shadow(0 28px 65px rgba(0,0,0,.35));
    }

.medical-hero__right {
    position: relative;
    z-index: 2;
}

.medical-hero__left {
    position: relative;
    z-index: 1;
}
.medical-hero__divider-img {
    z-index: 3;
}








body {
    background-image: url('/assets/servicebackground.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: 3;
}


