/* Canadian Plastic Surgery Guide - Enhanced Styling */
:root {
  --primary: #0f3d5e;
  --primary-dark: #0a2d45;
  --secondary: #1e88a8;
  --accent: #e3f2fd;
  --gold: #d4af37;
  --gold-dark: #b8960f;
  --text: #2c3e50;
  --text-light: #5a6c7d;
  --light: #f5f7fa;
  --white: #ffffff;
  --success: #27ae60;
  --shadow: 0 8px 24px rgba(15, 61, 94, 0.08);
  --shadow-hover: 0 12px 32px rgba(15, 61, 94, 0.15);
  --radius: 12px;
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.65;
  color: var(--text);
  background: var(--light);
}

header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

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

.logo {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.logo span { color: var(--gold); }

nav ul { list-style: none; display: flex; gap: 1.75rem; }
nav a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}
nav a:hover { color: var(--gold); }

.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--white);
  padding: 5rem 1.5rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1.5" fill="rgba(255,255,255,0.08)"/></svg>');
  opacity: 0.4;
}
.hero h1 { font-size: 2.8rem; margin-bottom: 1rem; font-weight: 700; position: relative; }
.hero p { font-size: 1.15rem; max-width: 780px; margin: 0 auto 2rem; opacity: 0.95; position: relative; }

.btn {
  display: inline-block;
  background: var(--gold);
  color: var(--primary-dark);
  padding: 0.85rem 1.75rem;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  margin: 0.4rem;
  transition: all 0.25s;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}
.btn:hover { background: var(--gold-dark); transform: translateY(-2px); }

.container { max-width: 1140px; margin: 2.5rem auto; padding: 0 1.5rem; }

.section { margin-bottom: 3.5rem; }
.section h2 {
  color: var(--primary);
  margin-bottom: 1.25rem;
  font-size: 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.section h2 i { color: var(--secondary); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.card {
  background: var(--white);
  padding: 1.75rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: 1px solid rgba(15,61,94,0.06);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.card h3 { color: var(--secondary); margin-bottom: 0.75rem; font-size: 1.2rem; }
.card h3 i { margin-right: 0.4rem; }

/* Featured #1 card */
.featured-rank {
  background: linear-gradient(135deg, #fffdf5, #fff);
  border-left: 5px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}
.featured-rank h3 { color: var(--primary); margin-bottom: 0.5rem; }
.featured-rank .score {
  display: inline-block;
  background: var(--gold);
  color: var(--primary-dark);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
  margin-left: 0.5rem;
}

/* Fancy Tables */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 1.5rem 0;
  background: var(--white);
}
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--white);
}
th {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  padding: 1rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.3px;
}
th:first-child { border-radius: var(--radius) 0 0 0; }
th:last-child { border-radius: 0 var(--radius) 0 0; }
td {
  padding: 1rem 1rem;
  border-bottom: 1px solid #eef2f6;
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8fbff; }
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.9rem;
}
.rank-badge.top { background: var(--gold); color: var(--primary-dark); }
.score-cell {
  font-weight: 700;
  color: var(--secondary);
}

.disclaimer {
  background: #fff8e6;
  border-left: 5px solid #f39c12;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  border-radius: 0 8px 8px 0;
  font-size: 0.92rem;
  color: #5d4e37;
}

footer {
  background: var(--primary-dark);
  color: #cbd5e1;
  text-align: center;
  padding: 2.5rem 1rem;
  margin-top: 4rem;
}
footer a { color: var(--gold); text-decoration: none; }
footer a:hover { text-decoration: underline; }

.procedure-intro {
  background: var(--white);
  padding: 1.75rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  border-top: 4px solid var(--secondary);
}
.procedure-intro h2 { margin-top: 0; }

@media (max-width: 768px) {
  nav ul { flex-direction: column; gap: 0.75rem; padding: 0.5rem 0; }
  .hero h1 { font-size: 2.1rem; }
  .cards { grid-template-columns: 1fr; }
}
/* ===== Additions (Dec 2026): procedure education + surgeon profiles ===== */
h1 { color: var(--primary); font-size: 2rem; line-height: 1.25; margin-bottom: 0.75rem; }
.section ul, .section ol { padding-left: 1.4rem; margin: 0.5rem 0 1rem; }
.section li { margin-bottom: 0.35rem; }
.section p { margin-bottom: 0.75rem; }
.muted { color: var(--text-light); font-size: 0.92rem; }
nav ul { flex-wrap: wrap; }

