/* 聚仁同昌官网 - 全局样式 */
/* 主色调：蓝色 #1a5276 | 点缀色：橙色 #e67e22 */

:root {
  --primary: #1a5276;
  --primary-dark: #154360;
  --primary-light: #2980b9;
  --accent: #e67e22;
  --accent-dark: #d35400;
  --accent-light: #f39c12;
  --text-dark: #2c3e50;
  --text-light: #7f8c8d;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --border: #e0e0e0;
  --shadow: rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text-dark);
  line-height: 1.8;
  background: var(--bg-white);
}

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

ul, ol {
  list-style: none;
}

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

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

/* 顶部导航 */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg-white);
  box-shadow: 0 2px 10px var(--shadow);
  z-index: 1000;
  transition: var(--transition);
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.98);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

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

.logo img {
  height: 65px;
}

.logo-text {
  display: none;
}

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

.logo-text span {
  color: var(--accent);
}

/* 主导航 */
.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-item {
  position: relative;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dark);
  padding: 10px 0;
  cursor: pointer;
}

.nav-item:hover {
  color: var(--primary);
}

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

.nav-item:hover::after {
  width: 100%;
}

.nav-item.active {
  color: var(--primary);
}

.nav-item.active::after {
  width: 100%;
}

/* 下拉菜单 */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% - 5px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-white);
  min-width: 160px;
  box-shadow: 0 5px 20px var(--shadow);
  border-radius: 4px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  padding: 15px 0 10px 0;
  z-index: 1000;
}

.dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 10px;
  background: transparent;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
}

.dropdown-menu a {
  display: block;
  padding: 10px 20px;
  font-size: 14px;
  color: var(--text-dark);
}

.dropdown-menu a:hover {
  background: var(--bg-light);
  color: var(--primary);
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 10px;
}

.mobile-menu-btn span {
  width: 25px;
  height: 2px;
  background: var(--text-dark);
  transition: var(--transition);
}

/* Banner轮播 */
.banner {
  margin-top: 80px;
  position: relative;
  overflow: hidden;
}

.banner-slider {
  display: flex;
  transition: transform 0.5s ease;
}

.banner-slide {
  min-width: 100%;
  height: 500px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.banner-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26, 82, 118, 0.1) 0%, rgba(26, 82, 118, 0.05) 100%);
}

.banner-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #fff;
  z-index: 1;
  width: 90%;
  max-width: 700px;
}

.banner-title {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 20px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.banner-desc {
  font-size: 20px;
  margin-bottom: 30px;
  opacity: 0.95;
}

.banner-btn {
  display: inline-block;
  padding: 15px 40px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  border-radius: 30px;
  transition: var(--transition);
}

.banner-btn:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(230, 126, 34, 0.4);
}

/* 轮播指示器 */
.banner-dots {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 2;
}

.banner-dot {
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
}

.banner-dot.active {
  background: var(--accent);
  transform: scale(1.2);
}

/* 区块通用样式 */
.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 15px;
}

.section-title p {
  font-size: 16px;
  color: var(--text-light);
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 20px auto 0;
}

/* 关于我们 */
.about-section {
  background: var(--bg-light);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.about-image {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px var(--shadow);
}

.about-image img {
  width: 100%;
  display: block;
}

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

.about-content p {
  margin-bottom: 20px;
  color: var(--text-light);
  font-size: 15px;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 30px;
}

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

.about-feature i {
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 服务项目 */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.service-card {
  background: var(--bg-white);
  border-radius: 8px;
  padding: 40px 30px;
  text-align: center;
  box-shadow: 0 5px 20px var(--shadow);
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px var(--shadow);
}

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

.service-icon i {
  font-size: 36px;
  color: #fff;
}

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

.service-card p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.8;
}

.service-card .link {
  display: inline-block;
  margin-top: 20px;
  color: var(--accent);
  font-weight: 500;
}

.service-card .link:hover {
  color: var(--accent-dark);
}

/* 案例展示 */
.cases-section {
  background: var(--bg-light);
}

.cases-filter {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 10px 25px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 30px;
  font-size: 14px;
  color: var(--text-dark);
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}

.case-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/3;
}

.case-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.case-card:hover img {
  transform: scale(1.1);
}

.case-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26, 82, 118, 0.9) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  opacity: 0;
  transition: var(--transition);
}

.case-card:hover .case-overlay {
  opacity: 1;
}

