/* romantic-gallery.css */

@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Poppins:wght@300;400;600&display=swap');

:root {
    --rmg-bg: #2d4a36; /* Dark Green */
    --rmg-accent: #6b9b78;
    --rmg-lavender-soft: #d8c7f0;
    --rmg-white: #ffffff;
    --rmg-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.rmg-memory-wrapper {
    background-color: var(--rmg-bg);
    padding: 100px 20px;
    font-family: 'Poppins', sans-serif;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Optional Heading */
.rmg-gallery-title {
    font-family: 'Great Vibes', cursive;
    font-size: 4rem;
    color: var(--rmg-white);
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

.rmg-gallery-title.reveal {
    opacity: 1;
    transform: translateY(0);
}

/* Photo Grid */
.rmg-photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
    perspective: 1000px;
}

/* Polaroid Frame Card */
.rmg-photo-card {
    background-color: var(--rmg-white);
    padding: 15px 15px 45px 15px; /* Scrapbook/Polaroid bottom margin */
    box-shadow: var(--rmg-shadow);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    opacity: 0;
    transform: scale(0.9) translateY(30px);
}

.rmg-photo-card.reveal {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.rmg-photo-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

/* Hover Effects */
.rmg-photo-card:hover {
    transform: scale(1.1) rotate(0deg) !important;
    z-index: 10;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

/* Floating Animation */
@keyframes rmgFloat {
    0%, 100% { transform: translateY(0) rotate(var(--tilt)); }
    50% { transform: translateY(-10px) rotate(var(--tilt)); }
}

/* Staggered random tilts applied via JS or manual classes */
.tilt-1 { --tilt: -3deg; transform: rotate(-3deg); }
.tilt-2 { --tilt: 2deg; transform: rotate(2deg); }
.tilt-3 { --tilt: -2deg; transform: rotate(-2deg); }
.tilt-4 { --tilt: 4deg; transform: rotate(4deg); }

/* ─── Mobile Only: Polaroid Memory Wall ──────────────── */
@media (max-width: 768px) {

    .rmg-memory-wrapper {
        padding: 10px 10px 20px;
    }

    .rmg-gallery-title {
        font-size: 2.4rem;
        margin-bottom: 5px;
    }

    /* 3-column tight grid */
    .rmg-photo-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        max-width: 100%;
        perspective: none;
    }

    /* Polaroid card — compact scrapbook feel */
    .rmg-photo-card {
        padding: 6px 6px 20px 6px; /* thin white border + bottom label area */
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
        border-radius: 2px;
        max-width: 100%;
        margin: 0;
    }

    /* Subtle random tilts per position — no hover on mobile */
    .rmg-photo-card:nth-child(3n + 1) { transform: rotate(-2.5deg) scale(1) translateY(0); }
    .rmg-photo-card:nth-child(3n + 2) { transform: rotate(1.8deg)  scale(1) translateY(0); }
    .rmg-photo-card:nth-child(3n + 3) { transform: rotate(-1.5deg) scale(1) translateY(0); }

    /* Override revealed state to keep tilt */
    .rmg-photo-card.reveal:nth-child(3n + 1) { transform: rotate(-2.5deg) scale(1) translateY(0); opacity: 1; }
    .rmg-photo-card.reveal:nth-child(3n + 2) { transform: rotate(1.8deg)  scale(1) translateY(0); opacity: 1; }
    .rmg-photo-card.reveal:nth-child(3n + 3) { transform: rotate(-1.5deg) scale(1) translateY(0); opacity: 1; }

    /* Disable big hover scale on mobile */
    .rmg-photo-card:hover {
        transform: inherit;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
        z-index: auto;
    }
}

