/* =========================================================
   PÁGINA DE RECUERDOS
========================================================= */

.memories-page {
    min-height: 100vh;

    background:
        radial-gradient(
            circle at 18% 8%,
            rgba(221, 85, 163, 0.12),
            transparent 25%
        ),
        radial-gradient(
            circle at 82% 72%,
            rgba(108, 72, 189, 0.14),
            transparent 28%
        ),
        linear-gradient(
            180deg,
            #09050d 0%,
            #120817 48%,
            #09050d 100%
        );
}

.memories-container {
    position: relative;
    z-index: 2;

    width: min(1100px, 100%);

    margin: 0 auto;

    padding: 60px 25px 100px;
}


/* =========================================================
   VOLVER
========================================================= */

.back-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    padding: 9px 16px;

    margin-bottom: 55px;

    border: 1px solid rgba(255, 181, 216, 0.12);

    border-radius: 30px;

    background: rgba(255, 255, 255, 0.025);

    color: #bda8bf;

    text-decoration: none;

    font-family: "Montserrat", sans-serif;

    font-size: 11px;

    transition:
        color 0.3s ease,
        background 0.3s ease,
        border-color 0.3s ease,
        transform 0.3s ease;
}

.back-button:hover {
    color: var(--light-pink);

    background: rgba(240, 111, 174, 0.07);

    border-color: rgba(240, 111, 174, 0.3);

    transform: translateY(-2px);
}


/* =========================================================
   HEADER
========================================================= */

.memories-header {
    max-width: 850px;

    margin: 0 auto;

    text-align: center;
}

.memories-icon {
    width: 70px;
    height: 70px;

    margin: 0 auto 30px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    border: 1px solid rgba(240, 111, 174, 0.35);

    color: var(--pink);

    font-size: 30px;

    box-shadow:
        0 0 45px rgba(240, 111, 174, 0.12);
}

.memories-header h1 {
    font-family: "Cormorant Garamond", serif;

    font-size: clamp(55px, 8vw, 95px);

    line-height: 0.95;

    margin-bottom: 25px;
}

.memories-intro {
    max-width: 700px;

    margin: 0 auto;

    font-family: "Cormorant Garamond", serif;

    font-size: 25px;

    line-height: 1.5;

    color: #d0c2d1;
}

.memories-note {
    margin-top: 20px;

    color: var(--light-pink);

    font-size: 13px;

    letter-spacing: 1px;
}


/* =========================================================
   ACCIONES
========================================================= */

.memories-actions {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 15px;

    margin: 55px auto 85px;
}

.memory-action {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 12px;

    padding: 16px 24px;

    border-radius: 40px;

    text-decoration: none;

    font-size: 13px;

    font-weight: 600;

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.primary-action {
    color: white;

    background:
        linear-gradient(
            90deg,
            #d95fa8,
            #895bd0
        );

    box-shadow:
        0 15px 35px rgba(217, 95, 168, 0.25);
}

.secondary-action {
    color: #decce0;

    border:
        1px solid rgba(255, 255, 255, 0.12);

    background:
        rgba(255, 255, 255, 0.04);
}

.memory-action:hover {
    transform: translateY(-3px);
}

.primary-action:hover {
    box-shadow:
        0 20px 45px rgba(217, 95, 168, 0.4);
}


/* =========================================================
   FEED
========================================================= */

.memories-feed {
    width: min(850px, 100%);

    margin: 0 auto;
}


/* =========================================================
   POST
========================================================= */

.post-card {
    width: 100%;

    margin-bottom: 32px;

    padding: 24px;

    border-radius: 28px;

    border: 1px solid rgba(240, 111, 174, 0.14);

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.055),
            rgba(255, 255, 255, 0.018)
        );

    box-shadow:
        0 20px 55px rgba(0, 0, 0, 0.32);

    backdrop-filter: blur(18px);

    overflow: hidden;
}


/* =========================================================
   CABECERA DEL POST
========================================================= */

.post-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 18px;
}

.post-author {
    display: flex;

    align-items: center;

    gap: 12px;
}

.author-avatar {
    width: 42px;
    height: 42px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            #d95fa8,
            #895bd0
        );

    color: white;

    font-family: "Cormorant Garamond", serif;

    font-size: 21px;
}

