/* MedEx Hospital Display - Business Profile Style */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

.mdx-hospital-profile {
    font-family: 'Manrope', sans-serif;
    color: #1a1a1a;
    background: #f8f9fa;
    line-height: 1.6;
    margin: 0;
    padding: 20px 0 60px 0;
}

/* Breadcrumb navigation */
.mdx-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 600;
}

.mdx-breadcrumb-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #666;
    text-decoration: none;
    padding: 6px 14px;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 50px;
    transition: all 0.2s ease;
}

.mdx-breadcrumb-link:hover {
    color: #ff4c88;
    border-color: #ff4c88;
    background: #fff5f8;
}

.mdx-breadcrumb-sep {
    color: #ccc;
    font-size: 18px;
    line-height: 1;
}

.mdx-breadcrumb-current {
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 380px;
}

.mdx-hospital-profile * {
    box-sizing: border-box;
}

.mdx-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header / Cover Section */
.mdx-profile-header {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    overflow: hidden;
    margin-bottom: 30px;
    position: relative;
}

.mdx-cover-photo {
    height: 320px;
    background: linear-gradient(122deg, #ff4c88 0%, #ff8a63 100%);
    position: relative;
    background-size: cover;
    background-position: center;
}

/* Fallback pattern if no cover photo */
.mdx-cover-photo::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.05)"/></svg>') repeat;
    background-size: 200px;
}

.mdx-profile-top {
    display: flex;
    padding: 0 40px;
    position: relative;
    margin-top: -80px; /* Overlap cover photo */
    align-items: flex-end;
    gap: 30px;
    padding-bottom: 20px;
}

.mdx-profile-logo {
    width: 160px;
    height: 160px;
    border-radius: 20px;
    background: #ffffff;
    border: 6px solid #ffffff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    position: relative;
    z-index: 2;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mdx-profile-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mdx-profile-info {
    flex: 1;
    padding: 20px 25px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: -10px; /* Offset visual bottom alignment */
}

.mdx-hospital-name {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 5px 0;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mdx-verified-badge {
    color: #1DA1F2; /* Verified blue */
    font-size: 22px;
    display: inline-flex;
}

.mdx-hospital-location {
    font-size: 16px;
    color: #555555;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.mdx-header-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.mdx-btn {
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.mdx-btn-primary {
    background: linear-gradient(122deg, #ff4c88 0%, #ff8a63 100%);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(255, 76, 136, 0.25);
}

.mdx-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(255, 76, 136, 0.35);
    color: #fff;
}

.mdx-btn-secondary {
    background: #ffffff;
    border: 2px solid #eeeeee;
    color: #1a1a1a;
}

.mdx-btn-secondary:hover {
    background: #f8f9fa;
    border-color: #dddddd;
}

/* Navigation Tabs */
.mdx-nav-tabs {
    display: flex;
    flex-wrap: wrap;
    padding: 0 40px;
    border-top: 1px solid #eeeeee;
}

.mdx-nav-tab {
    padding: 20px 24px;
    color: #666666;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.mdx-nav-tab:hover,
.mdx-nav-tab.active {
    color: #ff4c88;
    border-bottom-color: #ff4c88;
}

/* Main Grid Layout */
.mdx-main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

/* Sections */
.mdx-section {
    background: #ffffff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    margin-bottom: 30px;
}

.mdx-section-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 20px;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Badges */
.mdx-badges-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mdx-badge {
    background: #fdfdfd;
    border: 1px solid #eeeeee;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: #444;
}

.mdx-badge-success {
    background: #effaf3;
    border-color: #c6ebd5;
    color: #27ae60;
}

.mdx-badge-accent {
    background: #fff5f8;
    border-color: #ffd1e0;
    color: #ff4c88;
}

/* Services / Features Grid */
.mdx-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}

.mdx-feature-card {
    padding: 15px;
    border: 1px solid #eeeeee;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.mdx-feature-card:hover {
    border-color: #ff4c88;
    background: #fff5f8;
}

.mdx-feature-icon {
    color: #ff4c88;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

/* List details */
.mdx-detail-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mdx-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eeeeee;
}

.mdx-detail-item:last-child {
    border-bottom: none;
}

.mdx-detail-label {
    font-weight: 600;
    color: #555;
}

.mdx-detail-value {
    font-weight: 700;
    color: #1a1a1a;
}

/* Sidebar Info Card */
.mdx-sidebar-card {
    background: linear-gradient(122deg, #ff4c88 0%, #ff8a63 100%);
    border-radius: 20px;
    padding: 30px;
    color: #ffffff;
    margin-bottom: 30px;
    box-shadow: 0 10px 25px rgba(255, 76, 136, 0.2);
}

.mdx-sidebar-card h3 {
    color: #ffffff;
    margin-top: 0;
    font-weight: 800;
}

.mdx-contact-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding: 12px;
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.mdx-contact-row:last-child {
    margin-bottom: 0;
}

/* Emergency Alert */
.mdx-emergency-alert {
    background: #fff0f0;
    border: 1px solid #ffcaca;
    color: #d32f2f;
    padding: 15px 20px;
    border-radius: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.mdx-emergency-pulse {
    width: 12px;
    height: 12px;
    background: #d32f2f;
    border-radius: 50%;
    animation: mdxPulse 2s infinite;
}

@keyframes mdxPulse {
    0% { box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(211, 47, 47, 0); }
    100% { box-shadow: 0 0 0 0 rgba(211, 47, 47, 0); }
}

/* Responsive */
@media (max-width: 992px) {
    .mdx-main-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .mdx-profile-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-top: -60px;
    }
    
    .mdx-hospital-location {
        justify-content: center;
    }
    
    .mdx-header-actions {
        justify-content: center;
    }
    
    .mdx-nav-tabs {
        padding: 0 20px;
    }

    .mdx-badges-wrap {
        justify-content: center;
    }
}

/* Lightbox Styles */
.mdx-lightbox {
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.mdx-lightbox.active {
    display: flex;
    opacity: 1;
}
.mdx-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}
.mdx-lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    object-fit: contain;
}
.mdx-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    z-index: 100000;
}
.mdx-lightbox-prev, .mdx-lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: 0.3s;
    user-select: none;
    z-index: 100000;
}
.mdx-lightbox-prev:hover, .mdx-lightbox-next:hover {
    background: rgba(255,255,255,0.3);
}
.mdx-lightbox-prev { left: 20px; }
.mdx-lightbox-next { right: 20px; }

/* ----- DIRECTORY VIEW STYLES ----- */
.mdx-directory-header {
    text-align: center;
    margin-bottom: 40px;
}
.mdx-directory-header h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 10px;
}
.mdx-directory-header p {
    color: #666;
    font-size: 18px;
}

