/**
 * @name: home.css
 * @description: 首頁專用樣式 - 水中月民宿
 * @version: 3.0.0
 */

/* ================================
   Section 通用樣式
   ================================ */
.home-section {
    position: relative;
}

.section-title {
    color: var(--text-primary);
    font-weight: 600;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    margin: 0.5rem auto 0;
}

.section-title.text-center::after {
    margin: 0.5rem auto 0;
}

.section-title:not(.text-center)::after {
    margin: 0.5rem 0 0;
}

.section-subtitle {
    color: var(--text-tertiary);
    font-size: 1rem;
    margin-top: 0.75rem;
}

/* 滾動進場動畫 */
.section-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.section-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ================================
   大幻燈片 (Hero Swiper)
   ================================ */
.hero-section {
    margin-bottom: 0;
}

.hero-swiper {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 400px;
    max-height: 700px;
}

.hero-swiper .swiper-slide {
    height: 60vh;
    min-height: 400px;
    max-height: 700px;
}

.hero-swiper .carousel-slide-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-swiper .carousel-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-swiper .carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hero-swiper .carousel-custom-html {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    pointer-events: auto;
}

.hero-swiper .carousel-content {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    padding: 2rem;
    z-index: 10;
}

.hero-swiper .carousel-content.align-left {
    text-align: left;
    padding-left: 10%;
}

.hero-swiper .carousel-content.align-center {
    text-align: center;
}

.hero-swiper .carousel-content.align-right {
    text-align: right;
    padding-right: 10%;
}

.hero-swiper .carousel-title {
    font-size: 3rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 1rem;
    color: inherit;
}

.hero-swiper .carousel-subtitle {
    font-size: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    margin-bottom: 2rem;
    color: inherit;
}

.hero-swiper .carousel-btn {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    border-radius: 50px;
    transition: all var(--transition-speed, 0.3s) ease;
}

.hero-swiper .carousel-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

/* Swiper 導航按鈕 */
.hero-swiper .swiper-button-prev,
.hero-swiper .swiper-button-next {
    color: rgba(255, 255, 255, 0.8);
    transition: all var(--transition-speed, 0.3s) ease;
}

.hero-swiper .swiper-button-prev:hover,
.hero-swiper .swiper-button-next:hover {
    color: #fff;
}

.hero-swiper .swiper-button-prev::after,
.hero-swiper .swiper-button-next::after {
    font-size: 1.5rem;
}

/* Swiper 分頁指示器 */
.hero-swiper .swiper-pagination {
    bottom: 1.5rem;
}

.hero-swiper .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
    transition: all var(--transition-speed, 0.3s) ease;
}

.hero-swiper .swiper-pagination-bullet-active {
    background: #fff;
    transform: scale(1.2);
}

/* 輪播載入狀態 */
.carousel-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60vh;
    min-height: 400px;
    background: var(--bg-secondary);
}

/* 空輪播佔位 */
.carousel-placeholder {
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    color: var(--text-secondary);
}

/* ================================
   民宿簡介區塊
   ================================ */
.about-section {
    background-color: var(--bg-primary);
}

.about-image-container {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.about-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

.about-image-placeholder {
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    color: var(--text-tertiary);
    font-size: 4rem;
}

.about-content {
    padding: 1rem 0;
}

.about-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    position: relative;
}

.about-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    margin-top: 0.75rem;
}

.about-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* ================================
   為什麼選擇我們
   ================================ */
.why-choose-section {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

.why-card {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--bg-primary);
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-speed, 0.3s) ease;
    height: 100%;
}

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

.why-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border-radius: 50%;
    font-size: 1.75rem;
    color: #fff;
}

.why-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.why-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0;
    line-height: 1.6;
}

/* ================================
   精選推薦（主打商品）
   ================================ */
.featured-section {
    background-color: var(--bg-primary);
}

/* 單一精選大圖 */
.featured-hero-card {
    background: var(--bg-secondary);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: box-shadow var(--transition-speed, 0.3s) ease;
}

.featured-hero-card:hover {
    box-shadow: var(--shadow-lg);
}

.featured-hero-image {
    position: relative;
    height: 100%;
    min-height: 350px;
}

.featured-hero-image img {
    width: 100%;
    height: 100%;
    min-height: 350px;
    object-fit: cover;
}

