:root {
  --rx-bg: #f7f5f0;
  --rx-card: #ffffff;
  --rx-text: #333333;
  --rx-muted: #6f6962;
  --rx-border: rgba(51, 51, 51, 0.08);
  --rx-accent: #b0732b;
  --rx-accent-2: #c18644;
  --rx-shadow: 0 26px 60px rgba(51, 51, 51, 0.1);
  --rx-container: 1320px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--rx-text);
  font-family: "Open Sans", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(176, 115, 43, 0.12), transparent 26%),
    radial-gradient(circle at top right, rgba(51, 51, 51, 0.06), transparent 28%),
    linear-gradient(180deg, #faf8f5 0%, #f5f2ee 100%);
}
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }
button { cursor: pointer; }

.site-header { position: relative; z-index: 200; padding: 28px 24px 20px; }
.navbar-wrapper { width: 100%; }
.main-navbar { max-width: var(--rx-container); margin: 0 auto; padding: 0 4px; }
.navbar-shell {
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.94);
  box-shadow: 0 14px 40px rgba(51,51,51,0.06);
  backdrop-filter: blur(16px);
}
.navbar-container { min-height: 92px; padding: 0 34px; display: flex; align-items: center; gap: 26px; }
.navbar-brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.navbar-brand img { width: 128px; height: auto; object-fit: contain; }
.menu-button {
  display: none;
  width: 48px;
  height: 48px;
  border: 1px solid var(--rx-border);
  border-radius: 16px;
  color: var(--rx-text);
  background: linear-gradient(180deg, #ffffff, #f7f4ef);
  box-shadow: 0 8px 22px rgba(51,51,51,0.06);
}
.navbar-right { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav-center { display: flex; align-items: center; gap: 34px; margin: 0 auto; }
.nav-link, .dropdown-toggle, .user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #333333;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}
.nav-link:hover, .dropdown-toggle:hover, .user-trigger:hover { color: var(--rx-accent); }
.join-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  text-decoration: none;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  background: linear-gradient(135deg, #333333, #4a4540);
  box-shadow: 0 14px 24px rgba(51,51,51,0.16), inset 0 1px 0 rgba(255,255,255,0.1);
}
.dropdown, .user-dropdown-container { position: relative; }
.dropdown-content, .user-dropdown-menu {
  position: absolute;
  top: calc(100% + 16px);
  min-width: 240px;
  margin: 0;
  padding: 12px 0;
  list-style: none;
  border: 1px solid var(--rx-border);
  border-radius: 20px;
  background: rgba(255,255,255,0.97);
  box-shadow: 0 24px 50px rgba(51,51,51,0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
  z-index: 50;
}
.dropdown-content { left: 0; }
.user-dropdown-menu { right: 0; }
.dropdown-content a, .user-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  text-decoration: none;
  color: #333333;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}
.dropdown-content a:hover, .user-dropdown-menu a:hover { background: #f7f4ef; color: var(--rx-accent); }
.user-dropdown-menu .divider { height: 1px; margin: 8px 14px; background: rgba(51,51,51,0.08); }
.dropdown:hover .dropdown-content, .dropdown:focus-within .dropdown-content, .dropdown.is-open .dropdown-content,
.user-dropdown-container:hover .user-dropdown-menu, .user-dropdown-container:focus-within .user-dropdown-menu, .user-dropdown-container.is-open .user-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.hello-label { color: #8b847d; font-weight: 400; }
#username { color: #333333; font-weight: 700; }
.dropdown-icon { font-size: 13px; color: #8b847d; transition: transform .2s ease; }
.dropdown.is-open .dropdown-icon, .user-dropdown-container.is-open .dropdown-icon { transform: rotate(180deg); }

.doctors-page { max-width: var(--rx-container); margin: 0 auto; padding: 28px 28px 76px; }
.doctors-hero, .doctors-panel {
  border-radius: 34px;
  border: 1px solid var(--rx-border);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(251,250,247,.94));
  box-shadow: var(--rx-shadow);
}
.doctors-hero { padding: 44px; margin-bottom: 24px; }
.page-eyebrow {
  margin: 0 0 14px;
  color: var(--rx-accent);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.doctors-hero h1 {
  margin: 0 0 12px;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  line-height: 1.04;
  letter-spacing: -.05em;
}
.doctors-hero p:last-child { max-width: 680px; margin: 0; color: var(--rx-muted); font-size: 1.06rem; line-height: 1.8; }
.doctors-panel { padding: 28px; }
.filters-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.filter-chip {
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(176,115,43,.16);
  background: #fff;
  color: var(--rx-text);
  font-weight: 800;
}
.filter-chip.active, .filter-chip:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--rx-accent), var(--rx-accent-2));
  border-color: transparent;
}
.filter-search {
  flex: 1;
  min-width: 260px;
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-radius: 18px;
  border: 1px solid var(--rx-border);
  background: #fff;
}
.filter-search i { color: var(--rx-accent); }
.filter-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--rx-text); }
.doctors-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.doctor-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 100%;
  border-radius: 30px;
  border: 1px solid var(--rx-border);
  background: linear-gradient(180deg, #fff, #fbfaf7);
  box-shadow: 0 22px 54px rgba(51,51,51,.09);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.doctor-card:hover { transform: translateY(-5px); border-color: rgba(176,115,43,.22); box-shadow: 0 30px 70px rgba(51,51,51,.13); }
.doctor-card[hidden] { display: none; }
.doctor-avatar { height: 250px; margin: 22px 22px 0; border-radius: 24px; background-position: center; background-size: cover; }
.doctor-detail-wrapper { padding: 22px; }
.doctor-profession { display: inline-block; margin-bottom: 8px; color: var(--rx-accent); font-size: .78rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.doctor-name { margin: 0 0 10px; font-family: "Montserrat", sans-serif; font-size: 1.35rem; font-weight: 900; letter-spacing: -.03em; }
.doctor-detail-wrapper p { margin: 0 0 18px; color: var(--rx-muted); line-height: 1.7; }
.view-profile {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #333333, #4a4540);
  font-weight: 900;
}
.no-results { margin-top: 22px; padding: 26px; border-radius: 24px; border: 1px dashed rgba(176,115,43,.28); color: var(--rx-muted); background: #fff; text-align: center; }

.rx-footer { padding: 18px 28px 28px; }
.rx-footer-shell {
  max-width: var(--rx-container);
  margin: 0 auto;
  padding: 36px 36px 22px;
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(51,51,51,.98), rgba(0,0,0,.96));
  box-shadow: 0 28px 60px rgba(51,51,51,.18);
}
.rx-footer-top { display: grid; grid-template-columns: minmax(280px, 1.1fr) minmax(0, 2fr); gap: 34px; padding-bottom: 28px; }
.rx-footer-logo-link { display: inline-flex; align-items: center; justify-content: center; width: 154px; min-height: 76px; padding: 16px 20px; background: #fff; }
.rx-footer-logo { max-width: 118px; }
.rx-footer-description { max-width: 390px; margin: 24px 0 0; color: rgba(240,236,230,.88); line-height: 1.85; }
.rx-footer-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.rx-footer-column { display: flex; flex-direction: column; gap: 8px; }
.rx-footer-column h4 { margin: 8px 0 12px; color: #fff; font-family: "Montserrat", sans-serif; font-size: 1.25rem; }
.rx-footer-column a { text-decoration: none; color: rgba(240,236,230,.9); line-height: 1.8; }
.rx-footer-column a:hover { color: var(--rx-accent); }
.rx-footer-bottom { padding-top: 22px; border-top: 1px solid rgba(255,255,255,.08); }
.rx-footer-copy { margin: 0; color: rgba(240,236,230,.74); }

.rx-modal-overlay { position: fixed; inset: 0; z-index: 99999; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(20,18,16,.48); backdrop-filter: blur(6px); }
.rx-modal-overlay.is-open { display: flex; }
.modal-open { overflow: hidden; }
.rx-modal { width: min(720px, 100%); border-radius: 32px; border: 1px solid var(--rx-border); background: #fff; box-shadow: 0 34px 90px rgba(0,0,0,.24); }
.rx-h { display: flex; align-items: center; gap: 18px; padding: 24px; border-bottom: 1px solid var(--rx-border); }
.rx-av { width: 82px; height: 82px; border-radius: 24px; background-position: center; background-size: cover; background-color: #f7f2ea; }
.rx-t { margin: 0; font-family: "Montserrat", sans-serif; font-size: 1.55rem; }
.rx-s { margin-top: 5px; color: var(--rx-accent); font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.rx-b { padding: 24px; }
.rx-b p { color: var(--rx-muted); line-height: 1.7; }
.rx-meta { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; margin-top: 18px; }
.rx-meta dt { font-weight: 900; }
.rx-meta dd { margin: 0; color: var(--rx-muted); }
.rx-f { display: flex; justify-content: flex-end; gap: 12px; padding: 20px 24px 24px; }
.rx-btn { min-height: 44px; padding: 0 18px; border: 1px solid var(--rx-border); border-radius: 999px; background: #fff; color: var(--rx-text); font-weight: 900; text-decoration: none; }
.rx-btn.p { border-color: transparent; color: #fff; background: linear-gradient(135deg, #333333, #4a4540); }

@media (max-width: 980px) {
  .site-header { padding: 18px; }
  .navbar-container { min-height: auto; padding: 18px 22px; flex-wrap: wrap; }
  .menu-button { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; }
  .navbar-right { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-top: 16px; border-top: 1px solid rgba(51,51,51,.08); }
  .navbar-right.is-open { display: flex; }
  .nav-center { width: 100%; margin: 0; flex-direction: column; align-items: stretch; gap: 0; }
  .nav-link, .dropdown-toggle, .join-btn, .user-trigger { width: 100%; min-height: 48px; justify-content: space-between; }
  .dropdown-content, .user-dropdown-menu { position: static; min-width: 0; margin-top: 8px; display: none; opacity: 1; visibility: visible; transform: none; box-shadow: none; }
  .dropdown.is-open .dropdown-content, .user-dropdown-container.is-open .user-dropdown-menu { display: block; }
  .doctors-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rx-footer-top, .rx-footer-links { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .doctors-page { padding: 18px 14px 56px; }
  .doctors-hero, .doctors-panel { border-radius: 28px; }
  .doctors-hero { padding: 30px 22px; }
  .doctors-grid { grid-template-columns: 1fr; }
  .doctor-avatar { height: 220px; }
  .rx-meta { grid-template-columns: 1fr; }
  .rx-f { flex-direction: column; }
  .rx-btn { width: 100%; }
}
