/* ========================================
   广州安举尔视光科技有限公司 - 全局样式
   色彩方案：经典科技蓝
======================================== */

/* CSS 变量定义 */
:root {
  --primary-color: #0066CC;
  --secondary-color: #003D7A;
  --accent-color: #FF6B35;
  --bg-light: #F8F9FA;
  --text-dark: #333333;
  --text-gray: #666666;
  --white: #FFFFFF;
}

/* 全局重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

/* 导航栏样式 */
.navbar {
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 1rem 0;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: var(--primary-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.navbar.scrolled .navbar-brand,
.navbar.scrolled .nav-link {
  color: var(--white) !important;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary-color);
  transition: color 0.3s ease;
}

.navbar-brand img {
  height: 40px;
  margin-right: 10px;
}

.nav-link {
  color: var(--text-dark);
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color) !important;
}

.navbar.scrolled .nav-link:hover {
  color: var(--accent-color) !important;
}

/* 按钮样式 */
.btn-primary {
  background: var(--primary-color);
  border-color: var(--primary-color);
  padding: 0.75rem 2rem;
  font-weight: 600;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 102, 204, 0.3);
}

.btn-accent {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: var(--white);
  padding: 0.75rem 2rem;
  font-weight: 600;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.btn-accent:hover {
  background: #e55a2b;
  border-color: #e55a2b;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

/* 章节通用样式 */
section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
}

.section-title h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--accent-color);
}

.section-title p {
  font-size: 1.1rem;
  color: var(--text-gray);
  max-width: 600px;
  margin: 20px auto 0;
}

/* 卡片样式 */
.card {
  border: none;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.service-card {
  padding: 40px 30px;
  text-align: center;
  background: var(--white);
}

.service-card .icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 1.5rem;
  color: var(--text-dark);
  margin-bottom: 15px;
}

.service-card p {
  color: var(--text-gray);
  line-height: 1.8;
}

.product-card {
  height: 100%;
}

.product-card img {
  height: 250px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover img {
  transform: scale(1.1);
}

.product-card .card-body {
  padding: 25px;
}

.product-card .card-title {
  font-size: 1.3rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.product-card .card-text {
  color: var(--text-gray);
  margin-bottom: 20px;
}

/* 关于我们部分 */
.about-section {
  background: var(--bg-light);
}

.about-content {
  padding: 50px;
}

.about-content h3 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.about-content p {
  color: var(--text-gray);
  line-height: 1.8;
  margin-bottom: 20px;
}

.about-image img {
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* 时间轴样式 */
.timeline {
  position: relative;
  padding: 50px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 100%;
  background: var(--primary-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 50px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  background: var(--accent-color);
  border-radius: 50%;
  top: 0;
}

.timeline-content {
  width: 45%;
  padding: 30px;
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.timeline-item:nth-child(odd) .timeline-content {
  left: 0;
}

.timeline-item:nth-child(even) .timeline-content {
  left: 55%;
}

.timeline-content h4 {
  color: var(--primary-color);
  margin-bottom: 10px;
}

/* 新闻部分 */
.news-card .card-img-top {
  height: 200px;
  object-fit: cover;
}

.news-card .card-body {
  padding: 25px;
}

.news-card .card-date {
  color: var(--accent-color);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.news-card .card-title {
  font-size: 1.2rem;
  color: var(--text-dark);
  margin-bottom: 15px;
}

.news-card .card-text {
  color: var(--text-gray);
  margin-bottom: 20px;
}

/* 合作伙伴 */
.partners-section {
  background: var(--bg-light);
  padding: 60px 0;
}

.partner-logo {
  text-align: center;
  padding: 30px;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.partner-logo:hover {
  opacity: 1;
}

.partner-logo img {
  max-width: 150px;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.partner-logo:hover img {
  filter: grayscale(0);
}

/* 页脚样式 */
.footer {
  background: var(--secondary-color);
  color: var(--white);
  padding: 60px 0 30px;
}

.footer h5 {
  color: var(--white);
  font-size: 1.2rem;
  margin-bottom: 20px;
  font-weight: 600;
}

.footer p,
.footer a {
  color: rgba(255, 255, 255, 0.8);
  line-height: 2;
}

.footer a:hover {
  color: var(--accent-color);
  text-decoration: none;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.contact-info li {
  margin-bottom: 15px;
  display: flex;
  align-items: flex-start;
}

.contact-info i {
  margin-right: 10px;
  color: var(--accent-color);
  margin-top: 5px;
}

.social-links {
  margin-top: 20px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  margin-right: 10px;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: var(--accent-color);
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 40px;
  padding-top: 30px;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

/* 返回顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
  box-shadow: 0 5px 15px rgba(0, 102, 204, 0.3);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--accent-color);
  transform: translateY(-5px);
}

/* 页面标题区域 */
.page-header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  padding: 100px 0 60px;
  color: var(--white);
  text-align: center;
}

.page-header h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 15px;
}

.page-header p {
  font-size: 1.2rem;
  opacity: 0.9;
}

.breadcrumb {
  background: transparent;
  padding: 0;
  margin-top: 20px;
}

.breadcrumb-item a {
  color: var(--white);
}

.breadcrumb-item.active {
  color: rgba(255, 255, 255, 0.6);
}

.breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255, 255, 255, 0.6);
}

/* 表单样式 */
.form-control {
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 12px 20px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* 联系信息卡片 */
.contact-card {
  background: var(--white);
  padding: 40px 30px;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: all 0.3s ease;
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.contact-card .icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.contact-card h5 {
  color: var(--text-dark);
  margin-bottom: 10px;
}

.contact-card p {
  color: var(--text-gray);
}

/* 地图容器 */
.map-container {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* 响应式设计 */
@media (max-width: 991px) {
  .timeline::before {
    left: 0;
  }
  
  .timeline-item::before {
    left: 0;
  }
  
  .timeline-content {
    width: 100%;
    left: 40px !important;
  }
  
  section {
    padding: 60px 0;
  }
  
  /* 平板设备适配 */
  .service-card,
  .product-card,
  .news-card {
    margin-bottom: 30px;
  }
}

@media (max-width: 767px) {
  .navbar-brand {
    font-size: 1.2rem;
  }
  
  .section-title h2 {
    font-size: 1.8rem;
  }
  
  .page-header h1 {
    font-size: 2rem;
  }
  
  .about-content {
    padding: 20px;
  }
  
  section {
    padding: 40px 0;
  }
  
  .footer {
    padding: 40px 0 20px;
  }
  
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
}

@media (max-width: 575px) {
  .navbar-brand {
    font-size: 1rem;
  }
  
  .btn-primary,
  .btn-accent {
    padding: 0.6rem 1.5rem;
  }
}

/* 动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

/* 加载动画 */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid var(--bg-light);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
