/* Memories Page - Minimalistic Masonry Layout */

body {
    background-color: #0a0a0c;
    color: #fff;
    margin: 0;
    padding: 0;
    /* Removed overflow: hidden so vertical scrolling works normally */
    overflow-x: hidden;
}

.page-title {
    background: linear-gradient(135deg, #FFB703, #C84B6B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.page-subtitle {
    color: rgba(255, 255, 255, 0.7);
}

.gallery-wrapper {
    width: 100%;
    min-height: 100vh;
    padding: 120px 5vw 60px; /* Top padding to clear header/nav */
    box-sizing: border-box;
    display: flex;
    justify-content: center;
}

.gallery-container {
    width: 100%;
    max-width: 1400px;
    /* CSS Columns for masonry effect */
    column-count: 4;
    column-gap: 20px;
}

@media (max-width: 1200px) {
    .gallery-container {
        column-count: 3;
    }
}

@media (max-width: 800px) {
    .gallery-container {
        column-count: 2;
        column-gap: 15px;
    }
}

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

.memory-item {
    break-inside: avoid;
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: #1a1a1a;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    
    /* Center text content if any */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    
    /* Initial state for animation */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease;
}

/* Revealed state (added via JS) */
.memory-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hover effects */
.memory-item:hover {
    transform: translateY(-5px); /* Slightly move up instead of full scale to keep layout stable */
    box-shadow: 0 12px 25px rgba(255, 183, 3, 0.15); /* Subtle glow */
}

.memory-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.4s ease;
    filter: brightness(0.9);
}

.memory-item:hover img {
    transform: scale(1.03); /* Subtle zoom in image */
    filter: brightness(1.1);
}

/* Text Block Overrides */
.memory-item.text-block,
.memory-item.quote-block {
    background: rgba(30, 30, 35, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 40px 20px; /* Give text blocks some padding since image handles its own height */
}

.memory-item.text-block h3 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.2;
    background: linear-gradient(135deg, #FFB703, #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.memory-item.text-block .date {
    font-size: 0.9rem;
    opacity: 0.7;
    color: #FFB703;
}

.memory-item.quote-block p {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.5rem;
    line-height: 1.4;
}

/* Specific fix: Don't zoom text block container on hover, only its box shadow */
.memory-item.text-block:hover,
.memory-item.quote-block:hover {
    transform: translateY(-5px);
}