/**
 * =============================================================================
 * 文件: index.css (2025/08/27)
 * 描述: 首页专属样式表。
 * =============================================================================
 */

/* 区域 1: 视频英雄区域 */
.hero-video-section {
  position: relative;
  height: 60vh;
  min-height: 400px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  overflow: hidden;
  border-radius: 13px;
}
#heroVideo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  z-index: 1;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 2;
}
.hero-content {
  position: relative;
  z-index: 3;
  padding: 20px;
  max-width: 800px;
}
.hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 25px;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}
.search-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.9);
  padding: 8px;
  border-radius: 8px;
}
.search-row input {
  flex: 1;
  min-width: 0;
  padding: 10px;
  font-size: 16px;
  background: transparent;
  color: #333;
  border: none;
  outline: none;
}
.search-row button {
  padding: 10px 16px;
  font-size: 16px;
  border: none;
  border-radius: 5px;
  background-color: var(--btn-bg);
  color: var(--btn-text);
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer; 
  transition: background-color 0.2s;
}
.search-row button:hover { 
  background-color: var(--btn-hover); 
}

/* 区域 2: 各内容区块 */
.news ul, .news li {
  list-style: none;
  padding-left: 0;
}
.news ul li {
  margin-bottom: 0.5em;
}


/* ======================== 【代码修正与新增】 ======================== */
/* 描述: 将原有的 .for-business 样式更新为新的 .for-everyone-section 两栏样式 */

.for-everyone-section {
    background-color: #f8f9fa;
    text-align: center;
    border-radius: 12px;
    padding: 40px 20px;
}
html[data-theme='dark'] .for-everyone-section {
    background-color: rgba(35, 38, 58, 0.5);
}
.for-everyone-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 25px;
    text-align: left;
}
.for-everyone-column {
    background: var(--container-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
    transition: transform 0.3s, box-shadow 0.3s;
}
.for-everyone-column:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.for-everyone-column h3 {
    font-size: 1.4em;
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--btn-bg);
}
.for-everyone-column p {
    margin-bottom: 25px;
    line-height: 1.7;
    opacity: 0.8;
}
.cta-button {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--btn-bg);
    color: var(--btn-text);
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: background-color 0.2s, transform 0.2s;
}
.cta-button:hover {
    background-color: var(--btn-hover);
    transform: scale(1.05);
}

/* 专题文章预览区样式 */
.blog-preview .article-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.article-card {
    text-decoration: none;
    color: var(--text-main);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.3s;
}
.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.article-thumbnail {
    width: 100%;
    height: 180px;
    object-fit: cover;
}
.article-title {
    font-size: 1.1em;
    padding: 15px;
    margin: 0;
}

/* 区域 3: 动态内容轮播 (Carousel Section) */
.carousel-section { overflow: hidden; }
.carousel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.carousel-nav { display: flex; gap: 8px; }
.carousel-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--input-border);
  background-color: var(--container-bg); color: var(--text-main);
  font-size: 24px; cursor: pointer; transition: all 0.2s ease;
}
.carousel-btn:hover:not(:disabled) {
  background-color: var(--btn-bg); color: var(--btn-text); border-color: var(--btn-bg);
}
.carousel-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.carousel-window { overflow: hidden; }
.carousel-track {
  display: flex; gap: 20px;
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.carousel-card {
  flex: 0 0 auto; width: 300px;
  background-color: var(--container-bg);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  overflow: hidden; text-decoration: none; color: var(--text-main);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.carousel-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.12);
  border-color: var(--btn-bg);
}
.card-image { width: 100%; height: 180px; object-fit: cover; background-color: #f0f0f0; }
.card-content { padding: 16px; }
.card-title {
  font-size: 1.1em; font-weight: 600; margin: 0 0 8px 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-description {
  font-size: 0.9em; opacity: 0.8;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  height: 2.8em;
}
.verified-badge {
  display: inline-block; margin-left: 8px; padding: 3px 8px;
  font-size: 12px; font-weight: bold; color: #1a73e8;
  background-color: #e8f0fe; border-radius: 4px; vertical-align: middle;
}

/* 区域 4: ユーザーレビュー (贴纸墙) */
.review-sticker-section {
    background-color: transparent;
    box-shadow: none;
    padding-top: 20px;
    padding-bottom: 20px;
}
.review-sticker-wall {
    position: relative;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 800px;
}
.review-sticker {
    width: 90%;
    max-width: 400px;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeIn 0.8s ease-out;
    transform: rotate(-2deg);
}
.review-sticker:hover {
    transform: rotate(0deg) scale(1.05);
    box-shadow: 10px 10px 25px rgba(0,0,0,0.25);
}
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1) rotate(-2deg); }
}
.review-sticker-content {
    font-style: italic;
    font-size: 1.1em;
    margin-bottom: 15px;
}
.review-sticker-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
    font-weight: bold;
    opacity: 0.9;
}
.stars { color: gold; }

