/* 福州圣恩宠物医院 - 全局样式 */

:root {
  --primary: #2E7D32;
  --primary-dark: #1B5E20;
  --primary-light: #4CAF50;
  --secondary: #FF9800;
  --secondary-dark: #F57C00;
  --bg-light: #F5F5F5;
  --bg-white: #FFFFFF;
  --text-dark: #212121;
  --text-gray: #757575;
  --border: #E0E0E0;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.15);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: all 0.3s ease;
}

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

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

a {
  text-decoration: none;
  color: inherit;
}

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

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

/* 头部导航 */
.header {
  background: var(--bg-white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 50px;
  height: 50px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
}

.logo-text {
  font-size: 20px;
  font-weight: bold;
  color: var(--primary);
}

.nav {
  display: flex;
  gap: 30px;
}

.nav a {
  font-size: 16px;
  color: var(--text-dark);
  padding: 8px 0;
  position: relative;
  transition: var(--transition);
}

.nav a:hover,
.nav a.active {
  color: var(--primary);
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

/* 移动端菜单 */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1001;
}

.mobile-nav.active {
  display: block;
}

.mobile-nav-content {
  background: white;
  width: 280px;
  height: 100%;
  padding: 20px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

.mobile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.mobile-nav-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.mobile-nav-links a {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

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

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

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

.btn-secondary:hover {
  background: var(--secondary-dark);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

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

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 卡片 */
.card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card-body {
  padding: 20px;
}

/* 英雄区域 */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  padding: 80px 0;
  text-align: center;
}

.hero h1 {
  font-size: 48px;
  margin-bottom: 20px;
}

.hero p {
  font-size: 20px;
  margin-bottom: 30px;
  opacity: 0.9;
}

.hero-btns {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

/* 服务网格 */
.section {
  padding: 60px 0;
}

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

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.service-card {
  padding: 30px;
  text-align: center;
}

.service-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 30px;
  color: white;
}

.service-card h3 {
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--text-dark);
}

.service-card p {
  color: var(--text-gray);
  font-size: 15px;
}

/* 医生卡片 */
.doctors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.doctor-card {
  text-align: center;
}

.doctor-img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 20px;
  border: 4px solid var(--primary-light);
}

.doctor-card h3 {
  font-size: 22px;
  margin-bottom: 5px;
}

.doctor-card .title {
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 5px;
}

.doctor-card .specialty {
  color: var(--text-gray);
  font-size: 14px;
  margin-bottom: 15px;
}

.doctor-card .experience {
  display: inline-block;
  background: var(--secondary);
  color: white;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 13px;
  margin-bottom: 15px;
}

.doctor-card p {
  color: var(--text-gray);
  font-size: 14px;
  padding: 0 15px;
}

/* 联系区域 */
.contact-section {
  background: var(--bg-white);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 20px;
  background: var(--bg-light);
  border-radius: var(--radius);
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  flex-shrink: 0;
}

.contact-info h4 {
  font-size: 16px;
  margin-bottom: 5px;
}

.contact-info p {
  color: var(--text-gray);
  font-size: 14px;
}

/* 地图区域 */
.map-section {
  height: 400px;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  margin-top: 30px;
}

.map-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* 底部 */
.footer {
  background: var(--text-dark);
  color: white;
  padding: 40px 0 20px;
}

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

.footer h4 {
  font-size: 18px;
  margin-bottom: 15px;
}

.footer p,
.footer a {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  line-height: 2;
}

.footer a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5);
  font-size: 14px;
}

/* 关于页面 */
.about-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  padding: 60px 0;
  text-align: center;
}

.about-content {
  padding: 60px 0;
}

.about-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 60px;
}

.about-intro img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

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

.about-intro p {
  color: var(--text-gray);
  margin-bottom: 15px;
}

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

.about-intro li {
  padding: 8px 0;
  padding-left: 25px;
  position: relative;
  color: var(--text-gray);
}

.about-intro li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

/* 理念区域 */
.philosophy-section {
  background: #E8F5E9;
  padding: 60px 0;
}

.philosophy-intro {
  text-align: center;
  font-size: 18px;
  color: var(--text-gray);
  max-width: 700px;
  margin: 0 auto 40px;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
}