a.surgeon-link { color: var(--secondary); font-weight: 600; text-decoration: none; border-bottom: 1px dotted var(--secondary); }
a.surgeon-link:hover { color: var(--primary); border-bottom-style: solid; }
.featured-rank h3 a.surgeon-link { color: var(--primary); }
.text-link { color: var(--secondary); font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* Procedure education */
.procedure-education { margin-bottom: 2.5rem; }
.toc {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1rem 1.25rem; margin-bottom: 1.5rem; font-size: 0.92rem; line-height: 1.9;
}
.toc a { color: var(--secondary); text-decoration: none; white-space: nowrap; }
.toc a:hover { text-decoration: underline; }
.info-box {
  background: var(--accent); border-left: 5px solid var(--secondary); border-radius: 0 8px 8px 0;
  padding: 1rem 1.25rem; margin-bottom: 2rem; font-size: 0.95rem;
}
.edu-section {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.5rem 1.75rem; margin-bottom: 1.25rem; scroll-margin-top: 90px;
}
.edu-section h2 { font-size: 1.35rem; margin-bottom: 0.9rem; }
.recovery-table td:first-child { font-weight: 600; white-space: nowrap; color: var(--primary); }
details.faq { border: 1px solid #e3e9f0; border-radius: 8px; padding: 0.75rem 1rem; margin-bottom: 0.6rem; background: #fbfdff; }
details.faq summary { cursor: pointer; font-weight: 600; color: var(--primary); }
details.faq[open] summary { margin-bottom: 0.5rem; }
ol.sources { font-size: 0.88rem; }
ol.sources a { color: var(--secondary); word-break: break-word; }

/* Surgeon directory */
.breadcrumb { font-size: 0.88rem; color: var(--text-light); margin-bottom: 1rem; }
.breadcrumb a { color: var(--secondary); text-decoration: none; }
.surgeon-card h3 a { color: var(--secondary); text-decoration: none; }
.surgeon-card h3 a:hover { color: var(--primary); }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.75rem 0; }
.chip { background: var(--accent); color: var(--primary); border-radius: 20px; padding: 0.2rem 0.65rem; font-size: 0.8rem; font-weight: 600; }

/* Profile */
.profile-header {
  display: flex; align-items: center; gap: 1.25rem; background: var(--white);
  border-radius: var(--radius); box-shadow: var(--shadow); border-top: 4px solid var(--secondary);
  padding: 1.5rem 1.75rem; margin-bottom: 2rem;
}
.profile-header h1 { margin-bottom: 0.3rem; }
.avatar {
  flex: 0 0 72px; height: 72px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary)); color: var(--white); font-size: 1.9rem;
}
.profile-sub { color: var(--text-light); }
.profile-sub i { color: var(--secondary); }
.profile-table th {
  background: #f3f7fb; color: var(--primary); width: 30%; font-weight: 600; vertical-align: top;
  border-bottom: 1px solid #eef2f6; border-radius: 0 !important; font-size: 0.9rem;
}
.profile-table td { vertical-align: top; font-size: 0.95rem; }
.profile-table a { color: var(--secondary); }
a.cite { font-size: 0.75rem; text-decoration: none; vertical-align: super; margin-left: 1px; }

.provider-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; margin-top: 1rem; }
.provider-card {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid rgba(15,61,94,0.06); padding: 1.4rem 1.5rem; display: flex; flex-direction: column;
}
.provider-card h3 { color: var(--primary); font-size: 1.15rem; margin-bottom: 0.6rem; }
.provider-score { margin-bottom: 0.4rem; }
.rating-big { font-size: 2rem; font-weight: 700; color: var(--secondary); line-height: 1.1; }
.rating-big span { font-size: 1rem; color: var(--text-light); font-weight: 500; }
.rating-big.unverified { font-size: 1.05rem; color: #b5651d; padding: 0.4rem 0; }
.stars { color: var(--gold); font-size: 0.95rem; }
.rating-count { font-size: 0.9rem; color: var(--text-light); }
.checked { font-size: 0.8rem; color: var(--text-light); margin: 0.3rem 0 0.6rem; }
.provider-card p { font-size: 0.92rem; }
.provider-link { margin-top: auto; padding-top: 0.5rem; }
.provider-link a { color: var(--secondary); font-weight: 600; text-decoration: none; font-size: 0.9rem; }
.provider-link a:hover { text-decoration: underline; }

@media (max-width: 768px) {
  nav { flex-direction: column; gap: 0.4rem; }
  nav ul { flex-direction: row; justify-content: center; gap: 0.5rem 1rem; }
  nav a { font-size: 0.88rem; }
  header { position: static; }
  h1 { font-size: 1.6rem; }
  .edu-section { padding: 1.15rem 1.1rem; }
  .profile-header { flex-direction: column; text-align: center; }
  .profile-table th { width: 38%; }
  .recovery-table td:first-child { white-space: normal; }
}

/* SEO / AI-search additions (Dec 2026) */
.answer-box { background: var(--accent); border-left: 5px solid var(--primary); border-radius: 0 8px 8px 0; padding: 1rem 1.25rem; margin: 0 0 1.5rem; font-size: 1.02rem; line-height: 1.6; }
.answer-box p { margin-bottom: 0.5rem; }
.answer-box .updated { margin: 0.25rem 0 0; font-size: 0.88rem; color: var(--text-light); }
.related-links ul { padding-left: 1.4rem; }
.breadcrumb { margin: 0 0 0.75rem; }
.answer-box a { color: var(--secondary); }
