/* Reset và Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Ensure no horizontal overflow globally */
html,
body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

:root {
    --primary-color: #d4a574;
    --secondary-color: #f4e4c1;
    --accent-color: #e8c5a0;
    --text-primary: #5d4e37;
    --text-secondary: #8b7355;
    --bg-primary: #fefcf8;
    --bg-secondary: #f9f5f0;
    --bg-accent: #f2ede4;
    --shadow-light: 0 4px 25px rgba(212, 165, 116, 0.15);
    --shadow-medium: 0 8px 35px rgba(212, 165, 116, 0.2);
    --border-radius: 20px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --vintage-gold: #c9a96e;
    --vintage-cream: #f7f3e9;
    --vintage-rose: #e8b4a0;
}

html {
    scroll-behavior: smooth;
}

/* Android scroll optimization */
@media screen and (max-width: 768px) {
    html {
        scroll-behavior: auto !important;
        -webkit-overflow-scrolling: touch;
        overflow-x: hidden;
    }

    body {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }

    /* Disable momentum scrolling on Android */
    body.scrolling {
        -webkit-overflow-scrolling: auto;
    }

    /* Prevent horizontal overflow on all elements */
    * {
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Ensure all sections don't overflow */
    section {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }


    /* Fix container overflow and expand for mobile */
    .container {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        padding: 0 10px;
    }

    /* Timeline section specific mobile optimization */
    .timeline-section {
        background: linear-gradient(135deg, rgba(249, 245, 240, 0.8) 0%, rgba(242, 237, 228, 0.9) 100%),
            url('assets/images/common/minhkhue3.jpg') center/cover no-repeat;
        background-attachment: scroll;
    }

    .timeline-section .container {
        padding: 0 5px;
    }

    /* Fix gallery grid overflow */
    .gallery-grid {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Fix navbar overflow */
    .navbar {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .nav-container {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Fix timeline layout for mobile - left side with justified text */
    .timeline {
        padding-left: 0;
        margin-left: 0;
    }

    .timeline-content {
        margin-left: 0;
        width: calc(100% - 50px);
        padding: 1.5rem;
        text-align: justify;
    }

    .timeline-content p {
        text-align: justify !important;
        text-justify: inter-word;
        hyphens: auto;
        word-spacing: normal;
        line-height: 1.6;
    }

    .timeline-content h3 {
        text-align: left;
    }

    .timeline-date {
        text-align: left;
    }

    /* Ensure timeline marker is visible on left side */
    .timeline-marker {
        position: absolute;
        top: 0;
        left: 0 !important;
        right: auto !important;
        width: 40px;
        height: 40px;
        z-index: 10;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 1.2rem;
        box-shadow: var(--shadow-medium);
    }

    .timeline-marker img {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        object-fit: cover;
    }
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

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

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.8rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* Ensure text justification works properly */
.timeline-content p,
.about-text p {
    text-align: justify !important;
    text-justify: inter-word;
    hyphens: auto;
    word-spacing: normal;
    line-height: 1.6;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
}

/* Ensure navbar elements have proper z-index */
.nav-container {
    position: relative;
    z-index: 1001;
}

/* Make sure hamburger is clickable */
.nav-container .hamburger {
    position: relative;
    z-index: 1002;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* Ensure hamburger is always on top */
.nav-container .hamburger {
    position: relative;
    z-index: 1002;
    pointer-events: auto;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-logo i {
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    font-family: 'Dancing Script', cursive;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-menu a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    position: relative;
    z-index: 1002;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.hamburger:hover {
    background: var(--bg-accent);
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: all 0.3s ease;
    border-radius: 2px;
    transform-origin: center;
    pointer-events: none;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(242, 237, 228, 0.4) 0%, rgba(254, 252, 248, 0.5) 100%),
        url('assets/images/common/minhkhue2.jpg') center/cover no-repeat;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(242, 237, 228, 0.2) 0%, rgba(254, 252, 248, 0.3) 50%, rgba(249, 245, 240, 0.2) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero::after {
    content: '🌸 💕 🌸';
    position: absolute;
    top: 15%;
    right: 10%;
    font-size: 2.5rem;
    animation: float 8s ease-in-out infinite;
    opacity: 0.2;
    z-index: 0;
    color: var(--vintage-gold);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.highlight {
    background: linear-gradient(135deg, #000000, var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Dancing Script', cursive;
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-button {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 1.2rem 2.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
}

.cta-button::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.5s;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 40px rgba(255, 107, 107, 0.3);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-card {
    position: relative;
    animation: float 6s ease-in-out infinite;
    padding: 15px;
    border-radius: 32px;
    background: linear-gradient(180deg, rgba(254, 252, 248, 0.95), rgba(249, 245, 240, 0.9));
    box-shadow: 0 20px 50px rgba(212, 165, 116, 0.15), var(--shadow-medium);
    border: 2px solid var(--vintage-gold);
}

.floating-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--vintage-gold), var(--vintage-rose), var(--vintage-gold));
    border-radius: 34px;
    z-index: -1;
    opacity: 0.3;
}

.hero-photo {
    height: 400px;
    object-fit: cover;
    object-position: center top;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    transition: transform .5s ease, box-shadow .5s ease;
    aspect-ratio: 3/2;
}

.hero-photo.soft-corners:hover {
    transform: scale(1.015);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
}

/* Soft corners + subtle vignette for hero photo */
.soft-corners {
    border-radius: 28px;
    overflow: hidden;
    position: relative;
}

.soft-corners::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.15) 100%);
    border-radius: inherit;
}

.soft-corners {
    -webkit-mask-image: radial-gradient(ellipse 140% 140% at 50% 50%, black 60%, transparent 100%);
    mask-image: radial-gradient(ellipse 140% 140% at 50% 50%, black 60%, transparent 100%);
}

.floating-card {
    isolation: isolate;
}

.card-overlay {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background: rgba(254, 252, 248, 0.95);
    padding: 12px 16px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-weight: 600;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(212, 165, 116, 0.2);
    border: 1px solid var(--vintage-gold);
    font-family: 'Dancing Script', cursive;
    font-size: 1.1rem;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 30px;
    height: 30px;
    border: 2px solid var(--primary-color);
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    z-index: 2;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Timeline Section */
.timeline-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, rgba(249, 245, 240, 0.7) 0%, rgba(242, 237, 228, 0.8) 100%),
        url('assets/images/common/minhkhue3.jpg') center/cover no-repeat;
    position: relative;
}

.timeline-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(249, 245, 240, 0.3) 0%, rgba(242, 237, 228, 0.4) 50%, rgba(247, 243, 233, 0.3) 100%);
    z-index: 1;
    pointer-events: none;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    z-index: 2;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
    width: 45%;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 55%;
    text-align: left;
}

.timeline-marker {
    position: absolute;
    top: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: var(--shadow-medium);
    z-index: 2;
}

.timeline-item:nth-child(odd) .timeline-marker {
    right: -30px;
}

.timeline-item:nth-child(even) .timeline-marker {
    left: -30px;
}

.timeline-content {
    background: var(--vintage-cream);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    position: relative;
    border: 1px solid var(--vintage-gold);
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    /* height: 4px; */
    background: linear-gradient(90deg, var(--vintage-gold), var(--vintage-rose), var(--vintage-gold));
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.timeline-content p {
    text-align: justify !important;
    text-justify: inter-word;
    hyphens: auto;
    word-spacing: normal;
    line-height: 1.6;
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.timeline-date {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.timeline-image {
    margin-top: 1rem;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.timeline-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    object-position: center top;
    transition: var(--transition);
}

.timeline-image:hover img {
    transform: scale(1.05);
}

/* Gallery Section */
.gallery-section {
    padding: 6rem 0;
    background: var(--bg-primary);
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--bg-secondary);
    border: 2px solid transparent;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.gallery-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid var(--vintage-gold);
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 0%, rgba(212, 165, 116, 0.1) 50%, transparent 100%);
    opacity: 0;
    transition: var(--transition);
    z-index: 1;
    pointer-events: none;
}

.gallery-item:hover::before {
    opacity: 1;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-medium);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    object-position: center top;
    transition: var(--transition);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(93, 78, 55, 0.9));
    color: var(--vintage-cream);
    padding: 2rem 1.5rem 1.5rem;
    transform: translateY(100%);
    transition: var(--transition);
    border-top: 2px solid var(--vintage-gold);
}

.gallery-overlay h3 {
    font-family: 'Dancing Script', cursive;
    font-size: 1.4rem;
    color: var(--vintage-cream);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.gallery-overlay p {
    margin-bottom: 1rem;
    opacity: 0.9;
}

.gallery-overlay i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

/* Gallery Stats */
.gallery-stats {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    text-align: center;
}

.gallery-stats .stat-item {
    padding: 1rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.gallery-stats .stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.gallery-stats .stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.gallery-stats .stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

/* Memories Section */
.memories-section {
    padding: 6rem 0;
    background: var(--bg-accent);
}

.memories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.memory-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.memory-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.memory-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-medium);
}

.memory-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
}

