:root {
    --primary: #1a365d;
    --primary-light: #2c5282;
    --primary-lighter: #ebf4ff;
    --accent: #3182ce;
    --success: #276749;
    --success-bg: #c6f6d5;
    --warning: #c05621;
    --warning-bg: #fefcbf;
    --danger: #c53030;
    --danger-bg: #fed7d7;
    --info: #2b6cb0;
    --info-bg: #bee3f8;
    --gray-900: #1a202c;
    --gray-700: #4a5568;
    --gray-500: #718096;
    --gray-300: #e2e8f0;
    --gray-100: #f7fafc;
    --white: #ffffff;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    color: var(--gray-900);
    background: var(--gray-100);
    line-height: 1.6;
}

.container { max-width: 720px; margin: 0 auto; padding: 0 20px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-300);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 18px; font-weight: 700; color: var(--primary); text-decoration: none; }
.nav-links { display: flex; gap: 20px; }
.nav-links a { font-size: 14px; color: var(--gray-700); }
.nav-links a:hover { color: var(--primary); }

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}
.hero h1 { font-size: 32px; margin-bottom: 12px; }
.hero p { font-size: 17px; opacity: 0.9; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    line-height: 1.4;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-light); }
.btn-success { background: var(--success); color: var(--white); }
.btn-outline { background: var(--white); color: var(--primary); border-color: var(--gray-300); }
.btn-outline:hover { border-color: var(--primary); background: var(--primary-lighter); }
.btn-text { background: none; color: var(--accent); border: none; padding: 8px 12px; }
.btn-text:hover { background: var(--primary-lighter); }
.btn-whatsapp { background: #25d366; color: var(--white); }
.btn-whatsapp:hover { background: #1da851; }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-warning { background: var(--warning); color: var(--white); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* How it Works */
.how-it-works { padding: 60px 0; text-align: center; }
.how-it-works h2 { font-size: 24px; margin-bottom: 40px; color: var(--primary); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.step { text-align: center; }
.step-number {
    width: 48px;
    height: 48px;
    background: var(--primary-lighter);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    margin: 0 auto 16px;
}
.step h3 { font-size: 15px; margin-bottom: 8px; }
.step p { font-size: 13px; color: var(--gray-500); }

/* Features */
.features { padding: 60px 0; background: var(--white); }
.features h2 { font-size: 24px; text-align: center; margin-bottom: 40px; color: var(--primary); }
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.feature { text-align: center; padding: 24px; }
.feature-icon { font-size: 36px; margin-bottom: 12px; }
.feature h3 { font-size: 16px; margin-bottom: 8px; }
.feature p { font-size: 14px; color: var(--gray-500); }

/* Doctors */
.doctors-preview { padding: 60px 0; }
.doctors-preview h2 { font-size: 24px; text-align: center; margin-bottom: 40px; color: var(--primary); }
.doctor-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.doctor-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 24px; text-align: center; }
.doctor-photo { margin-bottom: 16px; }
.doctor-photo img { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; }
.doctor-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--primary-lighter);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    margin: 0 auto;
}
.doctor-card h3 { font-size: 17px; margin-bottom: 4px; }
.doctor-card .specialization { color: var(--accent); font-size: 13px; margin-bottom: 4px; }
.doctor-card .qualification { color: var(--gray-500); font-size: 12px; margin-bottom: 16px; }

/* Booking Page */
.booking-page { background: var(--gray-100); min-height: 100vh; }
.booking-main { padding: 30px 0 60px; }
.booking-progress { display: flex; justify-content: center; gap: 8px; margin-bottom: 30px; }
.progress-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-500);
    background: var(--white);
    border: 1px solid var(--gray-300);
}
.progress-step.active { background: var(--primary); color: var(--white); border-color: var(--primary); }
.progress-step.completed { background: var(--success-bg); color: var(--success); border-color: var(--success); }
.step-num { font-weight: 700; }

.booking-step { display: none; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 30px; }
.booking-step.active { display: block; }
.booking-step h2 { font-size: 20px; margin-bottom: 20px; color: var(--primary); }

/* Doctor Selection */
.selected-doctor { display: flex; gap: 20px; margin-bottom: 20px; padding: 20px; background: var(--gray-100); border-radius: var(--radius); }
.doctor-photo-lg img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; }
.doctor-avatar-lg {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary-lighter);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
}
.doctor-info h3 { font-size: 17px; margin-bottom: 4px; }
.doctor-info .specialization { color: var(--accent); font-size: 14px; margin-bottom: 4px; }
.doctor-info .qualification { color: var(--gray-500); font-size: 13px; margin-bottom: 8px; }
.doctor-info .bio { font-size: 13px; color: var(--gray-700); }

