/*
 * TheOne Sense 內容區塊樣式
 * 介紹區塊、精選專題、精選音樂、推薦 Podcast
 * Version: 2.0.0
 */

/* ==========================================
   頁面全局設定
   ========================================== */

.theone-sense-page {
    position: relative;
}

/* ==========================================
   介紹區塊
   ========================================== */

.sense-intro-section {
    padding: 100px 20px;
    background: #ffffff;
    text-align: center;
    position: relative;
    z-index: 10;
}

.intro-container {
    max-width: 800px;
    margin: 0 auto;
}

.intro-title {
    font-size: 36px;
    font-weight: 300;
    color: #313632;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.intro-subtitle {
    font-size: 18px;
    font-weight: 400;
    color: #666;
    margin-bottom: 30px;
    letter-spacing: 1px;
}

.intro-description {
    font-size: 16px;
    line-height: 2;
    color: #666;
    font-weight: 300;
}

/* ==========================================
   內容展示區主容器
   ========================================== */

.sense-content-sections {
    padding: 80px 0;
    background: #f8f8f8;
    position: relative;
    z-index: 10;
}

.sense-content-sections .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================
   內容區塊
   ========================================== */

.content-block {
    margin-bottom: 80px;
}

.content-block:last-child {
    margin-bottom: 0;
}

/* ==========================================
   區塊標題
   ========================================== */

.section-title {
    font-size: 32px;
    margin-bottom: 40px;
    text-align: center;
    color: #313632;
    font-weight: 500;
    letter-spacing: 1px;
}

/* ==========================================
   分類頁籤
   ========================================== */

.category-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 24px;
    background: white;
    color: #313632;
    border: 1px solid #313632;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
}

.tab-btn:hover {
    background: #313632;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(49, 54, 50, 0.2);
}

.tab-btn.active {
    background: #313632;
    color: white;
    border: none;
}

/* ==========================================
   Swiper 輪播容器
   ========================================== */

.swiper {
    width: 100%;
    padding: 20px 50px;
    margin: 0 -50px;
    overflow: hidden;
}

.swiper-wrapper {
    display: flex;
    align-items: stretch;
}

.swiper-slide {
    height: auto;
    display: flex;
    flex-direction: column;
    padding-right: 50px; /* 為右側黑膠預留空間 */
    padding-bottom: 20px;
    overflow: visible !important; /* 強制讓黑膠可以溢出 */
}

/* 確保所有卡片高度一致 */
.swiper-slide .content-card {
    height: auto; /* 自動高度 */
}

/* Swiper 容器需要處理溢出的黑膠 */
.swiper {
    overflow: visible !important; /* 強制讓黑膠可以溢出 */
    padding-right: 60px; /* 為右側黑膠預留額外空間 */
}

.swiper-wrapper {
    overflow: visible !important; /* 強制讓黑膠可以溢出 */
}

/* ==========================================
   內容卡片
   ========================================== */

.content-card {
    background: white;
    border-radius: 2px; /* 改為 2px 圓角 */
    overflow: visible; /* 讓黑膠可以顯示 */
    box-shadow: none !important; /* 強制移除陰影 */
    transform: none !important; /* 強制移除任何位移 */
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2; /* 卡片在 z-index: 2 */
}

.content-card:hover {
    transform: none !important; /* 強制移除 hover 位移效果 */
    box-shadow: none !important; /* 強制移除陰影 */
}

/* ==========================================
   卡片媒體區域 - 添加黑膠唱片效果
   ========================================== */

.card-media {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 改為 1:1 正方形 */
    background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
    overflow: hidden; /* 圖片區域保持裁切 */
    border-radius: 2px 2px 0 0; /* 改為 2px 圓角 */
    z-index: 3; /* 圖片區域在最上層 */
}

/* 黑膠唱片層 - 放在卡片下層，從右側露出 */
.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: -60px; /* 平時露出約 85% */
    width: 100%;
    height: 0;
    padding-top: 100%; /* 1:1 正方形，與卡片同大小 */
    background-image: url('/wp-content/uploads/2025/10/vinyl.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 1 !important; /* 在卡片下層 */
    pointer-events: none;
    opacity: 0.95;
    filter: drop-shadow(-2px 4px 8px rgba(0, 0, 0, 0.3));
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover 時黑膠唱片抽出效果 */
.content-card:hover::before {
    right: -75px; /* Hover 時抽出更多，約 90% */
    transform: rotate(8deg); /* 旋轉 8° */
    opacity: 1;
}

/* 新區塊（中島生活、房內設施、Playground、餐飲體驗）不需要黑膠唱片裝飾 */
.island-life-block .content-card::before,
.room-facilities-block .content-card::before,
.playground-block .content-card::before,
.dining-block .content-card::before {
    display: none !important;
}

/* 新區塊不需要為黑膠預留空間 */
.island-life-block .swiper-slide,
.room-facilities-block .swiper-slide,
.playground-block .swiper-slide,
.dining-block .swiper-slide {
    padding-right: 0;
}

/* 統一所有卡片為 1:1 正方形 */
.featured-music .card-media,
.recommended-podcasts .card-media {
    padding-top: 100%; /* 1:1 正方形 */
}

.card-media img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* ==========================================
   播放按鈕
   ========================================== */

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.play-btn:hover {
    background: rgba(49, 54, 50, 0.95);
    transform: translate(-50%, -50%) scale(1.1);
}

.play-btn:hover svg {
    fill: white;
}

.play-btn svg {
    width: 24px;
    height: 24px;
    fill: #313632;
    transition: fill 0.3s ease;
    margin-left: 3px; /* 視覺對齊 */
}

/* ==========================================
   卡片資訊區域
   ========================================== */

.card-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white; /* 確保文字區背景不透明 */
    border-radius: 0 0 2px 2px; /* 改為 2px 圓角 */
    position: relative;
    z-index: 3; /* 文字區在最上層 */
}

