/**
 * 崇来饰家企业网站样式表
 * 
 * @author 小龙虾 1 号
 * @date 2026-03-26
 */

/* ==========================================================================
   基础样式
   ========================================================================== */

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

:root {
  --primary-color: #1890ff;
  --primary-dark: #096dd9;
  --secondary-color: #722ed1;
  --text-color: #333333;
  --text-light: #666666;
  --text-muted: #999999;
  --bg-color: #ffffff;
  --bg-light: #f8f8f8;
  --border-color: #e8e8e8;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
  --radius: 8px;
  --radius-lg: 12px;
}

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

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

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

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

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  transition: all 0.3s ease;
}

/* ==========================================================================
   导航栏
   ========================================================================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  z-index: 1000;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-lg);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

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

.logo {
  height: 40px;
  width: auto;
}

.brand-name {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
}

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

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

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

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary-color);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  padding: 5px;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: var(--text-color);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* 移动端导航 */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 20px;
    gap: 15px;
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

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

/* ==========================================================================
    section 通用样式
   ========================================================================== */

.section {
  padding: 80px 0;
}

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

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

.more-link {
  color: var(--primary-color);
  font-weight: 500;
  font-size: 16px;
}

.more-link:hover {
  color: var(--primary-dark);
}

/* ==========================================================================
   轮播图
   ========================================================================== */

.banner-section {
  margin-top: 70px;
  background: var(--bg-light);
}

.banner-container {
  position: relative;
  height: 500px;
  overflow: hidden;
}

.banner-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.banner-slide.active {
  opacity: 1;
}

.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-caption {
  position: absolute;
  bottom: 60px;
  left: 60px;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.banner-caption h2 {
  font-size: 48px;
  margin-bottom: 10px;
}

.banner-caption p {
  font-size: 20px;
}

.banner-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

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

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

@media (max-width: 768px) {
  .banner-container {
    height: 300px;
  }

  .banner-caption {
    left: 20px;
    bottom: 40px;
  }

  .banner-caption h2 {
    font-size: 28px;
  }

  .banner-caption p {
    font-size: 16px;
  }
}

/* ==========================================================================
   快捷入口
   ========================================================================== */

.quick-entries {
  background: var(--bg-color);
}

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

.entry-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 20px;
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
  cursor: pointer;
}

.entry-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  background: white;
}

.entry-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.entry-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.entry-text {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-color);
}

@media (max-width: 768px) {
  .entries-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/* ==========================================================================
   案例展示
   ========================================================================== */

.cases-section {
  background: var(--bg-light);
}

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

.case-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  cursor: pointer;
}

.case-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.case-image {
  width: 100%;
  height: 250px;
  overflow: hidden;
}

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

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

.case-info {
  padding: 20px;
}

.case-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-color);
}

.case-meta {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-muted);
}

.case-area {
  color: var(--primary-color);
  font-weight: 500;
}

@media (max-width: 768px) {
  .cases-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/* ==========================================================================
   公司优势
   ========================================================================== */

.advantages-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.advantages-section .section-title {
  color: white;
}

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

.advantage-card {
  text-align: center;
  padding: 30px 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.advantage-card:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-5px);
}

.advantage-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.advantage-card h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.advantage-card p {
  font-size: 14px;
  opacity: 0.9;
}

@media (max-width: 768px) {
  .advantages-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/* ==========================================================================
   设计师展示
   ========================================================================== */

.designers-section {
  background: var(--bg-color);
}

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

.designer-card {
  text-align: center;
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  padding: 30px 20px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.designer-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  background: white;
}

.designer-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 20px;
  overflow: hidden;
  border: 3px solid var(--primary-color);
}

.designer-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.designer-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 5px;
}

.designer-title {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 15px;
}

.designer-cases {
  font-size: 14px;
  color: var(--primary-color);
}

@media (max-width: 768px) {
  .designers-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/* ==========================================================================
   装修知识
   ========================================================================== */

.knowledge-section {
  background: var(--bg-light);
}

.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.knowledge-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  cursor: pointer;
}

.knowledge-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.knowledge-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
}

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

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

.knowledge-info {
  padding: 20px;
}

.knowledge-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.knowledge-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .knowledge-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ==========================================================================
   预约表单
   ========================================================================== */

