/* =============================================
   Rajasthan Doctors Directory — Main CSS
   ============================================= */

:root {
  --primary:     #1a6fc4;
  --primary-dk:  #145aa0;
  --primary-lt:  #e8f1fb;
  --accent:      #e8392a;
  --text:        #1a1a2e;
  --text-muted:  #5f6b7a;
  --border:      #dde3ec;
  --bg:          #f5f7fa;
  --white:       #ffffff;
  --card-shadow: 0 2px 12px rgba(0,0,0,.08);
  --radius:      10px;
  --transition:  .2s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Poppins', sans-serif; color: var(--text); background: var(--bg); font-size: 15px; line-height: 1.6; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
ul { list-style: none; }

/* ─── Layout ─── */
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.section    { padding: 56px 0; }

/* ─── Header ─── */
.site-header { background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 6px rgba(0,0,0,.06); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; color: var(--primary); text-decoration: none; }
.logo i { font-size: 24px; }
.main-nav { display: flex; gap: 28px; }
.main-nav a { font-size: 14px; font-weight: 500; color: var(--text); transition: color var(--transition); }
.main-nav a:hover { color: var(--primary); text-decoration: none; }
.nav-toggle { display: none; background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text); }

/* ─── Hero ─── */
.hero { background: linear-gradient(135deg, var(--primary) 0%, #0d4f8c 100%); color: white; padding: 72px 0 64px; text-align: center; }
.hero h1 { font-size: clamp(24px, 4vw, 42px); font-weight: 700; margin-bottom: 12px; }
.hero p  { font-size: 16px; opacity: .88; margin-bottom: 36px; }

/* ─── Search Box ─── */
.search-box { background: white; border-radius: 14px; padding: 24px; display: flex; gap: 12px; flex-wrap: wrap; max-width: 860px; width: 100%; margin: 0 auto; box-shadow: 0 4px 24px rgba(0,0,0,.18); box-sizing: border-box; }
.search-box select,
.search-box input  { flex: 1; min-width: 180px; max-width: 100%; width: 100%; padding: 12px 16px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit; color: var(--text); background: #fafafa; box-sizing: border-box; }
.search-box select:focus,
.search-box input:focus  { outline: none; border-color: var(--primary); background: white; }
.search-box .btn { flex: 1; min-width: 180px; justify-content: center; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; transition: background var(--transition), transform .1s; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dk); text-decoration: none; }
.btn-outline { background: white; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary-lt); text-decoration: none; }
.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-danger { background: #dc3545; color: white; }

/* ─── Dept Grid (homepage) ─── */
.dept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; }
.dept-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 12px; text-align: center; transition: box-shadow var(--transition), transform var(--transition); cursor: pointer; }
.dept-card:hover { box-shadow: var(--card-shadow); transform: translateY(-2px); text-decoration: none; }
.dept-card i { font-size: 28px; color: var(--primary); margin-bottom: 8px; display: block; }
.dept-card span { font-size: 12px; font-weight: 500; color: var(--text); }

