.album-page {
    padding-top: 20px;
}

.album-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 columns strictly */
    gap: 28px;
    /* Spacing between photos, like Insta web */
    margin-top: 20px;
}

.album-item {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    /* enforce square aspect ratio */
    overflow: hidden;
    background-color: #f0f0f0;
    border-radius: 4px;
    /* Optional rounded corners */
}

.album-item-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.album-item-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.album-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    /* Darker for readability */
    opacity: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    pointer-events: none;
    padding: 10px;
    text-align: center;
}

.album-info-overlay {
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.album-caption {
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.2;
}

.album-date {
    font-size: 0.85rem;
    font-weight: 400;
    opacity: 0.9;
}

/* Hover effects */
.album-item:hover .album-overlay {
    opacity: 1;
}

.album-item:hover img {
    transform: scale(1.05);
    /* Slight zoom on hover */
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .album-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columns on tablets */
        gap: 10px;
    }
}

@media screen and (max-width: 480px) {
    .album-grid {
        grid-template-columns: 1fr;
        /* Single column on mobile */
        gap: 20px;
        /* Comfortable gap */
    }

    /* Always show overlay text on mobile */
    .album-overlay {
        opacity: 1;
    }
}

/* Modal Styles - Lightbox */
.album-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease-out;
    /* Background fade in */
}

/* Lightbox Media Container */
.album-lightbox-media {
    width: 100%;
    height: 100%;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0 auto;
    overflow: hidden;
    animation: imageZoomIn 0.4s cubic-bezier(0.1, 0.8, 0.2, 1);
    /* Image zoom in */
}

/* Animations */
@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes imageZoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.album-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    z-index: 1002;
    line-height: 1;
}

.album-modal-close:hover {
    color: #fff;
}


/* Sliding Track */
.carousel-track {
    display: flex;
    height: 100%;
    width: 100%;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Carousel Controls */
.carousel-prev,
.carousel-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.9);
    /* High opacity for visibility */
    color: #000;
    /* Black arrow */
    border-radius: 50%;
    font-size: 20px;
    z-index: 20;
    transition: all 0.2s ease;
    user-select: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    /* Stronger shadow */
}

.carousel-prev:hover,
.carousel-next:hover {
    background-color: rgba(255, 255, 255, 0.9);
    color: #000;
    transform: translateY(-50%) scale(1.05);
}

.carousel-next {
    right: 20px;
}

.carousel-prev {
    left: 20px;
}

/* Multi-photo indicator on grid */
.album-multi-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.5));
}