/* ===== 高血压健康管理网站 - 主样式 ===== */

/* CSS Variables */
:root {
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary-color: #059669;
  --accent-color: #dc2626;
  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --text-light: #6b7280;
  --bg-light: #f9fafb;
  --bg-white: #ffffff;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-light);
}

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

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

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

/* Typography */
h1, h2, h3, h4 {
  line-height: 1.3;
  font-weight: 700;
  color: var(--text-primary);
}

h1 {
  font-size: 2.25rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 1.75rem;
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-color);
}

h3 {
  font-size: 1.25rem;
  margin: 1.5rem 0 0.75rem;
  color: var(--text-secondary);
}

p {
  margin-bottom: 1rem;
}

ul, ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.header {
  background: var(--bg-white);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo:hover {
  text-decoration: none;
}

.logo-icon {
  font-size: 1.75rem;
}

/* Navigation */
.nav {
  display: flex;
  gap: 0.5rem;
}

.nav a {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.2s;
}

.nav a:hover,
.nav a.active {
  background: var(--primary-color);
  color: white;
  text-decoration: none;
}

/* Mobile menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-primary);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.hero h1 {
  color: white;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-align: center;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

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

.btn-white {
  background: white;
  color: var(--primary-color);
}

.btn-white:hover {
  background: var(--bg-light);
  color: var(--primary-dark);
}

.btn-secondary {
  background: var(--secondary-color);
  color: white;
}

.btn-secondary:hover {
  background: #047857;
  color: white;
}

/* Main Content */
.main {
  padding: 3rem 0;
}

.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
}

.content {
  background: var(--bg-white);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-card {
  background: var(--bg-white);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.sidebar-card h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: var(--primary-color);
}

.sidebar-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-card li {
  margin-bottom: 0.75rem;
}

.sidebar-card a {
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-card li:last-child a {
  border-bottom: none;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
  border: 1px solid var(--border-color);
}

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

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.card p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.card a {
  font-weight: 600;
}

/* Action Steps */
.action-steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
}

.action-step {
  position: relative;
  padding: 1.5rem;
  padding-left: 4rem;
  margin-bottom: 1rem;
  background: var(--bg-light);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--primary-color);
}

.action-step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 1.5rem;
  width: 2rem;
  height: 2rem;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.action-step h4 {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.action-step p {
  margin: 0;
  color: var(--text-secondary);
}

/* Info Box */
.info-box {
  padding: 1.5rem;
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
}

.info-box.warning {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
}

.info-box.tip {
  background: #d1fae5;
  border-left: 4px solid var(--secondary-color);
}

.info-box.important {
  background: #fee2e2;
  border-left: 4px solid var(--accent-color);
}

.info-box-title {
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Table */
.table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-white);
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  background: var(--primary-color);
  color: white;
  font-weight: 600;
}

tr:hover {
  background: var(--bg-light);
}

/* FAQ Section */
.faq-item {
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-question {
  padding: 1rem 1.5rem;
  background: var(--bg-light);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-answer {
  padding: 1rem 1.5rem;
  background: var(--bg-white);
}

/* Breadcrumb */
.breadcrumb {
  padding: 1rem 0;
  font-size: 0.9rem;
  color: var(--text-light);
}

.breadcrumb a {
  color: var(--text-light);
}

.breadcrumb span {
  margin: 0 0.5rem;
}

/* Footer */
.footer {
  background: var(--text-primary);
  color: white;
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer h4 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.footer ul {
  list-style: none;
  padding: 0;
}

.footer li {
  margin-bottom: 0.5rem;
}

.footer a {
  color: #9ca3af;
  transition: color 0.2s;
}

.footer a:hover {
  color: white;
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid #374151;
  text-align: center;
  color: #9ca3af;
  font-size: 0.9rem;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--secondary-color) 0%, #047857 100%);
  color: white;
  padding: 3rem;
  border-radius: var(--radius-lg);
  text-align: center;
  margin: 2rem 0;
}

.cta-section h2 {
  color: white;
  border: none;
  margin-top: 0;
}

.cta-section p {
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.stat-item {
  text-align: center;
  padding: 1.5rem;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Checklist */
.checklist {
  list-style: none;
  padding: 0;
}

.checklist li {
  padding: 0.75rem 0;
  padding-left: 2rem;
  position: relative;
  border-bottom: 1px solid var(--border-color);
}

.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--secondary-color);
  font-weight: 700;
}

/* Download Box */
.download-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--bg-light);
  border-radius: var(--radius-md);
  border: 2px dashed var(--border-color);
  margin: 1.5rem 0;
}

.download-icon {
  font-size: 2.5rem;
}

.download-info h4 {
  margin: 0 0 0.25rem;
}

.download-info p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 968px) {
  .content-wrapper {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    order: -1;
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .sidebar-card {
    flex: 1;
    min-width: 250px;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
  
  .header-inner {
    flex-wrap: wrap;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    padding-top: 1rem;
  }
  
  .nav.active {
    display: flex;
  }
  
  .nav a {
    padding: 0.75rem 1rem;
  }
  
  .hero {
    padding: 2.5rem 0;
  }
  
  .hero h1 {
    font-size: 1.75rem;
  }
  
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .content {
    padding: 1.5rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  
  .cards-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .download-box {
    flex-direction: column;
    text-align: center;
  }
}

/* Print styles */
@media print {
  .header, .footer, .sidebar, .nav {
    display: none;
  }
  
  .content-wrapper {
    grid-template-columns: 1fr;
  }
  
  .content {
    box-shadow: none;
  }
}