/* ─── Doctor Card ─── */
.doctors-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.doctor-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: box-shadow var(--transition); display: flex; flex-direction: column; }
.doctor-card:hover { box-shadow: var(--card-shadow); }
.doctor-card.featured { border-color: #f5a623; }
.featured-badge { background: #f5a623; color: #7a4800; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 0 0 8px 0; display: inline-block; }
.card-body { padding: 16px; flex: 1; }
.doctor-info { display: flex; gap: 14px; align-items: flex-start; }
.doctor-photo { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); flex-shrink: 0; }
.doctor-details h3 { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.doctor-details .dept { font-size: 12px; color: var(--primary); font-weight: 500; }
.doctor-details .qual { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.card-meta { margin-top: 12px; display: flex; flex-direction: column; gap: 5px; }
.card-meta span { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.card-meta i { width: 14px; color: var(--primary); }
.card-footer { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.fees-badge { background: var(--primary-lt); color: var(--primary); font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }

/* ─── Stars ─── */
.stars { color: #f5a623; font-size: 13px; letter-spacing: 1px; }
.rating-text { font-size: 12px; color: var(--text-muted); margin-left: 4px; }

/* ─── Search Page Layout ─── */
.search-layout { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: start; }
.filter-sidebar { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; position: sticky; top: 80px; }
.filter-sidebar h3 { font-size: 14px; font-weight: 600; margin-bottom: 14px; color: var(--text); }
.filter-group { margin-bottom: 20px; }
.filter-group label { display: block; font-size: 13px; font-weight: 500; color: var(--text-muted); margin-bottom: 6px; }
.filter-group select,
.filter-group input { width: 100%; padding: 9px 12px; border: 1.5px solid var(--border); border-radius: 7px; font-size: 13px; font-family: inherit; }
.results-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.results-header h2 { font-size: 16px; font-weight: 600; }
.sort-select { padding: 8px 12px; border: 1.5px solid var(--border); border-radius: 7px; font-size: 13px; font-family: inherit; }

/* ─── Doctor Profile Page ─── */
.profile-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.profile-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.profile-top { display: flex; gap: 24px; align-items: flex-start; margin-bottom: 20px; }
.profile-photo { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; border: 3px solid var(--primary-lt); flex-shrink: 0; }
.profile-name h1 { font-size: 22px; font-weight: 700; }
.profile-name .dept-tag { display: inline-block; background: var(--primary-lt); color: var(--primary); font-size: 12px; font-weight: 600; padding: 3px 12px; border-radius: 20px; margin: 6px 0; }
.profile-name .quals { font-size: 13px; color: var(--text-muted); }
.info-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.info-table tr td { padding: 9px 4px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: top; }
.info-table tr td:first-child { width: 36px; color: var(--primary); }
.info-table tr td:nth-child(2) { font-weight: 500; min-width: 110px; color: var(--text-muted); font-size: 13px; }
.sticky-contact { position: sticky; top: 80px; }
.contact-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.contact-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 16px; }
.contact-btns { display: flex; flex-direction: column; gap: 10px; }
.btn-call { background: var(--primary); color: white; text-align: center; }
.btn-wa   { background: #25d366; color: white; text-align: center; }
.map-frame { border-radius: 8px; margin-top: 16px; overflow: hidden; border: 1px solid var(--border); }

/* ─── Review Section ─── */
.review-card { background: var(--bg); border-radius: 8px; padding: 14px; margin-bottom: 12px; }
.review-card .reviewer { font-size: 13px; font-weight: 600; }
.review-card .review-text { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.review-card .review-date { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ─── Pagination ─── */
.pagination ul { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 28px; justify-content: center; }
.pagination li a,
.pagination li.active { display: inline-block; padding: 7px 13px; border-radius: 7px; border: 1px solid var(--border); font-size: 13px; color: var(--text); transition: background var(--transition); }
.pagination li.active { background: var(--primary); color: white; border-color: var(--primary); font-weight: 600; }
.pagination li a:hover { background: var(--primary-lt); text-decoration: none; }

/* ─── Section headings ─── */
.section-title { text-align: center; margin-bottom: 36px; }
.section-title h2 { font-size: 26px; font-weight: 700; }
.section-title p  { font-size: 14px; color: var(--text-muted); margin-top: 6px; }

/* ─── No results ─── */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state i { font-size: 48px; color: var(--border); margin-bottom: 14px; }
.empty-state h3 { font-size: 18px; margin-bottom: 6px; }
.empty-state p  { font-size: 14px; color: var(--text-muted); }

/* ─── Footer ─── */
.site-footer { background: #0d1b2e; color: #aab4be; margin-top: 60px; padding: 48px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer-grid h3 { color: white; font-size: 16px; margin-bottom: 10px; }
.footer-grid h4 { color: white; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.footer-grid p  { font-size: 13px; line-height: 1.7; }
.footer-grid ul li { margin-bottom: 6px; }
.footer-grid ul li a { color: #aab4be; font-size: 13px; }
.footer-grid ul li a:hover { color: white; }
.footer-bottom { border-top: 1px solid #1e3050; padding-top: 18px; text-align: center; font-size: 13px; }

/* ─── Breadcrumb ─── */
.breadcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--primary); }
.breadcrumb span { margin: 0 6px; }

/* ─── Tag chips ─── */
.tag { display: inline-block; background: var(--primary-lt); color: var(--primary); font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; margin: 2px; }

/* ─── Alert / notice ─── */
.alert { padding: 12px 16px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; }
.alert-success { background: #d4edda; color: #155724; }
.alert-danger   { background: #f8d7da; color: #721c24; }

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .search-layout { grid-template-columns: 1fr; }
  .filter-sidebar { position: static; }
  .profile-layout { grid-template-columns: 1fr; }
  .sticky-contact { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .main-nav { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: white; border-bottom: 1px solid var(--border); padding: 16px 20px; gap: 14px; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
  .main-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .search-box { flex-direction: column; padding: 18px; gap: 10px; max-width: 100%; }
  .search-box select,
  .search-box input,
  .search-box .btn { min-width: 0; width: 100%; }
  .doctors-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .profile-top { flex-direction: column; }
}
