:root {
            --primary-pink: #ff85a2;
            --dark-pink: #f06292;
            --soft-bg: #fff5f7;
            --text-color: #555;
        }

        body {
            font-family: 'Quicksand', sans-serif;
            color: var(--text-color);
            background-color: var(--soft-bg);
            overflow-x: hidden;
            -webkit-font-smoothing: antialiased;
        }

        .font-romantic { font-family: 'Dancing Script', cursive; }
        .font-serif { font-family: 'Playfair Display', serif; }

        /* Stickers bay bổng */
        .sticker {
            position: absolute;
            z-index: 10;
            pointer-events: none;
            opacity: 0.6;
            will-change: transform;
        }

        .floating-heart { width: 40px; animation: float 4s ease-in-out infinite; }
        .floating-star { width: 30px; animation: float 6s ease-in-out infinite reverse; }

        @keyframes float {
            0%, 100% { transform: translateY(0px) rotate(0deg); }
            50% { transform: translateY(-15px) rotate(10deg); }
        }

        /* Hero Section */
        .hero {
            height: 100vh;
            background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)), 
                        url('./img/top2.JPG') no-repeat top center;
            background-size: cover;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            text-align: center;
            position: relative;
        }

        /* .hero::after {
            content: '';
            position: absolute;
            bottom: 0; left: 0; width: 100%; height: 120px;
            background: linear-gradient(to top, var(--soft-bg), transparent);
        } */

        .hero-content h1 { 
            font-size: clamp(3.5rem, 12vw, 5.5rem); 
            text-shadow: 2px 2px 10px rgba(0,0,0,0.2);
        }

        /* Background Sections với hiệu ứng Parallax (Fixed Background) */
        .bg-image-section {
            position: relative;
            background-size: cover;
            background-position: center;
            background-attachment: fixed;
            padding: 120px 0;
            color: white;
            overflow: hidden;
        }

        .bg-image-section::before {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0, 0, 0, 0.4);
            z-index: 1;
        }

        .timeline-section-bg {
            position: relative;
            background-image: url('https://images.unsplash.com/photo-1522673607200-164d1b6ce486?auto=format&fit=crop&w=1400&q=80');
            background-size: cover;
            background-position: center;
            background-attachment: fixed;
            overflow: hidden;
        }

        .timeline-section-bg::before {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            background: rgba(0, 0, 0, 0.45);
            z-index: 1;
        }

        .timeline-section-bg .container {
            position: relative;
            z-index: 2;
        }

        .timeline-section-bg .section-title h2 {
            color: #fff;
            text-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
        }

        #wedding-info {
            position: relative;
            background-size: cover;
            background-position: center;
            background-attachment: fixed;
            overflow: hidden;
        }

        #wedding-info::before {
            content: '';
            position: absolute;
            inset: 0;
            background: rgba(0, 0, 0, 0.45);
            z-index: 1;
        }

        #wedding-info .container {
            position: relative;
            z-index: 2;
        }

        .invitation-box {
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(255, 245, 247, 0.94));
            padding: 60px 38px;
            border-radius: 36px;
            color: var(--text-color);
            box-shadow: 0 20px 45px rgba(0,0,0,0.12);
            position: relative;
            z-index: 5;
            border: 1px solid rgba(255, 133, 162, 0.35);
        }

        .invite-ornament {
            color: var(--primary-pink);
            letter-spacing: 4px;
            margin-bottom: 8px;
            font-size: 1rem;
        }

        .invitation-intro {
            max-width: 700px;
            margin: 0 auto;
            color: #666;
            line-height: 1.9;
        }

        .couple-row {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 24px;
            flex-wrap: nowrap;
        }

        .invitation-row {
            margin: 34px 0 26px;
        }

        .person-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            min-width: 180px;
        }

        .invitation-person {
            flex: 1;
            background: rgba(255, 255, 255, 0.85);
            border: 1px solid rgba(240, 98, 146, 0.2);
            border-radius: 20px;
            padding: 20px 14px;
            min-height: 180px;
            justify-content: center;
        }

        .person-role-chip {
            display: inline-block;
            padding: 6px 14px;
            border-radius: 999px;
            background: rgba(240, 98, 146, 0.12);
            color: #c24174;
            font-size: 0.85rem;
            font-weight: 600;
            margin-bottom: 10px;
        }

        .person-side-note {
            color: #8a8a8a;
            font-size: 0.9rem;
            line-height: 1.55;
        }

        .invitation-photo-wrap {
            position: relative;
            flex-shrink: 0;
        }

        .person-img-portrait {
            width: 110px;
            height: 165px; 
            object-fit: cover;
            border-radius: 60px; 
            border: 3px solid var(--primary-pink);
            box-shadow: 0 5px 15px rgba(255, 133, 162, 0.2);
            transition: transform 0.3s ease;
        }

        .invitation-photo {
            width: 250px;
            height: 330px;
            border-radius: 28px;
            border: 4px solid rgba(255, 255, 255, 0.95);
            box-shadow: 0 14px 28px rgba(240, 98, 146, 0.25);
        }

        .photo-badge {
            position: absolute;
            left: 50%;
            bottom: -14px;
            transform: translateX(-50%);
            background: var(--primary-pink);
            color: white;
            border-radius: 999px;
            padding: 6px 16px;
            font-size: 0.82rem;
            font-weight: 600;
            white-space: nowrap;
            box-shadow: 0 8px 20px rgba(240, 98, 146, 0.25);
        }

        .person-img-portrait:hover {
            transform: translateY(-5px);
        }

        .invitation-closing {
            margin-top: 8px;
            color: #6f6f6f;
            font-weight: 600;
        }

        @media (max-width: 768px) {
            #wedding-info { background-attachment: scroll; }
            .couple-row { flex-wrap: wrap; gap: 14px; }
            .invitation-row { margin: 28px 0 20px; }
            .invitation-person { width: 100%; min-height: auto; }
            .invitation-photo { width: 210px; height: 280px; }
            .bg-image-section { background-attachment: scroll; } /* Mobile không hỗ trợ tốt fixed background */
            .timeline-section-bg { background-attachment: scroll; }
        }

        /* Calendar */
        .calendar-container {
            background: white;
            border-radius: 30px;
            padding: 30px;
            box-shadow: 0 15px 45px rgba(255, 133, 162, 0.12);
            max-width: 400px;
            margin: 0 auto;
        }

        .calendar-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 10px;
            text-align: center;
        }

        .day-num { padding: 10px 0; position: relative; z-index: 1; }
        .heart-mark::before {
            content: '❤';
            position: absolute;
            top: 50%; left: 50%;
            transform: translate(-50%, -50%);
            color: var(--primary-pink);
            font-size: 2.5rem;
            z-index: -1;
            opacity: 0.9;
        }

        .timeline-box {
            background: transparent;
            border-radius: 30px;
            padding: 30px 25px;
            box-shadow: none;
            border: none;
        }

        .timeline-alt {
            position: relative;
            padding: 8px 0;
        }

        .timeline-alt::before {
            content: '';
            position: absolute;
            left: 50%;
            top: 0;
            bottom: 0;
            width: 4px;
            transform: translateX(-50%);
            background: linear-gradient(to bottom, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.35));
            box-shadow: 0 0 10px rgba(255, 255, 255, 0.35);
        }

        .timeline-alt-item {
            position: relative;
            width: 100%;
            margin-bottom: 18px;
            min-height: 104px;
        }

        .timeline-alt-item:last-child {
            margin-bottom: 0;
        }

        .timeline-alt-icon {
            position: absolute;
            left: 50%;
            top: 20px;
            width: 38px;
            height: 38px;
            transform: translateX(-50%);
            border-radius: 50%;
            background: linear-gradient(135deg, #ffd5e2, #fff6fa);
            border: 2px solid rgba(255, 133, 162, 0.45);
            box-shadow: 0 4px 10px rgba(240, 98, 146, 0.25);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            z-index: 3;
        }

        .timeline-alt-card {
            width: calc(50% - 34px);
            background: #fff;
            border-radius: 16px;
            padding: 14px 16px;
            border: 1px solid rgba(240, 98, 146, 0.22);
            box-shadow: 0 8px 20px rgba(255, 133, 162, 0.1);
            position: relative;
        }

        .timeline-alt-item.left .timeline-alt-card {
            margin-right: auto;
            text-align: right;
        }

        .timeline-alt-item.right .timeline-alt-card {
            margin-left: auto;
            text-align: left;
        }

        .timeline-alt-item.left .timeline-alt-card::after,
        .timeline-alt-item.right .timeline-alt-card::after {
            content: '';
            position: absolute;
            top: 20px;
            width: 10px;
            height: 10px;
            background: #fff;
            border-top: 1px solid rgba(240, 98, 146, 0.22);
            border-right: 1px solid rgba(240, 98, 146, 0.22);
            transform: rotate(45deg);
        }

        .timeline-alt-item.left .timeline-alt-card::after {
            right: -6px;
        }

        .timeline-alt-item.right .timeline-alt-card::after {
            left: -6px;
        }

        .timeline-title {
            color: var(--dark-pink);
            font-weight: 700;
            margin-bottom: 6px;
        }

        .timeline-time {
            margin: 0;
            font-weight: 600;
            color: #7a7a7a;
        }

        @media (max-width: 768px) {
            .timeline-alt::before {
                left: 19px;
                transform: none;
            }

            .timeline-alt-icon {
                left: 19px;
                transform: none;
            }

            .timeline-alt-card {
                width: calc(100% - 58px);
                margin-left: 58px !important;
                text-align: left !important;
            }

            .timeline-alt-item.left .timeline-alt-card::after,
            .timeline-alt-item.right .timeline-alt-card::after {
                left: -6px;
                right: auto;
            }
        }

        /* Gallery */
        .gallery-container {
            column-count: 3;
            column-gap: 20px;
        }

        @media (max-width: 992px) { .gallery-container { column-count: 2; } }
        @media (max-width: 576px) { .gallery-container { column-count: 1; } }

        .gallery-item {
            margin-bottom: 20px;
            border-radius: 20px;
            overflow: hidden;
            box-shadow: 0 5px 15px rgba(0,0,0,0.05);
            transform: translateZ(0);
        }

        .gallery-item img {
            width: 100%;
            display: block;
            transition: transform 0.5s ease;
        }

        .gallery-item:hover img { transform: scale(1.08); }

        /* Footer */
        .footer-cute {
            background-color: white;
            padding: 80px 0 40px;
            position: relative;
            text-align: center;
            border-top: 5px solid var(--primary-pink);
        }

         .couple-icon {
            font-size: 3rem;
            margin-bottom: 20px;
            display: block;
        }

        .footer-wave {
            position: absolute;
            top: -1px; left: 0; width: 100%; line-height: 0;
            transform: rotate(180deg);
        }

        .footer-wave svg {
            display: block;
            width: 100%;
            height: 50px;
            fill: var(--soft-bg);
        }

        /* Music Button */
        .music-btn {
            position: fixed;
            bottom: 30px;
            right: 30px;
            width: 55px;
            height: 55px;
            background: white;
            border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            box-shadow: 0 4px 15px rgba(0,0,0,0.2);
            cursor: pointer; z-index: 1000;
            border: 2px solid var(--primary-pink);
        }

        section { padding: 80px 0; }
        .section-title h2 { font-size: 3.5rem; color: var(--dark-pink); margin-bottom: 30px; }
                /* Thanks Box */
        .thanks-box {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            border: 2px solid white;
            padding: 60px;
            border-radius: 40px;
            color: white;
            position: relative;
            z-index: 5;
        }

        .bg-image-section .container {
            position: relative;
            z-index: 2;
        }

        @media (max-width: 768px) {
            .hero-content h1 { font-size: 3rem; }
            .invitation-box, .thanks-box { padding: 30px 20px; }
            .bg-image-section { background-attachment: scroll; }
        }

        .gallery-grid {
    column-count: 3; /* Chia làm 3 cột */
    column-gap: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item {
    break-inside: avoid; /* Ngăn ảnh bị cắt đôi giữa các cột */
    margin-bottom: 20px; /* Khoảng cách dưới mỗi ảnh */
    display: inline-block;
    width: 100%;
}

.image-card {
    position: relative;
    width: 100%;
    /* Bỏ aspect-ratio để ảnh hiển thị theo tỷ lệ gốc tự nhiên */
    height: auto; 
    border-radius: 16px; 
    overflow: hidden;
    background-color: #f5f5f7;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Hiệu ứng hover mềm mại hơn */
.image-card:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

/* Responsive cho Masonry */
@media (max-width: 992px) {
    .gallery-grid { column-count: 2; }
}

@media (max-width: 576px) {
    .gallery-grid { column-count: 1; }
}
#lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.95); /* Nền trắng trong suốt sang trọng */
    backdrop-filter: blur(10px); /* Làm mờ hậu cảnh */
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

#lightbox img {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

#lightbox.active {
    display: flex;
}

#lightbox.active img {
    transform: scale(1);
}

.close {
    position: absolute;
    top: 30px; right: 40px;
    font-size: 40px; color: #333; cursor: pointer;
}