/* 区域 5: 弹窗专属样式 (Modals) */

/* 新闻弹窗 */
.news-detail-modal .modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--input-border);
    position: relative;
}
.news-detail-modal .modal-close {
    font-size: 24px;
    color: #6c757d;
}
.news-detail-modal .modal-body {
    padding: 24px;
}
.news-detail-modal .news-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 8px 0;
}
.news-detail-modal .news-meta {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 24px;
}
.news-detail-modal .news-content {
    line-height: 1.8;
}
.news-detail-modal .news-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 1em;
    margin-bottom: 1em;
}

/* 首页新闻列表项 */
.news ul#newsListContainer li a {
    cursor: pointer;
    text-decoration: none;
    color: var(--btn-bg);
    font-weight: 500;
}
.news ul#newsListContainer li a:hover {
    color: var(--btn-hover);
    text-decoration: underline;
}

/* 评价详情弹窗 */
.review-detail-modal .modal-body {
    padding-top: 15px;
}
.review-detail-modal .review-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--input-border);
}
.review-detail-modal .review-author {
    font-weight: bold;
    font-size: 1.1em;
}
.review-detail-modal .review-content-full {
    line-height: 1.8;
    margin-bottom: 25px;
    white-space: pre-wrap; /* 保留换行符 */
}
.review-detail-modal .review-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}
.review-detail-modal .btn-action {
    background-color: #f0f2f5;
    border: 1px solid #dcdfe6;
    color: #606266;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.review-detail-modal .btn-action:hover:not(:disabled) {
    background-color: #e4e7ed;
    border-color: #cdd1d8;
}
.review-detail-modal .btn-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
html[data-theme='dark'] .review-detail-modal .btn-action {
    background-color: #3a3b3c;
    border-color: #4d4d4d;
    color: #e4e6eb;
}
html[data-theme='dark'] .review-detail-modal .btn-action:hover:not(:disabled) {
    background-color: #4e4f50;
}
.review-detail-modal .btn-action .count {
    font-weight: bold;
}

/* ======================== 【代码新增开始】 ======================== */
/* 描述: 新增搜索结果区域样式 */

.search-results-section {
    background-color: #f8f9fa;
    border: 1px solid var(--input-border);
    padding: 20px;
}
html[data-theme='dark'] .search-results-section {
    background-color: rgba(35, 38, 58, 0.5);
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--btn-bg);
}

.search-results-header h2 {
    margin: 0;
}

.close-btn {
    background: transparent;
    border: none;
    font-size: 28px;
    font-weight: bold;
    color: var(--text-main);
    opacity: 0.6;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}
.close-btn:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.search-results-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.search-result-item {
    display: flex;
    gap: 15px;
    background: var(--container-bg);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-decoration: none;
    color: var(--text-main);
    transition: transform 0.3s, box-shadow 0.3s;
}
.search-result-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.result-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.result-info {
    display: flex;
    flex-direction: column;
}