.value-card {
  background: white;
  padding: 30px;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow);
}

.value-card h4 {
  font-size: 24px;
  color: var(--primary);
  margin-bottom: 10px;
}

.value-card p {
  color: var(--text-gray);
  font-size: 14px;
}

/* 设备区域 */
.equipment-section {
  padding: 60px 0;
}

.equipment-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

.equipment-item {
  background: var(--bg-light);
  padding: 15px 20px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 10px;
}

.equipment-item::before {
  content: '⚙';
  color: var(--primary);
}

/* 相册 */
.gallery-section {
  padding: 60px 0;
  background: var(--bg-light);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/10;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: white;
  padding: 20px;
}

/* 表单 */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-dark);
}

.form-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 16px;
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.form-input.error {
  border-color: #f44336;
}

.form-error {
  color: #f44336;
  font-size: 13px;
  margin-top: 5px;
}

/* 标签页 */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 30px;
}

.tab {
  padding: 12px 24px;
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  position: relative;
  color: var(--text-gray);
  transition: var(--transition);
}

.tab.active {
  color: var(--primary);
  font-weight: 500;
}

.tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* 模态框 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: var(--radius-lg);
  padding: 30px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

/* Toast提示 */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-dark);
  color: white;
  padding: 15px 25px;
  border-radius: var(--radius);
  z-index: 3000;
  animation: toastIn 0.3s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.toast.success {
  background: var(--primary);
}

.toast.error {
  background: #f44336;
}

