/* Bootstrap 自定義樣式 */
:root {
    --bs-primary: #8b5a5a;
    --bs-primary-rgb: 139, 90, 90;
    --primary-color: #8b5a5a;
    --secondary-color: #d4a574;
    --accent-color: #f4f1ea;
    --text-color: #333;
    --light-bg: #fafafa;
}

/* 重置和基礎樣式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans TC', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
}

/* Bootstrap 覆蓋樣式 */
.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

.btn-primary:hover {
    background-color: #6d4343 !important;
    border-color: #6d4343 !important;
    color: white !important;
}

.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
    background-color: #6d4343 !important;
    border-color: #6d4343 !important;
    color: white !important;
    box-shadow: 0 0 0 0.25rem rgba(139, 90, 90, 0.25) !important;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 滾動到頂部按鈕專用樣式 */
.scroll-to-top {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
    transition: all 0.3s ease !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.scroll-to-top.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.scroll-to-top:hover {
    background-color: #6d4343 !important;
    border-color: #6d4343 !important;
    color: white !important;
    transform: translateY(-2px) !important;
}

.scroll-to-top:focus,
.scroll-to-top:active,
.scroll-to-top.active {
    background-color: #6d4343 !important;
    border-color: #6d4343 !important;
    color: white !important;
    box-shadow: 0 0 0 0.25rem rgba(139, 90, 90, 0.25) !important;
}

/* 服裝建議區段樣式 */
.dresscode-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.dresscode-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(139, 90, 90, 0.1);
}

.dresscode-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
    border-color: var(--primary-color);
}

.dresscode-icon i {
    transition: all 0.3s ease;
}

.dresscode-card:hover .dresscode-icon i {
    transform: scale(1.1);
}

.dresscode-note {
    border-left: 4px solid var(--primary-color);
    background: linear-gradient(135deg, rgba(139, 90, 90, 0.05) 0%, rgba(139, 90, 90, 0.1) 100%);
}

.dresscode-image img {
    /* transition: all 0.3s ease; */
    /* border: 3px solid var(--primary-color); */
}

.dresscode-image img:hover {
    /* transform: scale(1.02); */
    /* box-shadow: 0 15px 35px rgba(139, 90, 90, 0.3) !important; */
}

/* 防止橫向滾動 */
html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* 確保所有容器不超出螢幕寬度 */
.container, .container-fluid {
    max-width: 100vw;
    overflow-x: hidden;
}

/* 在手機上將左右滑入動畫改為淡入動畫，保持其他 AOS 效果 */
@media (max-width: 768px) {
    /* 重置左右滑入動畫的 transform，改為淡入效果 */
    [data-aos="fade-left"], 
    [data-aos="fade-right"] {
        transform: none !important;
        opacity: 0;
        transition: opacity 1s ease;
    }
    
    [data-aos="fade-left"].aos-animate, 
    [data-aos="fade-right"].aos-animate {
        transform: none !important;
        opacity: 1;
    }
}

/* 確保圖片不會溢出 */
img {
    max-width: 100%;
    height: auto;
}

/* 防止 Swiper 溢出 */
.swiper {
    overflow: hidden;
}

/* 額外保護：防止任何元素超出螢幕寬度 */
* {
    max-width: 100vw;
    box-sizing: border-box;
}