.card-info h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #313632;
    font-weight: 600;
    line-height: 1.4;
}

.card-info p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

/* ==========================================
   Swiper 導航按鈕
   ========================================== */

.swiper-button-prev,
.swiper-button-next {
    color: #313632 !important;
    width: 44px !important;
    height: 44px !important;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.swiper-button-prev:after,
.swiper-button-next:after {
    font-size: 20px !important;
    font-weight: bold;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    background: #313632;
    color: white !important;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(49, 54, 50, 0.3);
}

.swiper-button-prev.swiper-button-disabled,
.swiper-button-next.swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ==========================================
   模態播放器
   ========================================== */

.modal-player {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
}

.modal-close:hover {
    transform: rotate(90deg);
    color: #ff4444;
}

.modal-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px;
}

.player-container {
    max-width: 1200px;
    width: 100%;
    color: white;
}

/* ==========================================
   響應式設計
   ========================================== */

@media (max-width: 1024px) {
    .sense-content-sections {
        padding: 60px 0;
    }

    .content-block {
        margin-bottom: 60px;
    }

    .section-title {
        font-size: 28px;
        margin-bottom: 30px;
    }

    .category-tabs {
        gap: 12px;
        margin-bottom: 40px;
    }

    .swiper {
        padding: 20px 40px;
        margin: 0 -40px;
    }
}

@media (max-width: 768px) {
    .sense-intro-section {
        padding: 60px 20px;
    }

    .intro-title {
        font-size: 28px;
    }

    .intro-subtitle {
        font-size: 16px;
    }

    .intro-description {
        font-size: 15px;
    }

    .sense-content-sections {
        padding: 40px 0;
    }

    .sense-content-sections .container {
        padding: 0 15px;
    }

    .content-block {
        margin-bottom: 40px;
    }

    .section-title {
        font-size: 24px;
        margin-bottom: 25px;
    }

    .category-tabs {
        gap: 10px;
        margin-bottom: 30px;
    }

    .tab-btn {
        padding: 8px 18px;
        font-size: 13px;
    }

    .swiper {
        padding: 20px 30px;
        margin: 0 -30px;
    }

    .card-info h3 {
        font-size: 16px;
    }

    .card-info p {
        font-size: 13px;
    }

    .play-btn {
        width: 50px;
        height: 50px;
    }

    .play-btn svg {
        width: 20px;
        height: 20px;
    }

    .swiper-button-prev,
    .swiper-button-next {
        width: 36px !important;
        height: 36px !important;
    }

    .swiper-button-prev:after,
    .swiper-button-next:after {
        font-size: 16px !important;
    }
}

@media (max-width: 480px) {
    .intro-title {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .intro-subtitle {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .intro-description {
        font-size: 14px;
    }

    .section-title {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .category-tabs {
        gap: 8px;
    }

    .tab-btn {
        padding: 6px 14px;
        font-size: 12px;
    }

    .swiper {
        padding: 15px 20px;
        margin: 0 -20px;
    }

    .card-info {
        padding: 15px;
    }

    .card-info h3 {
        font-size: 15px;
    }

    .card-info p {
        font-size: 12px;
    }

    .modal-content {
        padding: 20px;
    }
}

/* ==========================================
   平滑滾動效果
   ========================================== */

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }

    .content-card,
    .tab-btn,
    .play-btn {
        will-change: transform;
    }
}

/* ==========================================
   夜間漫遊區塊
   ========================================== */

.yinyou-block {
    margin-top: 100px;
    padding: 80px 0;
    background: #f8f8f6;
}

.yinyou-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 50px;
}

.yinyou-image {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.yinyou-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.yinyou-image:hover img {
    transform: scale(1.03);
}

.yinyou-image .placeholder-image {
    width: 100%;
    padding-top: 75%;
    background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
}

.yinyou-content {
    padding: 20px 0;
}

.yinyou-title {
    font-size: 2.2rem;
    font-weight: 500;
    color: #313632;
    margin-bottom: 30px;
    line-height: 1.3;
    letter-spacing: 0.05em;
}

.yinyou-description {
    font-size: 1.1rem;
    line-height: 2;
    color: #555;
    font-weight: 300;
}

.yinyou-description p {
    margin-bottom: 1em;
}

.yinyou-description p:last-child {
    margin-bottom: 0;
}

/* 夜間漫遊區塊響應式 */
@media (max-width: 1024px) {
    .yinyou-block {
        padding: 60px 0;
        margin-top: 60px;
    }

    .yinyou-layout {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 0 30px;
    }

    .yinyou-title {
        font-size: 1.8rem;
    }

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

@media (max-width: 768px) {
    .yinyou-block {
        padding: 40px 0;
        margin-top: 40px;
    }

    .yinyou-layout {
        padding: 0 20px;
        gap: 30px;
    }

    .yinyou-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    .yinyou-description {
        font-size: 0.95rem;
        line-height: 1.8;
    }
}

/* ==========================================
   印刷樣式
   ========================================== */

@media print {
    .modal-player,
    .play-btn,
    .swiper-button-prev,
    .swiper-button-next,
    .floating-nav-tabs {
        display: none !important;
    }

    .content-card {
        break-inside: avoid;
    }
}
