/* 过滤表单 */
.reno-filter-wrapper {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid #e9ecef;
  font-size: 16px;
}

#reno-filter-form {
  display: flex;
  align-items: center;
  gap: 15px;
}

#reno-filter-form input[type="text"] {
  flex: 1;
  min-width: 350px;
  padding: 12px 15px;
  border: 1px solid #ced4da;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: #fff;
}

#reno-filter-form input[type="text"]:focus {
  outline: none;
  border-color: #0073aa;
  box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.15);
}

#reno-filter-form select {
  min-width: 150px;
  padding: 12px 15px;
  border: 1px solid #ced4da;
  border-radius: 8px;
  background-color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

#reno-filter-form select:focus {
  outline: none;
  border-color: #0073aa;
  box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.15);
}

#reno-filter-form select[multiple] {
  height: auto;
  min-height: 46px;
}

#reno-filter-form button {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#reno-filter-btn {
  background-color: #0073aa;
  color: #fff;
}

#reno-filter-btn:hover {
  background-color: #005177;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

#reno-reset-btn {
  background-color: #6c757d;
  color: #fff;
}

#reno-reset-btn:hover {
  background-color: #5a6268;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* 案例卡片 */
.reno-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  justify-content: center;
  font-size: 16px;
}

.reno-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
  width: calc(33.333% - 20px);
  max-width: 400px;
  font-size: 16px;
}

.reno-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.15);
}

/* Before/After 切换样式 */
.card-img {
  position: relative;
  height: 400px;
  /* 固定高度防止塌陷 */
  overflow: hidden;
}