/* RSVP 按鈕樣式 - 現代漸層設計 */
.rsvp-btn {
    background: linear-gradient(135deg, #d4a574 0%, #c19760 25%, #b8956a 50%, #a68556 75%, #8b6914 100%);
    border: none;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.8px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 15px rgba(212, 165, 116, 0.3),
        0 2px 8px rgba(139, 105, 20, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    color: white !important;
    position: relative;
    overflow: hidden;
}

.rsvp-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.rsvp-btn:hover::before {
    left: 100%;
}

.rsvp-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 8px 25px rgba(212, 165, 116, 0.4),
        0 4px 15px rgba(139, 105, 20, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #e2b482 0%, #d4a574 25%, #c19760 50%, #b8956a 75%, #a68556 100%);
    color: white !important;
    letter-spacing: 1px;
}

.rsvp-btn:active {
    transform: translateY(-1px) scale(1.01);
    transition: all 0.1s ease;
}

.rsvp-card {
    transition: transform 0.3s ease;
}

.rsvp-card:hover {
    transform: translateY(-5px);
}

/* 現代按鈕樣式 */
.modern-btn {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.9) 0%, rgba(193, 151, 96, 0.9) 25%, rgba(184, 149, 106, 0.9) 50%, rgba(166, 133, 86, 0.9) 75%, rgba(139, 105, 20, 0.9) 100%) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 50px !important;
    font-weight: 600 !important;
    letter-spacing: 0.8px !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 
        0 4px 15px rgba(212, 165, 116, 0.3),
        0 2px 8px rgba(139, 105, 20, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    position: relative !important;
    overflow: hidden !important;
}

.modern-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.modern-btn:hover::before {
    left: 100%;
}

.modern-btn:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 
        0 8px 25px rgba(212, 165, 116, 0.4),
        0 4px 15px rgba(139, 105, 20, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    background: linear-gradient(135deg, rgba(226, 180, 130, 0.95) 0%, rgba(212, 165, 116, 0.95) 25%, rgba(193, 151, 96, 0.95) 50%, rgba(184, 149, 106, 0.95) 75%, rgba(166, 133, 86, 0.95) 100%) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: white !important;
    letter-spacing: 1px !important;
}

/* 婚禮流程 section 置中樣式 */
.combined-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 婚禮流程時間軸簡潔樣式 */
.curved-timeline {
    max-width: 500px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    text-align: center;
}

.timeline-marker {
    margin: 0 auto 1rem auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-marker:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.timeline-content {
    text-align: center;
    padding: 0 15px;
    position: relative;
}

.timeline-time {
    display: inline-block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.timeline-title {
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
}

.timeline-description {
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.5;
}

.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

/* 導航欄 */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.navbar-brand {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--primary-color) !important;
}

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

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

/* 漢堡選單樣式 */
.navbar-toggler {
    border: 2px solid var(--primary-color) !important;
    padding: 8px 10px;
    background: transparent !important;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(139, 90, 90, 0.25);
}

.navbar-toggler:hover {
    background-color: rgba(139, 90, 90, 0.1) !important;
}

/* 自定義漢堡圖標動畫 */
.navbar-toggler-icon {
    background-image: none !important;
    position: relative;
    width: 24px;
    height: 18px;
    display: block;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
    transform-origin: center;
}

.navbar-toggler-icon::before {
    top: 0;
}

.navbar-toggler-icon::after {
    bottom: 0;
}

/* 中間線條 */
.navbar-toggler-icon {
    background-color: var(--primary-color);
    height: 2px;
    width: 24px;
    margin: 8px 0;
    transition: all 0.3s ease;
}

/* 展開狀態（X形狀）*/
.navbar-toggler.active .navbar-toggler-icon::before {
    top: 8px;
    transform: rotate(45deg);
}

.navbar-toggler.active .navbar-toggler-icon::after {
    bottom: 8px;
    transform: rotate(-45deg);
}

.navbar-toggler.active .navbar-toggler-icon {
    background-color: transparent;
}

/* 移除舊的導航樣式，改用 Bootstrap */

/* 主頁面 */
.hero {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #8b5a5a, #d4a574, #f5e6d3);
    background-image: url('images/banner.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

.hero-content {
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Hero section 內容樣式 */
.names {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    animation: fadeInUp 1s ease-out;
}

.date {
    letter-spacing: 2px;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.subtitle {
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.invitation-text {
    animation: fadeInUp 1s ease-out 0.9s both;
}

.cta-button {
    animation: fadeInUp 1s ease-out 1.2s both;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* 使用 Bootstrap utilities，移除多餘的樣式 */

/* 關於我們 */
/* 區塊標題樣式 */
.section-title {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
}

/* 移除舊的人物樣式，使用 Bootstrap */

/* 心形圖標動畫 */
.heart-icon {
    animation: pulse 2s infinite;
}

/* 愛情時光軸樣式 */
.timeline-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.love-timeline .story-card {
    border: 1px solid rgba(139, 90, 90, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.love-timeline .story-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(139, 90, 90, 0.15) !important;
}

.story-date {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
}

/* 邀請訊息樣式 */
.invitation-message-section {
    background: linear-gradient(135deg, #f4f1ea 0%, #e8e2d4 100%);
}

.invitation-card {
    border: 1px solid rgba(139, 90, 90, 0.1);
}

.invitation-card .signature {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* 故事內容樣式 */
.story-content p {
    text-align: justify;
    line-height: 1.8;
    color: #555;
}

.message-content p {
    text-align: left;
    line-height: 1.8;
    color: #555;
}

/* 婚禮詳情 - 移除多餘樣式，使用 Bootstrap cards */

/* 移除舊的詳情樣式，使用 Bootstrap cards */

/* Timeline 樣式保留 */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
}

.timeline-item {
    position: relative;
    padding-left: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 0.5rem;
    width: 1rem;
    height: 1rem;
    background: var(--primary-color);
    border-radius: 50%;
}

/* 組合 section - 婚禮流程 & 直式照片集 */

/* Swiper 樣式保留 */
.gallery-swiper, .landscape-gallery-swiper {
    width: 100%;
    padding: 0 0 0 0;
}

.gallery-swiper .swiper-slide,
.landscape-gallery-swiper .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery-item {
    width: 100%;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.gallery-item img {
    width: 100%;
    display: block;
    object-fit: cover;
}

/* 直式照片樣式 */
.gallery-item.portrait {
    /* max-width: 350px; */
    margin: 0 auto;
}

.gallery-item.portrait img {
    /* height: 450px; */
    aspect-ratio: 3/4;
}

/* 橫式照片樣式 */
.gallery-item.landscape {
    width: 100%;
    margin: 0 auto;
}

.gallery-item.landscape img {
    width: 100%;
    aspect-ratio: 5/3;
}

/* Swiper 自定義樣式 */
.gallery-swiper .swiper-pagination,
.landscape-gallery-swiper .swiper-pagination {
    bottom: 10px;
}

.gallery-swiper .swiper-pagination-bullet,
.landscape-gallery-swiper .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: #ccc;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.gallery-swiper .swiper-pagination-bullet-active,
.landscape-gallery-swiper .swiper-pagination-bullet-active {
    background: var(--primary-color);
    opacity: 1;
    transform: scale(1.2);
}

.gallery-swiper .swiper-pagination-bullet:hover,
.landscape-gallery-swiper .swiper-pagination-bullet:hover {
    background: #8b5a5a;
    transform: scale(1.1);
}

/* 移除 RSVP 舊樣式，使用 Bootstrap form classes */

/* Footer 樣式保留，但移除舊的 grid 樣式 */

/* 移除舊按鈕樣式，已在 HTML 中使用 Bootstrap */

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

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

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

/* 響應式設計 - 簡化版本，使用 Bootstrap 的響應式系統 */
@media (max-width: 768px) {
    .hero-background {
        background-image: url('images/banner_s.jpg');
    }
    
    .names {
        font-size: 2.5rem !important;
    }
    
    .section-title {
        font-size: 2rem !important;
    }
}

@media (max-width: 480px) {
    .hero-background {
        background-image: url('images/banner_s.jpg');
        background-position: center center;
        background-attachment: scroll;
    }
    
    .names {
        font-size: 2rem !important;
    }
    
    .date {
        font-size: 1.2rem !important;
    }
    
    .subtitle {
        font-size: 1rem !important;
    }
    
    /* 直式照片手機版 */
    .gallery-item.portrait {
        /* max-width: 250px; */
    }
    
    .gallery-item.portrait img {
        /* height: 300px; */
    }
    
    /* 橫式照片手機版 */
    .gallery-item.landscape {
        /* max-width: 320px; */
    }
    
    .gallery-item.landscape img {
        /* height: 200px; */
    }
    
    .gallery-swiper, .landscape-gallery-swiper {
        /* padding: 0 0 40px 0; */
    }
}

/* 額外的樣式 */
[data-aos] {
    pointer-events: none;
}

[data-aos].aos-animate {
    pointer-events: auto;
}

/* 載入動畫 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
