/* ============================================
   Beijing Jingdu Children's Hospital — Global Site
   Design System & Core Styles
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --primary: #1565C0;
  --primary-light: #42A5F5;
  --primary-dark: #0D47A1;
  --accent: #FF8F00;
  --accent-light: #FFB74D;
  --accent-dark: #E65100;
  --gold: #FFC107;
  --gold-light: #FFF8E1;
  --bg: #F5F9FF;
  --bg-card: #ffffff;
  --bg-alt: #E8F0FE;
  --text: #2d3748;
  --text-light: #5a6a7e;
  --text-muted: #8899aa;
  --border: #d0e0f0;
  --border-light: #e8f0f7;
  --success: #43A047;
  --warning: #F9A825;
  --danger: #E53935;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --max-width: 1200px;
  --nav-height: 72px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-dark); }
ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--primary);
}
h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }

/* --- Layout Components --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}
.section-sm { padding: 48px 0; }
.section-lg { padding: 120px 0; }

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}
.section-header h2 { margin-bottom: 16px; }
.section-header p { color: var(--text-light); font-size: 1.1rem; }

.bg-white { background: var(--bg-card); }
.bg-alt { background: var(--bg-alt); }
.bg-primary { background: var(--primary); color: #fff; }
.bg-primary h2, .bg-primary h3 { color: #fff; }
.bg-accent { background: var(--accent); color: #fff; }

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.01em;
}
.nav-brand .logo-icon {
  width: 36px; height: 36px;
  background: var(--accent);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-links a {
  color: var(--text);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.925rem;
  font-weight: 500;
  transition: all var(--transition);
}
.nav-links a:hover {
  background: var(--bg-alt);
  color: var(--primary);
}
.nav-links .btn-nav {
  background: var(--accent);
  color: #fff !important;
  padding: 8px 20px;
  font-weight: 600;
}
.nav-links .btn-nav:hover {
  background: var(--accent-dark);
}
.nav-links .nav-back {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.nav-links .nav-back:hover {
  color: var(--primary);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none; border: none;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* --- Hero --- */
.hero {
  padding: 100px 0 80px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, #1976D2 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  right: -10%;
  top: -20%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}
.hero h1 {
  color: #fff;
  margin-bottom: 20px;
}
.hero p {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: 32px;
  line-height: 1.8;
}
.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- Trust Bar --- */
.trust-bar {
  background: var(--bg-alt);
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
}
.trust-bar-inner {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
}
.trust-icon {
  font-size: 1.2rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1.4;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}
.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: #fff;
  color: #fff;
}
.btn-white {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
}
.btn-white:hover {
  background: var(--bg-alt);
  color: var(--primary-dark);
}
.btn-lg {
  padding: 14px 32px;
  font-size: 1.05rem;
}

/* --- Cards --- */
.cards-grid {
  display: grid;
  gap: 28px;
}
.cards-grid-2 { grid-template-columns: repeat(2, 1fr); }
.cards-grid-3 { grid-template-columns: repeat(3, 1fr); }
.cards-grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 36px;
  border: 1px solid var(--border-light);
  transition: all var(--transition);
}
.card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow);
}
.card-icon {
  width: 56px; height: 56px;
  background: var(--bg-alt);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
  color: var(--accent);
}
.card h3 {
  margin-bottom: 12px;
  font-size: 1.2rem;
}
.card p {
  color: var(--text-light);
  font-size: 0.95rem;
}
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
}
.card-link:hover {
  color: var(--accent-dark);
}

/* --- Service Cards --- */
.service-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-light);
  transition: all var(--transition);
}
.service-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.service-card-body {
  padding: 32px;
}
.service-card-body h3 {
  margin-bottom: 12px;
}
.service-card-body p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

/* --- Badge --- */
.badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 20px;
  margin-bottom: 12px;
  background: var(--gold-light);
  color: #8D6E00;
}
.badge-accent {
  background: #FFF3E0;
  color: var(--accent-dark);
}
.badge-success {
  background: #E8F5E9;
  color: #2E7D32;
}

/* --- Journey Steps --- */
.journey-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.journey-step {
  text-align: center;
  padding: 28px 24px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  position: relative;
}
.step-number {
  width: 44px; height: 44px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0 auto 16px;
}
.step-connector {
  position: absolute;
  left: -16px;
  top: 50px;
  width: 32px;
  height: 2px;
  background: var(--border);
}
.journey-step h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}
.journey-step p {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* --- Stats --- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}
.stat-item {
  padding: 24px;
}
.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent);
}
.stat-label {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.75);
  margin-top: 8px;
}

/* --- Location Cards --- */
.location-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border-light);
  text-align: center;
  transition: all var(--transition);
}
.location-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.location-card h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}
.location-city {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
}

