/* ==========================================================================
   Nicholson Internal Medicine Hub — Clinical Institutional Design System
   Modeled after Mayo Clinic, WebMD, GoodRx & Johns Hopkins Medicine
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Institutional Palette */
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-muted: #e2e8f0;
  
  --border-light: #e2e8f0;
  --border-focus: #0284c7;
  
  /* Primary Medical Trust Colors */
  --primary: #0284c7;             /* Clinical Blue */
  --primary-dark: #0369a1;
  --primary-light: #e0f2fe;
  
  --brand-navy: #0f172a;          /* Deep Institutional Slate */
  --brand-navy-light: #1e293b;
  
  --accent-teal: #0d9488;          /* Clinical Emerald/Teal */
  --accent-teal-light: #ccfbf1;
  --accent-amber: #d97706;
  --accent-red: #dc2626;
  --accent-red-light: #fee2e2;
  
  /* High-Contrast Typographic Hierarchy */
  --text-primary: #0f172a;        /* Deep Charcoal for Headings */
  --text-body: #334155;           /* Slate 700 for Body Paragraphs */
  --text-muted: #64748b;          /* Slate 500 for Subtitles & Meta */
  --text-dim: #94a3b8;            /* Slate 400 for Footnotes */
  
  /* Layout & Elevations */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 24px -4px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.03);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}

a:hover {
  color: var(--primary-dark);
}

/* Institutional Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  padding: 0.85rem 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.25rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.25);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--brand-navy);
  letter-spacing: -0.01em;
}

.brand-tag {
  font-size: 0.72rem;
  color: var(--accent-teal);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: #475569;
  transition: color 0.15s ease;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

.nav-cta {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff !important;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.2);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-cta:hover {
  background: linear-gradient(135deg, #0369a1, #075985);
  box-shadow: 0 4px 8px rgba(2, 132, 199, 0.3);
  transform: translateY(-1px);
}

/* Hero Section */
.hero {
  padding: 4rem 1.5rem 3.5rem;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.badge-trust {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.95rem;
  background: var(--primary-light);
  border: 1px solid rgba(2, 132, 199, 0.25);
  border-radius: 999px;
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}

.hero-title {
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
  font-weight: 800;
  color: var(--brand-navy);
  line-height: 1.15;
  margin-bottom: 1.25rem;
  max-width: 850px;
  margin-left: auto;
  margin-right: auto;
}

.hero-title span {
  color: var(--primary);
}

.hero-subtitle {
  font-size: 1.12rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 2.25rem;
  line-height: 1.65;
}

/* Search Bar */
.search-bar {
  max-width: 660px;
  margin: 0 auto 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  padding: 0.4rem 0.5rem 0.4rem 1.25rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.12);
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.98rem;
}

.search-input::placeholder {
  color: var(--text-dim);
}

.search-btn {
  background: var(--primary);
  border: none;
  color: #ffffff;
  font-weight: 700;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.92rem;
  transition: all 0.15s ease;
}

.search-btn:hover {
  background: var(--primary-dark);
}

/* Section Container */
.section {
  max-width: 1200px;
  margin: 0 auto 4rem;
  padding: 0 1.5rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.85rem;
}

.section-title {
  font-size: 1.65rem;
  color: var(--brand-navy);
  font-weight: 800;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

/* Drug Directory Grid */
.drug-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.drug-category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.drug-name {
  font-size: 1.25rem;
  color: var(--brand-navy);
  margin-bottom: 0.25rem;
  font-weight: 700;
}

.drug-generic {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.drug-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.spec-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-body);
  font-weight: 600;
}

.drug-desc {
  font-size: 0.9rem;
  color: var(--text-body);
  margin-bottom: 1.5rem;
  flex-grow: 1;
  line-height: 1.6;
}

.card-actions {
  display: flex;
  gap: 0.75rem;
}

.btn-details {
  flex: 1;
  text-align: center;
  padding: 0.6rem 0.75rem;
  background: var(--bg-subtle);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.btn-details:hover {
  background: var(--bg-muted);
  color: var(--brand-navy);
}

.btn-telehealth {
  flex: 1.2;
  text-align: center;
  padding: 0.6rem 0.75rem;
  background: linear-gradient(135deg, #0d9488, #0f766e);
  color: #ffffff !important;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
  box-shadow: 0 2px 4px rgba(13, 148, 136, 0.2);
}

.btn-telehealth:hover {
  background: linear-gradient(135deg, #0f766e, #115e59);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(13, 148, 136, 0.3);
}

/* Clinical Pharmacokinetics Table */
.table-pk {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table-pk th {
  background: var(--bg-subtle);
  color: var(--brand-navy);
  padding: 0.95rem 1.25rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.table-pk td {
  padding: 0.95rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-body);
}

.table-pk tr:last-child td {
  border-bottom: none;
}

.table-pk tr:nth-child(even) td {
  background: #fcfdfd;
}

.table-pk tr:hover td {
  background: #f1f5f9;
}

/* FAQ Cards */
.faq-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.faq-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
  border-left-color: var(--accent-teal);
}

.faq-question {
  font-size: 1.12rem;
  color: var(--brand-navy);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.faq-answer {
  color: var(--text-body);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* E-E-A-T Medical Reviewer Card */
.eeat-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 1.75rem 2rem;
  display: flex;
  gap: 1.75rem;
  align-items: center;
  margin: 2.5rem 0;
  box-shadow: var(--shadow-sm);
}

.eeat-info h3 {
  font-size: 1.25rem;
  color: var(--brand-navy);
  margin-bottom: 0.35rem;
}

.eeat-info p {
  font-size: 0.95rem;
  color: var(--text-body);
  line-height: 1.6;
}

/* Institutional Footer */
.footer {
  background: #0b1329;
  color: #94a3b8;
  padding: 4.5rem 1.5rem 2.5rem;
  margin-top: 5rem;
  border-top: 1px solid #1e293b;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3.5rem;
  margin-bottom: 2.5rem;
}

.footer-col h4 {
  font-size: 0.95rem;
  margin-bottom: 1.15rem;
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.65rem;
}

.footer-links a {
  color: #94a3b8;
  font-size: 0.88rem;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: #38bdf8;
}

.footer-disclaimer {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  color: #64748b;
  text-align: center;
  line-height: 1.65;
}

@media (max-width: 900px) {
  .hero-title { font-size: 2.15rem; }
  .footer-container { grid-template-columns: 1fr; gap: 2rem; }
  .eeat-box { flex-direction: column; text-align: center; }
  .nav-menu { display: none; }
}
