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

:root {
  --bg: #f5f8fa;
  --fg: #1a2535;
  --card: #ffffff;
  --primary: #0ea882;
  --primary-dark: #0d9470;
  --secondary: #e8f7f3;
  --secondary-fg: #0d7a5f;
  --muted: #edf1f5;
  --muted-fg: #6b7a8d;
  --border: rgba(0,0,0,0.08);
  --accent: #d0f0e8;
  --emerald: #10b981;
  --amber: #d97706;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-full: 9999px;
  --shadow: 0 4px 24px rgba(0,0,0,0.06);
}

body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--fg); font-size: 14px; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input { font-family: inherit; }
img { display: block; max-width: 100%; }
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-thumb { background: var(--muted-fg); border-radius: 4px; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 8px; }
.logo-img { height: 40px; width: auto; max-width: 180px; object-fit: contain; display: block; }
nav { display: flex; align-items: center; gap: 28px; }
nav a { font-size: 13px; font-weight: 500; color: var(--muted-fg); transition: color 0.15s; }
nav a:hover { color: var(--fg); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background 0.15s; }
.icon-btn:hover { background: var(--muted); }
.icon-btn svg { width: 16px; height: 16px; color: var(--muted-fg); }
.btn-primary { padding: 8px 18px; background: var(--primary); color: #fff; font-size: 13px; font-weight: 600; border-radius: var(--radius); transition: background 0.15s; display: inline-block; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { padding: 7px 14px; border: 1.5px solid var(--primary); color: var(--primary); font-size: 12px; font-weight: 600; border-radius: var(--radius-sm); background: transparent; transition: background 0.15s; display: inline-block; }
.btn-outline:hover { background: var(--secondary); }

.hero { background: #fff; border-bottom: 1px solid var(--border); }
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding: 64px 24px; }
.badge { display: inline-flex; align-items: center; gap: 8px; background: var(--secondary); color: var(--secondary-fg); font-size: 11px; font-weight: 700; padding: 6px 14px; border-radius: var(--radius-full); margin-bottom: 24px; }
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
h1 { font-family: 'Nunito', sans-serif; font-weight: 900; font-size: 46px; line-height: 1.15; margin-bottom: 16px; }
h1 span { color: var(--primary); }
.hero-sub { font-size: 15px; color: var(--muted-fg); line-height: 1.7; margin-bottom: 32px; max-width: 440px; }

.search-box { background: #fff; border-radius: 16px; border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden; }
.search-top { display: flex; align-items: center; gap: 12px; padding: 12px 16px; flex-wrap: wrap; }
.ai-badge { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.ai-icon { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, #0ea882, #34d399); display: flex; align-items: center; justify-content: center; }
.ai-icon svg { width: 14px; height: 14px; color: #fff; }
.ai-label { font-size: 11px; font-weight: 700; color: var(--primary); }
.sep { width: 1px; height: 24px; background: var(--border); flex-shrink: 0; }
.search-input { flex: 1; border: none; outline: none; font-size: 13px; color: var(--fg); background: transparent; min-width: 180px; }
.search-input::placeholder { color: var(--muted-fg); }
.search-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.location-row { display: flex; align-items: center; gap: 6px; }
.location-row svg { width: 14px; height: 14px; color: var(--primary); }
.location-input { border: none; outline: none; font-size: 13px; color: var(--fg); background: transparent; width: 110px; }
.search-btn { display: flex; align-items: center; gap: 6px; padding: 8px 16px; background: var(--primary); color: #fff; font-size: 13px; font-weight: 600; border-radius: var(--radius); transition: background 0.15s; }
.search-btn:hover { background: var(--primary-dark); }
.search-btn svg { width: 14px; height: 14px; }
.search-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; }
.chips-label { font-size: 11px; color: var(--muted-fg); }
.chip { font-size: 11px; padding: 4px 10px; border-radius: var(--radius-full); background: var(--muted); color: var(--muted-fg); cursor: pointer; transition: background 0.15s, color 0.15s; border: none; }
.chip:hover { background: var(--secondary); color: var(--primary); }

.trust-stats { display: flex; gap: 32px; margin-top: 32px; }
.stat-value { font-family: 'Nunito', sans-serif; font-weight: 900; font-size: 22px; line-height: 1; }
.stat-label { font-size: 11px; color: var(--muted-fg); margin-top: 3px; }

.hero-visual { display: flex; justify-content: center; position: relative; }
.hero-blob { position: absolute; inset: -24px; border-radius: 50%; background: linear-gradient(135deg, #e8f7f3, #d0f0e8); opacity: 0.6; }
.hero-photo { position: relative; width: 288px; height: 320px; border-radius: 24px; object-fit: cover; object-position: top; box-shadow: 0 20px 60px rgba(0,0,0,0.12); }
.float-card { position: absolute; background: #fff; border-radius: 16px; border: 1px solid var(--border); box-shadow: 0 8px 32px rgba(0,0,0,0.1); padding: 12px; }
.float-card.booked { left: -48px; bottom: 64px; display: flex; align-items: center; gap: 12px; }
.float-card.rating { right: -24px; top: 48px; }
.float-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--secondary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.float-icon svg { width: 20px; height: 20px; color: var(--primary); }
.float-label { font-size: 11px; font-weight: 700; }
.float-sub { font-size: 10px; color: var(--muted-fg); margin-top: 2px; }
.stars-row { display: flex; gap: 2px; margin-bottom: 4px; }
.stars-row svg { width: 12px; height: 12px; }

.pills-bar { background: #fff; border-bottom: 1px solid var(--border); }
.pills-inner { display: flex; align-items: center; gap: 8px; padding: 14px 24px; overflow-x: auto; }
.pills-label { font-size: 11px; font-weight: 600; color: var(--muted-fg); white-space: nowrap; }
.pill { white-space: nowrap; padding: 6px 16px; border-radius: var(--radius-full); font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.15s; background: var(--muted); color: var(--muted-fg); border: none; }
.pill:hover { background: var(--secondary); color: var(--secondary-fg); }
.pill.active { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(14,168,130,0.3); }

.results-section { padding: 32px 0 48px; }
.results-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
.results-count { font-size: 16px; font-weight: 700; }
.results-count span { color: var(--primary); }
.results-sub { font-size: 11px; color: var(--muted-fg); margin-top: 2px; }
.filter-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-btn { display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); font-size: 12px; font-weight: 600; color: var(--muted-fg); transition: all 0.15s; background: none; cursor: pointer; }
.filter-btn:hover, .filter-btn.active { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { background: var(--secondary); }
.filter-btn svg { width: 14px; height: 14px; }
.avail-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-fg); }
.filter-btn.active .avail-dot { background: #10b981; }

.doctors-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; min-height: 120px; }
.doctors-grid.is-loading { opacity: 0.55; pointer-events: none; }
.doctor-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; transition: box-shadow 0.2s, transform 0.2s; }
.doctor-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-top { display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; }
.save-btn { position: absolute; top: 0; right: 0; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: none; border: none; cursor: pointer; transition: background 0.15s; }
.save-btn:hover { background: var(--muted); }
.save-btn svg { width: 16px; height: 16px; color: var(--muted-fg); fill: none; transition: all 0.15s; }
.save-btn.saved svg { fill: #ef4444; color: #ef4444; }
.avatar-wrap { position: relative; }
.avatar { width: 80px; height: 80px; border-radius: 14px; object-fit: cover; background: var(--muted); }
.verified-badge { position: absolute; bottom: -4px; right: -4px; width: 20px; height: 20px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; }
.verified-badge svg { width: 12px; height: 12px; color: #fff; }
.card-info { text-align: center; }
.doctor-name { font-size: 13px; font-weight: 600; margin-bottom: 3px; transition: color 0.15s; }
.doctor-card:hover .doctor-name { color: var(--primary); }
.doctor-specialty { font-size: 11px; color: var(--muted-fg); margin-bottom: 4px; }
.doctor-location { display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 11px; color: var(--muted-fg); }
.doctor-location svg { width: 11px; height: 11px; flex-shrink: 0; }
.avail-row { display: flex; justify-content: center; }
.avail-tag { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 500; }
.avail-tag.available { color: #059669; }
.avail-tag.later { color: var(--amber); }
.pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: #10b981; animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.5;transform:scale(0.85)} }
.card-actions { display: flex; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border); }
.card-actions .btn-outline, .card-actions .btn-primary { flex: 1; text-align: center; font-size: 12px; padding: 7px 0; }
.load-more-wrap { display: flex; justify-content: center; margin-top: 40px; }
.btn-load-more { padding: 12px 36px; border-radius: var(--radius); border: 2px solid var(--primary); color: var(--primary); font-size: 13px; font-weight: 600; background: transparent; transition: background 0.15s; cursor: pointer; }
.btn-load-more:hover { background: var(--secondary); }
.btn-load-more:disabled { opacity: 0.5; cursor: not-allowed; }

.empty-state, .error-state { grid-column: 1 / -1; text-align: center; padding: 48px 16px; color: var(--muted-fg); }
.empty-state h3, .error-state h3 { font-size: 16px; color: var(--fg); margin-bottom: 8px; }

footer { background: #fff; border-top: 1px solid var(--border); margin-top: 32px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 32px; padding: 48px 0 32px; }
.footer-brand p { font-size: 12px; color: var(--muted-fg); line-height: 1.7; margin: 12px 0 16px; max-width: 200px; }
.social-row { display: flex; gap: 10px; }
.social-btn { width: 28px; height: 28px; border-radius: 50%; background: var(--muted); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--muted-fg); transition: background 0.15s, color 0.15s; }
.social-btn:hover { background: var(--secondary); color: var(--primary); }
.footer-col h4 { font-size: 13px; font-weight: 700; margin-bottom: 12px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { font-size: 12px; color: var(--muted-fg); transition: color 0.15s; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted-fg); }

.profile-page { padding: 40px 0 64px; }
.profile-card { background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 32px; box-shadow: var(--shadow); }
.profile-header { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; margin-bottom: 24px; }
.profile-avatar { width: 120px; height: 120px; border-radius: 18px; object-fit: cover; background: var(--muted); }
.profile-meta h2 { font-family: 'Nunito', sans-serif; font-size: 28px; margin-bottom: 8px; }
.profile-meta p { color: var(--muted-fg); }
.profile-section { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.profile-section h3 { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.profile-list { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-tag { padding: 6px 12px; border-radius: var(--radius-full); background: var(--muted); font-size: 12px; }

@media (max-width: 1100px) { .doctors-grid { grid-template-columns: repeat(3,1fr); } .footer-grid { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 900px) { .hero-inner { grid-template-columns: 1fr; } .hero-visual { display: none; } h1 { font-size: 36px; } .doctors-grid { grid-template-columns: repeat(2,1fr); } nav { display: none; } }
@media (max-width: 600px) { .doctors-grid { grid-template-columns: 1fr; } .footer-grid { grid-template-columns: 1fr 1fr; } .trust-stats { gap: 20px; } .footer-bottom { flex-direction: column; gap: 8px; } }