.case-overlay h4 {
  color: #fff;
  font-size: 18px;
  margin-bottom: 5px;
}

.case-overlay span {
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
}

/* 新闻动态 */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.news-card {
  background: var(--bg-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 20px var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px var(--shadow);
}

.news-image {
  height: 200px;
  overflow: hidden;
}

.news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-card:hover .news-image img {
  transform: scale(1.05);
}

.news-content {
  padding: 20px 25px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* 阅读更多 - 固定右下角橙色 */
.news-content .news-more {
  display: inline-block;
  color: #e67e22;
  font-size: 14px;
  font-weight: 600;
  margin-top: auto;
  align-self: flex-end;
  text-decoration: none;
}

.news-content .news-more:hover {
  color: #c0392b;
  text-decoration: none;
}

.news-date {
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 10px;
}

.news-content h3 {
  font-size: 18px;
  color: var(--text-dark);
  margin-bottom: 10px;
  line-height: 1.5;
}

.news-content p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.8;
}

/* 合作伙伴 */
.partners-section {
  background: var(--bg-light);
  padding: 60px 0;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 30px;
  align-items: center;
}

/* 横向新闻卡片 */
/* 横向新闻卡片 */
.news-list {
  max-width: 900px;
  margin: 0 auto;
}

.news-card-horizontal {
  display: flex;
  align-items: stretch;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.06);
  transition: box-shadow 0.3s, transform 0.3s;
  text-decoration: none;
  color: inherit;
}

.news-card-horizontal:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

.news-thumb-wrap {
  width: 280px;
  flex-shrink: 0;
  overflow: hidden;
}