.memory-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.memory-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.memory-date {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

/* About Section */
.about-section {
    padding: 6rem 0;
    background: var(--bg-primary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    text-align: justify !important;
    text-justify: inter-word;
    hyphens: auto;
    word-spacing: normal;
}

.about-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.about-stat {
    text-align: center;
}

.about-stat .stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.about-stat .stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.image-stack {
    position: relative;
    height: 500px;
}

.stacked-image {
    position: absolute;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
    object-fit: cover;
    object-position: center top;
    border: 3px solid var(--vintage-gold);
}

.stacked-image::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, var(--vintage-gold), var(--vintage-rose), var(--vintage-gold));
    border-radius: calc(var(--border-radius) + 3px);
    z-index: -1;
    opacity: 0.4;
}

.stacked-image:nth-child(1) {
    top: 0;
    left: 0;
    z-index: 3;
    transform: rotate(-5deg);
}

.stacked-image:nth-child(2) {
    top: 50px;
    right: 0;
    z-index: 2;
    transform: rotate(3deg);
}

.stacked-image:nth-child(3) {
    bottom: 0;
    left: 50px;
    z-index: 1;
    transform: rotate(-2deg);
}

.image-stack:hover .stacked-image {
    transform: rotate(0deg) scale(1.05);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, rgb(116 116 116 / 22%) 0%, rgba(139, 115, 85, 0.8) 100%), url(assets/images/common/minhkhue10.jpg) center / cover no-repeat;
    color: #ffeed8;
    padding: 4rem 0 2rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(93, 78, 55, 0.4) 0%, rgba(139, 115, 85, 0.3) 50%, rgba(93, 78, 55, 0.4) 100%);
    z-index: 1;
    pointer-events: none;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
}