.post-author-info {
    display: flex;
    flex-direction: column;

    gap: 3px;
}

.post-author-info strong {
    font-size: 13px;
}

.post-author-info span {
    font-size: 10px;

    color: #9f8ba2;
}

.post-date {
    font-size: 10px;

    color: #88768a;
}

/* =========================================================
   CONTENIDO
========================================================= */

.post-title {
    margin: 12px 0 8px;

    font-family: "Cormorant Garamond", serif;

    font-size: clamp(32px, 4vw, 45px);

    font-weight: 600;

    line-height: 1;

    color: #fff8fc;
}

.post-text {
    margin: 0 0 18px;

    font-family: "Cormorant Garamond", serif;

    font-size: 20px;

    line-height: 1.5;

    color: #cdbdce;

    white-space: pre-wrap;
}

/* =========================================================
   MEDIA
========================================================= */

.post-media-grid {
    width: 100%;

    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 7px;

    overflow: hidden;

    border-radius: 20px;

    background: #100817;
}

.post-media-item {
    position: relative;

    overflow: hidden;

    min-width: 0;

    aspect-ratio: 1 / 1;

    background: #100817;
}

.post-media-item img,
.post-media-item video {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition:
        transform 0.5s ease,
        filter 0.5s ease;
}

.post-media-item:hover img {
    transform: scale(1.04);

    filter: brightness(1.05);
}


/* =========================================================
   SI SOLO HAY UNA FOTO
========================================================= */

.post-media-grid.single-media {
    grid-template-columns: 1fr;
}

.post-media-item img,
.post-media-item video {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition:
        transform 0.5s ease,
        filter 0.5s ease;
}


/* =========================================================
   SI HAY TRES FOTOS
========================================================= */

.post-media-grid.three-media .post-media-item:first-child {
    grid-row: span 2;
}


/* =========================================================
   EMPTY STATE
========================================================= */

.empty-memory-card {
    padding: 80px 45px;

    text-align: center;

    border-radius: 30px;

    border:
        1px solid rgba(240, 111, 174, 0.16);

    background:
        radial-gradient(
            circle at center,
            rgba(240, 111, 174, 0.07),
            rgba(255, 255, 255, 0.025)
        );

    box-shadow:
        0 30px 70px rgba(0, 0, 0, 0.25);
}

.empty-memory-icon {
    width: 80px;
    height: 80px;

    margin: 0 auto 30px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background:
        rgba(240, 111, 174, 0.08);

    border:
        1px solid rgba(240, 111, 174, 0.22);

    color: var(--pink);

    font-size: 34px;
}

.empty-memory-card h2 {
    max-width: 650px;

    margin: 0 auto 20px;

    font-family: "Cormorant Garamond", serif;

    font-size: 45px;

    line-height: 1.05;
}

.empty-memory-card p {
    max-width: 620px;

    margin: 0 auto;

    font-family: "Cormorant Garamond", serif;

    font-size: 21px;

    line-height: 1.55;

    color: #bdaebe;
}

.empty-memory-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    margin-top: 35px;

    padding: 15px 23px;

    border-radius: 30px;

    color: white;

    background:
        linear-gradient(
            90deg,
            #d95fa8,
            #895bd0
        );

    text-decoration: none;

    font-size: 13px;

    font-weight: 600;
}


/* =========================================================
   FOOTER
========================================================= */

.memories-footer {
    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 8px;

    margin-top: 100px;

    color: #997e9e;
}

.memories-footer span {
    font-family: "Cormorant Garamond", serif;

    font-size: 28px;
}

.memories-footer small {
    font-size: 10px;

    letter-spacing: 3px;
}


/* =========================================================
   MÓVIL
========================================================= */