.featured-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary-color);
    color: #fff;
    padding: 0.35rem 1rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.featured-hero-body {
    padding: 2.5rem;
}

.featured-hero-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.featured-hero-summary {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.featured-hero-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* 多個精選卡片 */
.featured-card {
    display: block;
    background: var(--bg-secondary);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition: all var(--transition-speed, 0.3s) ease;
    height: 100%;
}

.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
}

.featured-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.featured-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.featured-card-body {
    padding: 1.25rem;
}

.featured-card-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.featured-card-summary {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-card-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* ================================
   熱門房型
   ================================ */
.hot-products-section {
    background-color: var(--bg-secondary);
}

.product-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition: all var(--transition-speed, 0.3s) ease;
    height: 100%;
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

.product-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.product-card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.product-card-summary {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.product-card-price {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.05rem;
}

.product-card-unit {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-tertiary);
}

.product-card-hover {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: #fff;
    padding: 2rem 1rem 1rem;
    text-align: center;
    opacity: 0;
    transition: opacity var(--transition-speed, 0.3s) ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.product-card:hover .product-card-hover {
    opacity: 1;
}

/* ================================
   促銷橫幅 CTA
   ================================ */
.cta-section {
    position: relative;
    background: linear-gradient(135deg, #1a1714 0%, #2e2a24 50%, #3d3632 100%);
    overflow: hidden;
}

.cta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/images/about-home.jpg') center/cover no-repeat;
    opacity: 0.15;
}

.cta-title {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
}

.cta-subtitle {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin-bottom: 0;
}

.btn-cta-primary {
    background: var(--primary-color);
    color: #fff;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    border: 2px solid var(--primary-color);
    transition: all var(--transition-speed, 0.3s) ease;
    display: inline-flex;
    align-items: center;
}

.btn-cta-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(195, 13, 35, 0.4);
}

.btn-cta-secondary {
    background: transparent;
    color: #fff;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.5);
    transition: all var(--transition-speed, 0.3s) ease;
    display: inline-flex;
    align-items: center;
}

.btn-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    color: #fff;
    transform: translateY(-2px);
}

/* ================================
   佈告欄（輕巧風格）
   ================================ */
.bulletin-section {
    background-color: var(--bg-secondary);
}

/* 輕巧佈告欄列表 */
.bulletin-list-compact {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.bulletin-item-compact {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px dashed var(--border-color);
    text-decoration: none;
    transition: all var(--transition-speed, 0.3s) ease;
}

.bulletin-item-compact:last-child {
    border-bottom: none;
}

.bulletin-item-compact:hover {
    text-decoration: none;
}

.bulletin-item-compact:hover .bulletin-compact-title {
    color: var(--primary-color);
}

/* 日期 */
.bulletin-item-compact .bulletin-compact-date {
    flex-shrink: 0;
    width: 100px;
    font-size: 0.875rem;
    color: var(--text-tertiary);
    font-weight: 400;
}

/* 標籤 */
.bulletin-item-compact .bulletin-compact-tag {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    padding: 0.35rem 0.875rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #fff;
    margin-right: 1.5rem;
    text-align: center;
}

/* 置頂圖標 */
.bulletin-item-compact .bulletin-compact-pinned {
    color: var(--primary-color);
    margin-right: 0.5rem;
    flex-shrink: 0;
}

/* 標題 */
.bulletin-item-compact .bulletin-compact-title {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color var(--transition-speed, 0.3s) ease;
}

/* 公告區空狀態 */
.bulletin-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    background: var(--bg-primary);
    border-radius: 0.5rem;
}

/* ================================
   合作夥伴
   ================================ */
.partners-section {
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-light);
}

.partners-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.partner-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    border: 1px solid var(--border-light);
    transition: all var(--transition-speed, 0.3s) ease;
    text-decoration: none;
    min-width: 120px;
    min-height: 60px;
}

.partner-logo:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
    text-decoration: none;
}

.partner-logo img {
    max-height: 40px;
    max-width: 120px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all var(--transition-speed, 0.3s) ease;
}

.partner-logo:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

