/* General Styles */
body {
    font-family: 'Cormorant Garamond', serif;
    background-color: #fdfdf9;
    color: #333;
    margin: 0;
    text-align: center;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}


/* Navigation */
.top-nav {
    padding: 20px 40px;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-item {
    font-size: 1rem;
    letter-spacing: 2px;
}

.hamburger {
    display: none;
    cursor: pointer;
    padding: 10px;
    z-index: 20;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Hamburger Animation to "X" */
.hamburger.active div:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active div:nth-child(2) {
    opacity: 0;
}

.hamburger.active div:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.nav-links-container {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fdfdf9;
    width: 100%;
    padding: 12px 18px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    z-index: 15;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.nav-links-container.open {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: #333;
    text-decoration: none;
    font-size: 1rem;
    letter-spacing: 2px;
    font-weight: 600;
    transition: color 0.3s ease;
    display: block;
    padding: 8px 0;
    text-align: center;
    white-space: nowrap; /* 防止導覽列文字換行 */
}

.nav-links a:hover {
    color: #555;
}

/* 大螢幕：顯示選單、隱藏漢堡 */
@media (min-width: 769px) {
    .hamburger { display: none; }

    .nav-links-container {
        display: flex !important;
        position: static;
        width: auto;
        background: transparent;
        padding: 0;
        opacity: 1; /* 確保在大螢幕上可見 */
        transform: none; /* 移除小螢幕的 transform 效果 */
        box-shadow: none;
        align-items: center;
    }

    .nav-links {
        flex-direction: row; /* 確保連結水平排列 */
        white-space: nowrap;
    }
}
/* Responsive Styles - 合併所有 max-width: 768px 的規則 */
@media (max-width: 768px) {
    /* 在手機/小螢幕上顯示漢堡並隱藏 menu，點擊時用 .open 顯示 */
    .nav-container {
        justify-content: center; /* 讓剩餘的 flex item (nav-item) 置中 */
    }

    .hamburger {
        display: block;
        position: absolute; /* 脫離排版流程，以便 nav-item 置中 */
        right: 0; /* 靠右對齊 */
        transform: scale(0.8); /* 將圖示縮小 */
    }

    /* 移除 .nav-links-container 的 left: 0，使其在 .nav-container 內對齊 */
    .nav-links-container { left: 0; }

    .nav-links {
        display: flex;
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }

    .nav-links a {
        display: block;
        width: 100%;
        padding: 8px 0;
        text-align: center;
    }
}

/* Hero Section */
.hero-section {
    padding: 40px 20px;
}

.names {
   
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 4px;
    margin-bottom: 20px;
}

.date {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 40px;
}

/* Swiper Carousel */
.swiper-container {
    width: 100%;
    padding-top: 50px;
    padding-bottom: 50px;
    margin-bottom: 20px;
}

.swiper-slide {
    background-position: center;
    background-size: cover;
    width: 300px;
    height: 300px;
    transition: transform 0.5s ease, opacity 0.5s ease;
    opacity: 0.5;
    transform: scale(0.8);
}

.swiper-slide-active {
    opacity: 1;
    transform: scale(1.2);
}

/* 輪播卡片中用於容納兩張照片的容器 */
.slide-image-container {
    display: flex; /* 使用 flexbox 讓圖片並排 */
    width: 100%;
    height: 100%;
    gap: 4px; /* 圖片之間的間距 */
}

.slide-image-container img {
    width: 50%; /* 每張圖片佔據容器的一半寬度 */
    object-fit: cover; /* 保持圖片比例並填滿空間 */
}

.swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.invitation-text {
    font-size: 1.1rem;
    line-height: 1.6;
    letter-spacing: 1px;
}

.invitation-text .english-text {
    font-size: 0.9rem;
    letter-spacing: 2px;
    margin-top: 10px;
}

/* Schedule Section */
.dark-section {
    background-color: #222;
    color: #fdfdf9;
    padding: 60px 20px;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 50px;
}

.schedule-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

.schedule-item .time {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.schedule-item .event {
    font-size: 1rem;
    letter-spacing: 2px;
}

.rsvp-btn {
    background-color: #fdfdf9;
    color: #333;
    border: 1px solid #fdfdf9;
    padding: 10px 30px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    cursor: pointer;
    letter-spacing: 1px;
}

/* Location Section */
.location-section {
    padding: 60px 20px;
}

/* Contact Section Styles */
.contact-section {
    padding: 60px 20px;
    text-align: center;
    background-color: #fdfdf9;
}

.contact-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 50px;
    color: #333;
}

.contact-intro {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    line-height: 1.8;
    letter-spacing: 1px;
    max-width: 800px;
    margin: 0 auto 40px auto;
    color: #555;
}

.contact-details p {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    letter-spacing: 1px;
    margin-bottom: 10px;
    color: #555;
}

.contact-details a {
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #ccc;
    transition: border-color 0.3s ease;
}

.contact-details a:hover {
    border-color: #333;
}

.contact-form {
    max-width: 600px;
    margin: 50px auto 0 auto;
    padding: 30px;
    border: 1px solid #eee;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 25px;
    text-align: left;
}

.form-group label {
    display: block;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
    letter-spacing: 0.5px;
}

.form-group label .fa {
    margin-right: 8px;
    color: #888;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group textarea {
    width: calc(100% - 24px);
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    color: #333;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #b0c4de;
    box-shadow: 0 0 8px rgba(176, 196, 222, 0.6);
    outline: none;
}

.form-submit-btn {
    background-color: #333;
    color: #fdfdf9;
    border: none;
    padding: 12px 30px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 20px;
}

.form-submit-btn:hover {
    background-color: #555;
    transform: translateY(-2px);
}

.form-submit-btn .fa {
    margin-right: 10px;
}

/* Footer */
footer {
    padding: 40px 20px;
    font-size: 0.9rem;
    color: #888;
}

/* About Wedding Section - Color Palette */
.about-section h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-top: 40px;
    margin-bottom: 15px;
}

.about-section .color-palette {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.about-section .color-item {
    text-align: center;
}

.about-section .color-swatch {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    margin: 0 auto 5px;
}

@media (max-width: 480px) {
    .contact-form {
        padding: 20px;
    }
    .form-group input,
    .form-group textarea {
        width: calc(100% - 20px);
    }
}

/* RSVP Form Mobile Styles */
@media (max-width: 600px) {
    #rsvp .container form {
        max-width: 100%;
        padding: 10px;
        border: none;
    }

    #rsvp .container form div {
        margin-bottom: 15px;
    }

    #rsvp .container form input,
    #rsvp .container form select,
    #rsvp .container form textarea {
        width: 100%;
        padding: 8px;
        box-sizing: border-box;
    }

    #rsvp .container form button {
        width: 100%;
    }
}