.mdx-directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.mdx-hospital-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}
.mdx-hospital-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
}

.mdx-card-cover {
    height: 160px;
    background: linear-gradient(122deg, #ff4c88 0%, #ff8a63 100%);
    position: relative;
    background-size: cover;
    background-position: center;
}

.mdx-card-body {
    padding: 0 25px 25px 25px;
    position: relative;
    margin-top: -40px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.mdx-card-logo {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    border: 4px solid white;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.mdx-card-logo img { width: 100%; height: 100%; object-fit: cover; }

.mdx-card-title {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 5px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #1a1a1a;
    text-decoration: none;
}
.mdx-card-title:hover {
    color: #ff4c88;
}

.mdx-card-location {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.mdx-card-action {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 2px solid #ff4c88;
    color: #ff4c88;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: auto;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}
.mdx-card-action:hover {
    background: linear-gradient(122deg, #ff4c88 0%, #ff8a63 100%);
    color: white;
    border-color: transparent;
}

/* Pagination */
.mdx-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}
.mdx-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: white;
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}
.mdx-pagination .page-numbers:hover {
    background: #f8f9fa;
    color: #ff4c88;
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}
.mdx-pagination .page-numbers.current {
    background: linear-gradient(122deg, #ff4c88 0%, #ff8a63 100%);
    color: white;
    box-shadow: 0 6px 15px rgba(255, 76, 136, 0.25);
}
.mdx-pagination .next.page-numbers,
.mdx-pagination .prev.page-numbers {
    width: auto;
    padding: 0 20px;
    border-radius: 50px;
}

/* ═══════════════════════════════════════════════════
   DOCTOR STYLES  (medizco-doctor)
   ═══════════════════════════════════════════════════ */

/* Doctor cover: blue-to-teal gradient */
.mdx-cover-doctor {
    background: linear-gradient(122deg, #1d4ed8 0%, #0891b2 100%) !important;
}

/* Circular avatar instead of square logo */
.mdx-doctor-avatar {
    border-radius: 50% !important;
    width: 160px !important;
    height: 160px !important;
}

.mdx-doctor-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f6ff;
}

/* Specialty label under doctor name */
.mdx-doctor-specialty {
    font-size: 17px;
    font-weight: 700;
    color: #1d4ed8;
    margin-bottom: 8px;
}

/* Inline SVG icon helper */
.mdx-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1em;
    height: 1.1em;
    flex-shrink: 0;
}
.mdx-icon svg {
    width: 100%;
    height: 100%;
}

/* Doctor badge — blue accent */
.mdx-badge-doctor-blue {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

/* Doctor CTA button */
.mdx-btn-doctor {
    background: linear-gradient(122deg, #1d4ed8 0%, #0891b2 100%);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(29, 78, 216, 0.25);
}
.mdx-btn-doctor:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(29, 78, 216, 0.35);
    color: #fff;
}

/* Doctor sidebar card — blue gradient */
.mdx-sidebar-doctor {
    background: linear-gradient(122deg, #1d4ed8 0%, #0891b2 100%) !important;
    box-shadow: 0 10px 25px rgba(29, 78, 216, 0.2) !important;
}

/* Doctor card grid — circular avatar */
.mdx-card-doctor-avatar {
    border-radius: 50% !important;
    width: 90px !important;
    height: 90px !important;
}

.mdx-card-cover-doctor {
    background: linear-gradient(122deg, #1d4ed8 0%, #0891b2 100%);
}

.mdx-doctor-specialty-card {
    font-size: 14px;
    font-weight: 700;
    color: #1d4ed8;
    margin-bottom: 8px;
}

/* Doctor card "View Profile" outline button — blue */
.mdx-card-action-doctor {
    border-color: #1d4ed8 !important;
    color: #1d4ed8 !important;
}
.mdx-card-action-doctor:hover {
    background: linear-gradient(122deg, #1d4ed8 0%, #0891b2 100%) !important;
    color: white !important;
    border-color: transparent !important;
}

/* ═══════════════════════════════════════════════════
   PROCEDURE STYLES  (medical-procedures)
   ═══════════════════════════════════════════════════ */

/* Procedure cover: taller hero with purple-violet gradient */
.mdx-cover-procedure {
    height: 380px !important;
    background: linear-gradient(122deg, #7c3aed 0%, #db2777 100%) !important;
    background-size: cover !important;
    background-position: center !important;
    position: relative;
    display: flex;
    align-items: flex-end;
}

.mdx-cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.1) 60%);
}

/* Hero title overlaid on cover image */
.mdx-procedure-hero-content {
    position: relative;
    z-index: 2;
    padding: 40px;
    width: 100%;
}

.mdx-procedure-hero-title {
    font-size: 36px;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Procedure header: hide the profile-top row (no avatar needed) */
.mdx-procedure-header .mdx-profile-top {
    display: none;
}
.mdx-procedure-header .mdx-nav-tabs {
    display: none;
}

/* Two-column image row */
.mdx-procedure-image-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 30px;
}
.mdx-procedure-image-row.mdx-procedure-image-single {
    grid-template-columns: 1fr;
}
.mdx-procedure-image-wrap img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

/* Procedure badge — purple */
.mdx-badge-procedure {
    background: #f5f3ff;
    border-color: #ddd6fe;
    color: #7c3aed;
    margin-right: 6px;
    margin-bottom: 8px;
}

.mdx-badge-procedure-outline {
    background: transparent;
    border: 1.5px solid #7c3aed;
    color: #7c3aed;
    text-decoration: none;
    transition: all 0.2s;
}
.mdx-badge-procedure-outline:hover {
    background: #7c3aed;
    color: #fff;
}

/* Procedure categories shown inside cover */
.mdx-procedure-categories {
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.mdx-procedure-categories .mdx-badge-procedure {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.4);
    color: #fff;
    backdrop-filter: blur(8px);
}

/* Procedure sidebar card — purple gradient */
.mdx-sidebar-procedure {
    background: linear-gradient(122deg, #7c3aed 0%, #db2777 100%) !important;
    box-shadow: 0 10px 25px rgba(124, 58, 237, 0.2) !important;
}

/* Card cover for procedure archive */
.mdx-card-cover-procedure {
    background: linear-gradient(122deg, #7c3aed 0%, #db2777 100%);
    position: relative;
}

/* Category badge floating on card cover */
.mdx-card-category-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(124, 58, 237, 0.85);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 50px;
}

/* Procedure excerpt in card */
.mdx-procedure-card-excerpt {
    font-size: 14px;
    color: #666;
    margin: 8px 0 15px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Procedure "Learn More" button */
.mdx-card-action-procedure {
    border-color: #7c3aed !important;
    color: #7c3aed !important;
}
.mdx-card-action-procedure:hover {
    background: linear-gradient(122deg, #7c3aed 0%, #db2777 100%) !important;
    color: white !important;
    border-color: transparent !important;
}

/* ── Category filter pills (procedure archive) ── */
.mdx-procedure-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 35px;
}

.mdx-filter-pill {
    padding: 8px 20px;
    border-radius: 50px;
    border: 2px solid #e5e7eb;
    background: #fff;
    color: #555;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.25s ease;
}
.mdx-filter-pill:hover {
    border-color: #7c3aed;
    color: #7c3aed;
}
.mdx-filter-pill.active {
    background: linear-gradient(122deg, #7c3aed 0%, #db2777 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.25);
}

/* Responsive tweaks */
@media (max-width: 600px) {
    .mdx-procedure-image-row {
        grid-template-columns: 1fr;
    }
    .mdx-procedure-hero-title {
        font-size: 26px;
    }
}
