/**
 * Hospital Medical Staff cards — shared dashboard + public Discover Our Experts.
 * Equal-height grid rows; View Profile aligned at bottom; matching badge/button styles.
 */
.hosp-staff-page .hospital-staff-grid.doctors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 20px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
}

.hosp-staff-page .doctor-card-pro-style {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    padding: 0;
    cursor: default;
    transform: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.hosp-staff-page .doctor-card-pro-style.hosp-staff-card-animate {
    animation: hospStaffCardUp 0.48s ease-out both;
    animation-delay: var(--card-reveal-delay, 0s);
}

@keyframes hospStaffCardUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

.hosp-staff-page .doctor-card-pro-style:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    border-color: rgba(46, 158, 128, 0.35);
    transform: none;
}

.hosp-staff-page .doctor-card-pro-style .doctor-content {
    background: #fff;
    border-radius: 0 0 16px 16px;
    box-shadow: none;
}

.hosp-staff-page .doctor-image-clickable {
    width: 100%;
    height: 176px;
    margin: 0;
    border: none;
    border-radius: 16px 16px 0 0;
    flex-shrink: 0;
}

.hosp-staff-page .doctor-card-photo,
.hosp-staff-page .doctor-image-clickable .doctor-card-photo {
    object-position: 28% 20% !important;
}

.hosp-staff-page .doctor-card-fixed-size .doctor-card-name-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
    min-height: calc(1.35em * 1);
    flex-wrap: nowrap;
}

.hosp-staff-page .doctor-card-fixed-size .doctor-card-name-row .doctor-card-title,
.hosp-staff-page .doctor-card-fixed-size .doctor-card-name-row .doctor-name.doctor-card-title {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 1.125rem !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    color: #1e293b !important;
    font-family: 'Poppins', sans-serif !important;
    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
}

.hosp-staff-page .doctor-card-title {
    overflow-wrap: normal;
    word-break: normal;
}

.hosp-staff-page .doctor-card-name-row {
    gap: 6px;
    align-items: flex-start;
}

.hosp-staff-page .gender-badge--card {
    flex-shrink: 0;
    max-width: 42%;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    border: 1px solid transparent;
}

.hosp-staff-page .gender-badge--card i {
    font-size: 9px;
}

.hosp-staff-page .gender-badge--male {
    background: #DBEAFE;
    color: #1E40AF;
    border-color: rgba(30, 64, 175, 0.2);
}

.hosp-staff-page .gender-badge--female {
    background: #FCE7F3;
    color: #BE185D;
    border-color: rgba(190, 24, 93, 0.2);
}

.hosp-staff-page .doctor-specialty-line {
    margin-bottom: 8px !important;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 13px;
    color: #64748b;
    min-height: 20px;
}

.hosp-staff-page .doctor-specialty-inline {
    display: block;
    width: 100%;
    line-height: 1.45;
    color: #0d9488;
    font-weight: 600;
}

.hosp-staff-page .doctor-card-about-snippet {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: #475569;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hosp-staff-page .doctor-location-inline {
    display: none !important;
}

/* Equal-height card body — stretch in grid, actions pinned to bottom */
.hosp-staff-page .hospital-staff-card.doctor-card-fixed-size {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.hosp-staff-page .hospital-staff-card.doctor-card-fixed-size .doctor-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    padding: 16px 18px 18px !important;
    min-height: 0;
    box-sizing: border-box;
    overflow: visible;
}

.hosp-staff-page .hospital-staff-card.doctor-card-fixed-size .doctor-card-head {
    flex-shrink: 0;
}

.hosp-staff-page .hospital-staff-card.doctor-card-fixed-size .doctor-card-mid {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: visible;
}

.hosp-staff-page .hospital-staff-card.doctor-card-fixed-size .doctor-card-about-zone {
    min-height: calc(13px * 1.55 * 3);
    flex-shrink: 0;
}

.hosp-staff-page .hospital-staff-card.doctor-card-fixed-size .doctor-card-exp-row {
    min-height: 28px;
    margin: 4px 0 8px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.hosp-staff-page .hospital-staff-card.doctor-card-fixed-size .doctor-card-exp-row--empty {
    min-height: 28px;
    margin: 4px 0 8px;
    visibility: hidden;
    pointer-events: none;
}

.hosp-staff-page .doctor-card-fixed-size .doctor-exp-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.08));
    color: #059669;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid rgba(5, 150, 105, 0.18);
}

.hosp-staff-page .doctor-card-fixed-size .doctor-exp-badge i {
    font-size: 9px;
}

