:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #0ea5e9;
    --accent: #10b981;
    --bg-light: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --glass: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.4);
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --radius: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Responsive Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container.narrow { max-width: 900px; }
.container.small { max-width: 500px; }
.centered { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 80vh; padding: 2rem 0; }

/* Buttons */
button {
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
}

.btn-primary:active { transform: scale(0.98); }

/* Header */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--primary);
}

/* Hero Section - Optimized */
.hero-section {
    position: relative;
    min-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 80px 1.5rem 40px;
    margin-bottom: 40px;
}

.hero-image {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    filter: brightness(0.5);
    z-index: -1;
}

.hero-content h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 1.25rem;
    font-weight: 800;
}

.hero-content p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}

.search-bar {
    background: white;
    padding: 6px 18px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 550px;
    margin: 0 auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.search-bar input {
    border: none;
    outline: none;
    width: 100%;
    padding: 14px 0;
    font-size: 1rem;
    color: var(--text-main);
}

/* Views */
.view {
    display: none;
    padding-top: 80px;
}

.view.active {
    display: block;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Doctor Grid - Optimized */
.section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 2rem;
    font-weight: 700;
}

.doctor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 80px;
}

.doctor-card {
    background: white;
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid #f1f5f9;
}

.doctor-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
}

.doctor-card img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 16px;
}

.doctor-card h3 { font-size: 1.2rem; margin-bottom: 4px; }
.specialty { color: var(--primary); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; margin-bottom: 15px; }

/* Booking Layout - Optimized */
.booking-card {
    display: grid;
    grid-template-columns: 320px 1fr;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.doctor-sidebar {
    background: #f8fafc;
    padding: 40px 30px;
    text-align: center;
    border-right: 1px solid #f1f5f9;
}

.doctor-sidebar img {
    width: 140px; height: 140px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 5px solid white;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

.booking-form-container { padding: 40px; }

/* Forms & Inputs - FIXED */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
}

.input-group input, 
.input-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    outline: none;
    font-size: 1rem;
    color: var(--text-main);
    transition: all 0.2s ease;
    background: #ffffff;
}

.input-group input:focus, 
.input-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.input-group input::placeholder {
    color: #cbd5e1;
}

/* Secondary Buttons */
.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    padding: 10px 20px;
    border-radius: 10px;
}

.btn-ghost:hover {
    background: #f1f5f9;
    color: var(--primary);
}

.btn-back {
    margin-bottom: 2rem;
    color: var(--text-muted);
    font-weight: 600;
}

.btn-back:hover {
    color: var(--text-main);
}

.btn-whatsapp {
    background: #25d366;
    color: white;
    padding: 16px;
    border-radius: 15px;
    width: 100%;
    margin-top: 20px;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
}

/* Doctors Info & Icons */
.rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 10px;
}

.rating i {
    width: 16px;
    color: #fbbf24;
}

/* Calendar & Slots Detail */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-weight: 700;
}

.day {
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8fafc;
}

.day:hover:not(.disabled) {
    background: #e2e8f0;
}

.day.active {
    background: var(--primary);
    color: white;
}

.day.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.time-slot {
    background: #f1f5f9;
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.2s;
}

.time-slot:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

.time-slot.active {
    background: var(--secondary);
    color: white;
}

hr {
    border: none;
    height: 1px;
    background: #e2e8f0;
    margin: 30px 0;
}


/* Calendar & Slots Layouts - RESTORED */
.days-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 24px; }
.day { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 10px; font-size: 0.9rem; font-weight: 600; }
.times-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(75px, 1fr)); gap: 10px; margin-bottom: 24px; }
/* Success Card */
.success-card { background: white; padding: 50px 30px; border-radius: 24px; text-align: center; box-shadow: var(--shadow); }
.success-icon { color: var(--accent); margin-bottom: 20px; }
.success-icon i { width: 80px; height: 80px; }
.appointment-summary { background: #f8fafc; padding: 20px; border-radius: 12px; margin: 30px 0; text-align: left; }
.summary-item { display: flex; justify-content: space-between; margin-bottom: 10px; }
.summary-item .label { color: var(--text-muted); }
.summary-item .value { font-weight: 700; color: var(--text-main); }
.whatsapp-card { background: rgba(37, 211, 102, 0.05); border: 1px solid rgba(37, 211, 102, 0.2); border-radius: 16px; padding: 25px; margin-bottom: 30px; }
.wa-header { display: flex; align-items: center; justify-content: center; gap: 8px; color: #25d366; font-weight: 700; margin-bottom: 15px; }
.wa-bubble { background: white; padding: 15px; border-radius: 12px; font-style: italic; font-size: 0.9rem; margin: 15px 0; position: relative; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.reminder-info { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 0.85rem; justify-content: center; margin-bottom: 20px; }
@media (max-width: 900px) { .booking-card { grid-template-columns: 1fr; } .doctor-sidebar { border-right: none; border-bottom: 1px solid #f1f5f9; padding: 30px; } }
@media (max-width: 600px) { .container { padding: 0 1rem; } .main-header { padding: 0.75rem 1rem; } .logo span { display: none; } .hero-section { min-height: 400px; padding-top: 100px; } .booking-form-container { padding: 25px 20px; } .days-grid { gap: 4px; } .day { font-size: 0.8rem; } .time-slot { font-size: 0.8rem; } }
.glass { background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.5); }
