/* ===== Isolated Book Component Styles ===== */

#publi_header {
    margin-top: 60px; /* ✅ Adds 60px space above */
    text-align: center;
    padding: 20px;
}

#publi_header h2 {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 10px; /* Adjust spacing below title */
}

#publi_header h2 span {
  color: #bf9b30;
}


#publi_header h3 {
    font-size: 24px;
    font-weight: normal;
    line-height: 1.5;
}


.publi_book {
    transition: opacity 0.4s 0.2s;
    perspective: 250vw;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #333;
    padding: 20px;
    border-radius: 10px;
}

/* Isolated Page Styling */
.publi_page {
    width: 30vw;
    height: 44vw;
    background-color: #111;
    float: left;
    margin-bottom: 0.5em;
    background: left top no-repeat;
    background-size: cover;
    position: relative;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    cursor: pointer;
    user-select: none;
}

.publi_page:nth-child(even) {
    clear: both;
}

/* Pages in the Book */
.publi_book .publi_pages {
    width: 60vw;
    height: 44vw;
    position: relative;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    border-radius: 4px;
}

.publi_book .publi_page {
    float: none;
    clear: none;
    margin: 0;
    position: absolute;
    top: 0;
    width: 30vw;
    height: 44vw;
    transform-origin: 0 0;
    transition: transform 1.4s;
}

.publi_book .publi_page:nth-child(odd) {
    pointer-events: all;
    transform: rotateY(0deg);
    right: 0;
    border-radius: 0 4px 4px 0;
    background-image: linear-gradient(to right, rgba(0,0,0,.15) 0%, rgba(0,0,0,0) 10%);
}

.publi_book .publi_page:nth-child(odd):hover {
    transform: rotateY(-15deg);
}

.publi_book .publi_page:nth-child(even) {
    pointer-events: none;
    transform: rotateY(180deg);
    transform-origin: 100% 0;
    left: 0;
    border-radius: 4px 0 0 4px;
    background-image: linear-gradient(to left, rgba(0,0,0,.12) 0%, rgba(0,0,0,0) 10%);
}

/* Flip Effect */
.publi_book .publi_page.flipped:nth-child(odd) {
    pointer-events: none;
    transform: rotateY(-180deg);
}

.publi_book .publi_page.flipped:nth-child(even) {
    pointer-events: all;
    transform: rotateY(0deg);
}

.publi_book .publi_page.flipped:nth-child(even):hover {
    transform: rotateY(15deg);
}

/* Text Styles */
.publi_page p {
    margin-top: 8vw;
    text-align: center;
    font-size: 5vw;
    color: #000;
}

/* Cover Pages */
.publi_page.publi_cover {
    background-color: #222;
}

/* Remove Global Overwrites */
.publi_book * {
    box-sizing: border-box;
}

#loading-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.8); /* Light transparent background */
    width: 100vw;
    height: 100vh;
    z-index: 1000;
}

.spinner-logo {
    width: 80px;
    height: 80px;
    animation: spin 1.5s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