.partner-text {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.partner-logo:hover .partner-text {
    color: var(--primary-color);
}

/* ================================
   載入狀態
   ================================ */
.section-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

/* ================================
   響應式設計
   ================================ */
@media (max-width: 992px) {
    .hero-swiper,
    .hero-swiper .swiper-slide,
    .carousel-loading,
    .carousel-placeholder {
        height: 50vh;
        min-height: 350px;
    }

    .hero-swiper .carousel-title {
        font-size: 2rem;
    }

    .hero-swiper .carousel-subtitle {
        font-size: 1.1rem;
    }

    .about-image {
        height: 300px;
    }

    .about-image-placeholder {
        height: 300px;
    }

    .about-title {
        font-size: 1.75rem;
    }

    .cta-title {
        font-size: 1.75rem;
    }

    .featured-hero-body {
        padding: 2rem;
    }

    .featured-hero-image {
        min-height: 280px;
    }

    .featured-hero-image img {
        min-height: 280px;
    }
}

@media (max-width: 768px) {
    .hero-swiper,
    .hero-swiper .swiper-slide,
    .carousel-loading,
    .carousel-placeholder {
        height: 40vh;
        min-height: 280px;
    }

    .hero-swiper .carousel-title {
        font-size: 1.5rem;
    }

    .hero-swiper .carousel-subtitle {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .hero-swiper .carousel-btn {
        padding: 0.5rem 1.5rem;
        font-size: 1rem;
    }

    .hero-swiper .carousel-content {
        padding: 1rem;
    }

    .hero-swiper .carousel-content.align-left,
    .hero-swiper .carousel-content.align-right {
        padding-left: 5%;
        padding-right: 5%;
    }

    .hero-swiper .swiper-button-prev,
    .hero-swiper .swiper-button-next {
        display: none;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .about-image {
        height: 250px;
    }

    .about-image-placeholder {
        height: 250px;
        font-size: 3rem;
    }

    .about-title {
        font-size: 1.5rem;
        margin-top: 1rem;
    }

    .about-description {
        font-size: 1rem;
    }

    /* CTA 響應式 */
    .cta-title {
        font-size: 1.5rem;
    }

    .cta-subtitle {
        font-size: 0.95rem;
    }

    .btn-cta-primary,
    .btn-cta-secondary {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        justify-content: center;
        margin-bottom: 0.75rem;
    }

    .btn-cta-primary {
        margin-right: 0 !important;
    }

    /* 熱門房型響應式 */
    .product-card-image {
        height: 180px;
    }

    .product-card-hover {
        display: none;
    }

    /* 精選響應式 */
    .featured-hero-image {
        min-height: 220px;
    }

    .featured-hero-image img {
        min-height: 220px;
    }

    .featured-hero-body {
        padding: 1.5rem;
    }

    .featured-hero-title {
        font-size: 1.4rem;
    }

    /* 為什麼選擇我們 響應式 */
    .why-card {
        padding: 1.5rem 1rem;
    }

    .why-icon {
        width: 56px;
        height: 56px;
        font-size: 1.4rem;
    }

    /* 輕巧佈告欄響應式 */
    .bulletin-item-compact {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .bulletin-item-compact .bulletin-compact-date {
        width: auto;
        order: 1;
    }

    .bulletin-item-compact .bulletin-compact-tag {
        min-width: auto;
        margin-right: 0;
        order: 2;
    }

    .bulletin-item-compact .bulletin-compact-title {
        width: 100%;
        order: 3;
        margin-top: 0.25rem;
    }

    .bulletin-item-compact .bulletin-compact-pinned {
        order: 0;
    }

    /* 合作夥伴響應式 */
    .partners-logos {
        gap: 1rem;
    }

    .partner-logo {
        padding: 0.75rem 1rem;
        min-width: 100px;
    }
}

@media (max-width: 576px) {
    .hero-swiper,
    .hero-swiper .swiper-slide,
    .carousel-loading,
    .carousel-placeholder {
        height: 35vh;
        min-height: 250px;
    }

    .hero-swiper .carousel-title {
        font-size: 1.25rem;
    }

    .hero-swiper .carousel-subtitle {
        font-size: 0.9rem;
    }

    .about-image {
        height: 200px;
    }

    .about-image-placeholder {
        height: 200px;
    }

    .bulletin-item-compact .bulletin-compact-tag {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }

    .bulletin-item-compact .bulletin-compact-date {
        font-size: 0.8rem;
    }

    .product-card-image {
        height: 160px;
    }

    .featured-card-image {
        height: 180px;
    }

    .category-card {
        padding: 1.5rem 1rem;
    }

    .category-card-icon {
        width: 64px;
        height: 64px;
    }
}
