:root {
    --primary: #2563EB;
    --primary-dark: #1e40af;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body { font-family: 'Inter', sans-serif; background: var(--bg-light); color: var(--text-main); }

/* --- HERO SECTION --- */
.hero {
    /* Use a gradient to ensure text readability over any image */
    background: linear-gradient(to right, rgba(37, 99, 235, 0.9), rgba(30, 64, 175, 0.8)), url('../hero.webp'); 
    background-size: cover;
    background-position: center;
    padding: 140px 0 100px;
    text-align: center;
    color: white;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero h1 span { color: #93c5fd; }

.hero p {
    font-size: 1.2rem;
    color: #e0e7ff;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-hero {
    display: inline-block;
    background: white;
    color: var(--primary);
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s;
}
.btn-hero:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }

.hero-stats {
    display: flex; justify-content: center; gap: 50px; margin-top: 50px;
    border-top: 1px solid rgba(255,255,255,0.2); padding-top: 30px;
}
.stat-item h4 { font-size: 2rem; margin: 0; font-weight: 700; }
.stat-item span { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; opacity: 0.8; }

/* --- FLOATING SEARCH --- */
.search-section { margin-top: -50px; position: relative; z-index: 10; }
.search-card {
    background: white; padding: 20px; border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 15px;
    max-width: 1000px; margin: 0 auto;
}
.search-group { position: relative; }
.search-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #94a3b8; }
.search-input, .search-select {
    width: 100%; padding: 14px 14px 14px 45px; border: 1px solid #e2e8f0;
    border-radius: 10px; font-size: 1rem; color: var(--text-main); outline: none;
}
.search-input:focus, .search-select:focus { border-color: var(--primary); ring: 2px solid var(--primary); }

/* --- HOW IT WORKS --- */
.process-section { padding: 80px 0; background: white; text-align: center; }
.process-grid { display: flex; justify-content: center; gap: 40px; margin-top: 40px; flex-wrap: wrap; }
.process-step { max-width: 250px; }
.step-icon {
    font-size: 2.5rem; background: #eff6ff; width: 80px; height: 80px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px; color: var(--primary);
}
.process-step h3 { font-size: 1.2rem; margin-bottom: 10px; font-weight: 700; }
.process-step p { color: var(--text-muted); font-size: 0.95rem; }

/* --- DOCTORS GRID --- */
.doctors-section { padding: 60px 0 100px; }
.section-header { text-align: center; margin-bottom: 50px; }
.section-title { font-size: 2.5rem; font-weight: 800; color: var(--text-main); margin-bottom: 10px; }
.section-description { color: var(--text-muted); font-size: 1.1rem; }

.doctors-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px;
}

.doctor-card {
    background: white; border-radius: 16px; overflow: visible; /* Changed to visible so image can overlap */
    border: 1px solid #e2e8f0; transition: all 0.3s ease; cursor: pointer; position: relative;
    margin-top: 30px; /* Added margin to account for overlapping image hover space */
}
.doctor-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: transparent; }

/* NEW CIRCULAR IMAGE STYLES */
.doctor-image {
    height: 120px; /* Shorter banner height */
    position: relative;
    /* Subtle blue gradient background for the header banner */
    background: linear-gradient(to right, #dbeafe, #eff6ff); 
    border-radius: 16px 16px 0 0; /* Round only top corners */
    display: flex;
    justify-content: center;
    margin-bottom: 50px; /* Create space for the bottom half of the circle */
}

.doctor-image img {
    width: 110px;  /* Fixed square size */
    height: 110px; /* Fixed square size */
    object-fit: cover;
    object-position: top center;
    border-radius: 50%; /* MAKES IT CIRCULAR */
    border: 4px solid white; /* Thick white border makes it pop */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); /* Soft shadow for depth */
    position: absolute;
    bottom: -55px; /* Pulls half the image down over the white card area */
    left: 50%;
    transform: translateX(-50%); /* Centers it horizontally */
    transition: transform 0.3s ease;
    background: white; /* Ensures transparent PNGs don't show banner behind them */
}

.doctor-card:hover .doctor-image img {
    transform: translateX(-50%) scale(1.05); /* Slight zoom effect on hover, keeping center */
}

/* Badges repositioned slightly */
.rating-badge {
    position: absolute; top: 10px; right: 10px; background: rgba(255,255,255,0.9);
    padding: 4px 10px; border-radius: 20px; font-weight: 700; font-size: 0.8rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); display: flex; align-items: center; gap: 4px;
    color: var(--text-main);
    z-index: 2;
}

.favorite-btn {
    position: absolute; top: 10px; left: 10px; background: rgba(255,255,255,0.9); border: none;
    width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.05); transition: 0.2s;
    z-index: 2;
}
.favorite-btn:hover { transform: scale(1.1); }
.favorite-btn.favorited svg { fill: #ef4444; stroke: #ef4444; }
.favorite-btn:not(.favorited) svg { fill: none; stroke: #94a3b8; }

/* Info section needs padding top to clear the overlapping circle */
.doctor-info { padding: 20px; padding-top: 10px; text-align: center; /* Center text for this layout */ }
.doctor-name { font-size: 1.35rem; font-weight: 800; margin-bottom: 5px; color: var(--text-main); }
.doctor-specialty { color: var(--primary); font-weight: 600; font-size: 0.95rem; margin-bottom: 15px; display: inline-block; background: #eff6ff; padding: 4px 12px; border-radius: 20px; }

.doctor-meta { 
    border-top: 1px solid #f1f5f9; padding-top: 15px; margin-bottom: 20px; 
    display: flex; flex-direction: column; gap: 10px; align-items: center; /* Center meta items */
}
.meta-item { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--text-muted); }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 250px; }

.card-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #f8fafc; padding-top: 15px; }
.fee-tag { font-size: 1.2rem; font-weight: 800; color: var(--text-main); }
.btn-book-card {
    background: var(--primary); color: white; border: none; padding: 10px 24px;
    border-radius: 50px; font-weight: 600; cursor: pointer; transition: 0.2s;
}
.btn-book-card:hover { background: var(--primary-dark); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2); }

/* --- MOBILE TWEAKS --- */
.mobile-sticky-btn { display: none; }

@media (max-width: 768px) {
    .hero { padding: 100px 0 80px; }
    .hero h1 { font-size: 2.5rem; }
    .hero-stats { gap: 20px; flex-wrap: wrap; }
    .search-card { grid-template-columns: 1fr; gap: 10px; margin: 0 15px; }
    .process-grid { gap: 30px; }
    
    .mobile-sticky-btn {
        display: block; position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
        z-index: 100; width: 90%; max-width: 400px;
    }
    .mobile-sticky-btn a {
        display: block; background: var(--text-main); color: white; text-align: center;
        padding: 15px; border-radius: 50px; font-weight: 700; text-decoration: none;
        box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    }
}

/* Skeleton Loading */
.skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: loading 1.5s infinite; }
@keyframes loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-text { height: 16px; margin-bottom: 10px; border-radius: 4px; }
.skeleton-text.title { height: 24px; width: 70%; }
.skeleton-text.short { width: 40%; }