/* ============================================
   上海七星医疗整形医院 - 共享样式
   现代响应式设计 | Mobile First
   ============================================ */

/* CSS 变量定义 */
:root {
    --primary-color: #8948EE;
    --primary-dark: #6b2fd9;
    --primary-light: #A66CFF;
    --secondary-color: #695DF7;
    --accent-color: #E5D4FF;
    --text-dark: #444444;
    --text-medium: #555555;
    --text-light: #777777;
    --bg-white: #ffffff;
    --bg-light: #F9F5FF;
    --bg-gray: #f5f5f5;
    --border-color: #e6e6e6;
    --shadow-sm: 0 2px 8px rgba(137, 72, 238, 0.08);
    --shadow-md: 0 4px 20px rgba(137, 72, 238, 0.12);
    --shadow-lg: 0 8px 40px rgba(137, 72, 238, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1200px;
    --header-height: 70px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark); line-height: 1.6; background: var(--bg-white); overflow-x: hidden;
}
a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* 导航栏 */
.header { position: fixed; top: 0; left: 0; width: 100%; height: var(--header-height); background: rgba(255,255,255,0.95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: var(--shadow-sm); z-index: 1000; transition: var(--transition); }
.header.scrolled { box-shadow: var(--shadow-md); }
.nav { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; height: 100%; display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; font-weight: 700; color: var(--primary-color); }
.logo-icon { width: 40px; height: 40px; background: linear-gradient(135deg, var(--primary-color), var(--primary-light)); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.2rem; font-weight: bold; }
.nav-menu { display: flex; gap: 12px; align-items: center; }
.nav-menu a { padding: 8px 18px; font-size: 0.95rem; color: var(--text-medium); border-radius: 25px; font-weight: 500; }
.nav-menu a:hover, .nav-menu a.active { color: var(--primary-color); background: var(--accent-color); }
.menu-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 5px; z-index: 1001; }
.menu-toggle span { width: 25px; height: 3px; background: var(--primary-color); border-radius: 2px; transition: var(--transition); }
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

/* ============================================
   Hero / Banner 区域 - 轮播效果
   ============================================ */
