/* ===== 上海医享家 - 主样式表 ===== */

/* CSS Variables */
:root {
  --primary: #667eea;
  --primary-dark: #5a6fd6;
  --secondary: #764ba2;
  --accent: #FFD700;
  --accent-hover: #FFED4E;
  --text-dark: #333;
  --text-light: #666;
  --text-white: #fff;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --shadow: 0 5px 15px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.15);
  --radius: 10px;
  --radius-pill: 50px;
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--bg-white);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

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

img {
  max-width: 100%;
  height: auto;
}

/* ===== Header & Nav ===== */
header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--text-white);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-white);
  text-decoration: none;
}

.logo:hover {
  color: var(--text-white);
}

.logo-icon {
  font-size: 28px;
}

nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

nav a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius);
  transition: var(--transition);
  font-size: 15px;
  font-weight: 500;
}

nav a:hover,
nav a.active {
  background: rgba(255,255,255,0.15);
  color: var(--text-white);
}

.lang-switch {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--text-white) !important;
  padding: 6px 14px !important;
  font-size: 13px !important;
  border-radius: 20px !important;
}

.lang-switch:hover {
  background: rgba(255,255,255,0.25);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  padding: 5px;
}

/* ===== Hero Section ===== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--text-white);
  padding: 100px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
  border-radius: 50%;
}

.hero h1 {
  font-size: 48px;
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.2;
  position: relative;
}

.hero p {
  font-size: 20px;
  margin-bottom: 40px;
  opacity: 0.9;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

.cta-button {
  background: var(--accent);
  color: var(--text-dark);
  padding: 15px 40px;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: var(--transition);
}

.cta-button:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(255,215,0,0.3);
  color: var(--text-dark);
}

.cta-button-outline {
  background: transparent;
  color: var(--text-white);
  border: 2px solid rgba(255,255,255,0.6);
  padding: 13px 38px;
}

.cta-button-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: white;
  transform: translateY(-2px);
  color: var(--text-white);
}

.hero-subnote {
  margin-top: 25px;
  opacity: 0.75;
  font-size: 16px;
  position: relative;
}

/* ===== Section Common ===== */
section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  font-size: 36px;
  margin-bottom: 15px;
  color: var(--text-dark);
}

.section-subtitle {
  text-align: center;
  color: var(--text-light);
  font-size: 18px;
  max-width: 700px;
  margin: 0 auto 50px;
}

.bg-light {
  background: var(--bg-light);
}

/* ===== Services Section ===== */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.service-card {
  background: white;
  padding: 40px 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--transition);
  border: 1px solid #eee;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.service-card h3 {
  font-size: 24px;
  margin-bottom: 12px;
  color: var(--primary);
}

.service-card .price {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary);
  margin: 18px 0;
}

.service-card .desc {
  color: var(--text-light);
  margin-bottom: 20px;
  font-size: 15px;
}

.service-card ul {
  list-style: none;
  text-align: left;
  margin: 20px 0;
}

.service-card li {
  padding: 9px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 15px;
  color: var(--text-dark);
}

.service-card li:before {
  content: "✓";
  color: var(--primary);
  font-weight: bold;
  margin-right: 10px;
}

/* ===== Features Grid ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px;
}

.feature {
  text-align: center;
  padding: 20px;
}

.feature-icon {
  font-size: 52px;
  margin-bottom: 18px;
}

.feature h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: var(--text-dark);
}

.feature p {
  color: var(--text-light);
  font-size: 15px;
}

/* ===== About / Why Us Section ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text h3 {
  font-size: 28px;
  margin-bottom: 20px;
  color: var(--primary);
}

.about-text p {
  color: var(--text-light);
  margin-bottom: 15px;
  font-size: 16px;
  line-height: 1.8;
}

.about-list {
  list-style: none;
  margin-top: 20px;
}

.about-list li {
  padding: 10px 0;
  font-size: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.about-list li:before {
  content: "✅";
  flex-shrink: 0;
  margin-top: 2px;
}

/* ===== Process/Steps ===== */
.steps-container {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  max-width: 1000px;
  margin: 0 auto;
}

.step-item {
  flex: 1;
  min-width: 200px;
  text-align: center;
  padding: 30px 20px;
  position: relative;
}

.step-number {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
  margin: 0 auto 18px;
}

.step-item h4 {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--text-dark);
}

.step-item p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
}

/* ===== Contact Section ===== */
.contact {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--text-white);
}

.contact h2 {
  text-align: center;
  font-size: 36px;
  margin-bottom: 30px;
}

.contact-info {
  text-align: center;
  font-size: 19px;
}

.contact-info p {
  margin: 14px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.contact-note {
  margin-top: 35px;
  font-size: 15px;
  opacity: 0.85;
  line-height: 1.7;
  text-align: center;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Footer ===== */
footer {
  background: #222;
  color: white;
  padding: 40px 0;
  text-align: center;
}

footer .container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  text-align: left;
}

footer h4 {
  font-size: 17px;
  margin-bottom: 15px;
  color: var(--accent);
}

footer ul {
  list-style: none;
}

footer ul li {
  padding: 5px 0;
}

footer ul a {
  color: #aaa;
  font-size: 14px;
}

footer ul a:hover {
  color: white;
}

.footer-bottom {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #444;
  text-align: center;
  color: #888;
  font-size: 14px;
}

/* ===== Page Header (for inner pages) ===== */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: 80px 0 50px;
  text-align: center;
}

