@charset "UTF-8";
/*
 Theme Name:   胃肠新视界
 Theme URI:    https://your-domain.com
 Description:  胃肠外科医生个人科普网站专用主题，支持后台自定义医生信息、文章管理、FAQ管理等
 Version:      1.0.0
 Author:       您的姓名
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  gi-theme
*/

/* ===== 全局样式重置 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #FF6B6B;
  --primary-dark: #EE5A5A;
  --primary-light: #FFF0F0;
  --secondary: #00D4AA;
  --accent: #FF9F43;
  --violet: #845EC2;
  --text-dark: #1A1A2E;
  --text-body: #3D3D5C;
  --text-light: #9090B0;
  --bg-white: #FFFFFF;
  --bg-light: #FAFBFF;
  --border: #F0F0F8;
  --border-color: #E8E8F8;
  --shadow: 0 4px 20px rgba(255, 107, 107, 0.12);
  --shadow-lg: 0 8px 32px rgba(255, 107, 107, 0.18);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-body);
  background: var(--bg-light);
  -webkit-font-smoothing: antialiased;
}

/* ===== 全局页面包装器 ===== */
.site-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  background: var(--bg-white);
  min-height: 100vh;
  box-shadow: 0 0 30px rgba(0,0,0,0.08);
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary);
}

/* ===== 顶部工具栏 ===== */
.top-bar {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  padding: 7px 0;
}

.top-bar-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-left {
  font-size: 12px;
  color: var(--text-light);
}

.top-bar-left a {
  color: var(--text-light);
  margin: 0 6px;
}

.top-bar-left a:hover {
  color: var(--primary);
}

.top-bar-right {
  font-size: 12px;
  color: var(--text-light);
}

/* ===== Logo 搜索栏 ===== */
.logo-search-bar {
  background: var(--bg-white);
  padding: 14px 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.logo-search-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
}

.logo-fallback {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon-small {
  font-size: 24px;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.logo-subtitle {
  font-size: 12px;
  color: var(--text-light);
  letter-spacing: 2px;
}

.search-box {
  display: flex;
  border: 2px solid var(--border-color);
  border-radius: 24px;
  overflow: hidden;
  transition: var(--transition);
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,107,107,0.15);
}

.search-input {
  padding: 8px 16px;
  border: none;
  outline: none;
  width: 240px;
  font-size: 13px;
  background: transparent;
  color: var(--text-body);
}

.search-btn {
  padding: 8px 18px;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  font-size: 13px;
  cursor: pointer;
  border-radius: 0 22px 22px 0;
  transition: var(--transition);
}

.search-btn:hover {
  opacity: 0.88;
}

/* ===== 导航栏 ===== */
.nav-bar {
  background: linear-gradient(135deg, #1A1A2E 0%, #2D2D5A 100%);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(26,26,46,0.3);
}

.nav-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  height: 50px;
}

.nav-item {
  height: 50px;
  padding: 0 20px;
  color: rgba(255,255,255,0.85);
  font-size: 15px;
  font-weight: 500;
  display: flex;
  align-items: center;
  position: relative;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 3px 3px 0 0;
  transition: width 0.3s ease;
}

.nav-item:hover,
.nav-item.active {
  color: #FFFFFF;
  background: rgba(255,255,255,0.08);
}

.nav-item:hover::after,
.nav-item.active::after {
  width: 60%;
}

/* ===== 横幅 ===== */
.hero-banner {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    #1A1A2E 0%,
    #2D1B69 25%,
    #845EC2 50%,
    #00D4AA 75%,
    #FF6B6B 100%
  );
  background-size: 400% 400%;
  animation: gradientShift 12s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  25% { background-position: 100% 0%; }
  50% { background-position: 100% 100%; }
  75% { background-position: 0% 100%; }
  100% { background-position: 0% 50%; }
}

.banner-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding: 0 40px;
}

.banner-content h2 {
  font-size: 36px;
  font-weight: 800;
  color: #FFFFFF;
  text-shadow: 0 2px 12px rgba(0,0,0,0.25);
  margin-bottom: 12px;
  letter-spacing: 4px;
}

.banner-content p {
  font-size: 16px;
  color: rgba(255,255,255,0.85);
  letter-spacing: 1px;
}

/* ===== 主内容区 ===== */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px 40px;
}

.content-wrapper {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
}

.content-main {
  min-width: 0;
}

.content-section {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  overflow: hidden;
}

.content-section h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 14px;
  border-left: 4px solid var(--primary);
  padding-left: 10px;
}

/* ===== 右侧边栏 ===== */
.content-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-section {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 18px;
}

.sidebar-section h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
}

.quick-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-link {
  padding: 10px 14px;
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-body);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.quick-link:hover {
  background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
  color: var(--primary);
  transform: translateX(4px);
}

.tip-box {
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.tip-box p {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.9;
  margin-bottom: 4px;
}

.tip-box p:last-child {
  margin-bottom: 0;
}

/* ===== 视频列表 ===== */
.video-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.video-item {
  background: #fff;
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--transition);
}

.video-item:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.video-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #845EC2, #D65DB1);
  color: #fff;
}

.video-info {
  flex: 1;
  min-width: 0;
}

.video-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-title:hover {
  color: var(--primary);
}

