/* =============================================
   DOCTORS — HERO
   ============================================= */
.dr-hero {
    position: relative;
    min-height: 560px;
    padding: 80px 0;
    background-color: #f4f6fc;
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Left-to-right white wash so the LEFT side reads as a clean panel
   while the people on the right stay clearly visible. */
.dr-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.97) 0%,
        rgba(255, 255, 255, 0.94) 26%,
        rgba(255, 255, 255, 0.55) 46%,
        rgba(255, 255, 255, 0.18) 62%,
        rgba(255, 255, 255, 0)    78%
    );
}

.dr-hero-container {
    position: relative;
    z-index: 2;
    width: 100%;
}

.dr-hero-content {
    max-width: 540px;
}

/* Breadcrumb */
.dr-hero-crumbs {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-sans);
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 26px;
}
.dr-hero-crumbs a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s ease;
}
.dr-hero-crumbs a:hover {
    color: var(--color-primary);
}
.dr-hero-crumbs i {
    font-size: 10px;
    opacity: 0.6;
}
.dr-hero-crumbs span[aria-current] {
    color: var(--color-primary);
    font-weight: 600;
}

.dr-hero-title {
    font-family: var(--font-serif);
    font-size: clamp(2.2rem, 4.4vw, 3.6rem);
    font-weight: 600;
    line-height: 1.05;
    color: var(--color-primary);
    margin: 0 0 22px;
    letter-spacing: -0.5px;
}

.dr-hero-desc {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.7;
    color: #5a6478;
    max-width: 460px;
    margin: 0;
}

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
    .dr-hero {
        min-height: 480px;
        padding: 60px 0;
        background-position: 80% center;
    }
    .dr-hero-overlay {
        background: linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.97) 0%,
            rgba(255, 255, 255, 0.92) 42%,
            rgba(255, 255, 255, 0.55) 62%,
            rgba(255, 255, 255, 0.10) 80%,
            rgba(255, 255, 255, 0)    92%
        );
    }
    .dr-hero-content { max-width: 480px; }
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
    .dr-hero {
        min-height: 440px;
        padding: 56px 0;
        background-size: cover;
        background-position: 72% center;
    }
    /* Top-down white fade on phones — keeps text legible regardless of where
       the photo content lands at the smaller viewport. */
    .dr-hero-overlay {
        background: linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.96) 0%,
            rgba(255, 255, 255, 0.92) 48%,
            rgba(255, 255, 255, 0.55) 78%,
            rgba(255, 255, 255, 0.18) 100%
        );
    }
    .dr-hero-content { max-width: 100%; }
    .dr-hero-title br { display: none; }
    .dr-hero-desc { font-size: 14.5px; }
}


/* =============================================
   DOCTORS — BROWSE BY SPECIALITY
   ============================================= */
.dr-specs {
    background-color: #fff;
    padding: 64px 0 32px;
}

.dr-specs-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 32px;
}

.dr-specs-title {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 600;
    color: var(--color-primary);
    margin: 0 0 10px;
    letter-spacing: -0.3px;
}

.dr-specs-sub {
    font-family: var(--font-sans);
    font-size: 14.5px;
    line-height: 1.6;
    color: #6b7280;
    margin: 0;
}

.dr-specs-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 14px;
}

.dr-spec-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 112px;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px 10px;
    cursor: pointer;
    transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
    font-family: var(--font-sans);
}

.dr-spec-pill:hover {
    border-color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(26, 42, 108, 0.08);
}

.dr-spec-pill.is-active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: 0 14px 28px rgba(26, 42, 108, 0.22);
}

.dr-spec-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-size: 22px;
    transition: color 0.25s ease;
}

.dr-spec-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-primary);
    text-align: center;
    line-height: 1.2;
    transition: color 0.25s ease;
}

.dr-spec-pill.is-active .dr-spec-icon,
.dr-spec-pill.is-active .dr-spec-label {
    color: #fff;
}


/* =============================================
   DOCTORS — EMERGENCY SIDEBAR + RESULTS GRID
   ============================================= */
.dr-main {
    background-color: #fff;
    padding: 24px 0 80px;
    border-top: 1px solid #eef0f7;
}

.dr-main-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 26px;
    align-items: flex-start;
}

/* --- Left sidebar --- */
.dr-side {
    position: sticky;
    top: 100px;
    background: linear-gradient(160deg, #1a2a6c 0%, #131f52 100%);
    border-radius: 18px;
    padding: 28px 26px 30px;
    color: #fff;
    box-shadow: 0 22px 50px rgba(19, 31, 82, 0.18);
}

.dr-side-badge {
    display: inline-block;
    background: #e63946;
    color: #fff;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 14px;
}

.dr-side-eyebrow {
    display: block;
    font-family: var(--font-sans);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.dr-side-title {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 10px;
    line-height: 1.2;
}

.dr-side-text {
    font-family: var(--font-sans);
    font-size: 13.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 18px;
}

.dr-side-phone {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    text-decoration: none;
    transition: background-color 0.25s ease, transform 0.25s ease;
    margin-bottom: 22px;
}
.dr-side-phone:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-2px);
}

.dr-side-phone-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.dr-side-phone:hover .dr-side-phone-icon {
    background: var(--color-primary);
    color: #fff;
}

