/* 根元素變數 */
:root {
    --primary-color: #2c5f5d;
    --secondary-color: #3d8b85;
    --accent-color: #5fb3ad;
    --text-color: #333;
    --light-text: #707070;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* 全域樣式 */
* {
    transition: all 0.3s ease;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

/* 導航列 */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: var(--white) !important;
    box-shadow: var(--shadow-hover);
}

.navbar-brand img {
    width: 90px;
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 10px;
    color: var(--text-color) !important;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

/* 英雄區塊 */
.hero {
    height: 100vh;
    background: linear-gradient(135deg, rgba(44, 95, 93, 0.8), rgba(91, 179, 173, 0.6)),
                url("https://a0.muscache.com/im/pictures/miso/Hosting-763485625790254002/original/e78619de-89ec-4543-9f88-abcb3e762fc9.jpeg?im_w=1200");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(44, 95, 93, 0.3), rgba(91, 179, 173, 0.2));
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease-out;
}

.hero p.lead {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 0.3s both;
}

/* 按鈕樣式 */
.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    background: linear-gradient(45deg, var(--accent-color), var(--primary-color));
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 28px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* 一般樣式 */
h3 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-color);
    margin-bottom: 1rem;
}

p {
    color: var(--light-text);
    font-size: 1.1rem;
    line-height: 1.8;
}

img {
    max-width: 100%;
    height: auto;
}

/* 功能區塊 */
.features {
    padding: 100px 0;
    background: var(--white);
}

.features h3 {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
}

.features h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.feature-card {
    text-align: center;
    padding: 30px 20px;
    border-radius: 15px;
    transition: all 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    background: var(--white);
}

.feature-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
    object-fit: cover;
}

.feature-card:hover img {
    transform: scale(1.1);
}

.feature-card h5 {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 15px;
}

.feature-card p {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* 最新消息區塊 */
.latest {
    padding: 100px 0;
    background: var(--light-bg);
}

.latest h3 {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
}

.latest h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.news-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    height: 100%;
}

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

.news-card img {
    height: 250px;
    width: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* 內部環境卡片圖片統一高度 */
.hover-card .card-img-top {
    height: 250px;
    width: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover img,
.hover-card:hover .card-img-top {
    transform: scale(1.05);
}

.news-card .card-body {
    padding: 25px;
}

.news-card h5 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 15px;
    line-height: 1.4;
}

.news-card p {
    font-size: 0.95rem;
    color: var(--light-text);
    line-height: 1.6;
    margin-bottom: 20px;
}

.news-card .btn-sm {
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* 預訂區塊 */
.booking-section {
    background: linear-gradient(135deg, 
        rgba(44, 95, 93, 0.95) 0%, 
        rgba(61, 139, 133, 0.9) 50%, 
        rgba(95, 179, 173, 0.85) 100%),
        url('https://images.unsplash.com/photo-1559827260-dc66d52bef19?ixlib=rb-4.0.3&auto=format&fit=crop&w=2000&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
}

.booking-content {
    position: relative;
    z-index: 2;
}

.booking-badge .badge {
    font-weight: 600;
    border-radius: 25px;
    animation: pulse 2s infinite;
}

.booking-features .feature-item {
    transition: transform 0.3s ease;
}

.booking-features .feature-item:hover {
    transform: translateX(10px);
}

.booking-features i {
    font-size: 1.1rem;
}

.booking-buttons .btn {
    font-weight: 600;
    border-radius: 25px;
    transition: all 0.3s ease;
    min-width: 160px;
}

.booking-buttons .btn-warning {
    background: linear-gradient(45deg, #ffc107, #ffeb3b);
    border: none;
    color: #000;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.booking-buttons .btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.4);
    background: linear-gradient(45deg, #ffeb3b, #ffc107);
}

.booking-buttons .btn-outline-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.booking-image-gallery {
    position: relative;
}

.image-card {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.image-card:hover {
    transform: scale(1.02);
}

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

.image-card.main-image img {
    height: 300px;
}

.image-card:not(.main-image) img {
    height: 150px;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.1));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-card:hover .image-overlay {
    opacity: 1;
}

.play-button {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.play-button:hover {
    background: var(--white);
    transform: scale(1.1);
}

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

.image-count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* 背景裝飾 */
.booking-bg-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.decoration-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.circle-1 {
    width: 100px;
    height: 100px;
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}

.circle-2 {
    width: 150px;
    height: 150px;
    bottom: 20%;
    left: 5%;
    animation-delay: 2s;
}

.circle-3 {
    width: 80px;
    height: 80px;
    top: 60%;
    right: 20%;
    animation-delay: 4s;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* 響應式設計 - 預訂區塊 */
@media (max-width: 991px) {
    .booking-section {
        background-attachment: scroll;
    }
    
    .booking-content {
        text-align: center;
        margin-bottom: 3rem;
    }
    
    .booking-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .image-card.main-image img {
        height: 250px;
    }
}

@media (max-width: 576px) {
    .booking-section {
        padding: 3rem 0;
    }
    
    .booking-content h2 {
        font-size: 2rem;
    }
    
    .booking-features {
        text-align: left;
    }
    
    .image-card.main-image img {
        height: 200px;
    }
    
    .image-card:not(.main-image) img {
        height: 120px;
    }
}

/* 頁尾 */
footer {
    background: var(--text-color);
    color: var(--white);
    padding: 60px 0 40px;
    margin-top: 0;
    border-top: none;
}

footer img {
    width: 90px;
    border-radius: 10px;
    margin-bottom: 20px;
}

footer h5 {
    color: var(--white);
    font-weight: 600;
    margin-bottom: 20px;
}

footer p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    line-height: 1.6;
}

footer .list-unstyled li {
    margin-bottom: 8px;
}

footer .list-unstyled a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer .list-unstyled a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    margin-top: 40px;
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* 動畫效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 響應式設計 */
@media (max-width: 768px) {
    .hero {
        height: 80vh;
        background-attachment: scroll;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p.lead {
        font-size: 1.1rem;
    }
    
    .features,
    .latest {
        padding: 60px 0;
    }
    
    .features h3,
    .latest h3 {
        margin-bottom: 50px;
    }
    
    .feature-card,
    .news-card {
        margin-bottom: 30px;
    }
    
    .navbar-brand img {
        width: 70px;
    }
    
    /* 手機版內部環境卡片圖片高度調整 */
    .hover-card .card-img-top {
        height: 200px;
    }
}

@media (max-width: 576px) {
    .hero {
        height: 70vh;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .features,
    .latest {
        padding: 40px 0;
    }
    
    .btn-primary,
    .btn-outline-primary {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* 滾動條美化 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}