/**
 * @name: rooms.css
 * @description: 房型介紹頁樣式 - 水中月民宿
 * @version: 2.0.0
 * @author: Baiya Wang
 */

/* ================================
   Hero 區塊
   ================================ */
.rooms-hero {
    padding: 4.5rem 0 3.5rem;
    text-align: center;
    background-color: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.rooms-hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -15%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    opacity: 0.03;
    border-radius: 50%;
    pointer-events: none;
}

.rooms-hero::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    opacity: 0.03;
    border-radius: 50%;
    pointer-events: none;
}

.rooms-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    letter-spacing: 0.08em;
}

.rooms-title i {
    color: var(--primary-color);
}

.rooms-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 0;
    line-height: 1.8;
    letter-spacing: 0.03em;
}

/* 裝飾性分隔線 ——•—— */
.hero-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 1rem auto 0;
}

.hero-divider::before,
.hero-divider::after {
    content: '';
    height: 1px;
    width: 40px;
    background: var(--primary-color);
    opacity: 0.4;
}

.hero-divider .divider-dot {
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.6;
}

/* ================================
   房型列表區塊
   ================================ */
.rooms-section {
    padding: 3.5rem 0;
    background-color: var(--bg-primary);
}

/* ================================
   房型卡片
   ================================ */
.room-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.room-card-link:hover {
    text-decoration: none;
    color: inherit;
}

.room-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    overflow: hidden;
    transition: transform var(--transition-speed) ease,
                box-shadow var(--transition-speed) ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.room-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

/* 房型圖片 */
.room-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: var(--bg-tertiary);
}

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

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

.room-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 3rem;
}

/* 房型資訊 */
.room-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.room-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.03em;
}

.room-summary {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    line-height: 1.7;
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.room-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

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

.room-price small {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-tertiary);
}

.room-detail-btn {
    font-size: 0.875rem;
    color: var(--primary-color);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: gap var(--transition-speed) ease;
}

.room-card:hover .room-detail-btn {
    gap: 0.6rem;
}

/* ================================
   Loading 骨架屏
   ================================ */
.rooms-loading .placeholder-card {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    background-color: var(--bg-secondary);
}

.rooms-loading .room-image {
    padding-top: 66.67%;
    background-color: var(--bg-tertiary);
}

/* ================================
   Booking.com CTA
   ================================ */
.rooms-booking-section {
    padding: 3rem 0;
    background-color: var(--bg-primary);
}

.booking-cta {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border-radius: 20px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.booking-cta::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -8%;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.booking-cta::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: 5%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.booking-cta-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.booking-icon {
    flex-shrink: 0;
    width: 68px;
    height: 68px;
    background: rgba(255,255,255,0.15);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.booking-icon i {
    font-size: 1.8rem;
    color: #fff;
}

.booking-text {
    flex: 1;
}

.booking-text h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.35rem;
}

.booking-text p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 0;
    line-height: 1.6;
}

.booking-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 0.8rem 2rem;
    background: rgba(255,255,255,0.95);
    color: var(--primary-color);
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: transform var(--transition-speed) ease,
                box-shadow var(--transition-speed) ease;
    white-space: nowrap;
}

.booking-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    color: var(--primary-color);
    text-decoration: none;
}

/* 暗色主題 CTA — 深色底 + 金色調 */
[data-theme="dark"] .booking-cta {
    background: linear-gradient(135deg, #2e2a24 0%, #1a1714 100%);
    border: 1px solid rgba(212, 175, 55, 0.25);
}

[data-theme="dark"] .booking-icon {
    background: rgba(212, 175, 55, 0.15);
}

[data-theme="dark"] .booking-icon i {
    color: var(--primary-color);
}

[data-theme="dark"] .booking-text h2 {
    color: var(--primary-color);
}

[data-theme="dark"] .booking-text p {
    color: var(--text-secondary);
}

[data-theme="dark"] .booking-btn {
    background: var(--primary-color);
    color: var(--text-inverse);
}

[data-theme="dark"] .booking-btn:hover {
    background: var(--primary-hover);
    color: var(--text-inverse);
}

/* ================================
   住宿須知
   ================================ */
.rooms-info-section {
    padding: 4rem 0;
    background-color: var(--bg-secondary);
}

.info-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-align: center;
    letter-spacing: 0.05em;
}

.info-title i {
    color: var(--primary-color);
}

/* Section 小分隔線 */
.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 0 auto 2.5rem;
}

.section-divider::before,
.section-divider::after {
    content: '';
    height: 1px;
    width: 30px;
    background: var(--primary-color);
    opacity: 0.4;
}

.section-divider .divider-dot {
    width: 5px;
    height: 5px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.6;
}

.info-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: transform var(--transition-speed) ease,
                box-shadow var(--transition-speed) ease;
    height: 100%;
}

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

.info-card-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-speed) ease;
}

.info-card:hover .info-card-icon {
    transform: scale(1.08);
}

.info-card-icon i {
    font-size: 1.5rem;
    color: #fff;
}

[data-theme="dark"] .info-card-icon i {
    color: var(--text-inverse);
}

.info-card h5 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    letter-spacing: 0.03em;
}

.info-card p {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    line-height: 1.7;
    margin-bottom: 0;
}

/* ================================
   Scroll Reveal 動畫
   ================================ */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ================================
   響應式設計
   ================================ */
@media (max-width: 992px) {
    .rooms-hero {
        padding: 3.5rem 0 2.5rem;
    }

    .rooms-title {
        font-size: 1.85rem;
    }

    .rooms-section {
        padding: 2.5rem 0;
    }
}

@media (max-width: 768px) {
    .rooms-hero {
        padding: 3rem 0 2rem;
    }

    .rooms-title {
        font-size: 1.5rem;
    }

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

    .rooms-section {
        padding: 2rem 0;
    }

    .room-info {
        padding: 1.25rem;
    }

    .room-name {
        font-size: 1.1rem;
    }

    /* Booking CTA */
    .booking-cta {
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }

    .booking-cta-content {
        flex-direction: column;
        text-align: center;
        gap: 1.25rem;
    }

    .booking-text h2 {
        font-size: 1.2rem;
    }

    .booking-btn {
        width: 100%;
        justify-content: center;
    }

    /* Info */
    .rooms-info-section {
        padding: 3rem 0;
    }

    .info-card {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 576px) {
    .rooms-hero {
        padding: 2.5rem 0 1.75rem;
    }

    .rooms-title {
        font-size: 1.35rem;
    }

    .info-card-icon {
        width: 56px;
        height: 56px;
    }

    .info-card-icon i {
        font-size: 1.3rem;
    }
}
