/* style.css */

/* --- 全局变量 --- */
:root {
    --primary-color: #d4a373; /* 香槟金 */
    --bg-color: #faf9f6;      /* 暖白 */
    --text-color: #333;
    --secondary-text: #666;
    --white: #ffffff;
}

/* --- 基础重置 --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* --- 导航栏 --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 1000;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(5px);
}

.logo {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
    letter-spacing: 2px;
}

nav ul {
    display: flex;
    gap: 2rem;
}

nav a {
    font-size: 0.9rem;
    transition: color 0.3s;
    font-weight: 500;
}

nav a:hover {
    color: var(--primary-color);
}

/*!* --- 首页 Hero 区域  单个背景模式1--- *!
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('http://love.lxpzyy.top/婚礼/40图/DSC04271.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
    padding: 0 20px;
}*/

/* --- 首页 Hero 区域 --- */
/*.hero {
    height: 100vh; !* 确保容器本身占满视口高度 *!
    !* 替换为您自己的图片 URL *!
    background: linear-gradient(rgba(0,0,0,0.1), rgba(0,0,0,0.1)), url('http://love.lxpzyy.top/婚礼/相框出图/06.jpg');
    background-size: cover;     !* 关键：强制图片缩放以覆盖整个容器，可能会裁剪 *!
    background-position: center center; !* 使图片在容器内居中 *!
    background-repeat: no-repeat;       !* 防止图片重复 *!
    background-attachment: fixed;       !* (可选) 固定背景，产生视差效果 *!
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
    padding: 0 20px;
}

.hero-location {
    margin-top: 2rem;
    text-align: center;
    color: white;
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-location p {
    margin: 0.3rem 0;
}

.hero-location .nav-link {
    display: inline-block;
    margin-top: 0.8rem;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-location .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}
.hero h1 {
    font-size: 3.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    letter-spacing: 5px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.2rem;
    letter-spacing: 3px;
    opacity: 0.9;
}

.hero .date {
    margin-top: 20px;
    font-size: 1rem;
    border-top: 1px solid rgba(255,255,255,0.5);
    border-bottom: 1px solid rgba(255,255,255,0.5);
    padding: 10px 20px;
    display: inline-block;
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
}*/

/* --- 首页 Hero 区域 (全新布局)  左右海报模式2 --- */
.hero {
    height: 100vh;
    /* 移除之前的背景图，使用纯色或渐变 */
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    justify-content: space-around; /* 关键：均匀分布三个子元素 */
    align-items: center;
    text-align: center;
    color: var(--text-color); /* 改为深色文字 */
    padding: 0 5%; /* 两侧留出空间 */
    position: relative;
    overflow: hidden; /* 防止内容溢出 */
}

/* --- 海报容器样式 --- */
.poster-left,
.poster-right {
    flex: 0 0 auto; /* 不伸缩，占据自身内容大小 */
    max-width: 25%; /* 控制海报最大宽度，可根据需要调整 */
    height: 80vh; /* 海报高度，略小于屏幕高度 */
    border-radius: 15px; /* 圆角 */
    overflow: hidden; /* 裁剪图片超出部分 */
    box-shadow: 0 20px 40px rgba(0,0,0,0.2); /* 投影效果 */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* 悬停效果 */
}

.poster-left {
    /* 可以为左侧海报添加不同风格 */
    /* box-shadow: 0 20px 40px rgba(212, 163, 115, 0.3); */
}

.poster-right {
    /* 可以为右侧海报添加不同风格 */
    /* box-shadow: 0 20px 40px rgba(115, 163, 212, 0.3); */
}

.poster-left:hover,
.poster-right:hover {
    transform: translateY(-10px); /* 悬停时轻微上移 */
    box-shadow: 0 25px 50px rgba(0,0,0,0.3); /* 加深投影 */
}

.poster-left img,
.poster-right img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 图片覆盖整个容器 */
    display: block; /* 消除图片底部间隙 */
}

/* --- 中间文字内容样式 --- */
.hero-content {
    flex: 1 1 auto; /* 中间内容占据剩余空间 */
    max-width: 400px; /* 限制中间区域的最大宽度 */
    z-index: 2; /* 确保文字在海报上方（如果需要） */
}

.hero-content h1 {
    font-size: 2.5rem; /* 调整字体大小 */
    font-weight: 300;
    margin-bottom: 1rem;
    letter-spacing: 3px;
    /* 由于背景较浅，文字颜色不再是白色 */
    color: var(--text-color);
    text-shadow: none; /* 移除之前的文字阴影 */
}

.hero-content p {
    font-size: 1.1rem;
    letter-spacing: 2px;
    opacity: 0.9;
    color: var(--secondary-text); /* 使用次要文字颜色 */
}

.hero-content .date {
    margin-top: 20px;
    font-size: 1rem;
    /* 重新设计日期样式 */
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 20px;
    display: inline-block;
    border-radius: 30px; /* 圆润边框 */
    background: rgba(212, 163, 115, 0.05); /* 微弱背景色 */
}

