/* ===========================================
   ALBUM DETAIL STYLES - PUSTAKA ADAPTATION
   Adaptasi dari fakultas-website dengan tema green pustaka
   =========================================== */

/* Album Header */
.album-header {
    background: var(--gallery-gradient);
    color: white;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Menghilangkan background SVG pattern */
.album-header::before {
    display: none;
}

.album-header-content {
    position: relative;
    z-index: 2;
}

.album-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.album-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.album-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.album-details {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.detail-item i {
    color: var(--gallery-accent);
}

.album-actions-header {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.album-back-button {
    margin-top: 2rem;
    text-align: center;
}

/* Album Filter */
.album-filter {
    background: white;
    border-bottom: 1px solid #eee;
    padding: 1.5rem 0;
    position: sticky;
    top: 76px; /* Adjust based on navbar height */
    z-index: 100;
}

.filter-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 2px solid var(--gallery-light);
    border-radius: 20px;
    color: var(--gallery-primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.filter-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gallery-gradient);
    transition: left 0.3s ease;
    z-index: -1;
}

.filter-tab:hover::before {
    left: 0;
}

.filter-tab:hover,
.filter-tab.active {
    color: white;
    border-color: var(--gallery-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(62, 180, 137, 0.2);
}

.filter-tab .count {
    background: rgba(255,255,255,0.9);
    color: var(--gallery-primary);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.filter-tab.active .count {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* Album Content */
.album-content {
    background: #f8f9fa;
    padding: 3rem 0;
    min-height: 400px;
}

.album-categories-header {
    text-align: center;
    margin-bottom: 2rem;
}

.album-categories-header h3 {
    color: var(--gallery-primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.categories-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-link {
    background: rgba(62, 180, 137, 0.1);
    color: var(--gallery-accent);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.category-link:hover {
    background: var(--gallery-accent);
    color: white;
    transform: translateY(-1px);
}

/* Album Grid */
.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    transition: all 0.5s ease;
}

/* Masonry View */
.album-grid.masonry-view {
    columns: 4;
    column-gap: 1.5rem;
}

.album-grid.masonry-view .album-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    display: block;
}

/* Grid View */
.album-grid.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.album-grid.grid-view .album-item {
    aspect-ratio: 1;
}

.album-grid.grid-view .item-wrapper {
    height: 100%;
}

/* List View */
.album-grid.list-view {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.album-grid.list-view .album-item {
    display: flex;
    height: 120px;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.album-grid.list-view .item-wrapper {
    width: 200px;
    flex-shrink: 0;
    position: relative;
}

.album-grid.list-view .item-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-grid.list-view .item-info {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.album-grid.list-view .item-info h4 {
    font-size: 1rem;
    color: var(--gallery-primary);
    margin-bottom: 0.5rem;
}

.album-grid.list-view .item-info p {
    color: var(--text-light);
    font-size: 0.85rem;
    margin: 0;
}

.album-grid.list-view .item-overlay {
    opacity: 0;
    transition: all 0.3s ease;
}

/* Video duration positioning for list view */
.album-grid.list-view .video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
}

/* Action buttons positioning for different views */
.album-grid.list-view .item-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    flex-direction: column;
    gap: 4px;
}

.album-grid.masonry-view .item-actions,
.album-grid.grid-view .item-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    flex-direction: row;
    gap: 4px;
}

.album-grid.list-view .album-item:hover .item-overlay {
    opacity: 1;
}

.album-grid.list-view .item-overlay:hover {
    background: rgba(27, 78, 59, 0.8);
}

/* Hover effects for different views */
.album-grid.grid-view .album-item:hover,
.album-grid.masonry-view .album-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.album-grid.list-view .album-item:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

/* Image loading and aspect ratio handling */
.album-media {
    width: 100%;
    height: auto;
    display: block;
    border-radius: inherit;
}

/* Album Item */
.album-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    animation: fadeInUp 0.6s ease-out;
}

.album-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(27, 78, 59, 0.15);
}

.item-wrapper {
    position: relative;
    overflow: hidden;
}

.album-grid.masonry-view .item-wrapper {
    display: block;
}

.item-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

.album-grid.masonry-view .item-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

.album-item:hover .item-wrapper img {
    transform: scale(1.05);
}

.item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(27, 78, 59, 0.6);
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.album-item:hover .item-overlay {
    opacity: 1;
}

.play-icon {
    background: var(--gallery-accent);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.play-icon:hover {
    background: var(--gallery-primary);
    transform: scale(1.1);
}

.item-info {
    padding: 1rem;
}

.item-info h4 {
    font-size: 0.9rem;
    color: var(--gallery-primary);
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.item-info p {
    color: var(--text-light);
    font-size: 0.8rem;
    margin: 0;
    line-height: 1.4;
}

.item-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: all 0.3s ease;
}

.album-item:hover .item-actions {
    opacity: 1;
}

.action-btn {
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.action-btn:hover {
    background: var(--gallery-accent);
    transform: scale(1.1);
}

.action-btn.active {
    background: var(--gallery-accent);
}

.action-btn.favorite-btn.active {
    background: #dc2626;
    color: white;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 500;
}

/* Album Viewer Modal */
.album-viewer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.album-viewer.active {
    opacity: 1;
    visibility: visible;
}

.viewer-container {
    position: relative;
    width: 90vw;
    height: 90vh;
    max-width: 1200px;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.viewer-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    position: relative;
    width: 100%;
    height: 100%;
}

.viewer-content img,
.viewer-content video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 1; /* Always visible */
    font-size: 1.2rem;
    z-index: 15;
}

.album-viewer:hover .viewer-nav {
    opacity: 1;
}

.viewer-nav:hover {
    background: var(--gallery-accent);
    transform: translateY(-50%) scale(1.1);
}

.viewer-nav.prev {
    left: 20px;
}

.viewer-nav.next {
    right: 20px;
}

.viewer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.8);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    z-index: 15;
    opacity: 1 !important; /* Force visible with !important */
}

.viewer-close:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.viewer-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    z-index: 10;
    max-height: 30%;
    overflow-y: auto;
    opacity: 1 !important; /* Force visible with !important */
    display: block !important; /* Force visible with !important */
}

.viewer-info h4 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.viewer-info p {
    color: rgba(255,255,255,0.9);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.viewer-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.viewer-actions .btn-outline-custom {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.viewer-actions .btn-outline-custom:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
    color: white;
}

.viewer-counter {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 15;
    opacity: 1;
}

.youtube-embed {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.youtube-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Custom Buttons */
.btn-primary-custom {
    background: var(--gallery-gradient);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.btn-primary-custom:hover {
    background: var(--gallery-gradient-secondary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(62, 180, 137, 0.3);
}

.btn-outline-custom {
    background: transparent;
    color: var(--gallery-primary);
    border: 2px solid var(--gallery-primary);
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.btn-outline-custom:hover {
    background: var(--gallery-primary);
    color: white;
    border-color: var(--gallery-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(27, 78, 59, 0.3);
}

.like-album-btn.liked {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
}

.like-album-btn.liked:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

/* Related Albums */
.related-albums {
    background: #f2f2f2;
    padding: 4rem 0;
    position: relative;
}

/* Menghilangkan pseudo-element, menggunakan background color yang lebih bagus */

.related-albums .section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.related-albums .section-title h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gallery-primary);
    margin-bottom: 0.5rem;
}

/* .related-albums .section-title h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--gallery-accent);
    margin: 1rem auto 0;
    border-radius: 2px;
} */

.related-albums .section-subtitle {
    color: var(--text-light);
    font-size: 1rem;
}

/* Related albums grid - 3 columns per row untuk lebih lega */
.related-albums .albums-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* Empty Album State */
.empty-album {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 20px;
    border: 2px dashed var(--gallery-light);
}

.empty-album i {
    font-size: 4rem;
    color: var(--gallery-light);
    margin-bottom: 1rem;
}

.empty-album h3 {
    color: var(--gallery-primary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.empty-album p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .album-grid.masonry-view {
        columns: 3;
    }
    
    .album-grid.grid-view {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .related-albums .albums-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .album-header {
        padding: 2.5rem 0;
    }
    
    .album-header h1 {
        font-size: 2rem;
    }
    
    .album-filter {
        padding: 1rem 0;
        position: static;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .filter-tabs {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .album-grid.masonry-view {
        columns: 2;
        column-gap: 1rem;
    }
    
    .album-grid.grid-view {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .album-grid.list-view .album-item {
        flex-direction: column;
        height: auto;
    }
    
    .album-grid.list-view .item-wrapper {
        width: 100%;
        height: 150px;
    }
    
    .viewer-container {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .viewer-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .viewer-nav.prev {
        left: 10px;
    }

    .viewer-nav.next {
        right: 10px;
    }

    .viewer-close {
        width: 35px;
        height: 35px;
        top: 15px;
        right: 15px;
        font-size: 1rem;
    }

    .viewer-counter {
        top: 15px;
        left: 15px;
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .viewer-info {
        padding: 1rem;
    }

    .viewer-info h4 {
        font-size: 1rem;
    }

    .viewer-info p {
        font-size: 0.9rem;
    }

    .viewer-container {
        width: 95vw;
        height: 95vh;
        border-radius: 10px;
    }    .album-actions-header {
        flex-direction: column;
        align-items: center;
    }
    
    .related-albums .albums-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .album-header {
        padding: 2rem 0;
    }
    
    .album-header h1 {
        font-size: 1.8rem;
    }
    
    .album-grid.masonry-view {
        columns: 1;
    }
    
    .album-grid.grid-view {
        grid-template-columns: 1fr;
    }
    
    .viewer-container {
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .filter-tabs {
        flex-direction: column;
    }
    
    .album-item {
        margin-bottom: 1rem;
    }
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.album-item {
    animation: fadeInUp 0.6s ease-out;
}

.album-item:nth-child(2) { animation-delay: 0.1s; }
.album-item:nth-child(3) { animation-delay: 0.2s; }
.album-item:nth-child(4) { animation-delay: 0.3s; }




