/* General body styling */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    height: 100vh;
    background-color: #FFD4C3; /* Background sesuai dengan referensi */
}

/* Container for all images */
#flipbook {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Default: 2 images per row */
    gap: 20px;
    width: 80%;
    max-width: 1200px;
    margin-top: 20px;
}

/* One-page view (PC - Full width) */
#flipbook.one-page-view {
    grid-template-columns: 1fr; /* 1 image per row */
    width: 100%; /* Take full width of the screen */
    max-width: 100%;
    gap: 0;
}

/* Page container for each image */
.page {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background-color: #FFD4C3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Page images */
.page img {
    width: 100%;
    height: auto;
    object-fit: cover; /* Ensures full coverage */
    display: block;
    border-radius: 8px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    #flipbook {
        grid-template-columns: 1fr; /* 1 image per row on mobile */
        width: 100%;
    }

    .page img {
        object-fit: contain; /* Ensure image fits without cutting on mobile */
    }
}

/* Toggle Button Styling */
#toggleViewBtn {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 60px; /* Smaller button size */
    height: 60px;
    background-color: rgba(0, 0, 0, 0.1); /*Circular background*/
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /*Shadow effect */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
}

#toggleViewBtn2 {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 40px; /* Smaller button size */
    height: 40px;
    background-color: rgba(0, 0, 0, 0.1); /*Circular background*/
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /*Shadow effect */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
}

#toggleViewBtn img {
    width: 60px; /* Adjust icon size */
    height: auto;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

#toggleViewBtn2 img {
    width: 40px; /* Adjust icon size */
    height: auto;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

#toggleViewBtn:hover img {
    opacity: 1;
}

/* Hide button when screen width forces 1-page view */
@media (max-width: 768px) {
    #toggleViewBtn {
        display: none;
    }
}
