/* معرض الصور */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 900px;
}

.memory-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s ease;
    aspect-ratio: 1;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.memory-item:hover {
    transform: scale(1.05);
    border-color: #450c0c;
    box-shadow: 0 10px 30px rgba(255, 107, 157, 0.3);
}

.memory-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.memory-item .memory-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: #fff;
    opacity: 0;
    transition: all 0.4s ease;
    text-align: center;
}

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

.memory-item .memory-hint {
    font-size: 0.85rem;
    color: #ffd6e8;
    font-weight: bold;
}

/* المودال */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: modalFade 0.3s ease;
}

.modal.show {
    display: flex;
}

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

.modal-content {
    background: rgba(30, 20, 40, 0.95);
    border-radius: 30px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.modal-content img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 20px;
}

.modal-content p {
    font-size: 1.2rem;
    color: #ffd6e8;
    line-height: 1.8;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2.5rem;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-modal:hover {
    color: #410b09;
    transform: rotate(90deg);
}