.video-meta {
  font-size: 12px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.video-duration {
  background: var(--primary);
  color: white;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 11px;
}

.video-btn {
  padding: 6px 16px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.video-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

/* ===== FAQ列表 ===== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.faq-question {
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.faq-question::before {
  content: '?';
  margin-right: 8px;
  flex-shrink: 0;
  background: var(--primary);
  color: white;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.faq-toggle {
  font-size: 12px;
  color: var(--text-light);
  transition: var(--transition);
  flex-shrink: 0;
}

.faq-item.active .faq-toggle {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 16px 14px 38px;
  font-size: 13px;
  color: var(--text-body);
  line-height: 1.8;
}

.faq-item.active .faq-answer {
  display: block;
}

/* ===== 文章卡片 ===== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.article-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.article-card.pinned {
  border: 2px solid var(--primary);
}

.article-card.pinned::before {
  content: '置顶';
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 12px;
  z-index: 2;
}

.card-body {
  padding: 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

.card-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 8px;
  align-self: flex-start;
}

.card-tag.gastric { background: #FFF0F0; color: #FF6B6B; }
.card-tag.colon { background: #F3EEFF; color: #845EC2; }
.card-tag.surgery { background: #E8FFF9; color: #00B894; }
.card-tag.peri { background: #EEF6FF; color: #4D96FF; }
.card-tag.tumor { background: #FFF8F0; color: #FF9F43; }

.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.6;
  margin-bottom: 8px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-title:hover { color: var(--primary); }

.card-summary {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  font-size: 11px;
  color: var(--text-light);
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ===== 指南列表 ===== */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pub-item {
  background: #fff;
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: var(--transition);
}

.pub-item:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transform: translateY(-1px);
}

.pub-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  color: #fff;
}

.pub-icon.guideline { background: linear-gradient(135deg, var(--primary), var(--accent)); }
.pub-icon.paper { background: linear-gradient(135deg, #845EC2, #B39CD8); }

.pub-info {
  flex: 1;
  min-width: 0;
}

.pub-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 4px;
  line-height: 1.5;
  display: block;
}

.pub-title:hover { color: var(--primary); }

.pub-meta {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 6px;
}

.pub-link {
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.pub-link:hover { text-decoration: underline; }

/* ===== 精选问答 ===== */
.qa-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qa-item {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.qa-question, .qa-answer {
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.8;
}

.qa-question {
  background: #FFF5F5;
  color: var(--text-dark);
  display: flex;
  gap: 10px;
}

.qa-question::before {
  content: "?";
  flex-shrink: 0;
  background: var(--primary);
  color: white;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.qa-answer {
  border-top: 1px dashed #eee;
  color: var(--text-body);
  display: flex;
  gap: 10px;
}

.qa-answer::before {
  content: "?";
  flex-shrink: 0;
  background: var(--secondary);
  color: white;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* ===== 出诊时间表 ===== */
.schedule-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.schedule-card {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  text-align: center;
  transition: var(--transition);
}

.schedule-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.schedule-day {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.schedule-time {
  font-size: 14px;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.schedule-type {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 10px;
}

.schedule-btn {
  display: inline-block;
  padding: 6px 20px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.schedule-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* ===== 医院信息 ===== */
.info-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-card {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.info-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.info-card p {
  font-size: 13px;
  color: var(--text-body);
  line-height: 1.8;
  margin-bottom: 6px;
}

/* ===== 留言表单 ===== */
.form-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  margin-bottom: 20px;
}

.form-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.form-row.full {
  grid-template-columns: 1fr;
}

.form-label {
  font-size: 13px;
  color: var(--text-body);
  margin-bottom: 6px;
}

.form-label .required {
  color: var(--primary);
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  transition: var(--transition);
  box-sizing: border-box;
  font-family: inherit;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,107,107,0.1);
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

.submit-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255,107,107,0.3);
}

/* ===== 页脚 ===== */
.footer {
  background: linear-gradient(135deg, #1A1A2E 0%, #2D2D5A 100%);
  color: rgba(255,255,255,0.7);
  padding: 28px 0 20px;
  margin-top: 40px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

.footer-links {
  margin-bottom: 16px;
}

.footer-links a {
  color: rgba(255,255,255,0.6);
  margin: 0 12px;
  font-size: 13px;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-copyright {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}

/* ===== 返回顶部 ===== */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 32px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  border: none;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255,107,107,0.4);
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255,107,107,0.5);
}

/* ===== 分类按钮 ===== */
.category-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.category-btn {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  border: 1.5px solid var(--border-color);
  color: var(--text-light);
  background: var(--bg-light);
  cursor: pointer;
  transition: var(--transition);
}

.category-btn:hover,
.category-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent;
  color: white;
}

/* ===== 分页 ===== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}

.pagination a,
.pagination span {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--bg-white);
  color: var(--text-body);
  border: 1px solid var(--border-color);
}

.pagination a:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.pagination .active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  border-color: transparent;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .content-wrapper {
    grid-template-columns: 1fr;
  }

  .content-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .sidebar-section {
    flex: 1;
    min-width: 280px;
  }

  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .top-bar-content,
  .logo-search-content,
  .nav-content,
  .main-content,
  .footer-content {
    padding: 0 16px;
  }

  .logo-search-content {
    flex-wrap: wrap;
    gap: 12px;
  }

  .search-input {
    width: 180px;
  }

  .nav-content {
    overflow-x: auto;
    gap: 0;
  }

  .nav-item {
    padding: 0 14px;
    font-size: 13px;
  }

  .banner-content h2 {
    font-size: 24px;
  }

  .hero-banner {
    height: 180px;
  }

  .articles-grid {
    grid-template-columns: 1fr;
  }

  .schedule-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}
