/* =========================================
   5. ADVANCED GALLERY (ALBUM TOPICS)
   ========================================= */
.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.album-card {
    position: relative;
    height: 300px;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.album-card img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s ease;
}

.album-card:hover img { transform: scale(1.1); }

.album-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    color: white; opacity: 0.9; transition: 0.3s;
}

.album-card:hover .album-overlay {
    background: rgba(255, 77, 109, 0.85); /* Pink overlay on hover */
}

.album-overlay i { font-size: 3rem; margin-bottom: 10px; }
.album-overlay h3 { font-size: 1.5rem; font-weight: 600; }
.album-overlay p { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; }


/* --- Layer 1: Album Modal (Grid) --- */
#albumModal { z-index: 1500; } /* Higher than Header(1000) */

.modal-container {
    width: 90%; max-width: 1000px; max-height: 90vh;
    overflow-y: auto; /* Scroll inside modal if needed */
    padding: 20px;
    /* Custom Scrollbar for Modal */
    scrollbar-width: thin;
    scrollbar-color: var(--primary) #333;
}

.modal-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.modal-gallery-grid img {
    width: 100%; height: 180px; object-fit: cover;
    border-radius: 8px; border: 2px solid transparent;
    cursor: zoom-in; transition: 0.3s;
}

.modal-gallery-grid img:hover {
    transform: scale(1.03); border-color: var(--primary);
}

/* --- Layer 2: Full View Modal (Single Image) --- */
#fullViewModal { z-index: 2000; } /* Topmost Layer */

#fullImage {
    max-width: 90%; max-height: 90vh;
    border: 3px solid var(--white);
    border-radius: 5px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}


/* --- DELETE BUTTON STYLES --- */
.img-wrapper {
    position: relative; /* මේක අනිවාර්යයි */
    display: inline-block;
}

.delete-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: red;
    color: white;
    border: none;
    padding: 5px 8px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    z-index: 10;
    transition: 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.delete-btn:hover {
    background: darkred;
    transform: scale(1.1);
}