/* ─────────────────────────────────────────
   3D DIARY BOOK STYLE (slide1-binder.css)
───────────────────────────────────────── */

/* 1. Header Section Title */
.book-section-header {
    text-align: center;
    margin-bottom: 24px;
    z-index: 5;
}

.book-section-title {
    font-family: 'Englebert', cursive;
    font-size: 2.2rem;
    color: var(--warm);
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(200, 168, 130, 0.15);
    margin-bottom: 4px;
}

.book-section-subtitle {
    font-family: 'Jost', sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--platinum-dim);
}

/* 2. Slide Binder Gutter Layout */
.slide-binder {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    width: 100%;
    flex-shrink: 0; /* Prevent flex container squishing on desktop/web view */
}

.s1-content {
    flex-shrink: 0; /* Prevent header text squishing */
}

.book {
    position: relative;
    width: 350px;
    height: 500px;
    transition: transform 0.6s cubic-bezier(0.645, 0.045, 0.355, 1.000);
    perspective: 1500px;
    will-change: transform; /* GPU accelerated book translation */
}

/* Spine Shadow */
.book::after {
    content: '';
    position: absolute;
    left: -4px;
    top: 0;
    width: 8px;
    height: 100%;
    /* background: linear-gradient(to right, rgba(0,0,0,0.2), rgba(0,0,0,0.05), rgba(0,0,0,0.2)); */
    z-index: 10;
    pointer-events: none;
}

/* 3. Binder Rings Ornament */
.binder-rings {
    position: absolute;
    left: 0;
    top: 15px;
    width: 0;
    height: calc(100% - 30px);
    z-index: 99;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    opacity: 0; /* Hidden when book is closed */
    transition: opacity 0.5s ease;
}

.book.open .binder-rings {
    opacity: 1; /* Fade in when book is open */
}

.ring {
    width: 26px;
    height: 14px;
    background: linear-gradient(to right, #a3814c, #e5c07b 40%, #f7e6c4 60%, #a3814c);
    border-radius: 6px;
    transform: translateX(-50%);
    box-shadow: 1px 3px 5px rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.35);
    position: relative;
}

/* 4. 3D Pages Structure */
.paper {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    transform-style: preserve-3d;
}

/* Paper Flipped Transition */
.flipped .front,
.flipped .back {
    transform: rotateY(-180deg);
}

.front, .back {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    transform-origin: left;
    transition: transform 0.6s cubic-bezier(0.645, 0.045, 0.355, 1.000); /* Synchronized with book translation */
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    will-change: transform; /* Force GPU rendering path */
}

.front {
    z-index: 1;
    backface-visibility: hidden; /* Added to both to prevent Z-fighting */
}

.back {
    z-index: 0;
}