/* 加载动画 */
.loading {
  text-align: center;
  padding: 40px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 响应式 */
@media (max-width: 768px) {
  .nav {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .hero h1 {
    font-size: 32px;
  }
  
  .hero p {
    font-size: 16px;
  }
  
  .about-intro {
    grid-template-columns: 1fr;
  }
  
  .section-title {
    font-size: 24px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* 管理后台样式 */
.admin-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: white;
  border-radius: var(--radius);
  margin-bottom: 30px;
  box-shadow: var(--shadow);
}

.admin-grid {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 30px;
}

.admin-sidebar {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  height: fit-content;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 5px;
}

.admin-nav-item:hover,
.admin-nav-item.active {
  background: var(--primary);
  color: white;
}

.admin-content {
  background: white;
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
}

.admin-panel {
  display: none;
}

.admin-panel.active {
  display: block;
}

/* 数据表格 */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  background: var(--bg-light);
  font-weight: 600;
}

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

/* 编辑表单 */
.edit-form {
  max-width: 600px;
}

.edit-form h3 {
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-gray);
}

.empty-state-icon {
  font-size: 60px;
  margin-bottom: 20px;
  opacity: 0.3;
}

/* 搜索框 */
.search-box {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.search-box input {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* 操作按钮组 */
.action-btns {
  display: flex;
  gap: 10px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 14px;
}

.btn-danger {
  background: #f44336;
  color: white;
}

.btn-danger:hover {
  background: #d32f2f;
}

/* 图片展示页样式 */
.gallery-section { padding: 60px 0; background: #fff; }
.gallery-tabs { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 40px; }
.tab-btn { padding: 10px 24px; border: 2px solid #e0e0e0; background: #fff; border-radius: 25px; cursor: pointer; transition: var(--transition); font-size: 14px; }
.tab-btn:hover { border-color: var(--primary); color: var(--primary); }
.tab-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.gallery-item { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); cursor: pointer; aspect-ratio: 4/3; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item-info { position: absolute; bottom: 0; left: 0; right: 0; padding: 15px; background: linear-gradient(transparent, rgba(0,0,0,0.7)); color: #fff; }
.gallery-item-info h4 { font-size: 14px; }
.gallery-empty { text-align: center; padding: 60px; color: #999; font-size: 16px; }
.lightbox { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.95); z-index: 9999; justify-content: center; align-items: center; }
.lightbox-close { position: absolute; top: 20px; right: 20px; font-size: 40px; color: #fff; background: none; border: none; cursor: pointer; }
.lightbox-img { max-width: 90%; max-height: 90%; }

/* 视频中心页样式 */
.videos-section { padding: 60px 0; background: #fff; }
.video-tabs { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 40px; }
.videos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px; }
.video-card { background: #fff; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.video-thumbnail { position: relative; aspect-ratio: 16/9; cursor: pointer; overflow: hidden; }
.video-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.play-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.3); display: flex; justify-content: center; align-items: center; transition: var(--transition); }
.video-thumbnail:hover .play-overlay { background: rgba(0,0,0,0.5); }
.play-icon { font-size: 50px; color: #fff; }
.video-info { padding: 20px; }
.video-info h3 { font-size: 18px; margin-bottom: 8px; color: var(--text-dark); }
.video-info p { font-size: 14px; color: var(--text-gray); margin-bottom: 12px; }
.video-meta { font-size: 12px; color: #999; }
.videos-empty { text-align: center; padding: 60px; color: #999; }

/* 法律页面样式 */
.legal-section { padding: 60px 0; background: #fff; }
.legal-content { max-width: 800px; margin: 0 auto; }
.legal-card { background: #fff; border-radius: var(--radius-lg); padding: 30px; margin-bottom: 24px; box-shadow: var(--shadow); }
.legal-card h2 { font-size: 20px; color: var(--primary); margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--primary); }
.legal-card h4 { font-size: 16px; color: var(--text-dark); margin: 20px 0 10px; }
.legal-card p { font-size: 15px; line-height: 1.8; color: var(--text-gray); margin-bottom: 12px; }
.legal-card ul { padding-left: 24px; margin: 12px 0; }
.legal-card li { font-size: 15px; line-height: 1.8; color: var(--text-gray); margin-bottom: 8px; }
.legal-card a { color: var(--primary); }

/* 小程序页面样式 */
.miniprogram-section { padding: 60px 0; background: #fff; }
.miniprogram-intro { display: flex; gap: 40px; align-items: center; justify-content: center; margin-bottom: 60px; flex-wrap: wrap; }
.miniprogram-qr { width: 200px; height: 200px; background: #f5f5f5; border-radius: var(--radius-lg); display: flex; justify-content: center; align-items: center; }
.qr-placeholder { text-align: center; color: #999; }
.qr-placeholder span { font-size: 24px; display: block; }
.qr-placeholder small { font-size: 12px; }
.miniprogram-info { max-width: 400px; }
.miniprogram-info h2 { font-size: 24px; color: var(--primary); margin-bottom: 16px; }
.miniprogram-info p { font-size: 16px; color: var(--text-gray); line-height: 1.8; }
.miniprogram-features, .miniprogram-guide, .miniprogram-contact { margin-bottom: 60px; }
.miniprogram-features h3, .miniprogram-guide h3, .miniprogram-contact h3 { font-size: 22px; color: var(--text-dark); margin-bottom: 30px; text-align: center; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; }
.feature-card { text-align: center; padding: 24px 16px; background: #f8f9fa; border-radius: var(--radius-lg); transition: var(--transition); }
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.feature-icon { font-size: 36px; margin-bottom: 12px; }
.feature-card h4 { font-size: 16px; color: var(--text-dark); margin-bottom: 8px; }
.feature-card p { font-size: 13px; color: var(--text-gray); }
.guide-steps { max-width: 500px; margin: 0 auto; }
.guide-step { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 24px; }
.step-num { width: 40px; height: 40px; background: var(--primary); color: #fff; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-weight: bold; flex-shrink: 0; }
.step-content h4 { font-size: 16px; color: var(--text-dark); margin-bottom: 4px; }
.step-content p { font-size: 14px; color: var(--text-gray); }
.miniprogram-contact { text-align: center; background: #f8f9fa; padding: 40px; border-radius: var(--radius-lg); }
.miniprogram-contact p { font-size: 16px; color: var(--text-gray); margin-bottom: 20px; }
.contact-info p { margin-bottom: 10px; font-size: 16px; }
.contact-info a { color: var(--primary); }

/* 响应式 */
@media (max-width: 768px) {
  .gallery-grid, .videos-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .legal-card { padding: 20px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .miniprogram-intro { flex-direction: column; text-align: center; }
}
