/* ============================================
   DrugsRegistry.com — Refined Wellness Aesthetic
   Typography: DM Serif Display + Plus Jakarta Sans
   ============================================ */

/* --- Design Tokens --- */
:root {
  --plum: #3D1F3D;
  --plum-light: #5C3D5C;
  --plum-lighter: #7A5A7A;
  --plum-subtle: #F3EDF3;
  --gold: #C4956A;
  --gold-light: #D4A574;
  --gold-subtle: #FDF6F0;
  --teal: #5B9EA6;
  --teal-light: #7AB8BF;
  --teal-dark: #3D7A82;
  --cream: #FAF7F4;
  --cream-dark: #F0EBE5;
  --ink: #1A1118;
  --ink-light: #4A3F48;
  --ink-muted: #8A7F88;
  --white: #FFFFFF;
  --red: #C44B4B;
  --green: #4B8C6B;
  --shadow-sm: 0 1px 3px rgba(61,31,61,0.06), 0 1px 2px rgba(61,31,61,0.04);
  --shadow-md: 0 4px 14px rgba(61,31,61,0.08), 0 2px 6px rgba(61,31,61,0.04);
  --shadow-lg: 0 10px 30px rgba(61,31,61,0.10), 0 4px 10px rgba(61,31,61,0.05);
  --shadow-xl: 0 20px 50px rgba(61,31,61,0.14), 0 8px 20px rgba(61,31,61,0.06);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-weight: 400;
  overflow-x: hidden;
}
a { color: var(--plum); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold); }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* --- Utility --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 900px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.text-center { text-align: center; }
.fade-in { opacity: 0; transform: translateY(20px); animation: fadeUp 0.6s ease forwards; }
.fade-in-delay-1 { animation-delay: 0.1s; }
.fade-in-delay-2 { animation-delay: 0.2s; }
.fade-in-delay-3 { animation-delay: 0.3s; }
.fade-in-delay-4 { animation-delay: 0.4s; }

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(2deg); }
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,247,244,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(61,31,61,0.06);
  transition: box-shadow var(--transition);
}
.site-header.scrolled {
  box-shadow: var(--shadow-md);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--plum);
  letter-spacing: -0.01em;
}
.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--plum), var(--plum-light));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(61,31,61,0.2);
}
.logo span { color: var(--gold); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-light);
  position: relative;
  padding: 4px 0;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  border-radius: 1px;
  transition: width var(--transition);
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a:hover { color: var(--plum); }

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  position: relative;
}
.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--plum);
  border-radius: 2px;
  position: absolute;
  left: 5px;
  transition: var(--transition);
}
.mobile-toggle span:nth-child(1) { top: 9px; }
.mobile-toggle span:nth-child(2) { top: 15px; }
.mobile-toggle span:nth-child(3) { top: 21px; }

/* --- Hero --- */
.hero {
  position: relative;
  padding: 80px 0 100px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -20%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(196,149,106,0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(91,158,166,0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: float 10s ease-in-out infinite reverse;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--plum-subtle);
  color: var(--plum);
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 24px;
}
.hero-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s ease infinite;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  line-height: 1.12;
  color: var(--plum);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
  max-width: 700px;
}
.hero h1 em {
  font-style: italic;
  color: var(--gold);
}
.hero-sub {
  font-size: 1.15rem;
  color: var(--ink-muted);
  max-width: 540px;
  margin-bottom: 40px;
  line-height: 1.7;
}

/* --- Search Box --- */
.search-box {
  position: relative;
  max-width: 580px;
  margin-bottom: 48px;
}
.search-box input {
  width: 100%;
  padding: 18px 60px 18px 52px;
  border: 2px solid rgba(61,31,61,0.1);
  border-radius: var(--radius-xl);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  outline: none;
}
.search-box input::placeholder { color: var(--ink-muted); }
.search-box input:focus {
  border-color: var(--plum);
  box-shadow: var(--shadow-lg), 0 0 0 4px rgba(61,31,61,0.06);
}
.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
  pointer-events: none;
}
.search-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, var(--plum), var(--plum-light));
  color: var(--white);
  border: none;
  border-radius: 100px;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(61,31,61,0.25);
}
.search-btn:hover {
  transform: translateY(-50%) scale(1.03);
  box-shadow: 0 4px 16px rgba(61,31,61,0.3);
}
.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(61,31,61,0.08);
  display: none;
  z-index: 50;
  overflow: hidden;
}
.search-suggestions.active { display: block; }
.search-suggestion {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background var(--transition);
  font-size: 0.92rem;
}
.search-suggestion:hover { background: var(--plum-subtle); }
.search-suggestion .suggestion-icon {
  color: var(--plum-lighter);
  font-size: 0.85rem;
  width: 20px;
  text-align: center;
}
.search-suggestion .suggestion-meta {
  color: var(--ink-muted);
  font-size: 0.8rem;
  margin-left: auto;
}

