body {
    margin: 0;
    font-family: Arial, sans-serif;
}

h1, h2 {
    text-align: center;
}

.header-image img {
    width: 100%;
    height: 440px;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.page-title {
    font-size: 20px;
    text-align: center;
    color: #fff;
    background: linear-gradient(to right, #00BFFF, #8A2BE2);
    padding: 25px;
    margin: 0 auto 30px auto;
    max-width: 100%;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: bold;
}

#page-title {
    font-size: 20px;
    text-align: center;
    color: #fff;
    background: linear-gradient(to right, #00BFFF, #8A2BE2);
    padding: 25px;
    margin: 0 auto 30px auto;
    max-width: 100%;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.event-selection {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
}

.event-card {
    cursor: pointer;
    border: 1px solid #ccc;
    padding: 10px;
    width: 250px;
    height: 360px;
    background-color: white;
    text-align: center;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.event-card:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    object-position: center center; 
    border-radius: 5px;
    background-color: #f0f0f0; 
}

.no-photo-message {
    font-size: 18px;
    color: #888;
    text-align: center;
    font-style: italic;
    width: 100%;
}

.gallery-container {
    display: none;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.photo-item {
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
    max-width: 400px;
    max-height: 350px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
}

.photo-item img {
    max-width: 100%;
    max-height: 100%;
    height: auto;
    width: auto;
    object-fit: contain;
    border-radius: 6px;
}

.photo-item:hover {
    transform: scale(1.05);
}

.back-button-wrapper {
    text-align: center;
    margin-top: 30px;
}
        
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #dc3545;    
    color: white;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.back-button:hover {
    background-color: #c82333; 
    transform: translateX(-2px);
}

.pagination-controls {
    text-align: center;
    margin-top: 20px;
}

.pagination-controls .page-btn {
    display: inline-block;
    margin: 0 3px;
    padding: 6px 12px;
    border: 1px solid #007bff;
    border-radius: 4px;
    background-color: white;
    color: #007bff;
    cursor: pointer;
    font-weight: bold;
}

.pagination-controls .page-btn.active {
    background-color: #007bff;
    color: white;
}

.pagination-controls .page-btn:disabled {
    color: #aaa;
    border-color: #aaa;
    cursor: default;
}

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 60px 15px 15px; 
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.85);
    box-sizing: border-box;
}

.button-grup {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.modal-close,
.modal-download {
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 8px 12px;
    background-color: rgba(0, 0, 0, 0.6);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border: none;
    outline: none;
    border-radius: 6px; /* sedikit membulat, tapi tetap kotak */
}

.modal-close:hover {
    background-color: #ff4747;
    transform: scale(1.05);
}

.modal-download:hover {
    background-color: #47a7ff;
    transform: scale(1.05);
}

.modal-content {
    display: block;
    margin: 40px auto 20px; 
    max-width: 90vw;
    max-height: 80vh;
    width: auto;
    height: auto;
    border-radius: 10px;
    object-fit: contain;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

.modal.show {
    animation: fadeIn 0.3s ease-in-out;
}

/* Efek Fade-in untuk Modal */
@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Responsif Tambahan */
@media (max-width: 480px) {
    .modal-header {
        top: 10px;
        right: 10px;
        padding: 4px 8px;
        gap: 8px;
    }
    .header-image img {
        height: 200px;
    }
    .modal-close,
    .modal-download {
        font-size: 24px;
    }

    .modal-download i {
        font-size: 18px;
    }

    .modal-content {
        justify-content: center;
        margin-top: 120px; 
        max-height: 70vh;
    }
}

@media (max-width: 600px) {
    .gallery {
        justify-content: center;
        padding: 0 10px;
    }

    .photo-item {
        width: 100%;
        max-width: 100%;
        max-height: none;
        height: auto;
        margin-bottom: 15px;
    }

    .photo-item img {
        width: 100%;
        height: auto;
        max-height: 200px;
        object-fit: contain;
    }
}
