/* ========================================
   INTERACTIVE BOOK SECTION STYLES
   ======================================== */

.book-section {
    min-height: 100vh;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 2rem;
    position: relative;
    overflow: hidden;
    border: 8px solid #c5a394;
    margin: 0;
}

.book-container {
    max-width: 1400px;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   BOOK CONTENT LAYOUT
   ======================================== */
.book-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    position: relative;
    z-index: 2;
}

/* ========================================
   NAVIGATION ARROWS
   ======================================== */
.nav-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid rgba(197, 163, 148, 0.3);
    background: rgba(197, 163, 148, 0.1);
    color: rgba(197, 163, 148, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.nav-btn:hover {
    background: rgba(197, 163, 148, 0.2);
    border-color: rgba(197, 163, 148, 0.7);
    color: #c5a394;
    transform: scale(1.05);
}

.nav-btn:active {
    transform: scale(0.95);
}

/* ========================================
   3D BOOK DISPLAY
   ======================================== */
.book-display {
    perspective: 1000px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-3d {
    position: relative;
    width: 500px;
    height: 380px;
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
    cursor: pointer;
}

.book-3d:hover {
    transform: rotateY(-5deg) rotateX(2deg);
}

.book-3d.book-open {
    transform: rotateY(-15deg) rotateX(5deg);
}

/* ========================================
   BOOK COVER
   ======================================== */
.book-cover {
    position: absolute;
    width: 100%;
    height: 100%;
    background: url('../Assets /book-cover.png') center/cover;
    border-radius: 8px;
    transform: translateZ(15px);
    display: block;
    transition: all 0.6s ease;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 10;
}

.book-cover::before {
    display: none;
}

.book-title {
    display: none;
}

.book-spine {
    position: absolute;
    left: -15px;
    top: 0;
    width: 15px;
    height: 100%;
    background: linear-gradient(180deg, #6d4136 0%, #5a342a 100%);
    transform: rotateY(-90deg);
    transform-origin: left center;
    border-radius: 0 0 0 8px;
}

/* ========================================
   BOOK PAGES & PDF VIEWER
   ======================================== */
.book-pages {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #faf9f7;
    border-radius: 6px;
    transform: translateZ(-5px);
    display: none;
    perspective: 1000px;
    opacity: 0;
    transition: all 0.6s ease;
    overflow: hidden;
}

.book-3d.book-open .book-pages {
    display: block;
    opacity: 1;
    transform: translateZ(20px);
}

.book-3d.book-open .book-cover {
    transform: translateZ(5px) rotateY(-160deg);
    transform-origin: left center;
}

/* Book Page Flip Styles */
.book-page-container {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.book-page {
    position: absolute;
    width: 50%;
    height: 100%;
    background: white;
    border: 1px solid #ddd;
    transform-origin: right center;
    transition: transform 0.8s ease;
    backface-visibility: hidden;
}

.book-page.left {
    left: 0;
    border-radius: 6px 0 0 6px;
}

.book-page.right {
    right: 0;
    border-radius: 0 6px 6px 0;
}

.book-page.flipping {
    transform: rotateY(-180deg);
}

.book-page iframe {
    width: 200%;
    height: 100%;
    border: none;
    transform-origin: left top;
}

.book-page.left iframe {
    transform: translateX(0);
}

.book-page.right iframe {
    transform: translateX(-100%);
}

/* Close button */
.close-book-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(197, 163, 148, 0.8);
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.close-book-btn:hover {
    background: rgba(197, 163, 148, 1);
    transform: scale(1.1);
}

.book-3d.book-open .close-book-btn {
    display: flex;
}

.pdf-viewer {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 6px;
    display: none;
}

.book-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    color: #666;
}

.book-placeholder p {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #888;
}

.open-book-btn {
    background: #c5a394;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.open-book-btn:hover {
    background: #b8988a;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(197, 163, 148, 0.4);
}

/* ========================================
   TEXT OVERLAY
   ======================================== */
.book-text-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.text-left {
    position: absolute;
    left: 5%;
    bottom: 35%;
    font-family: 'Migra', serif;
    font-size: 4.5rem;
    font-weight: 200;
    color: rgba(197, 163, 148, 0.7);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    line-height: 0.9;
}

.text-right {
    position: absolute;
    right: 5%;
    bottom: 20%;
    font-family: 'Migra', serif;
    font-size: 4.5rem;
    font-weight: 200;
    color: rgba(197, 163, 148, 0.7);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    line-height: 0.9;
}

.name-header {
    position: absolute;
    top: 12%;
    right: 8%;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(51, 51, 51, 0.8);
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

.decorative-stars {
    position: absolute;
}

.star {
    position: absolute;
    font-size: 2rem;
    color: rgba(197, 163, 148, 0.4);
    animation: twinkle 3s ease-in-out infinite alternate;
}

.star-1 {
    top: 20%;
    left: 15%;
    animation-delay: 0s;
}

.star-2 {
    bottom: 25%;
    right: 20%;
    animation-delay: 1.5s;
}

@keyframes twinkle {
    0% { opacity: 0.3; transform: scale(1); }
    100% { opacity: 0.8; transform: scale(1.1); }
}


/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1024px) {
    .book-content {
        gap: 2rem;
    }
    
    .name-main {
        font-size: 4.5rem;
    }
    
    .book-3d {
        width: 450px;
        height: 320px;
    }
    }
    
    .nav-btn {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 768px) {
    .book-section {
        padding: 40px 1rem;
    }
    
    .book-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    .nav-arrow {
        order: 2;
    }
    
    .book-display {
        order: 1;
    }
    
    .nav-arrow.nav-left {
        order: 1;
    }
    
    .nav-arrow.nav-right {
        order: 3;
    }
    
    .book-3d {
        width: 400px;
        height: 280px;
    }
    
    .text-left {
        font-size: 3rem;
        left: 3%;
        bottom: 30%;
    }
    
    .text-right {
        font-size: 3rem;
        right: 3%;
        bottom: 15%;
    }
    
    .name-header {
        font-size: 0.8rem;
        top: 8%;
        right: 5%;
    }
    
}

@media (max-width: 480px) {
    .book-3d {
        width: 320px;
        height: 240px;
    }
    
    .text-left {
        font-size: 2rem;
        left: 2%;
        bottom: 25%;
    }
    
    .text-right {
        font-size: 2rem;
        right: 2%;
        bottom: 10%;
    }
    
    .book-title {
        font-size: 1.4rem;
    }
    
    .nav-btn {
        width: 45px;
        height: 45px;
    }
    
    .star {
        font-size: 1.5rem;
    }
}