/* --- Stats Row --- */
.stats-row {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}
.stat-item {
  display: flex;
  flex-direction: column;
}
.stat-number {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--plum);
  line-height: 1.1;
}
.stat-label {
  font-size: 0.82rem;
  color: var(--ink-muted);
  font-weight: 500;
  margin-top: 4px;
}

/* --- Section Headings --- */
.section {
  padding: 80px 0;
}
.section-header {
  margin-bottom: 48px;
}
.section-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  color: var(--plum);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.section-subtitle {
  font-size: 1.05rem;
  color: var(--ink-muted);
  margin-top: 12px;
  max-width: 560px;
}

/* --- State Grid --- */
.states-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.state-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(61,31,61,0.04);
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}
.state-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: linear-gradient(180deg, var(--gold), var(--plum));
  transition: height var(--transition);
  border-radius: 0 0 4px 0;
}
.state-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  color: inherit;
}
.state-card:hover::before { height: 100%; }
.state-card-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--plum);
}
.state-card-count {
  font-size: 0.85rem;
  color: var(--ink-muted);
  font-weight: 500;
}
.state-card-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%) translateX(-8px);
  opacity: 0;
  color: var(--gold);
  transition: var(--transition);
  font-size: 1.1rem;
}
.state-card:hover .state-card-arrow {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* --- Featured/CTA Band --- */
.cta-band {
  background: linear-gradient(135deg, var(--plum) 0%, #5C3D6B 50%, var(--plum-light) 100%);
  padding: 64px 0;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(196,149,106,0.15), transparent 70%);
  border-radius: 50%;
}
.cta-band .section-label { color: var(--gold-light); }
.cta-band .section-title { color: var(--white); }
.cta-band .section-subtitle { color: rgba(255,255,255,0.7); }

/* --- Clinic Cards --- */
.clinics-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.clinic-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 28px 32px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(61,31,61,0.04);
  transition: var(--transition);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: start;
  text-decoration: none;
  color: inherit;
}
.clinic-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  color: inherit;
}
.clinic-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--plum);
  margin-bottom: 4px;
  line-height: 1.3;
}
.clinic-address {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin-bottom: 12px;
  line-height: 1.5;
}
.clinic-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.clinic-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
}
.tag-spravato {
  background: rgba(91,158,166,0.12);
  color: var(--teal-dark);
}
.tag-ketamine {
  background: var(--plum-subtle);
  color: var(--plum);
}
.tag-askp {
  background: var(--gold-subtle);
  color: #8B6B3E;
}
.clinic-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  min-width: 140px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--plum), var(--plum-light));
  color: var(--white);
  box-shadow: 0 2px 8px rgba(61,31,61,0.2);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(61,31,61,0.3);
  color: var(--white);
}
.btn-outline {
  background: transparent;
  color: var(--plum);
  border: 1.5px solid rgba(61,31,61,0.2);
}
.btn-outline:hover {
  border-color: var(--plum);
  background: var(--plum-subtle);
  color: var(--plum);
}
.btn-sm { padding: 7px 16px; font-size: 0.8rem; }
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--white);
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  padding: 16px 0;
  font-size: 0.85rem;
  color: var(--ink-muted);
}
.breadcrumbs a { color: var(--plum-lighter); font-weight: 500; }
.breadcrumbs a:hover { color: var(--plum); }
.breadcrumbs .sep {
  margin: 0 10px;
  color: var(--ink-muted);
  opacity: 0.4;
}