.front-content, .back-content {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.back-content {
    transform: rotateY(180deg);
}

/* 5. Lined Notebook Paper Texture */
.notebook-paper {
    width: 100%;
    height: 100%;
    background-color: #fdfbf7;
    background-size: 100% 100%, 100% 28px;
    box-shadow: inset 10px 0 20px rgba(0,0,0,0.04), 0 4px 10px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    box-sizing: border-box;
}

/* Front Page Notebook Margins and Lines */
.front-content.notebook-paper {
    background-image: 
        linear-gradient(90deg, transparent 34px, rgba(232, 168, 168, 0.6) 34px, rgba(232, 168, 168, 0.6) 36px, transparent 36px),
        linear-gradient(rgba(200, 168, 130, 0.16) 1px, transparent 1px);
    padding: 38px 24px 20px 48px;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    border-left: 1px solid rgba(0,0,0,0.05);
}

/* Back Page Notebook Margins and Lines */
.back-content.notebook-paper {
    background-image: 
        linear-gradient(-90deg, transparent 34px, rgba(232, 168, 168, 0.6) 34px, rgba(232, 168, 168, 0.6) 36px, transparent 36px),
        linear-gradient(rgba(200, 168, 130, 0.16) 1px, transparent 1px);
    padding: 38px 48px 20px 24px;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    border-right: 1px solid rgba(0,0,0,0.05);
}

/* 6. Hand-written Text Alignment */
.paper-title {
    font-family: 'Englebert', cursive;
    font-size: 1.45rem;
    color: #432e22;
    margin-bottom: 24px;
    margin-top: 4px;
    line-height: 28px;
    font-weight: 600;
}

.paper-text {
    font-family: 'Englebert', cursive;
    font-size: 1.15rem;
    color: #553f31;
    line-height: 28px; /* Perfectly aligned to the horizontal page lines */
    margin-bottom: 28px;
    letter-spacing: 0.2px;
    font-weight: normal;
}

/* Page Number Styling */
.page-number {
    position: absolute;
    bottom: 12px;
    font-family: 'Jost', sans-serif;
    font-size: 10px;
    letter-spacing: 1px;
    color: rgba(67, 46, 34, 0.4);
}

.back-content .page-number {
    left: 20px;
}

.front-content .page-number {
    right: 20px;
}

/* 7. Covers Styling (Warm Amber Leather Theme) */
.page-texture {
    width: 100%;
    height: 100%;
    position: relative;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
}

.page-texture.cover-front {
    background: linear-gradient(135deg, #2a150e 0%, #442317 40%, #5a3121 70%, #2a150e 100%);
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.page-texture.cover-back {
    background: linear-gradient(135deg, #2a150e 0%, #442317 40%, #5a3121 70%, #2a150e 100%);
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.cover-content {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 32px;
}

.cover-title {
    font-family: 'Englebert', cursive;
    font-size: 26px;
    color: #f7e6c4;
    text-align: center;
    line-height: 1.4;
    letter-spacing: 1px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
}

.cover-subtitle {
    font-family: 'Englebert', cursive;
    font-size: 16px;
    color: rgba(247, 230, 196, 0.7);
    text-align: center;
    letter-spacing: 0.5px;
}

.cover-divider {
    width: 80px;
    height: 1px;
    background: rgba(247, 230, 196, 0.3);
    margin: 4px 0;
}

.cover-ornament {
    font-size: 22px;
    color: rgba(247, 230, 196, 0.65);
    font-family: serif;
}

.corner-ribbon {
    position: absolute;
    top: 16px; 
    right: 16px;
    width: 28px; 
    height: 28px;
    border-top: 2px solid rgba(247, 230, 196, 0.3);
    border-right: 2px solid rgba(247, 230, 196, 0.3);
}

.corner-ribbon.bl {
    top: auto; 
    right: auto;
    bottom: 16px; 
    left: 16px;
    border-top: none; 
    border-right: none;
    border-bottom: 2px solid rgba(247, 230, 196, 0.3);
    border-left: 2px solid rgba(247, 230, 196, 0.3);
}

/* 8. Soft Bottom-positioned Buttons */
.book-controls {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 36px;
    z-index: 5;
}

.control-btn {
    border: 1px solid var(--border-soft);
    background-color: rgba(18, 16, 26, 0.85); /* Slightly darker solid background for readability */
    color: var(--warm);
    cursor: pointer;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    will-change: transform; /* Prevent redrawing layout tree */
}

.control-btn:hover:not(:disabled) {
    background-color: var(--warm-ghost);
    border-color: var(--warm);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(200, 168, 130, 0.2);
}

.control-btn:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(200, 168, 130, 0.15);
}

.control-btn i {
    color: var(--warm);
    font-size: 16px;
    transition: color 0.3s;
}

.control-btn:hover i {
    color: var(--platinum);
}

.control-btn:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

/* 9. Z-indexing Stack order */
#p1 { z-index: 4; }
#p2 { z-index: 3; }
#p3 { z-index: 2; }
#p4 { z-index: 1; }

#f1 { border-radius: 0 12px 12px 0; }
#b4 { border-radius: 12px 0 0 12px; }

/* 10. Proportional Combined Scaling Media Queries (Width & Height) */
@media (max-width: 800px), (max-height: 850px) {
    .slide {
        padding: 30px 24px !important;
    }
    .s1-content {
        margin-bottom: 12px !important;
    }
    .slide-binder {
        transform: scale(0.8);
        transform-origin: center center;
    }
}

@media (max-width: 620px), (max-height: 740px) {
    .slide-binder {
        transform: scale(0.68);
        transform-origin: center center;
    }
    .book-section-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px), (max-height: 620px) {
    .slide-binder {
        transform: scale(0.55);
        transform-origin: center center;
    }
}

@media (max-width: 380px), (max-height: 520px) {
    .slide-binder {
        transform: scale(0.45);
        transform-origin: center center;
    }
}
.binder{
background:#0b0916;

}