.doctor-list { display: flex; flex-direction: column; gap: 10px; }
.doctor-list-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}
.doctor-list-item:hover { border-color: var(--accent); background: var(--primary-lighter); }
.doctor-list-item.selected { border-color: var(--primary); background: var(--primary-lighter); }
.doctor-photo-sm img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.doctor-avatar-sm {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-lighter);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
}
.doctor-info-sm h3 { font-size: 15px; margin-bottom: 2px; }
.doctor-info-sm p { font-size: 13px; color: var(--gray-500); }
.doctor-info-sm .qualification-sm { font-size: 12px; }
.arrow { margin-left: auto; font-size: 24px; color: var(--gray-500); }

/* Date Selection */
.date-list { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.date-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 20px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    min-width: 90px;
}
.date-card:hover { border-color: var(--accent); background: var(--primary-lighter); }
.date-card.selected { border-color: var(--primary); background: var(--primary); color: var(--white); }
.date-label { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--accent); letter-spacing: 0.5px; }
.date-card.selected .date-label { color: var(--white); }
.date-day { font-size: 14px; font-weight: 600; margin-top: 4px; }
.date-num { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.date-card.selected .date-num { color: rgba(255,255,255,0.8); }

/* Time Slots */
.selected-date-display { font-size: 14px; color: var(--gray-700); margin-bottom: 16px; }
.time-slots { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.time-slot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}
.time-slot:hover:not(.disabled) { border-color: var(--accent); background: var(--primary-lighter); }
.time-slot.selected { border-color: var(--primary); background: var(--primary); color: var(--white); }
.time-slot.disabled { opacity: 0.5; cursor: not-allowed; background: var(--gray-100); }
.slot-time { font-weight: 600; font-size: 15px; }
.slot-capacity { font-size: 13px; }
.slot-status.full { color: var(--danger); font-weight: 600; }
.slot-status.past { color: var(--gray-500); }
.slot-remaining { color: var(--success); }
.time-slot.selected .slot-remaining { color: rgba(255,255,255,0.8); }
.loading { text-align: center; padding: 20px; color: var(--gray-500); }

/* Appointment Summary */
.appointment-summary { background: var(--gray-100); border-radius: var(--radius); padding: 16px; margin-bottom: 24px; }
.summary-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--gray-300); }
.summary-item:last-child { border-bottom: none; }
.summary-item .label { color: var(--gray-500); font-size: 13px; }
.summary-item .value { font-weight: 600; font-size: 14px; }

/* Forms */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; font-size: 14px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--white);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(49,130,206,0.1);
}
.form-group input.error { border-color: var(--danger); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.consent-group { margin-top: 8px; }
.checkbox-label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 13px; color: var(--gray-700); line-height: 1.5; }
.checkbox-label input { margin-top: 3px; width: auto; }

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Success */
.success-content { text-align: center; padding: 20px; }
.success-icon {
    width: 64px;
    height: 64px;
    background: var(--success-bg);
    color: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 20px;
}
.success-content h2 { font-size: 22px; margin-bottom: 20px; color: var(--success); }
.success-details { background: var(--gray-100); border-radius: var(--radius); padding: 20px; margin-bottom: 24px; text-align: left; }
.detail-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--gray-300); }
.detail-item:last-child { border-bottom: none; }
.detail-item .label { color: var(--gray-500); font-size: 13px; }
.detail-item .value { font-weight: 600; font-size: 14px; }
.detail-item .booking-id { font-family: monospace; background: var(--white); padding: 2px 8px; border-radius: 4px; }
.success-actions { display: flex; flex-direction: column; gap: 10px; }

/* Error */
.booking-error { background: var(--danger-bg); border-radius: var(--radius); padding: 20px; margin-top: 20px; }
.error-content { display: flex; align-items: center; justify-content: space-between; }
.error-content p { color: var(--danger); font-weight: 500; }

/* Alerts */
.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 16px; font-size: 14px; display: flex; align-items: center; justify-content: space-between; }
.alert-success { background: var(--success-bg); color: var(--success); }
.alert-danger { background: var(--danger-bg); color: var(--danger); }
.alert-close { background: none; border: none; cursor: pointer; font-size: 18px; color: inherit; }

/* Confirmation Page */
.confirmation-main { padding: 40px 0; }
.confirmation-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 40px; text-align: center; }
.confirmation-card h1 { font-size: 24px; margin-bottom: 24px; }
.confirmation-details { text-align: left; background: var(--gray-100); border-radius: var(--radius); padding: 20px; margin-bottom: 24px; }
.detail-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--gray-300); }
.detail-row:last-child { border-bottom: none; }
.detail-row .label { color: var(--gray-500); font-size: 13px; }
.detail-row .value { font-weight: 500; font-size: 14px; }
.confirmation-actions { display: flex; flex-direction: column; gap: 10px; }

