/* Simple Book Menu - Clean Implementation */

.menu-book-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
    perspective: 1500px;
}

/* Hide mobile navigation on desktop */
.mobile-menu-nav {
    display: none;
}

.book {
    position: relative;
    width: 600px;
    height: 400px;
    margin: 0 auto;
    transform-style: preserve-3d;
}

/* Book Cover - Always visible initially */
.book-cover {
    position: absolute;
    width: 300px;
    height: 400px;
    right: 0;
    top: 0;
    background: linear-gradient(145deg, #001AB1, #2563eb);
    border-radius: 12px;
    transform-origin: left center;
    transform-style: preserve-3d;
    transition: transform 1.5s ease-in-out;
    z-index: 10;
    box-shadow: 
        0 10px 30px rgba(0, 26, 177, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

/* Cover content */
.cover-front {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 40px 20px;
    backface-visibility: hidden;
}

.cover-back {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border: 1px solid rgba(226, 232, 240, 0.5);
    border-radius: 12px;
    transform: rotateY(180deg);
    backface-visibility: hidden;
    padding: 30px 25px;
    overflow-y: auto;
}

.cover-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cover-subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    opacity: 0.9;
    margin-bottom: 20px;
}

.cover-ornament {
    font-size: 2rem;
    opacity: 0.8;
    animation: pulse 2s infinite;
}

/* Menu Pages Container */
.pages-container {
    position: absolute;
    width: 300px;
    height: 400px;
    right: 0;
    top: 0;
    z-index: 5;
}

/* Left Page Container (turned cover back) */
.left-page-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.left-page-header {
    padding: 40px 20px;
}

.left-page-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #001AB1;
    margin-bottom: 15px;
    line-height: 1.2;
}

.left-page-subtitle {
    font-size: 1.1rem;
    color: #64748b;
    font-style: italic;
    line-height: 1.4;
}

/* Individual Pages */
.menu-page {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border: 1px solid rgba(226, 232, 240, 0.5);
    border-radius: 12px;
    padding: 30px 25px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.menu-page.active {
    opacity: 1;
    visibility: visible;
    z-index: 8;
}

/* Page Content */
.page-header {
    display: none; /* Hide right panel header since title is now on left */
}

.page-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #001AB1;
    margin-bottom: 5px;
}

.page-subtitle {
    font-size: 1rem;
    color: #64748b;
    font-style: italic;
}

.page-description {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 15px;
}

.page-features {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.page-features li {
    font-size: 0.8rem;
    color: #475569;
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.page-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

.page-cta {
    background: linear-gradient(135deg, #001AB1, #2563eb);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
}

.page-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 26, 177, 0.3);
}

/* Side Navigation - Centered on Menu */
.book-nav {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.book-nav.visible {
    opacity: 1;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100px;
    height: 100px;
    border: 3px solid #001AB1;
    background: linear-gradient(135deg, #001AB1, #2563eb);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: all;
    box-shadow: 0 6px 25px rgba(0, 26, 177, 0.4);
    z-index: 25;
}

.nav-btn.prev {
    left: -70px;
}

.nav-btn.next {
    right: -70px;
}

.nav-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    border-color: #0ea5e9;
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 8px 30px rgba(14, 165, 233, 0.5);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: #cbd5e1;
    border-color: #94a3b8;
    color: #64748b;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-btn svg {
    margin-bottom: 2px;
    width: 22px;
    height: 22px;
}

.nav-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-align: center;
    line-height: 1.1;
    margin-top: 1px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.nav-menu-text {
    font-size: 0.6rem;
    font-weight: 600;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Page Counter - Bottom Center */
.page-counter {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 600;
    background: white;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    pointer-events: all;
    opacity: 0;
    transition: opacity 0.5s ease 0.3s;
}

.book-nav.visible .page-counter {
    opacity: 1;
}

/* Animations */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Book States */
.book.opened .book-cover {
    transform: rotateY(-180deg);
    z-index: 1;
}

.book.opened .pages-container {
    z-index: 10;
}

/* Responsive */
@media (max-width: 768px) {
    .menu-book-container {
        padding: 10px 0;
        perspective: 1000px;
    }
    
    .book {
        width: 95vw;
        max-width: 360px;
        height: 500px;
        margin: 0 auto;
    }
    
    .book-cover,
    .pages-container,
    .menu-page {
        width: 180px;
        height: 480px;
        padding: 22px 16px;
        display: flex;
        flex-direction: column;
    }
    
    /* Left panel text adjustments for mobile */
    .left-page-header {
        padding: 20px 12px;
    }
    
    .left-page-title {
        font-size: 1.6rem;
        line-height: 1.1;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    .left-page-subtitle {
        font-size: 0.85rem;
        line-height: 1.3;
    }
    
    .cover-front {
        padding: 30px 18px;
    }
    
    .cover-title {
        font-size: 1.6rem;
        margin-bottom: 10px;
    }
    
    .cover-subtitle {
        font-size: 1rem;
        margin-bottom: 18px;
    }
    
    .cover-ornament {
        font-size: 1.8rem;
    }
    
    .page-title {
        font-size: 1.35rem;
        margin-bottom: 6px;
    }
    
    .page-subtitle {
        font-size: 0.8rem;
        margin-bottom: 12px;
    }
    
    .page-description {
        font-size: 0.8rem;
        line-height: 1.4;
        margin-bottom: 12px;
    }
    
    .page-features {
        margin-bottom: 15px;
        flex: 1;
    }
    
    .page-features li {
        font-size: 0.7rem;
        margin-bottom: 5px;
        padding-left: 16px;
        line-height: 1.25;
    }
    
    .page-cta {
        padding: 10px 18px;
        font-size: 0.8rem;
        border-radius: 8px;
        margin-top: auto;
        margin-bottom: 10px;
        align-self: stretch;
        text-align: center;
    }
    
    /* Mobile Navigation - Side buttons smaller */
    .nav-btn {
        width: 50px;
        height: 50px;
        font-size: 0.6rem;
    }
    
    .nav-btn.prev {
        left: -40px;
    }
    
    .nav-btn.next {
        right: -40px;
    }
    
    .nav-btn svg {
        width: 14px;
        height: 14px;
    }
    
    /* Page Counter */
    .page-counter {
        bottom: -35px;
        font-size: 0.75rem;
        padding: 6px 12px;
    }
    
    /* Mobile Bottom Navigation - Visible on mobile */
    .mobile-menu-nav {
        display: flex !important;
        justify-content: center;
        align-items: center;
        gap: 15px;
        margin-top: 25px;
        padding: 15px;
        background: rgba(255, 255, 255, 0.95);
        border-radius: 25px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(0, 26, 177, 0.1);
    }
    
    /* Hide desktop navigation on mobile */
    .book-nav {
        display: none !important;
    }
    
    .mobile-nav-btn {
        background: linear-gradient(135deg, #001AB1, #2563eb);
        color: white;
        border: none;
        width: 45px;
        height: 45px;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        box-shadow: 0 3px 10px rgba(0, 26, 177, 0.3);
    }
    
    .mobile-nav-btn:hover:not(:disabled) {
        background: linear-gradient(135deg, #0ea5e9, #2563eb);
        transform: scale(1.1);
        box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
    }
    
    .mobile-nav-btn:disabled {
        opacity: 0.3;
        cursor: not-allowed;
        background: #cbd5e1;
        color: #64748b;
    }
    
    .mobile-nav-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .mobile-page-dots {
        display: flex;
        gap: 8px;
        align-items: center;
    }
    
    .mobile-page-dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: #cbd5e1;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .mobile-page-dot.active {
        background: #001AB1;
        transform: scale(1.2);
        box-shadow: 0 2px 8px rgba(0, 26, 177, 0.3);
    }
    
    .mobile-page-dot:hover {
        background: #64748b;
        transform: scale(1.1);
    }
    
    .mobile-page-info {
        font-size: 0.7rem;
        color: #64748b;
        font-weight: 600;
        text-align: center;
        min-width: 40px;
    }
}
