/* ============================================
   MediGlance Healthcare — Clean White & Blue
   ============================================ */

/* --- Base Reset & Font --- */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Manrope', system-ui, -apple-system, sans-serif;
    background: #F8FAFC;
    color: #1E293B;
    margin: 0;
    overflow-x: hidden;
}

/* --- Scroll Progress Bar --- */
#scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #3B82F6, #2563EB);
    z-index: 9999;
    transition: width 0.1s linear;
}

/* --- Glass Card --- */
.glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.6);
}

.glass-dark {
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* --- Services Dropdown --- */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.45rem 0.85rem;
    border-radius: 0.6rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    border: none;
    background: transparent;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.nav-dropdown-trigger:hover,
.nav-dropdown-trigger.open {
    background: #EFF6FF;
    color: #2563EB;
}

.nav-dropdown-trigger svg {
    transition: transform 0.2s ease;
}

.nav-dropdown-trigger.open svg {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 260px;
    background: #ffffff;
    border: 1px solid #E2E8F0;
    border-radius: 1rem;
    box-shadow: 0 16px 48px rgba(0,0,0,0.10);
    padding: 0.5rem;
    z-index: 100;
    animation: dropdownIn 0.18s ease-out both;
}

@keyframes dropdownIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.nav-dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.65rem;
    text-decoration: none;
    color: #334155;
    transition: background 0.15s, color 0.15s;
    font-size: 0.875rem;
}

.nav-dropdown-item:hover {
    background: #EFF6FF;
    color: #2563EB;
}

.nav-dropdown-item:hover .nav-dropdown-icon {
    background: #DBEAFE;
    color: #2563EB;
}

.nav-dropdown-icon {
    width: 2rem;
    height: 2rem;
    min-width: 2rem;
    border-radius: 0.5rem;
    background: #F1F5F9;
    color: #64748B;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}

.nav-dropdown-label {
    font-weight: 600;
    line-height: 1.2;
}

.nav-dropdown-desc {
    font-size: 0.75rem;
    color: #94A3B8;
    margin-top: 1px;
    line-height: 1.4;
}

/* --- Scroll Reveal --- */
.scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Page Fade Transition --- */
.page-fade {
    animation: pageFadeIn 0.4s ease-out;
}

@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Card Hover Effect --- */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px -8px rgba(37, 99, 235, 0.12);
}

/* --- Button Styles --- */
.btn-primary-mg {
    background: #2563EB;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.btn-primary-mg:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
    background: #1D4ED8;
}

.btn-secondary-mg {
    background: transparent;
    color: #2563EB;
    border: 2px solid #2563EB;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-secondary-mg:hover {
    background: #2563EB;
    color: white;
    transform: translateY(-2px);
}

.btn-accent {
    background: #2563EB;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
    background: #1D4ED8;
}

/* --- Skeleton Loader --- */
.skeleton {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    border-radius: 0.75rem;
}

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* --- Stepper --- */
.stepper-line {
    height: 3px;
    background: #e2e8f0;
    position: relative;
    flex: 1;
}

.stepper-line::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: var(--progress, 0%);
    background: #2563EB;
    transition: width 0.5s ease;
}

/* --- Rating Stars --- */
.star-filled { color: #F59E0B; }
.star-empty { color: #CBD5E1; }

/* --- Tag / Badge --- */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tag-navy {
    background: rgba(37, 99, 235, 0.08);
    color: #1D4ED8;
}

.tag-blue {
    background: rgba(37, 99, 235, 0.08);
    color: #1D4ED8;
}

.tag-red {
    background: rgba(239, 68, 68, 0.08);
    color: #DC2626;
}

.tag-amber {
    background: rgba(245, 158, 11, 0.1);
    color: #D97706;
}

.tag-green {
    background: rgba(22, 163, 74, 0.08);
    color: #15803D;
}

/* --- Tabs --- */
.tab-btn {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    color: #64748B;
    border: none;
    background: none;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
}

.tab-btn.active {
    color: #2563EB;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #2563EB;
    border-radius: 3px 3px 0 0;
}

/* --- Input Styles --- */
.input-mg {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #E2E8F0;
    border-radius: 0.75rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
    color: #1E293B;
    outline: none;
}

.input-mg:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-mg::placeholder {
    color: #94A3B8;
}

select.input-mg {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748B' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* --- Testimonial Slider --- */
.testimonial-track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 1rem 0;
}

.testimonial-track::-webkit-scrollbar { display: none; }

.testimonial-track > * {
    scroll-snap-align: start;
    flex: 0 0 min(100%, 400px);
}

/* --- Section Styling --- */
.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    color: #1E293B;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #64748B;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* --- Container --- */
.container-mg {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- File Drop Zone --- */
.drop-zone {
    border: 2px dashed #CBD5E1;
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #F8FAFC;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: #3B82F6;
    background: rgba(59, 130, 246, 0.04);
}

/* --- Responsive Grid --- */
.grid-doctors {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.grid-tests {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.grid-services {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

/* --- Blazor Error Boundary --- */
.blazor-error-boundary {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    color: #DC2626;
    margin: 1rem;
}

.blazor-error-boundary::after {
    content: "Something went wrong. Please refresh the page.";
}

/* --- Text Accent --- */
.text-gradient {
    background: linear-gradient(135deg, #2563EB, #3B82F6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Hero Section --- */
.hero-gradient {
    background: linear-gradient(135deg, #1E40AF 0%, #2563EB 50%, #3B82F6 100%);
}

/* --- Navbar --- */
.navbar-mg {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}

.nav-link-mg {
    position: relative;
    padding: 0.5rem 1rem;
    color: #64748B;
    font-size: 0.875rem;
    font-weight: 600;
    transition: color 0.25s ease;
    text-decoration: none;
}

.nav-link-mg:hover,
.nav-link-mg.active {
    color: #2563EB;
}

.nav-link-mg::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #2563EB;
    transition: width 0.25s ease;
    border-radius: 1px;
}

.nav-link-mg:hover::after,
.nav-link-mg.active::after {
    width: 60%;
}

/* --- Print --- */
@media print {
    .no-print { display: none !important; }
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}