/* ======================================= */
/* STYLE UNTUK HALAMAN GALERI & ALBUM   */
/* ======================================= */

/* === 1. Halaman Daftar Album (gallery.php) === */

.album-grid {
    display: grid;
    /* Tampilkan 3 kolom di desktop, 2 di tablet, 1 di HP */
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.album-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    text-decoration: none;
    color: #333;
    display: flex;
    flex-direction: column;
}
.album-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.album-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #f0f0f0;
}

.album-info {
    padding: 15px;
    background-color: #ffffff;
    flex-grow: 1;
}
.album-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.2em;
    color: #107C41; /* Hijau Kemenag */
}
.album-info p {
    margin: 0;
    font-size: 0.9em;
    color: #666;
}

/* === 2. Halaman Tampilan Album (album_view.php) === */

.back-link {
    display: inline-block;
    margin-bottom: 15px;
    color: #555;
    text-decoration: none;
    font-weight: 600;
}
.back-link:hover {
    color: #107C41;
}

.album-narrative {
    background-color: #e8f5e9; /* Hijau muda */
    border-left: 5px solid #107C41;
    padding: 15px 20px;
    border-radius: 5px;
    margin: 10px 0;
}

/* --- INI ADALAH PERBAIKAN UTAMA --- */
.photo-grid {
    display: grid;
    /* Tampilkan 4 kolom foto di desktop */
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.photo-item a {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.photo-item a:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.photo-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block; /* Menghilangkan spasi ekstra di bawah gambar */
    background-color: #f0f0f0;
}

/* 3. Paginasi (Berlaku di kedua halaman) */
.pagination {
    text-align: center;
    margin-top: 30px;
}
.pagination a {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 4px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
}
.pagination a.active,
.pagination a:hover {
    background-color: #107C41;
    color: white;
    border-color: #107C41;
}

/* 4. Responsive */
@media (max-width: 992px) {
    .album-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .photo-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .album-grid {
        grid-template-columns: 1fr; /* 1 kolom album di HP */
    }
    .photo-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 kolom foto di HP */
        gap: 10px;
    }
    .photo-item img {
        height: 150px;
    }
}