.page-header h1 {
  font-size: 42px;
  margin-bottom: 12px;
}

.page-header p {
  font-size: 18px;
  opacity: 0.85;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== Content Sections (inner pages) ===== */
.content-section {
  padding: 60px 0;
}

.content-section h2 {
  font-size: 28px;
  margin-bottom: 20px;
  color: var(--primary);
}

.content-section h3 {
  font-size: 22px;
  margin: 25px 0 12px;
  color: var(--text-dark);
}

.content-section p {
  color: var(--text-light);
  margin-bottom: 15px;
  line-height: 1.8;
  font-size: 16px;
}

.content-section ul {
  margin-left: 20px;
  color: var(--text-light);
  line-height: 2;
}

.content-section ul li {
  margin-bottom: 6px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 30px;
}

.info-card {
  background: var(--bg-light);
  padding: 30px;
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
}

.info-card h4 {
  font-size: 19px;
  margin-bottom: 12px;
  color: var(--primary);
}

/* ===== Intake Forms & AI Assistant ===== */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.form-grid.compact {
  gap: 10px;
}

.intake-form label,
.ai-assistant label {
  display: block;
  margin-bottom: 14px;
  font-weight: 600;
  color: var(--text-dark);
}

.intake-form input,
.intake-form select,
.intake-form textarea,
.ai-assistant input,
.ai-assistant select,
.ai-assistant textarea,
.admin-toolbar input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  background: white;
}

.intake-form textarea,
.ai-assistant textarea {
  resize: vertical;
}

.check-row {
  display: flex !important;
  gap: 8px;
  align-items: flex-start;
  font-weight: 400 !important;
  font-size: 13px;
  color: #666 !important;
  line-height: 1.6;
}

.check-row input {
  width: auto !important;
  margin-top: 4px;
  flex: 0 0 auto;
}

.intake-result,
.ai-assistant-result {
  margin-top: 18px;
  padding: 16px;
  background: #eef6ff;
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  color: var(--text-dark);
  font-size: 14px;
  line-height: 1.8;
}

.ai-assistant {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1200;
  font-size: 14px;
}

.ai-assistant-toggle {
  min-width: 92px;
  height: 48px;
  border: 0;
  border-radius: 24px;
  background: var(--accent);
  color: var(--text-dark);
  font-weight: 800;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
}

.ai-assistant-panel {
  position: absolute;
  right: 0;
  bottom: 60px;
  width: min(420px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 110px));
  overflow: auto;
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.24);
}

.ai-assistant-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 18px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
}

.ai-assistant-header span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  opacity: 0.85;
}

.ai-assistant-close {
  border: 0;
  background: rgba(255,255,255,0.16);
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.ai-assistant-body {
  padding: 18px;
}

.ai-assistant-note {
  margin-bottom: 14px;
  color: #555;
  font-size: 13px;
  line-height: 1.7;
}

.ai-submit {
  width: 100%;
  padding: 13px;
  font-size: 16px;
}

.ai-admin-link {
  display: inline-block;
  margin-top: 14px;
  font-weight: 700;
}

/* ===== Local Admin ===== */
.admin-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.admin-toolbar input {
  flex: 1 1 280px;
}

.admin-button {
  border: 1px solid #ddd;
  background: white;
  color: var(--text-dark);
  border-radius: 8px;
  padding: 11px 14px;
  cursor: pointer;
  font-weight: 700;
}

.admin-button.danger {
  color: #a32626;
  border-color: #efcaca;
}

.admin-count {
  color: var(--text-light);
  font-size: 14px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid #eee;
  border-radius: 8px;
  background: white;
}

.intake-table {
  width: 100%;
  min-width: 1060px;
  border-collapse: collapse;
}

.intake-table th,
.intake-table td {
  padding: 12px;
  border-bottom: 1px solid #eee;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

.intake-table th {
  background: var(--bg-light);
  color: var(--text-dark);
  font-weight: 800;
}

.intake-table small {
  color: var(--text-light);
}

.risk-badge {
  display: inline-block;
  min-width: 36px;
  padding: 3px 7px;
  border-radius: 999px;
  text-align: center;
  font-weight: 800;
  font-size: 12px;
}

.risk-L1 { background: #e8f7ee; color: #176b3a; }
.risk-L2 { background: #eef6ff; color: #1d5fa7; }
.risk-L3 { background: #fff7df; color: #986600; }
.risk-L4 { background: #ffecec; color: #a32626; }

/* ===== Testimonials ===== */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
}

.testimonial-card {
  background: white;
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-style: italic;
  color: var(--text-light);
  line-height: 1.7;
}

.testimonial-author {
  margin-top: 15px;
  font-style: normal;
  font-weight: 600;
  color: var(--text-dark);
}

.testimonial-stars {
  color: var(--accent);
  margin-bottom: 10px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero h1 { font-size: 32px; }
  .hero p { font-size: 17px; }
  .section-title { font-size: 28px; }
  
  nav { display: none; }
  nav.active { 
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  }
  
  .mobile-menu-btn { display: block; }
  
  .service-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .steps-container { flex-direction: column; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .ai-assistant {
    right: 14px;
    bottom: 14px;
  }
  .ai-assistant-panel {
    width: calc(100vw - 28px);
    max-height: calc(100vh - 96px);
  }
  
  .header-content { padding: 12px 0; }
  .logo { font-size: 20px; }
}
