/* ========================================
   YiER-Studio 补充样式（配合 yier-style.css）
   仅保留：原生 JS 轮播 / 灯箱 / Formspree 表单
   ======================================== */

/* === 首页轮播（原生 crossfade，替代 nivoSlider） === */
.home-slider {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
}

.home-slider .slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.home-slider .slide.active {
  opacity: 1;
}

.home-slider .slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 30px;
  line-height: 50px;
  text-align: center;
  text-decoration: none;
  z-index: 100;
  transition: background 0.3s;
  border: none;
  cursor: pointer;
}

.home-slider .slider-nav:hover {
  background: rgba(0, 0, 0, 0.6);
}

.home-slider .slider-nav.prev { left: 20px; }
.home-slider .slider-nav.next { right: 20px; }

/* === 灯箱 === */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  cursor: zoom-out;
}

#lightbox img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
}

/* === 表单（联系页，Formspree） === */
.contact-form { max-width: 560px; }
.contact-form .field { margin-bottom: 16px; }
.contact-form label {
  display: block; font-size: 13px; color: #333; margin-bottom: 6px;
}
.contact-form input,
.contact-form textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #ccc;
  font-family: "Microsoft Yahei", "微软雅黑", sans-serif;
  font-size: 13px; color: #333; box-sizing: border-box; transition: border-color 0.2s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #333; outline: none;
}
.contact-form textarea { resize: vertical; min-height: 140px; }
.contact-form .submit-btn {
  cursor: pointer; padding: 10px 36px; background: #333; color: #fff;
  border: 1px solid #000; font-size: 13px; transition: background 0.2s;
}
.contact-form .submit-btn:hover { background: #000; }
.contact-form .form-note { font-size: 12px; color: #999; margin-top: 10px; }

/* === 响应式：移动端轮播降高 === */
@media screen and (max-width: 768px) {
  .home-slider,
  .home-slider .slide {
    height: 300px;
  }
  #slider img {
    height: 300px;
  }
}