/* Manage Booking */
.manage-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 30px; }
.manage-card h1 { font-size: 22px; margin-bottom: 20px; }
.appointment-detail { margin-bottom: 24px; }
.manage-actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.manage-extra-actions { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--gray-300); display: flex; flex-direction: column; gap: 10px; }
.reschedule-form { background: var(--gray-100); border-radius: var(--radius); padding: 20px; margin-top: 20px; }
.reschedule-form h2 { font-size: 17px; margin-bottom: 16px; }
.time-slots-sm { display: flex; flex-wrap: wrap; gap: 8px; }
.time-slot-sm {
    padding: 10px 16px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.time-slot-sm:hover { border-color: var(--accent); }
.time-slot-sm.selected { border-color: var(--primary); background: var(--primary); color: var(--white); }
.time-slot-sm .remaining { font-size: 11px; color: var(--gray-500); }
.time-slot-sm.selected .remaining { color: rgba(255,255,255,0.8); }

/* Empty State */
.empty-state { text-align: center; padding: 40px; color: var(--gray-500); }
.empty-state h2 { color: var(--gray-700); margin-bottom: 8px; }

/* Footer */
.site-footer { background: var(--white); border-top: 1px solid var(--gray-300); padding: 20px 0; text-align: center; font-size: 13px; color: var(--gray-500); margin-top: 40px; }

/* Responsive */
@media (max-width: 768px) {
    .hero { padding: 40px 0; }
    .hero h1 { font-size: 24px; }
    .steps { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .feature-grid { grid-template-columns: 1fr; }
    .doctor-cards { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .booking-progress { gap: 4px; }
    .progress-step { padding: 8px 10px; font-size: 12px; }
    .step-label { display: none; }
    .selected-doctor { flex-direction: column; align-items: center; text-align: center; }
    .date-list { justify-content: center; }
    .booking-step { padding: 20px; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 20px; }
    .hero-actions { flex-direction: column; }
    .steps { grid-template-columns: 1fr; }
    .date-card { min-width: 70px; padding: 12px; }
}

/* ============ UI enhancements ============ */

/* Hero — layered gradient + subtle pattern + badge + stats */
.hero {
    background:
        radial-gradient(900px 400px at 85% -10%, rgba(49, 130, 206, 0.35), transparent 60%),
        radial-gradient(700px 380px at 10% 110%, rgba(45, 212, 191, 0.18), transparent 60%),
        linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 70%, #2b6cb0 100%);
    position: relative;
    overflow: hidden;
    padding: 72px 0 64px;
}
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.09) 1px, transparent 1px);
    background-size: 26px 26px;
    pointer-events: none;
}
.hero .container { position: relative; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.28);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 999px;
    margin-bottom: 18px;
    backdrop-filter: blur(4px);
}
.hero h1 { font-size: 38px; }
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-top: 40px;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 14px;
    padding: 18px 10px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    backdrop-filter: blur(4px);
}
.stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    border-right: 1px solid rgba(255,255,255,0.18);
    padding: 0 8px;
}
.stat:last-child { border-right: none; }
.stat-num { font-size: 22px; font-weight: 800; color: #fff; line-height: 1.2; }
.stat-label { font-size: 12px; color: rgba(255,255,255,0.85); text-transform: uppercase; letter-spacing: 0.06em; }

/* Buttons — lift + focus rings */
.btn { box-shadow: 0 2px 8px rgba(26, 54, 93, 0.12); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(26, 54, 93, 0.18); }
.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, #2b6cb0 100%);
    border-color: #2b6cb0;
}
.btn-outline-light {
    background: transparent;
    border-color: rgba(255,255,255,0.7);
    color: #fff;
}
.btn-outline-light:hover { background: rgba(255,255,255,0.12); }
.btn-light {
    background: #fff;
    color: var(--primary);
}
.btn-whatsapp {
    background: #25d366;
    border-color: #25d366;
    color: #fff;
}
.btn-whatsapp:hover { background: #1eb457; border-color: #1eb457; color: #fff; }

/* Cards — soft elevation + hover */
.doctor-card,
.manage-card,
.feature,
.step {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    border: 1px solid var(--gray-300);
}
.doctor-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(26, 54, 93, 0.12);
    border-color: var(--accent);
}
.step-number {
    background: linear-gradient(135deg, var(--accent), #2b6cb0);
    color: #fff;
}

/* CTA band */
.cta-band {
    background: linear-gradient(135deg, #0f2238 0%, var(--primary) 60%, var(--primary-light) 100%);
    color: #fff;
    padding: 44px 0;
}
.cta-band .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    max-width: 720px;
}
.cta-text h2 { font-size: 24px; margin-bottom: 6px; }
.cta-text p { opacity: 0.85; margin: 0; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Footer polish */
.site-footer {
    background: #0f2238;
    color: rgba(255,255,255,0.75);
    padding: 28px 0;
    font-size: 14px;
}

/* Keyboard focus visibility + reduced motion */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .btn:hover, .doctor-card:hover { transform: none; }
}