.dr-side-phone-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}
.dr-side-phone-label {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.dr-side-phone-num {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-top: 2px;
}

.dr-side-form-title {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 4px;
}

.dr-side-form-sub {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.55;
    margin: 0 0 16px;
}

.dr-side-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dr-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.dr-field > span {
    font-family: var(--font-sans);
    font-size: 11.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.3px;
}

.dr-field input,
.dr-field select,
.dr-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 13.5px;
    transition: border-color 0.25s ease, background-color 0.25s ease;
    box-sizing: border-box;
}

.dr-field input::placeholder,
.dr-field textarea::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.dr-field input:focus,
.dr-field select:focus,
.dr-field textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.18);
}

.dr-field-select,
.dr-field-icon-wrap {
    position: relative;
}

.dr-field-select select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 36px;
    cursor: pointer;
}

.dr-field-select i,
.dr-field-icon-wrap i {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    pointer-events: none;
}

.dr-field select option {
    color: #1a2a6c;
    background: #fff;
}

.dr-field textarea {
    resize: vertical;
    min-height: 76px;
    font-family: var(--font-sans);
}

.dr-side-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #fff;
    color: var(--color-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 700;
    padding: 13px 18px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    margin-top: 6px;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.dr-side-submit:hover:not(:disabled) {
    background: var(--color-accent);
    color: #131f52;
    transform: translateY(-2px);
}
.dr-side-submit:disabled {
    opacity: 0.85;
    cursor: default;
}

/* --- Right: results --- */
.dr-results-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.dr-results-eyebrow {
    display: block;
    font-family: var(--font-sans);
    font-size: 12.5px;
    color: #6b7280;
    margin-bottom: 4px;
}

.dr-results-title {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 2.4vw, 1.9rem);
    font-weight: 600;
    color: var(--color-primary);
    margin: 0;
    letter-spacing: -0.3px;
}

.dr-results-count {
    font-family: var(--font-sans);
    font-size: 13.5px;
    color: #6b7280;
    white-space: nowrap;
}
.dr-results-count strong {
    color: var(--color-primary);
    font-weight: 700;
}

.dr-results-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.dr-card {
    background: #fff;
    border: 1px solid #eef0f7;
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.dr-card[hidden] {
    display: none;
}

.dr-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(26, 42, 108, 0.14);
    border-color: var(--color-primary);
}

.dr-card-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    overflow: hidden;
    background-color: #f4f6fc;
    margin-bottom: 14px;
}
.dr-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.dr-card-name {
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 600;
    color: var(--color-primary);
    margin: 0 0 4px;
    line-height: 1.3;
}

.dr-card-spec {
    font-family: var(--font-sans);
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 8px;
    line-height: 1.4;
    min-height: 36px;
}

.dr-card-years {
    font-family: var(--font-sans);
    font-size: 12.5px;
    color: #9ca3af;
    margin: 0 0 8px;
}

.dr-card-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.dr-stars {
    display: inline-flex;
    gap: 2px;
    color: #e5e7eb;
    font-size: 12px;
}
.dr-stars .on {
    color: var(--color-accent);
}

.dr-rating-val {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 700;
    color: var(--color-primary);
}

.dr-card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    border-top: 1px solid #eef0f7;
    padding-top: 12px;
    transition: color 0.25s ease, gap 0.25s ease;
}
.dr-card-link:hover {
    color: var(--color-primary-dark, #131f52);
    gap: 12px;
}
.dr-card-link i {
    font-size: 10px;
}

.dr-results-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    font-family: var(--font-sans);
    color: #6b7280;
    background: #f9fafb;
    border-radius: 14px;
    margin: 0;
}

.dr-results-foot {
    text-align: center;
    margin-top: 28px;
}

.dr-view-all {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 26px;
    border-radius: 999px;
    border: 1.5px solid var(--color-primary);
    color: var(--color-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
}
.dr-view-all:hover {
    background: var(--color-primary);
    color: #fff;
    transform: translateY(-2px);
}
.dr-view-all i {
    font-size: 11px;
}


/* =============================================
   DOCTORS — RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
    .dr-specs-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
    .dr-main-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }
    /* When stacked, show the doctors grid right after the speciality filter,
       and push the emergency/contact + booking form to the bottom. */
    .dr-results { order: 1; }
    .dr-side {
        position: relative;
        top: auto;
        order: 2;
    }
    .dr-results-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .dr-specs {
        padding: 56px 0 24px;
    }
    .dr-specs-head { margin-bottom: 24px; }

    /* Horizontal scrolling strip of pills on mobile */
    .dr-specs-grid {
        display: flex;
        grid-template-columns: none;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 10px;
        padding-bottom: 8px;
        margin: 0 -20px;
        padding-left: 20px;
        padding-right: 20px;
        -webkit-overflow-scrolling: touch;
    }
    .dr-spec-pill {
        flex: 0 0 96px;
        scroll-snap-align: start;
        min-height: 96px;
        padding: 12px 8px;
    }
    .dr-spec-icon { font-size: 19px; width: 32px; height: 32px; }
    .dr-spec-label { font-size: 11.5px; }

    .dr-main { padding: 16px 0 56px; }
    .dr-side { padding: 22px 20px 24px; border-radius: 16px; }
    .dr-side-title { font-size: 20px; }

    .dr-results-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .dr-results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .dr-card-spec { min-height: 0; }
}

@media (max-width: 480px) {
    .dr-results-grid {
        grid-template-columns: 1fr;
    }
    .dr-card-img { max-width: 240px; margin-left: auto; margin-right: auto; }
}
