/* ===== case.html 页面专属样式 ===== */

.page-banner {
  position: relative;
  height: 320px;
  overflow: hidden;
}

.page-banner-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0,60,100,0.7) 0%, rgba(0,137,207,0.45) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-banner-content {
  text-align: center;
  color: #fff;
}

.page-banner-content h1 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 12px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.page-banner-content .subtitle {
  font-size: 15px;
  opacity: 0.9;
  margin-bottom: 24px;
  letter-spacing: 2px;
}

.cases-section {
  padding: 70px 0;
  background: var(--bg-light);
}

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

.case-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: var(--transition);
}

.case-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(0,137,207,0.15);
}

.case-card-img-wrapper {
  width: 100%;
  height: 260px;
  overflow: hidden;
}

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

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

.case-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 20px 20px;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  color: #fff;
  transition: var(--transition);
}

.case-card:hover .case-card-overlay {
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  padding-bottom: 28px;
}

.case-card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.case-card-icon {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--theme-color);
  font-size: 16px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.4s ease;
}

.case-card:hover .case-card-icon {
  opacity: 1;
  transform: translateY(0);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 50px;
}

.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  background: #fff;
  border: 1px solid var(--border-color);
  transition: var(--transition);
  cursor: pointer;
}

.pagination a:hover {
  color: var(--theme-color);
  border-color: var(--theme-color);
}

@media (max-width: 1024px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .cases-section {
    padding: 50px 0;
  }
}

@media (max-width: 768px) {
  .top-bar {
    display: none;
  }
  .nav-inner {
    height: 60px;
    padding: 0 16px;
  }
  .nav-menu {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 70px 0 20px;
    box-shadow: -4px 0 20px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 100;
    overflow-y: auto;
  }
  .nav-menu.open {
    right: 0;
  }
  .nav-menu > li > a {
    padding: 12px 24px;
    line-height: normal;
    font-size: 15px;
    border-bottom: 1px solid #f0f0f0;
  }
  .nav-menu > li .submenu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border-radius: 0;
    padding: 0 0 0 20px;
  }
  .nav-search {
    margin: 12px 24px;
  }
  .mobile-toggle {
    display: flex;
  }
  .mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
  }
  .mobile-overlay.visible {
    opacity: 1;
    visibility: visible;
  }
  .page-banner {
    height: 240px;
  }
  .page-banner-content h1 {
    font-size: 26px;
  }
  .page-banner-content .subtitle {
    font-size: 13px;
  }
  .cases-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .case-card-img-wrapper {
    height: 200px;
  }
  .cases-section {
    padding: 40px 0;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
  .container {
    padding: 0 16px;
  }
  .back-to-top {
    bottom: 80px;
    right: 16px;
  }
}

@media (max-width: 480px) {
  .page-banner {
    height: 200px;
  }
  .page-banner-content h1 {
    font-size: 22px;
  }
  .cases-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .case-card-img-wrapper {
    height: 220px;
  }
  .pagination a, .pagination span {
    min-width: 34px;
    height: 34px;
    font-size: 13px;
  }
  .cases-section {
    padding: 30px 0;
  }
}

.gallery-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: none;
}

.gallery-modal.open {
  display: block;
}

.gallery-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.88);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.gallery-modal.show .gallery-modal-backdrop {
  opacity: 1;
}

.gallery-modal-body {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 52px 72px 20px;
  box-sizing: border-box;
  pointer-events: none;
}

.gallery-modal-inner {
  pointer-events: auto;
  width: min(920px, 100%);
  opacity: 0;
  transform: translateY(24px) scale(0.97);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-modal.show .gallery-modal-inner {
  opacity: 1;
  transform: none;
}

.gallery-main {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 4 / 3;
  max-height: 66vh;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: #fff;
  margin-top: 14px;
  font-size: 14px;
}

.gallery-caption-title {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-caption-count {
  color: rgba(255,255,255,0.65);
  flex-shrink: 0;
  font-size: 13px;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  backdrop-filter: blur(4px);
}

.gallery-nav:hover {
  background: var(--theme-color);
}

.gallery-nav-prev {
  left: 14px;
}

.gallery-nav-next {
  right: 14px;
}

.gallery-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-size: 17px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.gallery-close:hover {
  background: #e74c3c;
  transform: rotate(90deg);
}

.gallery-thumbs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 14px;
  flex-wrap: wrap;
}

.gallery-thumb {
  width: 88px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  background: none;
  opacity: 0.55;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

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

.gallery-thumb:hover {
  opacity: 0.9;
}

.gallery-thumb.active {
  border-color: var(--theme-color);
  opacity: 1;
}

@media (max-width: 768px) {
  .gallery-modal-body {
    padding: 56px 12px 12px;
  }
  .gallery-main {
    max-height: 52vh;
  }
  .gallery-thumb {
    width: 64px;
    height: 44px;
  }
  .gallery-nav {
    width: 36px;
    height: 36px;
  }
}
