﻿@media (min-width: 1400px) {
  .container {
    max-width: 1220px;
  }
}

@media all and (max-width: 768px) {
  #countdown li {
    font-size: 12px;
    padding: 5px;
  }
  #countdown li span {
    font-size: 35px;
  }
}

/* Responsive cho mobile */
@media (max-width: 768px) {
    .timeline::after {
        left: 8px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 30px;
        text-align: left;
    }

    .timeline-item::after {
        left: 0;
    }

    .timeline-item.right {
        left: 0;
    }
}

.dress-code {
    display: flex; /* dùng flexbox để canh các ô màu và text */
    justify-content: center; /* căn giữa toàn bộ nội dung */
    align-items: center; /* căn theo chiều dọc */
    flex-wrap: wrap; /* nếu màn hình nhỏ thì xuống hàng */
    gap: 10px; /* khoảng cách giữa các ô màu và text */
    font-size: 16px;
}

.dress-code strong {
    margin-right: 10px;
}

.color-box {
    display: inline-block;
    width: 16px;
    height: 16px;
    transform: rotate(45deg); /* xoay thành hình thoi */
    margin-right: 5px;
    border: 1px solid #ccc;
}

/* Màu tương ứng */
.color-box.black {
    background-color: black;
}

.color-box.white {
    background-color: white;
}

.color-box.pink {
    background-color: pink;
}

.color-box.blue {
    background-color: #87CEEB;
}

.color-box.beige {
    background-color: beige;
}

.timeline-item .content {
    display: flex;
    align-items: center; /* căn theo chiều dọc */
    gap: 10px; /* khoảng cách giữa giờ và mô tả */
    background-color: #fff5f8;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.timeline-item .content h3 {
    margin: 0;
    color: #e75480;
    font-size: 16px;
}

.timeline-item .content p {
    margin: 0;
    color: #333;
}

.family-section {
    display: flex; /* ảnh + khung text nằm ngang */
    align-items: flex-start; /* căn theo đầu */
    gap: 20px; /* khoảng cách giữa ảnh và khung */
    flex-wrap: wrap; /* responsive */

    justify-content: center; /* căn giữa toàn bộ khối */
    margin: 0 auto; /* đảm bảo căn giữa trên trang */
    max-width: 1000px; /* giới hạn chiều rộng khối */
}

.family-section img {
    width: 48%; /* ảnh chiếm ~50% */
    max-width: 400px;
    height: auto;
    border-radius: 10px; /* bo góc */
}

.family-info {
    width: 33%; /* chiếm phần còn lại */
    border: 2px solid #ffb6c1; /* viền hồng nhạt */
    border-radius: 10px;
    padding: 15px;
    background-color: #fff5f8; /* màu nền nhẹ */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.family-member {
    margin-bottom: 10px;
    font-size: 16px;
    color: #333;
}

/* Responsive cho màn hình nhỏ */
@media (max-width: 768px) {
    .family-section {
        flex-direction: column; /* ảnh trên, text dưới */
        align-items: center;
    }

    .family-section img,
    .family-info {
        width: 90%;
    }
}

.wedding-row {
    display: flex;
    align-items: center;
    justify-content: center; /* căn giữa khối trung tâm */
    gap: 20px;
}

.wedding-img {
    width: 30%;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
}

.wedding-center {
    flex: 1;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wedding-date {
    width: 100%;
    height: 80px;
    border: 1px solid #808080;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 18px;
}

.parents-row {
    display: flex;
    justify-content: space-between; /* căn trái - phải */
    gap: 10px;
}

.parent-box {
    width: 100px;
    height: 250px;
    border: 1px solid #808080;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 16px;
    padding: 5px;
    box-sizing: border-box;
}

/* Container căn giữa */
.section {
    max-width: 1000px; /* giới hạn chiều rộng */
    margin: 0 auto; /* căn giữa tự động */
    padding: 20px 30px; /* khoảng cách trong container */
    background-color: #ffffff; /* nền trắng cho nội dung */
    box-shadow: 0 0 20px rgba(0,0,0,0.1); /* bóng nhẹ */
    border-radius: 10px; /* bo góc */
    box-sizing: border-box; /* tính padding vào chiều rộng */
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        max-width: 90%; /* nhỏ lại trên mobile */
        padding: 15px 20px;
    }

    .invitation-cards-class {
        padding: 10px 10px !important;
    }

    .timeline-item {
        padding: 0px !important;
    }

    .timeline-item.left {
        padding: 10px 10px !important;
    }
}

.fade-in {
    opacity: 0; /* ban đầu trong suốt */
    transform: translateY(20px); /* hơi dịch xuống dưới */
    transition: opacity 1s ease, transform 1s ease;
}

/* Khi thêm class active sẽ hiện hình */
.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

.scroll-fade {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
}

.scroll-fade.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-fade {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    filter: blur(5px);
    transition: opacity 1s ease, transform 1s ease, filter 1s ease;
}

.scroll-fade.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}