.appointment-section {
  background: linear-gradient(135deg, #1890ff 0%, #722ed1 100%);
  color: white;
}

.appointment-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.appointment-content h2 {
  font-size: 36px;
  margin-bottom: 15px;
}

.appointment-content p {
  font-size: 18px;
  margin-bottom: 30px;
  opacity: 0.9;
}

.appointment-form {
  background: white;
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.appointment-form input,
.appointment-form textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.appointment-form input:focus,
.appointment-form textarea:focus {
  border-color: var(--primary-color);
  outline: none;
}

.appointment-form textarea {
  resize: vertical;
  margin-bottom: 20px;
}

.submit-btn {
  width: 100%;
  padding: 15px;
  background: var(--primary-color);
  color: white;
  font-size: 18px;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all 0.3s ease;
}

.submit-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .appointment-form {
    padding: 25px;
  }

  .appointment-content h2 {
    font-size: 28px;
  }

  .appointment-content p {
    font-size: 16px;
  }
}

/* ==========================================================================
   页脚
   ========================================================================== */

.footer {
  background: #2c3e50;
  color: white;
  padding: 60px 0 30px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3 {
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.footer-section p,
.footer-section li {
  font-size: 14px;
  line-height: 2;
  opacity: 0.9;
}

.footer-section ul {
  list-style: none;
}

.footer-section a:hover {
  color: var(--primary-color);
}

.social-links {
  display: flex;
  gap: 10px;
}

.social-icon {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  font-size: 14px;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background: var(--primary-color);
  transform: translateY(-2px);
}

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

.footer-bottom p {
  margin: 5px 0;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

/* ==========================================================================
   回到顶部按钮
   ========================================================================== */

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-5px);
}

/* ==========================================================================
   加载状态
   ========================================================================== */

.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 16px;
}

/* ==========================================================================
   工具类
   ========================================================================== */

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

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

/* 优化轮播图样式 */
.banner-slide {
  position: relative;
  overflow: hidden;
}

.banner-slide img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.banner-slide:hover img {
  transform: scale(1.05);
}

/* 添加遮罩层，让文字更清晰 */
.banner-slide::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
  z-index: 1;
}

.banner-caption {
  position: absolute;
  bottom: 100px;
  left: 60px;
  color: white;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  z-index: 2;
  max-width: 600px;
}

.banner-caption h2 {
  font-size: 42px;
  margin: 0 0 15px 0;
  font-weight: 600;
  letter-spacing: 2px;
}

/* 小圆点优化 */
.banner-dots .dot {
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.banner-dots .dot:hover {
  transform: scale(1.3);
  background: white !important;
}

/* 箭头优化 */
.banner-arrow {
  transition: all 0.3s ease;
  opacity: 0.7;
}

.banner-arrow:hover {
  opacity: 1;
  background: rgba(0,0,0,0.5) !important;
  transform: translateY(-50%) scale(1.1);
}

/* 移动端适配 */
@media (max-width: 768px) {
  .banner-slide img {
    height: 300px;
  }
  
  .banner-caption {
    bottom: 60px;
    left: 20px;
    right: 20px;
  }
  
  .banner-caption h2 {
    font-size: 24px;
  }
  
  .banner-arrow {
    padding: 10px;
    font-size: 24px;
  }
}
/* 增加轮播图高度 */
.banner-container {
  position: relative;
  height: 700px !important;
  overflow: hidden;
}

.banner-slide img {
  width: 100%;
  height: 700px !important;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.banner-caption {
  bottom: 150px !important;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .banner-container {
    height: 400px !important;
  }
  
  .banner-slide img {
    height: 400px !important;
  }
}

/* 修复轮播图显示问题 */
.banner-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 700px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  z-index: 1;
}

.banner-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.banner-container {
  position: relative;
  height: 700px;
  overflow: hidden;
}

/* 确保小圆点和箭头在最上层 */
.banner-dots,
.banner-arrow {
  z-index: 100 !important;
}

.banner-dots .dot {
  z-index: 101 !important;
}

/* 确保点击事件有效 */
.banner-dots .dot,
.banner-arrow {
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* 移动端隐藏箭头，用触摸滑动即可 */
@media (max-width: 768px) {
  .banner-arrow {
    display: none !important;
  }
  
  .banner-dots .dot {
    width: 10px !important;
    height: 10px !important;
  }
  
  .banner-caption h2 {
    font-size: 20px !important;
  }
}

/* 桌面端显示箭头 */
@media (min-width: 769px) {
  .banner-arrow {
    display: block !important;
  }
}