.news-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-card-content {
  flex: 1;
  padding: 22px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.news-card-content h3 {
  font-size: 18px;
  color: #1B4F72;
  margin-bottom: 10px;
  line-height: 1.5;
  font-weight: 600;
}

.news-card-content .news-summary {
  font-size: 14px;
  color: #777;
  line-height: 1.8;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-content .news-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.news-card-content .news-date {
  font-size: 13px;
  color: #aaa;
}

.news-card-content .news-date i {
  color: #E67E22;
  margin-right: 4px;
}

.news-card-content .news-link {
  font-size: 14px;
  color: #E67E22;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s;
}

.news-card-content .news-link:hover {
  color: #d35400;
}

@media (max-width: 768px) {
  .news-card-horizontal {
    flex-direction: column;
  }
  .news-thumb-wrap {
    width: 100%;
    height: 200px;
  }
}



.partner-item {
  text-align: center;
  opacity: 0.6;
  transition: var(--transition);
}

.partner-item:hover {
  opacity: 1;
}

.partner-item img {
  max-height: 60px;
  filter: grayscale(100%);
  transition: var(--transition);
}

.partner-item:hover img {
  filter: grayscale(0);
}

/* 联系我们 */
.contact-section {
  background: var(--primary);
  color: #fff;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.contact-info h3 {
  font-size: 28px;
  margin-bottom: 30px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 25px;
}

.contact-item i {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.contact-item div p {
  font-size: 14px;
  opacity: 0.8;
}

.contact-form {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 30px;
}

.contact-form h3 {
  font-size: 22px;
  margin-bottom: 25px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  color: #fff;
  font-size: 14px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.form-group textarea {
  height: 120px;
  resize: none;
}

.submit-btn {
  width: 100%;
  padding: 15px;
  background: var(--accent);
  border: none;
  border-radius: 4px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

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

/* 页脚 */
.footer {
  background: var(--text-dark);
  color: #fff;
  padding: 50px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 35px;
}

.footer-brand h3 {
  font-size: 22px;
  margin-bottom: 20px;
  color: var(--accent);
  text-align: center;
}

.footer-brand p {
  font-size: 14px;
  opacity: 0.7;
  line-height: 1.8;
}

.footer-links h4 {
  font-size: 15px;
  margin-bottom: 18px;
  color: var(--accent);
  position: relative;
  padding-bottom: 10px;
}

.footer-links h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--accent);
  opacity: 0.5;
}

.footer-links ul li {
  margin-bottom: 10px;
}

.footer-links ul li a {
  font-size: 14px;
  opacity: 0.7;
  display: inline-block;
  transition: var(--transition);
}

.footer-links ul li a:hover {
  opacity: 1;
  color: var(--accent);
  transform: translateX(3px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 25px;
  text-align: center;
  font-size: 13px;
  opacity: 0.6;
}

/* 文章详情 */
.article-detail {
  padding: 80px 0;
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
}

.article-content h1 {
  font-size: 32px;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.article-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-light);
}

.article-body {
  font-size: 16px;
  line-height: 2;
}

.article-body p {
  margin-bottom: 20px;
}

.article-body img {
  border-radius: 8px;
  margin: 20px 0;
}

/* 适老化改造专区 */
.elderly-hero {
  margin-top: 80px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  padding: 100px 0;
  color: #fff;
  text-align: center;
}

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

.elderly-hero p {
  font-size: 18px;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

.elderly-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: -60px;
  position: relative;
  z-index: 1;
}

.elderly-feature-card {
  background: var(--bg-white);
  border-radius: 8px;
  padding: 40px 25px;
  text-align: center;
  box-shadow: 0 10px 30px var(--shadow);
}

.elderly-feature-card i {
  font-size: 48px;
  color: var(--primary);
  margin-bottom: 20px;
}

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

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

/* 响应式设计 */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cases-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .elderly-features {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header-inner {
    height: 70px;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    background: var(--bg-white);
    flex-direction: column;
    padding: 15px 20px;
    box-shadow: 0 5px 20px var(--shadow);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    gap: 0;
    z-index: 999;
  }

  .main-nav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-item:last-child {
    border-bottom: none;
  }

  .dropdown-menu {
    position: static;
    transform: none;
    box-shadow: none;
    padding: 0 0 10px 20px;
    background: transparent;
    opacity: 1;
    visibility: visible;
  }

  .dropdown-menu a {
    padding: 8px 0;
    font-size: 14px;
  }

  .banner-title {
    font-size: 30px;
  }

  .banner-desc {
    font-size: 16px;
  }

  .banner-slide {
    height: 380px;
  }

  .banner-content {
    padding: 0 20px;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-image img {
    height: 250px;
    object-fit: cover;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .cases-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .elderly-features {
    grid-template-columns: 1fr;
  }

  /* 内联网格移动端适配 */
  section .container [style*="grid-template-columns:repeat(4"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  section .container [style*="grid-template-columns:repeat(3"] {
    grid-template-columns: 1fr !important;
  }
  section .container [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand h3 {
    margin-bottom: 15px;
  }

  .footer-brand h3 img {
    width: 200px !important;
    height: auto !important;
  }

  .footer-brand p {
    font-size: 13px;
    line-height: 1.7;
  }

  .footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .footer-links > div {
    min-width: 130px;
  }

  .footer-links h4 {
    margin-top: 10px;
    margin-bottom: 8px;
    font-size: 14px;
    text-align: center;
  }

  .footer-links h4::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-links ul li {
    margin-bottom: 6px;
    text-align: center;
  }

  .footer-links ul li a {
    font-size: 13px;
  }

  .footer-bottom {
    font-size: 12px;
    padding-top: 20px;
    margin-top: 20px;
  }

  .partners-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .section {
    padding: 50px 0;
  }

  .section-title h2 {
    font-size: 26px;
  }

  .elderly-hero {
    padding: 60px 0;
  }

  .elderly-hero h1 {
    font-size: 28px;
  }

  .contact-section {
    padding: 50px 0;
  }

  .cases-filter {
    flex-wrap: wrap;
    gap: 8px;
  }

  .filter-btn {
    padding: 8px 16px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .banner-title {
    font-size: 24px;
  }

  .banner-desc {
    font-size: 15px;
  }

  .banner-slide {
    height: 320px;
  }

  .banner-btn {
    padding: 12px 28px;
    font-size: 14px;
  }

  .section-title h2 {
    font-size: 22px;
  }

  .cases-grid {
    grid-template-columns: 1fr;
  }

  .partners-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .elderly-hero h1 {
    font-size: 24px;
  }

  .footer-brand h3 img {
    width: 180px !important;
    height: auto !important;
  }

  .contact-form,
  .contact-info {
    padding: 0;
  }

  .about-features {
    grid-template-columns: 1fr 1fr;
  }
}

/* 动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeInUp {
  animation: fadeInUp 0.6s ease forwards;
}

/* 滚动显示动画 */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* 桌面端隐藏汉堡菜单按钮 */
@media (min-width: 992px) {
  .mobile-toggle {
    display: none;
  }
}