.footer-section h3,
.footer-section h4 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.footer-section p {
    color: #b2bec3;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #b2bec3;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--accent-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffeed8;
    position: relative;
    z-index: 2;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    object-position: center top;
    border-radius: var(--border-radius);
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
}

.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
}

/* Đảm bảo các phần tử quan trọng có z-index cao hơn hoa rơi */
.navbar {
    z-index: 1000 !important;
}

.hero-content {
    z-index: 10 !important;
}

.timeline {
    z-index: 10 !important;
}

.gallery-section {
    z-index: 10 !important;
}

.about-section {
    z-index: 10 !important;
}

.footer {
    z-index: 10 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
        z-index: 1002;
        position: relative;
        background: transparent;
        border: none;
        outline: none;
        min-width: 44px;
        min-height: 44px;
        align-items: center;
        justify-content: center;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

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

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hamburger:focus {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        width: 100%;
        height: 100vh;
        text-align: center;
        transition: all 0.3s ease-in-out;
        box-shadow: var(--shadow-light);
        padding: 80px 2rem 2rem;
        z-index: 1000;
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 1rem 0;
    }

    .nav-menu a {
        font-size: 1.2rem;
        padding: 1rem;
        display: block;
        border-radius: var(--border-radius);
        transition: all 0.3s ease;
        font-family: 'Dancing Script', cursive;
    }

    .nav-menu a:hover {
        background: var(--bg-accent);
        color: var(--primary-color);
        transform: translateX(10px);
    }

    /* Mobile menu overlay effect */
    .nav-menu::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, var(--bg-accent) 0%, var(--bg-primary) 100%);
        opacity: 0.1;
        z-index: -1;
    }

    /* Ensure mobile menu is above all content */
    .nav-menu.active {
        left: 0;
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.2);
    }

    .hero {
        background: linear-gradient(135deg, rgba(242, 237, 228, 0.3) 0%, rgba(254, 252, 248, 0.4) 100%),
            url('assets/images/common/minhkhue2.jpg') center/cover no-repeat;
        background-attachment: scroll;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        padding: 0 16px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        z-index: 2;
    }

    .hero-title {
        font-size: 2.2rem;
        line-height: 1.15;
    }

    .hero-stats {
        justify-content: center;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
    }

    /* Mobile-friendly hero card */
    .floating-card {
        padding: 8px;
        border-radius: 24px;
        box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
        width: 100%;
        max-width: 520px;
        overflow: hidden;
    }

    .hero-photo {
        width: 100%;
        height: auto;
        max-height: none;
        aspect-ratio: auto;
        object-fit: cover;
        object-position: center top;
        border-radius: 24px;
        display: block;
    }

    .card-overlay {
        bottom: 12px;
        left: 12px;
        padding: 8px 12px;
        gap: 6px;
    }

    .timeline::before {
        left: 20px;
        right: auto;
    }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        text-align: left !important;
        padding-left: 50px;
        padding-right: 20px;
        max-width: 100%;
        overflow-x: hidden;
        margin-left: 0;
    }

    .timeline-marker {
        left: 0px !important;
        right: auto !important;
        width: 40px;
        height: 40px;
        z-index: 10;
    }

    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Mobile layout cho about section - có hình ảnh */
    .about-section {
        padding: 3rem 0 !important;
        margin-bottom: 2rem !important;
        min-height: auto !important;
        position: relative !important;
        z-index: 10 !important;
    }

    /* Đảm bảo about section luôn hiển thị đầy đủ trên mobile */
    .about-section::after {
        content: '';
        display: block;
        height: 100px;
        width: 100%;
    }

    .about-content {
        padding: 0 1rem !important;
    }

    .about-text h2 {
        font-size: 1.8rem !important;
        margin-bottom: 1.5rem !important;
        text-align: center !important;
    }

    .about-text p {
        font-size: 1rem !important;
        line-height: 1.7 !important;
        margin-bottom: 1.2rem !important;
        text-align: justify !important;
        padding: 0 !important;
    }

    .about-stats {
        margin-top: 2rem !important;
        gap: 1rem !important;
        justify-content: center !important;
    }

    .about-stat {
        flex: 1 !important;
        min-width: 80px !important;
    }

    .about-stat .stat-number {
        font-size: 1.6rem !important;
    }

    .about-stat .stat-label {
        font-size: 0.8rem !important;
    }

    /* Hiển thị image stack trên mobile với layout tối ưu */
    .about-image {
        display: block !important;
        margin-top: 2rem !important;
    }

    .image-stack {
        height: 300px !important;
        position: relative !important;
    }

    .stacked-image {
        width: 200px !important;
        height: 250px !important;
        object-fit: cover;
        object-position: center top;
    }

    .stacked-image:nth-child(1) {
        top: 0 !important;
        left: 50% !important;
        transform: translateX(-50%) rotate(-5deg) !important;
        z-index: 3 !important;
    }

    .stacked-image:nth-child(2) {
        top: 20px !important;
        left: 20% !important;
        transform: rotate(3deg) !important;
        z-index: 2 !important;
    }

    .stacked-image:nth-child(3) {
        top: 20px !important;
        right: 20% !important;
        transform: rotate(-2deg) !important;
        z-index: 1 !important;
    }


    /* Nút back-to-top trên mobile */
    button[style*="position: fixed"] {
        bottom: 20px !important;
        right: 20px !important;
        width: 45px !important;
        height: 45px !important;
        font-size: 0.9rem !important;
        z-index: 999 !important;
    }

    .image-stack {
        height: 400px;
    }

    .gallery-filters {
        flex-direction: column;
        align-items: center;
    }

    .filter-btn {
        width: 200px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-stats {
        flex-direction: row;
        gap: 0.8rem;
        justify-content: center;
        flex-wrap: nowrap;
    }

    .hero-stats .stat-item {
        flex: 1;
        min-width: 0;
    }

    .hero-stats .stat-number {
        font-size: 2rem;
    }

    .hero-stats .stat-label {
        font-size: 0.8rem;
    }

    /* Ensure stats fit on very small screens */
    @media (max-width: 360px) {
        .hero-stats {
            gap: 0.5rem;
        }

        .hero-stats .stat-number {
            font-size: 1.8rem;
        }

        .hero-stats .stat-label {
            font-size: 0.7rem;
        }
    }

    .floating-card {
        padding: 6px;
        border-radius: 20px;
    }

    .hero {
        background: linear-gradient(135deg, rgba(242, 237, 228, 0.25) 0%, rgba(254, 252, 248, 0.35) 100%),
            url('assets/images/common/minhkhue2.jpg') center/cover no-repeat;
        background-attachment: scroll;
    }

    .hero-photo {
        max-height: none;
        aspect-ratio: auto;
        border-radius: 20px;
        display: block;
    }

    .card-overlay {
        bottom: 10px;
        left: 10px;
        padding: 6px 10px;
        font-size: 0.9rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .timeline-section {
        background: linear-gradient(135deg, rgba(249, 245, 240, 0.85) 0%, rgba(242, 237, 228, 0.95) 100%),
            url('assets/images/common/minhkhue3.jpg') center/cover no-repeat;
        background-attachment: scroll;
    }

    .timeline-content {
        padding: 1.5rem;
    }

    .memory-card {
        padding: 1.5rem;
    }

    .footer {
        background: linear-gradient(135deg, rgba(93, 78, 55, 0.95) 0%, rgba(139, 115, 85, 0.9) 100%),
            url('assets/images/common/minhkhue10.jpg') center/cover no-repeat;
        background-attachment: scroll;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    /* Mobile menu improvements for small screens */
    .nav-menu {
        padding: 100px 1rem 2rem;
    }

    .nav-menu a {
        font-size: 1.1rem;
        padding: 0.8rem;
        font-family: 'Dancing Script', cursive;
    }

    .hamburger {
        margin-right: 10px;
    }

    /* Additional timeline fixes for small screens - left side with justified text */
    .timeline-item {
        padding-left: 40px;
        padding-right: 15px;
    }

    .timeline-marker {
        left: 0px !important;
        right: auto !important;
        width: 35px;
        height: 35px;
    }

    .timeline-marker img {
        width: 25px;
        height: 25px;
    }

    .timeline-content {
        width: calc(100% - 10px);
        padding: 1.2rem;
        text-align: justify;
    }

    /* Điều chỉnh cho màn hình rất nhỏ */
    .about-section {
        padding: 2.5rem 0 !important;
    }

    .about-text h2 {
        font-size: 1.6rem !important;
    }

    .about-text p {
        font-size: 0.95rem !important;
    }

    .about-stat .stat-number {
        font-size: 1.4rem !important;
    }

    .about-stat .stat-label {
        font-size: 0.7rem !important;
    }

    /* Hình ảnh nhỏ hơn trên màn hình nhỏ */
    .image-stack {
        height: 250px !important;
    }

    .stacked-image {
        width: 150px !important;
        height: 200px !important;
        object-fit: cover;
        object-position: center top;
    }

    .stacked-image:nth-child(1) {
        left: 50% !important;
        transform: translateX(-50%) rotate(-3deg) !important;
    }

    .stacked-image:nth-child(2) {
        left: 15% !important;
        transform: rotate(2deg) !important;
    }

    .stacked-image:nth-child(3) {
        right: 15% !important;
        transform: rotate(-1deg) !important;
    }

    /* Nút back-to-top nhỏ hơn */
    button[style*="position: fixed"] {
        bottom: 15px !important;
        right: 15px !important;
        width: 40px !important;
        height: 40px !important;
        font-size: 0.8rem !important;
    }


    .timeline-content p {
        text-align: justify !important;
        text-justify: inter-word;
        hyphens: auto;
        word-spacing: normal;
        line-height: 1.6;
    }

    .timeline-content h3 {
        text-align: left;
    }

    .timeline-date {
        text-align: left;
    }

    .timeline::before {
        left: 17px;
        right: auto;
    }
}

/* Animation Classes */
[data-aos] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

[data-aos].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

[data-aos="fade-right"] {
    transform: translateX(-30px);
}

[data-aos="fade-left"] {
    transform: translateX(30px);
}

[data-aos="zoom-in"] {
    transform: scale(0.8);
}

[data-aos="zoom-in"].aos-animate {
    transform: scale(1);
}

/* Smooth scrolling for older browsers */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Face-focused image display optimization */
img {
    object-fit: cover;
    object-position: center top;
}

/* Background image optimization */
.hero {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

@media (max-width: 768px) {
    .hero {
        background-attachment: scroll;
    }
}

/* Specific optimizations for different image contexts */
.hero-photo,
.gallery-item img,
.timeline-image img,
.stacked-image,
.lightbox-content {
    object-fit: cover;
    object-position: center top;
}

/* Ensure face visibility in portrait images */
img[src*="birth"],
img[src*="monthly"],
img[src*="thoi-noi"] {
    object-position: center 30%;
}

/* Mobile-specific face optimization */
@media (max-width: 768px) {

    .hero-photo,
    .gallery-item img,
    .timeline-image img,
    .stacked-image {
        object-position: center 25%;
    }
}

/* Vintage decorative elements */
.vintage-decoration {
    position: relative;
}

.vintage-decoration::before {
    content: '🌸';
    position: absolute;
    top: -10px;
    left: -10px;
    font-size: 1.5rem;
    color: var(--vintage-gold);
    opacity: 0.6;
}

.vintage-decoration::after {
    content: '💕';
    position: absolute;
    bottom: -10px;
    right: -10px;
    font-size: 1.5rem;
    color: var(--vintage-rose);
    opacity: 0.6;
}

/* Vintage typography enhancements */
.section-header h2 {
    position: relative;
}

.section-header h2::before {
    content: '✨';
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: var(--vintage-gold);
}

.section-header h2::after {
    content: '✨';
    position: absolute;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: var(--vintage-gold);
}

/* Vintage button styles */
.cta-button {
    position: relative;
    overflow: hidden;
}

.cta-button::after {
    content: '💖';
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    font-size: 1.1rem;
    opacity: 0.8;
}

/* Vintage filter buttons */
.filter-btn {
    position: relative;
    font-family: 'Dancing Script', cursive;
    font-size: 1.1rem;
}

.filter-btn.active::before {
    content: '🌸';
    position: absolute;
    left: -25px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
}

/* Vintage stats styling */
.stat-item {
    position: relative;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, var(--vintage-gold), var(--vintage-rose));
    border-radius: 1px;
}

/* Vintage memory cards */
.memory-card {
    position: relative;
    border: 1px solid var(--vintage-gold);
}

.memory-card::after {
    content: '💝';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 1.2rem;
    opacity: 0.7;
}