/* --- Feature Row --- */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.feature-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.feature-text h2 {
  margin-bottom: 20px;
}
.feature-text p {
  color: var(--text-light);
  margin-bottom: 24px;
  font-size: 1.05rem;
}

/* --- FAQ --- */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}
.faq-item {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--bg-card);
}
.faq-question {
  width: 100%;
  padding: 20px 24px;
  border: none;
  background: none;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background var(--transition);
  font-family: var(--font);
}
.faq-question:hover {
  background: var(--bg-alt);
}
.faq-question::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: 16px;
  transition: transform var(--transition);
}
.faq-item.open .faq-question::after {
  content: '−';
  transform: rotate(180deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.faq-item.open .faq-answer {
  max-height: 500px;
}
.faq-answer p {
  padding: 0 24px 20px;
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.7;
}
.faq-answer a {
  color: var(--accent);
}

/* --- CTA Banner --- */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  padding: 60px 48px;
  border-radius: var(--radius-lg);
  text-align: center;
}
.cta-banner h2 {
  color: #fff;
  margin-bottom: 16px;
}
.cta-banner p {
  opacity: 0.9;
  margin-bottom: 32px;
  font-size: 1.1rem;
}

/* --- Footer --- */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.85);
  padding: 60px 0 0;
}
.footer h4 {
  color: #fff;
  margin-bottom: 16px;
  font-size: 1rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-links a {
  display: block;
  color: rgba(255,255,255,0.7);
  padding: 4px 0;
  font-size: 0.9rem;
  transition: color var(--transition);
}
.footer-links a:hover {
  color: var(--accent-light);
}
.footer-bottom {
  padding: 24px 0;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}
.brand-x {
  color: var(--text-muted);
  font-size: 1rem;
  margin: 0 2px;
}
.brand-jingdu {
  font-size: 1rem;
  font-weight: 600;
}

/* --- Page Hero (sub-pages) --- */
.page-hero {
  padding: 60px 0 48px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
}
.page-hero h1 {
  color: #fff;
  margin-bottom: 12px;
}
.page-hero p {
  opacity: 0.9;
  font-size: 1.1rem;
}

/* --- Contact Form --- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-group {
  margin-bottom: 20px;
}
.form-group.full-width {
  grid-column: 1 / -1;
}
.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: var(--font);
  transition: border-color var(--transition);
  background: var(--bg-card);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,143,0,0.1);
}
.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

/* --- Toast --- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-lg);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* --- Animations --- */
.animate {
  animation: fadeInUp 0.6s ease forwards;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* --- Doctor Cards --- */
.doctor-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-light);
  transition: all var(--transition);
}
.doctor-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--border);
}
.doctor-avatar {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--bg-alt);
}
.doctor-info {
  padding: 20px;
}
.doctor-info h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}
.doctor-info .doctor-title {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}
.doctor-info .doctor-dept {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* --- Filter Bar --- */
.filter-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.filter-bar select {
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font);
  background: var(--bg-card);
  cursor: pointer;
  min-width: 180px;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .cards-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .cards-grid-2,
  .cards-grid-3 { grid-template-columns: 1fr; }
  .cards-grid-4 { grid-template-columns: 1fr; }
  .journey-steps { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .feature-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .hero { padding: 80px 0 60px; }
  .section { padding: 56px 0; }
  .stat-number { font-size: 2rem; }
  .trust-bar-inner { gap: 20px; }
}
@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr; }
  .hero-buttons { flex-direction: column; }
  .hero-buttons .btn { width: 100%; }
}

/* --- Specialty Highlight --- */
.specialty-highlight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 48px 0;
}
.specialty-highlight.reverse {
  direction: rtl;
}
.specialty-highlight.reverse > * {
  direction: ltr;
}
.specialty-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}
.specialty-stat {
  background: var(--bg-alt);
  padding: 16px;
  border-radius: var(--radius-sm);
  text-align: center;
}
.specialty-stat .stat-val {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}
.specialty-stat .stat-lbl {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 4px;
}

/* --- Breadcrumb --- */
.breadcrumb {
  padding: 12px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.breadcrumb a {
  color: var(--text-muted);
}
.breadcrumb a:hover {
  color: var(--primary);
}

/* --- Info Cards Grid --- */
.info-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.info-card {
  background: var(--bg-card);
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  text-align: center;
  transition: all var(--transition);
}
.info-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.info-card-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}
.info-card h3 {
  margin-bottom: 8px;
  font-size: 1.1rem;
}
.info-card p {
  font-size: 0.9rem;
  color: var(--text-light);
}

@media (max-width: 768px) {
  .info-cards { grid-template-columns: 1fr; }
  .specialty-highlight { grid-template-columns: 1fr; }
  .specialty-highlight.reverse { direction: ltr; }
}
