/* 全域樣式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #333;
    padding-top: 64px; /* 對應固定導覽列 nav 的實際高度，避免蓋住第一個區塊 */
}

/* 平滑滾動 */
html {
    scroll-behavior: smooth;
}

/* 導航列樣式 */
.nav-link {
    position: relative;
    color: #4b5563;
    font-weight: 700;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #2563eb;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #2563eb;
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

/* 主視覺區 */
.hero-section {
    background: #ffffff;
    min-height: 500px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    border: 8px solid transparent;
    border-image: linear-gradient(135deg, #e91e63, #9c27b0, #2196f3, #e91e63) 1;
    box-shadow: 
        inset 0 0 0 2px rgba(233, 30, 99, 0.1),
        0 10px 40px rgba(233, 30, 99, 0.15);
    margin: 20px;
    border-radius: 20px;
}

/* 6 個等距小 LOGO - 使用獨立元素 */
.hero-section::before {
    content: none;
}

/* LOGO 項目樣式 */
.logo-item {
    position: absolute;
    width: 107px;
    height: 107px;
    opacity: 0.15;
    perspective: 1000px;
    z-index: 1;
}

.logo-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: flip 8s ease-in-out infinite;
    transform-style: preserve-3d;
}

/* 每個 LOGO 的位置 */
.logo-1 { top: 15%; left: 10%; }
.logo-2 { top: 10%; left: 45%; }
.logo-3 { top: 20%; left: 85%; }
.logo-4 { top: 70%; left: 15%; }
.logo-5 { top: 75%; left: 80%; }
.logo-6 { top: 72%; left: 50%; }

/* 所有 LOGO 同時翻轉 - 移除動畫延遲 */
.logo-1 img { animation-delay: 0s; }
.logo-2 img { animation-delay: 0s; }
.logo-3 img { animation-delay: 0s; }
.logo-4 img { animation-delay: 0s; }
.logo-5 img { animation-delay: 0s; }
.logo-6 img { animation-delay: 0s; }

/* 移除第二層 */
.hero-section::after {
    content: none;
}

/* 文字區域 */
.hero-section .container {
    position: relative;
    z-index: 10;
}

@keyframes flip {
    0% {
        transform: rotateY(0deg);
    }
    25% {
        transform: rotateY(90deg);
    }
    50% {
        transform: rotateY(180deg);
    }
    75% {
        transform: rotateY(270deg);
    }
    100% {
        transform: rotateY(360deg);
    }
}

/* 動畫效果 */
.animate-fade-in {
    animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 卡片懸浮效果 */
.hover\:shadow-xl:hover {
    transform: translateY(-5px);
}

/* 表單樣式增強 */
input:focus,
textarea:focus {
    outline: none;
}

/* 按鈕效果 */
button {
    cursor: pointer;
    transition: all 0.3s ease;
}

button:active {
    transform: scale(0.98);
}

/* 區塊間距 */
section {
    scroll-margin-top: 80px;
}

/* 響應式調整 */
@media (max-width: 768px) {
    .hero-section {
        min-height: 400px;
    }
    
    .hero-section h2 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
}

/* 載入動畫 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* 成功/錯誤訊息樣式 */
.success-message {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.error-message {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* 滾動條樣式 */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 模態框樣式 */
#roomModal {
    animation: fadeIn 0.3s ease;
}

#roomModal > div {
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 模態框內的圖片懸浮效果 */
#roomModal img {
    transition: transform 0.3s ease;
}

#roomModal img:hover {
    transform: scale(1.05);
}

/* 防止背景滾動 */
body.modal-open {
    overflow: hidden;
}

/* 照片燈箱樣式 */
#lightbox {
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(5px);
}

#lightboxImage {
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* 照片縮圖懸浮提示 */
.cursor-pointer:hover {
    transform: scale(1.02);
}

/* 關於我們區塊 - 菱形花紋與光澤效果 */
#about {
    position: relative;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 50%, #f0fdf4 100%);
}

#about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(16, 185, 129, 0.03) 35px, rgba(16, 185, 129, 0.03) 70px),
        repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(16, 185, 129, 0.03) 35px, rgba(16, 185, 129, 0.03) 70px);
    z-index: 1;
}

#about::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.4) 0%, 
        rgba(255, 255, 255, 0.1) 25%, 
        transparent 50%, 
        rgba(255, 255, 255, 0.1) 75%, 
        rgba(255, 255, 255, 0.3) 100%);
    z-index: 2;
    pointer-events: none;
}

#about > .container {
    position: relative;
    z-index: 3;
}