.hosp-staff-page .hospital-staff-card.doctor-card-fixed-size .doctor-card-services-zone {
    min-height: 52px;
    margin-top: 0;
    flex-shrink: 0;
    overflow: visible;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.hosp-staff-page .doctor-card-fixed-size .services-display {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.hosp-staff-page .doctor-card-fixed-size .doctor-services-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: 100%;
    row-gap: 4px;
}

.hosp-staff-page .doctor-card-fixed-size .doctor-services-row::-webkit-scrollbar {
    display: none;
}

.hosp-staff-page .doctor-card-fixed-size .service-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    background: #eef7f7;
    color: #1A5C7E;
    border-radius: 5px;
    font-size: 0.6875rem !important;
    font-weight: 600;
    border: 1px solid rgba(26, 92, 126, 0.15);
    white-space: nowrap;
    flex: 0 0 auto;
}

.hosp-staff-page .doctor-card-fixed-size .service-badge i {
    font-size: 8px;
    color: #2E9E80;
    flex-shrink: 0;
}

.hosp-staff-page .doctor-card-fixed-size .doctor-services-more,
.hosp-staff-page .doctor-card-fixed-size .btn-show-more-services.doctor-services-more {
    display: inline-flex;
    align-items: center;
    min-height: 16px;
    margin: 4px 0 0;
    padding: 0;
    border: none;
    background: none;
    color: #0d9488;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.3;
}

.hosp-staff-page .doctor-card-fixed-size .doctor-services-more--spacer {
    display: block;
    min-height: 16px;
    margin-top: 4px;
    visibility: hidden;
    pointer-events: none;
}

.hosp-staff-page .doctor-card-fixed-size .btn-show-more-services.doctor-services-more {
    align-self: flex-start;
    margin-top: 0;
}

.hosp-staff-page .doctor-card-fixed-size .doctor-services-more:hover {
    color: #0f766e;
    text-decoration: underline;
}

.hosp-staff-page .hospital-staff-card.doctor-card-fixed-size .doctor-actions {
    flex-shrink: 0;
    margin-top: auto !important;
    padding-top: 12px;
    border-top: 1px solid #eef2f6;
    display: flex;
    flex-direction: column;
    gap: 8px !important;
    width: 100%;
}

.hosp-staff-page .doctor-social-actions,
.hosp-staff-page .doctor-rating,
.hosp-staff-page .doctor-listing-snippet {
    display: none !important;
}

.hosp-staff-page .btn-view-profile {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #2E9E80 0%, #1A5C7E 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 4px 12px rgba(26, 92, 126, 0.3);
    min-height: 40px;
    line-height: 1.2;
    font-family: inherit;
}

.hosp-staff-page .btn-view-profile:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(26, 92, 126, 0.4);
    color: #fff;
}

.hosp-staff-page .btn-view-profile:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
}

@media (max-width: 767px) {
    .hosp-staff-page .hospital-staff-grid.doctors-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .hosp-staff-page .hospital-staff-card.doctor-card-fixed-size .doctor-content {
        padding: 14px 16px 16px !important;
    }

    .hosp-staff-page .doctor-card-fixed-size .doctor-services-row {
        flex-wrap: wrap;
        overflow-x: visible;
        row-gap: 6px;
    }

    .hosp-staff-page .doctor-image-clickable {
        height: 176px !important;
        min-height: 176px !important;
    }
}

/* Beat global header .doctor-card .doctor-name rules on public hospital profile */
body.page-hospital-profile .hp-experts-staff-cards.hosp-staff-page .doctor-card .doctor-name.doctor-card-title {
    font-size: 1.125rem !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: unset !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #1e293b !important;
}

body.page-hospital-profile .hp-experts-staff-cards.hosp-staff-page .doctor-card-fixed-size .doctor-card-name-row {
    flex-wrap: wrap;
    align-items: flex-start;
    min-height: auto;
}

body.page-hospital-profile .hp-experts-staff-cards.hosp-staff-page .doctor-card-fixed-size .doctor-card-name-row .doctor-name.doctor-card-title {
    flex: 1 1 calc(100% - 72px);
    min-width: 0;
    white-space: normal !important;
    text-overflow: unset !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
}

@media (max-width: 768px) {
    body.page-hospital-profile .hp-experts-staff-cards.hosp-staff-page .doctor-card .doctor-name.doctor-card-title {
        font-size: 1.125rem !important;
        line-height: 1.35 !important;
        white-space: normal !important;
        overflow: hidden !important;
        text-overflow: unset !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hosp-staff-page .doctor-card-pro-style.hosp-staff-card-animate {
        animation: none !important;
    }

    .hosp-staff-page .btn-view-profile:hover {
        transform: none;
    }
}