.hero { margin-top: var(--header-height); min-height: 500px; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; text-align: center; }
.hero-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; }
.hero-bg img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.5s ease-in-out; }
.hero-bg img.active { opacity: 1; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(137,72,238,0.65) 0%, rgba(105,93,247,0.55) 50%, rgba(89,48,238,0.45) 100%); z-index: 1; }
.hero-content { position: relative; z-index: 2; max-width: 800px; padding: 60px 20px; }
.hero h1 { font-size: 2.5rem; color: #fff; margin-bottom: 15px; text-shadow: 0 2px 10px rgba(0,0,0,0.15); font-weight: 700; letter-spacing: 2px; }
.hero .hero-en { font-size: 0.85rem; color: rgba(255,255,255,0.7); letter-spacing: 4px; text-transform: uppercase; margin-bottom: 10px; }
.hero p { font-size: 1.1rem; color: rgba(255,255,255,0.9); margin-bottom: 30px; line-height: 1.8; }
.hero-buttons { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-block; padding: 12px 35px; border-radius: 30px; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: var(--transition); border: 2px solid transparent; }
.btn-primary { background: #fff; color: var(--primary-color); box-shadow: var(--shadow-md); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.7); }
.btn-outline:hover { background: rgba(255,255,255,0.15); border-color: #fff; }

/* 通用区块 */
.section { padding: 70px 0; }
.section-light { background: var(--bg-light); }
.section-gray { background: var(--bg-gray); }
.section-title { text-align: center; margin-bottom: 50px; }
.section-title h2 { font-size: 2rem; color: var(--text-dark); margin-bottom: 10px; font-weight: 700; }
.section-title .subtitle { font-size: 0.9rem; color: var(--primary-color); letter-spacing: 3px; text-transform: uppercase; font-weight: 600; }
.section-title p { color: var(--text-light); max-width: 600px; margin: 10px auto 0; line-height: 1.8; }

/* 品牌理念 */
.brand-concept { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.brand-text h3 { font-size: 1.6rem; color: var(--primary-color); margin-bottom: 20px; }
.brand-text p { color: var(--text-medium); line-height: 2; margin-bottom: 15px; }
.brand-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 30px; }
.stat-item { text-align: center; }
.stat-number { font-size: 2rem; color: var(--primary-color); font-weight: 700; }
.stat-label { font-size: 0.85rem; color: var(--text-light); }
.brand-image { width: 100%; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-lg); }
.brand-image img { width: 100%; height: auto; display: block; border-radius: 20px; }

/* ============================================
   服务项目 - 原站样式：图片+标题+描述
   ============================================ */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.service-card { background: #fff; border-radius: 16px; padding: 30px 20px; text-align: center; box-shadow: var(--shadow-sm); transition: var(--transition); border: 1px solid var(--border-color); overflow: hidden; }
.service-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: var(--accent-color); }
.service-img-top { width: 100%; height: 220px; overflow: hidden; border-radius: 12px 12px 0 0; margin-bottom: 20px; }
.service-img-top img { width: 100%; height: 100%; object-fit: cover; }
.service-icon { width: 70px; height: 70px; margin: 0 auto 20px; background: linear-gradient(135deg, var(--accent-color), var(--primary-light)); border-radius: 50%; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.service-icon img { width: 50px; height: 50px; object-fit: contain; }
.service-card h3 { font-size: 1.2rem; color: var(--text-dark); margin-bottom: 8px; }
.service-card .service-divider { color: var(--primary-light); font-size: 0.85rem; margin-bottom: 8px; }
.service-card p { color: var(--text-light); font-size: 0.88rem; line-height: 1.8; }
.service-card .learn-more { display: inline-block; margin-top: 12px; color: var(--primary-color); font-size: 0.9rem; font-weight: 600; }

/* ============================================
   案例网格 - 成功案例（深紫背景+白色文字）
   ============================================ */
.section-case { background: linear-gradient(135deg, #8948EE 0%, #6b2fd9 50%, #5D3FD7 100%); color: #fff; }
.section-case .section-title h2 { color: #fff; }
.section-case .section-title .subtitle { color: rgba(255,255,255,0.9); }
.section-case .section-title p { color: rgba(255,255,255,0.85); }
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.case-grid-item { border-radius: 12px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.2); background: #fff; }
.case-grid-item img { width: 100%; height: auto; display: block; }
.case-scroll-wrapper { width: 100%; overflow: hidden; }
.case-scroll-track { display: flex; gap: 15px; animation: caseScroll 40s linear infinite; }
.case-scroll-track:hover { animation-play-state: paused; }
.case-scroll-item { flex-shrink: 0; width: 230px; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); background: #fff; }
.case-scroll-item img { width: 100%; height: auto; display: block; }
@keyframes caseScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* 案例网格 */
.cases-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
.case-card { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition); }
.case-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.case-image { width: 100%; overflow: hidden; }
.case-image img { width: 100%; height: auto; display: block; }
.case-card h3 { padding: 20px 20px 10px; font-size: 1.05rem; color: var(--text-dark); }
.case-card p { padding: 0 20px 20px; color: var(--text-light); font-size: 0.88rem; }

/* ============================================
   医生团队 - 长图布局（竖版卡片）
   ============================================ */
.doctors-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; }
.doctor-card { background: #fff; border-radius: 16px; overflow: hidden; text-align: center; box-shadow: var(--shadow-sm); transition: var(--transition); }
.doctor-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.doctor-avatar { width: 100%; overflow: hidden; position: relative;}
.doctor-avatar img { width: 100%; height: auto; display: block; }
.doctor-avatar .doctor-head{position: absolute;top: 0;left: 0;width: 70%;object-fit: cover;background: #fff;font-size: 20px;font-weight: bold;line-height: 2.5;color: #8948EE;padding-top: 20px;}
.doctor-info { padding: 20px; }
.doctor-info h3 { font-size: 1.15rem; color: var(--text-dark); margin-bottom: 5px; }
.doctor-info .title { display: inline-block; background: var(--accent-color); color: var(--primary-dark); font-size: 0.8rem; padding: 3px 12px; border-radius: 20px; margin-bottom: 8px; }
.doctor-info p { color: var(--text-light); font-size: 0.85rem; line-height: 1.7; }

/* ============================================
   新闻列表 - 首页横排样式
   ============================================ */
.news-list-home { display: grid; grid-template-columns: 1fr; gap: 20px; max-width: 960px; margin: 0 auto; }
.news-item-home { display: flex; gap: 25px; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition); align-items: stretch; border: 1px solid var(--border-color); }
.news-item-home:hover { box-shadow: var(--shadow-md); transform: translateX(5px); }
.news-thumb { flex-shrink: 0; width: 200px; min-height: 150px; overflow: hidden; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-content { flex: 1; padding: 20px; }
.news-content h3 { font-size: 1.1rem; color: var(--text-dark); margin-bottom: 10px; font-weight: 600; }
.news-content p { color: var(--text-light); font-size: 0.88rem; line-height: 1.9; }

/* ============================================
   行业动态 - 3×2 卡片布局
   ============================================ */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.news-card { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition); border: 1px solid var(--border-color); }
.news-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--accent-color); }
.news-card-thumb { width: 100%; height: 200px; overflow: hidden; }
.news-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-card-body { padding: 20px; }
.news-card-body h3 { font-size: 1.05rem; color: var(--text-dark); margin-bottom: 10px; font-weight: 600; line-height: 1.5; }
.news-card-body p { color: var(--text-light); font-size: 0.85rem; line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ============================================
   联系我们
   ============================================ */
.contact-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.contact-info h3 { font-size: 1.5rem; color: var(--primary-color); margin-bottom: 30px; }
.contact-item { display: flex; gap: 15px; margin-bottom: 25px; align-items: flex-start; }
.contact-icon { flex-shrink: 0; width: 50px; height: 50px; background: linear-gradient(135deg, var(--accent-color), var(--primary-light)); border-radius: 12px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.contact-icon img { width: 36px; height: 36px; object-fit: contain; }
.contact-detail h4 { font-size: 0.9rem; color: var(--text-light); margin-bottom: 5px; }
.contact-detail p { font-size: 1.05rem; color: var(--text-dark); font-weight: 500; word-break: break-all; }
.contact-images { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; margin-bottom: 30px; }
.contact-image-card { border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-md); }
.contact-image-card img { width: 100%; height: auto; display: block; }
.contact-form { background: #fff; border-radius: 20px; padding: 35px; box-shadow: var(--shadow-md); }
.contact-form h3 { font-size: 1.3rem; color: var(--text-dark); margin-bottom: 25px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.88rem; color: var(--text-medium); margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 12px 16px; border: 2px solid var(--border-color); border-radius: 10px; font-size: 0.95rem; font-family: inherit; transition: var(--transition); background: var(--bg-light); }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: var(--primary-light); background: #fff; }
.form-group textarea { resize: vertical; min-height: 120px; }

/* 页脚 */
.footer { background: #1a1a2e; color: rgba(255,255,255,0.7); padding: 50px 0 20px; }
.footer-content { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 30px; }
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 15px; }
.footer-col p { font-size: 0.88rem; line-height: 1.8; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 0.88rem; color: rgba(255,255,255,0.6); }
.footer-col ul li a:hover { color: var(--accent-color); }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.82rem; }
.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: var(--accent-color); }

/* 回到顶部 */
.back-to-top { position: fixed; bottom: 30px; right: 30px; width: 45px; height: 45px; background: linear-gradient(135deg, var(--primary-color), var(--primary-light)); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.2rem; cursor: pointer; box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transition: var(--transition); z-index: 999; }
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

/* 动画 */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeInUp 0.8s ease forwards; }

/* ============================================
   响应式设计 - 平板
   ============================================ */
@media (max-width: 992px) {
    .hero h1 { font-size: 2rem; }
    .brand-concept { grid-template-columns: 1fr; gap: 30px; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .cases-grid { grid-template-columns: repeat(2, 1fr); }
    .case-grid { grid-template-columns: repeat(2, 1fr); }
    .doctors-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-wrapper { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr 1fr; gap: 30px; }
    .news-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .news-item-home { flex-direction: column; }
    .news-thumb { width: 100%; min-height: 200px; }
    .news-content { padding: 20px; }
    .contact-images { grid-template-columns: 1fr; }
}

/* ============================================
   响应式设计 - 手机
   ============================================ */
@media (max-width: 768px) {
    :root { --header-height: 60px; }
    .menu-toggle { display: flex; }
    .nav-menu { position: fixed; top: 0; right: -100%; width: 200px; height: 100vh; background: #fff; flex-direction: column; padding: 80px 20px 30px; gap: 10px; box-shadow: -5px 0 30px rgba(0,0,0,0.1); transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1); align-items: stretch; }
    .nav-menu.active { right: 0; }
    .nav-menu a { padding: 12px 20px; font-size: 1rem; border-radius: 10px; }
    .hero { min-height: 350px; }
    .hero h1 { font-size: 1.5rem; letter-spacing: 1px; }
    .hero p { font-size: 0.95rem; }
    .hero-buttons { flex-direction: column; width: 100%; max-width: 250px; margin: 0 auto; }
    .btn { text-align: center; }
    .section { padding: 50px 0; }
    .section-title h2 { font-size: 1.5rem; }
    .container { padding: 0 16px; }
    .brand-stats { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .stat-number { font-size: 1.4rem; }
    .stat-label { font-size: 0.75rem; }
    .services-grid { grid-template-columns: 1fr; gap: 20px; }
    .service-img-top { height: 180px; }
    .cases-grid { grid-template-columns: 1fr; gap: 20px; }
    .case-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .doctors-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .doctor-info { padding: 15px; }
    .news-grid { grid-template-columns: 1fr; }
    .news-item-home { flex-direction: column; }
    .news-thumb { width: 100%; min-height: 160px; }
    .news-card-thumb { height: 160px; }
    .contact-form { padding: 25px 20px; }
    .contact-item { gap: 12px; }
    .contact-icon { width: 42px; height: 42px; }
    .contact-icon img { width: 28px; height: 28px; }
    .footer-content { grid-template-columns: 1fr; gap: 25px; text-align: center; }
    .footer-col ul { display: inline-block; text-align: left; }
    .back-to-top { bottom: 20px; right: 20px; width: 40px; height: 40px; }
}

/* ============================================
   响应式设计 - 小手机
   ============================================ */
@media (max-width: 480px) {
    .hero h1 { font-size: 1.35rem; }
    .hero p { font-size: 0.85rem; }
    .section-title h2 { font-size: 1.3rem; }
    .logo { font-size: 0.95rem; }
    .logo-icon { width: 35px; height: 35px; font-size: 1rem; }
    .doctors-grid { grid-template-columns: 1fr; }
    .case-grid { grid-template-columns: 1fr; }
    .brand-stats { gap: 5px; }
    .stat-number { font-size: 1.2rem; }
    .service-img-top { height: 160px; }
}
