/* ==================== MEMORIES PAGE ==================== */

/* Hero */
.memories-hero {
    min-height: 45vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 5%;
    padding-top: 6rem;
    position: relative;
    overflow: hidden;
}

.memories-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(37, 99, 235, 0.08) 0%, transparent 60%),
        radial-gradient(circle at 80% 50%, rgba(56, 189, 248, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

.memories-hero-content {
    z-index: 1;
    max-width: 700px;
}

.memories-label {
    display: inline-block;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.memories-hero h1 {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.memories-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
}

/* Gallery Masonry Grid */
.gallery-section {
    padding: 3rem 4%;
    padding-bottom: 5rem;
}

.gallery-masonry {
    columns: 4;
    column-gap: 1rem;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 1rem;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 40px rgba(37, 99, 235, 0.25);
}

.gallery-item img {
    width: 100%;
    display: block;
    object-fit: cover;
    filter: brightness(0.92);
    transition: filter 0.4s ease, transform 0.5s ease;
}

.gallery-item:hover img {
    filter: brightness(0.7);
    transform: scale(1.04);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    background: rgba(37, 99, 235, 0.15);
    backdrop-filter: blur(2px);
}

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

.overlay-icon {
    font-size: 2.5rem;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.gallery-item:hover .overlay-icon {
    transform: scale(1);
}

/* ==================== LIGHTBOX ==================== */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(15px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 85vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
    animation: zoomIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    object-fit: contain;
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.lightbox-close {
    position: fixed;
    top: 1.5rem;
    right: 2rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    font-size: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    line-height: 1;
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.18);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    font-size: 2.5rem;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    line-height: 1;
}

.lightbox-nav:hover {
    background: rgba(37, 99, 235, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.prev {
    left: 1.5rem;
}

.lightbox-nav.next {
    right: 1.5rem;
}

.lightbox-counter {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 2px;
}

/* Responsive */
@media (max-width: 1024px) {
    .gallery-masonry { columns: 3; }
}

@media (max-width: 768px) {
    .gallery-masonry { columns: 2; }
    .lightbox-nav { display: none; }
    .lightbox-content { max-width: 95vw; }
}

@media (max-width: 480px) {
    .gallery-masonry { columns: 1; }
}