.result-title {
    font-size: 1.1em;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.result-description {
    font-size: 0.9em;
    opacity: 0.8;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =============================================================================
 * 新增/修正: 服务详情弹窗内日历、时间段和地图样式
 * ============================================================================= */
.service-modal-body {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.service-modal-main-top {
    width: 100%;
}

.service-main-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.service-description {
    line-height: 1.8;
}

.service-booking-area {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 25px;
    align-items: flex-start;
}

.calendar-container-wrapper {
    padding: 15px;
    border: 1px solid var(--input-border);
    border-radius: 8px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.calendar-header h3 {
    margin: 0;
    font-size: 1.2em;
}

.calendar-nav {
    background: none;
    border: 1px solid var(--input-border);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}
.calendar-nav:hover {
    background-color: var(--btn-bg);
    color: var(--btn-text);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    text-align: center;
}

.calendar-grid .day-name {
    font-weight: bold;
    font-size: 0.8em;
    opacity: 0.7;
    padding-bottom: 5px;
}

.calendar-grid .day {
    padding: 8px 0;
    border-radius: 50%;
    transition: background-color 0.2s, color 0.2s;
    border: 1px solid transparent;
}

.day.other-month {
    opacity: 0.4;
    pointer-events: none;
}

.day.past {
    text-decoration: line-through;
    color: #ccc;
    pointer-events: none;
    background-color: #f8f9fa;
}
html[data-theme='dark'] .day.past {
    background-color: #2c2f33;
    color: #555;
}

.day.closed {
    background-color: #f8f9fa;
    color: #ccc;
    pointer-events: none;
}

.day.available {
    background-color: #d4edda;
    cursor: pointer;
}

.day.available:hover {
    border-color: var(--btn-bg);
    box-shadow: 0 0 5px rgba(0,123,255,0.5);
}

.day.selected {
    background-color: var(--btn-bg);
    color: var(--btn-text);
    font-weight: bold;
}

#timeSlotsContainer h4 {
    font-size: 1.1em;
    margin-bottom: 10px;
    margin-top: 0;
}

.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.time-slot {
    padding: 10px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.time-slot:hover {
    background-color: #e9ecef;
}
html[data-theme='dark'] .time-slot:hover {
    background-color: #3a3b3c;
}

.time-slot.selected {
    background-color: var(--btn-bg);
    color: var(--btn-text);
    border-color: var(--btn-bg);
}

.time-slot.booked {
    opacity: 0.5;
    background-color: #f8f9fa;
    pointer-events: none;
    text-decoration: line-through;
}
html[data-theme='dark'] .time-slot.booked {
    background-color: #2c2f33;
}


.service-modal-sidebar {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.merchant-info-block {
    display: flex;
    gap: 15px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid var(--input-border);
    align-items: flex-start;
}
html[data-theme='dark'] .merchant-info-block {
    background-color: rgba(58, 59, 60, 0.5);
}

.merchant-info-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.merchant-info-details {
    overflow: hidden;
    text-align: left;
    flex-grow: 1;
}
.merchant-info-details h4 {
    margin: 0 0 8px 0;
    font-size: 1.1em;
}
.merchant-info-details p {
    margin: 4px 0;
    font-size: 0.9em;
    color: #666;
    word-break: break-all;
}
html[data-theme='dark'] .merchant-info-details p {
    color: #ccc;
}
.merchant-info-details button {
    margin-top: 10px;
}

.map-container {
    width: 100%;
    height: 250px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--input-border);
    background-color: #e9ecef;
}
.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.reservation-status-message {
    margin-top: 20px;
    text-align: center;
    font-weight: bold;
    min-height: 1.2em;
    grid-column: 1 / -1; /* 让状态消息横跨整个网格 */
}


/* 区域 6: 响应式设计 (Responsive Design) */
@media (max-width: 900px) {
    .service-booking-area {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
  .hero-video-section { min-height: 350px; }
  .hero-content h1 { font-size: 1.8rem; }
  .carousel-card { width: 250px; }
  .for-everyone-columns {
      grid-template-columns: 1fr;
      gap: 20px;
  }
  .for-everyone-section {
      padding: 30px 15px;
  }
  .for-everyone-column {
      padding: 25px;
  }
}

@media (max-width: 480px) {
  .hero-video-section { height: 50vh; min-height: 300px; }
  .hero-content h1 { font-size: 1.6rem; margin-bottom: 20px; }
  .carousel-track { gap: 16px; }
  .carousel-card { width: 80vw; }
  .carousel-header h2 { max-width: calc(100% - 100px); }
  .search-row { flex-direction: column; align-items: stretch; }
  .search-row button { width: 100%; margin-top: 8px; padding: 12px; }
  .article-thumbnail { height: 150px; }
  .article-title { padding: 12px; font-size: 1em; }
  .card-content { padding: 12px; }
  .card-title { font-size: 1em; }
  .card-description { font-size: 0.85em; }
  .search-results-container {
    grid-template-columns: 1fr; /* 手机上单列显示 */
  }
}

/* ===== Featured(特集記事) 弹窗样式 ===== */
.featured-detail-modal .modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--input-border);
}
.featured-detail-modal .fd-title { margin: 0; font-size: 1.4rem; }
.featured-detail-modal .modal-body { padding: 20px 24px; }
.featured-detail-modal .fd-cover {
  width: 100%; height: 220px; border-radius: 8px; background-size: cover;
  background-position: center; margin-bottom: 12px; border: 1px solid var(--input-border);
}
.featured-detail-modal .fd-content { line-height: 1.8; }
.featured-detail-modal .fd-link a { color: var(--btn-bg); text-decoration: none; }
.featured-detail-modal .fd-link a:hover { text-decoration: underline; }
.featured-detail-modal .modal-footer {
  padding: 12px 24px; border-top: 1px solid var(--input-border); display: flex; gap: 10px; justify-content: flex-end;
}
.featured-detail-modal .input { width:100%; margin-bottom:10px; }

.price-tiers { margin: 6px 0 10px; padding-left: 16px; }
.price-tier-row { display:flex; gap:8px; line-height:1.6; }
.price-tier-row .tier-label { min-width:6em; font-weight:600; }
.price-tier-row .tier-amount { min-width:4em; }
.pm-badge { display:inline-block; padding:.1em .5em; border:1px solid #ddd; border-radius:6px; margin-right:6px; }