/* --- 中间区域的地址信息样式 (继承自之前的CSS，可能需要微调) --- */
.hero-location {
    margin-top: 2rem;
    text-align: center;
    /* color: white; -> 改为深色 */
    color: var(--text-color);
    font-size: 0.95rem; /* 可能需要稍小一点 */
    opacity: 0.9;
    line-height: 1.6;
}

.hero-location p {
    margin: 0.3rem 0;
}

.hero-location .nav-link {
    display: inline-block;
    margin-top: 0.8rem;
    /* 改为深色主题样式 */
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
    text-decoration: none;
    border: 1px solid var(--primary-color);
}

.hero-location .nav-link:hover {
    background-color: #c49261; /* 深色悬停效果 */
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(212, 163, 115, 0.4);
}

/* --- 移动端适配 --- */
@media (max-width: 768px) {
    .hero {
        flex-direction: column; /* 垂直堆叠 */
        height: auto;
        min-height: 100vh;
        padding: 60px 20px 20px; /* 调整 padding */
    }

    .poster-left,
    .poster-right {
        max-width: 45%; /* 在移动端，海报宽度调整 */
        height: 40vh; /* 高度调整 */
        margin-bottom: 20px; /* 添加间距 */
    }

    .hero-content {
        max-width: 100%; /* 占满宽度 */
        order: 3; /* 将文字内容放到最后 */
        padding-top: 20px;
    }

    .hero-content h1 {
        font-size: 2rem; /* 缩小字体 */
    }
}

/* --- 通用板块样式 --- */
section {
    padding: 80px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 400;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
    margin: 10px auto 0;
}

.section-title p {
    color: var(--secondary-text);
    font-size: 0.9rem;
    margin-top: 10px;
}

/* --- 相册模块 (Grid 布局) --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.photo-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    aspect-ratio: 3/4;
    cursor: pointer;
    background: #ddd;
    opacity: 1; /* 初始状态完全可见 */
    transition: opacity 0.3s ease;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.photo-item:hover img {
    transform: scale(1.05);
}

/* --- 加载更多按钮样式 --- */
.load-more-container {
    text-align: center;
    margin-top: 20px;
}

.load-more-btn {
    display: inline-block;
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 12px 40px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.load-more-btn:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    background-color: transparent;
    color: var(--primary-color);
}

/* --- 隐藏元素 --- */
.hidden {
    display: none;
}

/* --- 视频模块 --- */
.video-section-bg {
    background-color: var(--white);
}

.video-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.video-wrapper {
    flex: 1 1 500px;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column; /* 关键：垂直布局 */
}

.video-wrapper iframe,
.video-wrapper video {
    width: 100%;
    height: auto; /* 改为 auto 以配合 aspect-ratio */
    border: none;
    display: block;
    /* 保持 16:9 宽高比 */
    aspect-ratio: 16 / 9;
}

/* 视频占位符样式 */
.video-wrapper .video-placeholder {
    flex: 1; /* 占据剩余空间 */
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f0f0f0; /* 淡灰色背景 */
    color: var(--secondary-text);
    font-size: 1.2rem;
    text-align: center;
    /* 保持 16:9 宽高比 */
    aspect-ratio: 16 / 9;
}

/* 视频标题样式 */
.video-title {
    color: var(--white);
    background-color: rgba(0, 0, 0, 0.5); /* 半透明背景 */
    padding: 10px 15px;
    margin: 0;
    font-size: 1.1rem;
    text-align: center;
    z-index: 10; /* 确保标题在视频上方 */
}
/* --- 页脚 --- */
footer {
    background-color: var(--white);
    text-align: center;
    padding: 40px 20px;
    margin-top: 50px;
    color: var(--secondary-text);
    font-size: 0.9rem;
    border-top: 1px solid #eee;
}

footer p {
    margin: 5px 0;
}

/* --- 动画类 --- */
.fade-in {
    animation: fadeIn 1.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- 移动端适配 --- */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1rem; }

    nav { display: none; }
    header { justify-content: center; }

    .location-card {
        flex-direction: column;
    }

    .location-info {
        padding: 30px 20px;
        text-align: center;
        align-items: center;
    }

    .nav-btn {
        width: 100%;
        text-align: center;
    }

    .location-map {
        min-height: 250px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

}
/* --- 花絮2视频网格样式 --- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.video-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  aspect-ratio: 16 / 9; /* 保持容器比例 */
  background: #000; /* 黑色背景防止加载闪烁 */
}

/* 新增：视频元素样式 */
.video-item video {
  width: 100%;
  height: 100%;
  object-fit: contain; /* 关键：确保视频完整显示且不被裁剪 */
  display: block; /* 消除底部默认的微小间隙 */
}

/* 保持原有的 iframe 样式 */
.video-item iframe {
  width: 100%;
  height: 100%;
  border: none;
}