/* --- Page Header (State/City) --- */
.page-header {
  padding: 48px 0 40px;
  border-bottom: 1px solid rgba(61,31,61,0.06);
  margin-bottom: 0;
}
.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--plum);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.page-header p {
  font-size: 1.05rem;
  color: var(--ink-muted);
  max-width: 600px;
}
.page-header-stats {
  display: flex;
  gap: 24px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.page-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--ink-light);
  font-weight: 500;
}
.page-stat-icon {
  width: 32px;
  height: 32px;
  background: var(--plum-subtle);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--plum);
  font-size: 0.85rem;
}

/* --- City Grid (on state pages) --- */
.cities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  padding: 40px 0 80px;
}
.city-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(61,31,61,0.04);
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}
.city-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: inherit;
}
.city-card-name {
  font-weight: 600;
  color: var(--plum);
  font-size: 0.95rem;
}
.city-card-count {
  font-size: 0.8rem;
  color: var(--ink-muted);
  background: var(--plum-subtle);
  padding: 3px 10px;
  border-radius: 100px;
  font-weight: 600;
}

/* --- Clinic List Page --- */
.clinics-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0 16px;
  flex-wrap: wrap;
  gap: 12px;
}
.clinics-count {
  font-size: 0.9rem;
  color: var(--ink-muted);
}
.clinics-count strong {
  color: var(--plum);
  font-weight: 700;
}
.sort-select {
  padding: 8px 16px;
  border: 1.5px solid rgba(61,31,61,0.12);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--ink-light);
  background: var(--white);
  cursor: pointer;
}

/* --- Treatments Section --- */
.treatments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.treatment-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(61,31,61,0.04);
  transition: var(--transition);
}
.treatment-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.treatment-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: var(--plum-subtle);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--plum);
}
.treatment-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--plum);
  margin-bottom: 8px;
}
.treatment-card p {
  font-size: 0.85rem;
  color: var(--ink-muted);
  line-height: 1.6;
}

/* --- Footer --- */
.site-footer {
  background: var(--plum);
  color: rgba(255,255,255,0.7);
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--white);
  margin-bottom: 12px;
}
.footer-brand span { color: var(--gold-light); }
.footer-desc {
  font-size: 0.88rem;
  line-height: 1.7;
  max-width: 300px;
}
.footer-heading {
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 16px;
}
.footer-links a {
  display: block;
  color: rgba(255,255,255,0.6);
  font-size: 0.88rem;
  padding: 4px 0;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-disclaimer {
  background: rgba(0,0,0,0.15);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  font-size: 0.8rem;
  line-height: 1.7;
  margin-bottom: 32px;
  color: rgba(255,255,255,0.5);
}

/* --- Pagination --- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 40px 0;
}
.page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-light);
  background: var(--white);
  border: 1px solid rgba(61,31,61,0.08);
  transition: var(--transition);
  text-decoration: none;
}
.page-link:hover { background: var(--plum-subtle); color: var(--plum); }
.page-link.active {
  background: var(--plum);
  color: var(--white);
  border-color: var(--plum);
}

/* --- 404 --- */
.error-page {
  text-align: center;
  padding: 120px 24px;
}
.error-code {
  font-family: var(--font-display);
  font-size: 8rem;
  color: var(--plum-subtle);
  line-height: 1;
}
.error-page h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--plum);
  margin: 16px 0;
}
.error-page p {
  color: var(--ink-muted);
  margin-bottom: 32px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-toggle { display: block; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--cream);
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid rgba(61,31,61,0.08);
    box-shadow: var(--shadow-lg);
  }
  .hero { padding: 48px 0 64px; }
  .stats-row { gap: 24px; }
  .stat-number { font-size: 1.7rem; }
  .clinic-card {
    grid-template-columns: 1fr;
    padding: 20px 24px;
  }
  .clinic-actions {
    flex-direction: row;
    min-width: auto;
    width: 100%;
  }
  .clinic-actions .btn { flex: 1; }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .states-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  .search-btn span { display: none; }
  .search-btn { padding: 12px 14px; }
  .treatments-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .states-grid { grid-template-columns: 1fr 1fr; }
  .cities-grid { grid-template-columns: 1fr; }
  .treatments-grid { grid-template-columns: 1fr; }
  .page-header-stats { flex-direction: column; gap: 12px; }
}