@media (max-width: 700px) {

    .memories-container {
        padding: 35px 16px 70px;
    }

    .memories-header h1 {
        font-size: 55px;
    }

    .memories-intro {
        font-size: 22px;
    }

    .memories-actions {
        flex-direction: column;

        margin-bottom: 65px;
    }

    .memory-action {
        width: 100%;
    }

    .post-card {
        padding: 20px;

        border-radius: 22px;
    }

    .post-header {
        align-items: flex-start;
    }

    .post-date {
        font-size: 9px;
    }

    .post-title {
        font-size: 34px;
    }

    .post-text {
        font-size: 20px;
    }

    .post-media-grid {
        gap: 4px;

        border-radius: 15px;
    }

    .empty-memory-card {
        padding: 60px 25px;
    }

    .empty-memory-card h2 {
        font-size: 38px;
    }

/* =========================================================
   VISOR DE RECUERDOS
========================================================= */

.clickable-media {
    cursor: zoom-in;
}


/* =========================================================
   LIGHTBOX
========================================================= */

.memory-lightbox {
    position: fixed;

    inset: 0;

    z-index: 9999;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 35px;

    background:
        rgba(4, 2, 7, 0.94);

    backdrop-filter: blur(18px);
}

.memory-lightbox.active {
    display: flex;
}


body.lightbox-open {
    overflow: hidden;
}


.lightbox-content {
    width: min(1000px, 90vw);
    height: min(760px, 85vh);

    display: flex;

    align-items: center;
    justify-content: center;
}


.lightbox-content img,
.lightbox-content video {
    max-width: 100%;
    max-height: 100%;

    display: block;

    border-radius: 16px;

    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.6);

    object-fit: contain;
}


#lightbox-video {
    display: none;
}


/* =========================================================
   CERRAR
========================================================= */

.lightbox-close {
    position: fixed;

    top: 25px;
    right: 30px;

    width: 48px;
    height: 48px;

    display: flex;

    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255,255,255,0.15);

    border-radius: 50%;

    background:
        rgba(255,255,255,0.06);

    color: white;

    font-size: 30px;

    line-height: 1;

    cursor: pointer;

    transition:
        background 0.3s ease,
        transform 0.3s ease;
}

.lightbox-close:hover {
    background:
        rgba(240,111,174,0.18);

    transform: rotate(90deg);
}


/* =========================================================
   NAVEGACIÓN
========================================================= */

.lightbox-navigation {
    position: fixed;

    top: 50%;

    width: 55px;
    height: 55px;

    display: flex;

    align-items: center;
    justify-content: center;

    transform: translateY(-50%);

    border: 1px solid rgba(255,255,255,0.15);

    border-radius: 50%;

    background:
        rgba(255,255,255,0.06);

    color: white;

    font-family: "Cormorant Garamond", serif;

    font-size: 45px;

    line-height: 1;

    cursor: pointer;

    transition:
        background 0.3s ease,
        transform 0.3s ease;
}

.lightbox-navigation:hover {
    background:
        rgba(240,111,174,0.18);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}


/* =========================================================
   MÓVIL
========================================================= */

@media (max-width: 700px) {

    .memory-lightbox {
        padding: 18px;
    }

    .lightbox-content {
        width: 94vw;
        height: 80vh;
    }

    .lightbox-close {
        top: 15px;
        right: 15px;

        width: 42px;
        height: 42px;
    }

    .lightbox-navigation {
        width: 44px;
        height: 44px;

        font-size: 35px;
    }

    .lightbox-prev {
        left: 12px;
    }

    .lightbox-next {
        right: 12px;
    }

}

/* =========================================================
   ACCIONES DEL POST
========================================================= */

.post-actions {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-top: 20px;

    padding-top: 16px;

    border-top:
        1px solid rgba(255, 255, 255, 0.07);
}

.post-memory-label {
    font-family: "Cormorant Garamond", serif;

    font-size: 17px;

    color: #a995aa;
}

.delete-post-button {
    padding: 8px 14px;

    border: 1px solid
        rgba(255, 100, 150, 0.18);

    border-radius: 20px;

    background:
        rgba(255, 80, 130, 0.05);

    color: #c997aa;

    cursor: pointer;

    font-family: "Montserrat", sans-serif;

    font-size: 10px;

    transition:
        background 0.3s ease,
        color 0.3s ease,
        border-color 0.3s ease;
}

.delete-post-button:hover {
    background:
        rgba(255, 80, 130, 0.12);

    border-color:
        rgba(255, 100, 150, 0.35);

    color: #ffafc9;
}

@media (max-width: 600px) {

    .post-actions {
        flex-direction: column;

        align-items: flex-start;
    }

    .delete-post-button {
        width: 100%;
    }
}

}