.card-img .reno-before-after-toggle {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 5px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  padding: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.card-img .reno-toggle-btn {
  border: none;
  background: transparent;
  padding: 5px 15px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #666;
}

.card-img .reno-toggle-btn.active {
  background: #0073aa;
  color: white;
}

.card-img .reno-before-image,
.card-img .reno-after-image {
  width: 100%;
  height: 100%;
  /* 使用100%高度填充容器 */
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
  position: absolute;
  top: 0;
  left: 0;
}

.card-img .reno-after-image {
  display: none;
}

.reno-card:hover .card-img .reno-before-image,
.reno-card:hover .card-img .reno-after-image {
  transform: scale(1.05);
}

/* 响应式优化 */
@media (max-width: 768px) {
  .card-img {
    height: 250px;
    /* 响应式高度 */
  }

  .card-img .reno-before-after-toggle {
    top: 10px;
  }

  .card-img .reno-toggle-btn {
    padding: 4px 12px;
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .card-img {
    height: 350px;
    /* 响应式高度 */
  }

  .card-img .reno-before-after-toggle {
    top: 8px;
  }

  .card-img .reno-toggle-btn {
    padding: 3px 10px;
    font-size: 10px;
  }
}

/* 保持原有样式 */
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

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

.card-overlay {
  position: absolute;
  bottom: 60px;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
  color: #fff;
  padding: 20px 15px 15px;
  font-size: 14px;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.4s ease-out;
  pointer-events: none;
  padding-bottom: 40px;
}

.reno-card:hover .card-overlay {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.card-overlay ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.card-overlay li {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4em;
  max-height: 2.8em;
}

.card-overlay li strong {
  color: #ffd700;
}

.card-bottom {
  padding: 15px;
  background: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #eee;
  font-size: 16px;
}

.card-bottom span {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

.card-bottom button.view-details {
  background-color: #0073aa;
  color: #fff;
  border: none;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.card-bottom button.view-details:hover {
  background-color: #005177;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 115, 170, 0.2);
}

/* 分页 */

/* 优化分页器样式 */
#reno-pagination {
  margin-top: 40px;
  text-align: center;
  padding: 20px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

#reno-pagination button {
  background-color: #f8f9fa;
  border: 1px solid #ddd;
  color: #333;
  padding: 8px 12px;
  margin: 0 2px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  min-width: 40px;
}

#reno-pagination button:hover:not([disabled]):not(.active) {
  background-color: #e9ecef;
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

#reno-pagination button.active {
  background-color: #0073aa;
  color: white;
  border-color: #0073aa;
}

#reno-pagination button[disabled] {
  background-color: #f8f9fa;
  color: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

#reno-page-info {
  margin: 0 15px;
  font-size: 14px;
  color: #666;
  font-weight: 500;
  white-space: nowrap;
}

.reno-page-ellipsis {
  padding: 0 8px;
  color: #999;
  font-size: 14px;
}

.reno-pagination-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
}

/* 评论表单 */
.reno-comment-respond {
  margin-top: 30px;
}

.reno-comment-respond textarea {
  width: 100%;
  padding: 12px 15px;
  font-size: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  resize: vertical;
  min-height: 100px;
  transition: border-color 0.3s ease;
}

.reno-comment-respond textarea:focus {
  outline: none;
  border-color: #0073aa;
  box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.reno-submit-button {
  background: #0073aa;
  color: #fff;
  padding: 12px 25px;
  border: none;
  margin-top: 15px;
  cursor: pointer;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.reno-submit-button:hover {
  background: #005177;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 115, 170, 0.2);
}

/* 响应式 */
@media (max-width: 768px) {
  .reno-filter-wrapper {
    padding: 15px;
  }

  #reno-filter-form {
    flex-direction: column;
    align-items: stretch;
  }

  #reno-filter-form input[type="text"],
  #reno-filter-form select {
    min-width: auto;
    width: 100%;
    margin-bottom: 10px;
  }

  .reno-filter-wrapper select {
    display: none;
  }

  .reno-filter-wrapper #reno-search {
    width: 100%;
    margin-bottom: 10px;
    padding: 10px;
    font-size: 16px;
    /* Prevents zoom on iOS */
  }

  .reno-filter-wrapper #reno-filter-btn {
    width: 100%;
    padding: 10px;
    font-size: 16px;
  }

  .reno-filter-wrapper form {
    padding: 10px;
  }

  #reno-filter-form button {
    width: 100%;
    padding: 12px;
  }

  .reno-card {
    width: 100%;
    max-width: 400px;
    touch-action: pan-y;
  }

  .reno-card::after {
    content: "Tap to view details";
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 115, 170, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
  }

  .reno-card:hover::after {
    opacity: 1;
  }

  /* Make sure the overlay can be scrolled */
  .card-overlay {
    -webkit-overflow-scrolling: touch;
    /* For momentum scrolling on iOS */
    overflow-y: auto;
    max-height: 70vh;
  }

  .reno-cards {
    gap: 20px;
  }

  #reno-pagination button {
    padding: 6px 10px;
    font-size: 13px;
    min-width: 36px;
  }

  #reno-page-info {
    font-size: 13px;
    margin: 0 10px;
  }

  .reno-page-ellipsis {
    font-size: 13px;
    padding: 0 5px;
  }

  .reno-filter-wrapper,
  .reno-cards,
  .reno-card,
  .card-bottom {
    font-size: 15px;
  }

  .card-bottom span {
    font-size: 13px;
  }

  .card-bottom button.view-details {
    font-size: 13px;
  }
}

/* Desktop styles */
@media (min-width: 769px) {
  .reno-filter-wrapper .reno-filter-select {
    display: inline-block;
    width: auto;
    margin-right: 10px;
    padding: 5px;
  }
}

@media (max-width: 480px) {
  .reno-filter-wrapper {
    padding: 12px;
  }

  .card-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .card-bottom span {
    font-size: 13px;
  }

  .card-bottom button.view-details {
    padding: 10px 20px;
    width: 100%;
  }

  #reno-pagination {
    gap: 2px;
  }

  #reno-pagination button {
    padding: 5px 8px;
    font-size: 12px;
    min-width: 32px;
  }

  #reno-page-info {
    font-size: 12px;
    margin: 0 5px;
  }

  .reno-page-ellipsis {
    font-size: 12px;
    padding: 0 3px;
  }

  .reno-filter-wrapper,
  .reno-cards,
  .reno-card,
  .card-bottom {
    font-size: 14px;
  }

  .card-bottom span {
    font-size: 12px;
  }

  .card-bottom button.view-details {
    font-size: 12px;
  }
}

/* 平板优化 */
@media (min-width: 769px) and (max-width: 1024px) {
  .reno-card {
    width: calc(50% - 20px);
  }
}

/* 大屏幕优化 */
@media (min-width: 1025px) {
  .reno-card {
    width: calc(33.333% - 20px);
  }
}