/* Personal Story Section - Book Style */
.personal-story-section {
    background: linear-gradient(180deg, #070b1f 0%, #0a0e27 100%);
    padding: 120px 20px;
    position: relative;
    overflow: hidden;
}

/* Add subtle pattern background */
.personal-story-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(53, 67, 240, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(53, 67, 240, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.story-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.story-main-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: #ffffff;
    text-align: center;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.story-subtitle {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    font-weight: 500;
    margin-bottom: 4rem;
}

/* Book Container */
.book-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 600px;
    perspective: 2000px;
}

/* Book */
.book {
    position: relative;
    width: 800px;
    height: 500px;
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
}


/* Book Pages */
.book-page {
    position: absolute;
    width: 50%;
    height: 100%;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform-origin: left center;
    transition: transform 0.6s ease, box-shadow 0.3s ease;
    backface-visibility: hidden;
}

/* Cover */
.cover {
    background: linear-gradient(135deg, #1a1f3a 0%, #0a0e27 100%);
    border: 2px solid rgba(53, 67, 240, 0.3);
}

.cover .page-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #ffffff;
    text-align: center;
}

.cover h3 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #3543F0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cover p {
    font-size: 1.25rem;
    color: #ffffff !important;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.start-reading {
    background: #3543F0;
    color: #ffffff;
    border: none;
    padding: 12px 30px;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.start-reading:hover {
    background: #2936d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(53, 67, 240, 0.4);
}

/* Left Pages */
.page-left {
    left: 0;
    transform-origin: right center;
    z-index: 5;
}

/* Right Pages */
.page-right {
    left: 50%;
    z-index: 4;
}

/* Page Content */
.page-content {
    padding: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

/* Page Images */
.page-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.page-image img {
    width: 90%;
    height: 90%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* Text Pages */
.page-right .page-content h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0a0e27;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #3543F0;
}

.page-right .page-content p {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    margin-bottom: 0.75rem;
}

.page-right .page-content p.highlight {
    background: rgba(53, 67, 240, 0.1);
    padding: 0.75rem;
    border-left: 4px solid #3543F0;
    font-weight: 600;
    margin: 1rem 0;
    font-size: 0.95rem;
}

/* Back Cover */
.back-cover {
    left: 0;
    transform-origin: right center;
    background: 
        linear-gradient(135deg, rgba(10, 14, 39, 0.8) 0%, rgba(26, 31, 58, 0.8) 100%),
        url('book-back-cover.png') center/cover;
    color: #ffffff;
    z-index: 1;
}

.back-cover .page-content {
    text-align: center;
}

.back-cover blockquote {
    font-size: 1.25rem;
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 2rem;
    padding: 0;
    border: none;
    color: rgba(255, 255, 255, 0.9);
}

/* Founder Info */
.founder-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.founder-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #3543F0;
}

.founder-details h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.25rem 0;
}

.founder-details p {
    font-size: 1rem;
    color: #3543F0;
    margin: 0;
}

/* Page States */
.book-page.flip {
    transform: rotateY(-180deg);
}

.page-left.flip {
    z-index: 15;
}

/* Page States */
.book-page.flip {
    transform: rotateY(-180deg);
}

.page-left.flip {
    z-index: 15;
}

/* Book Navigation */
.book-navigation {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-top: 3rem;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 10px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-indicator {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    min-width: 120px;
    text-align: center;
}

/* Auto-flip animation */
@keyframes pageFlip {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(-180deg);
    }
}

/* Responsive Design */
@media (max-width: 900px) {
    .book {
        width: 100%;
        max-width: 600px;
        height: 400px;
    }
    
    .page-content {
        padding: 1.5rem;
    }
    
    .page-right .page-content h3 {
        font-size: 1.4rem;
        margin-bottom: 0.75rem;
    }
    
    .page-right .page-content p {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .page-right .page-content p.highlight {
        padding: 0.5rem;
        margin: 0.75rem 0;
        font-size: 0.85rem;
    }
}

@media (max-width: 600px) {
    .personal-story-section {
        padding: 80px 20px;
    }
    
    .book {
        height: 500px;
    }
    
    .book-page {
        width: 100%;
    }
    
    /* Stack pages on mobile */
    .page-left {
        display: none;
    }
    
    .page-right,
    .cover,
    .back-cover {
        left: 0;
        width: 100%;
    }
    
    .book-navigation {
        width: 100%;
        justify-content: space-between;
        padding: 0 20px;
    }
    
    .page-content {
        padding: 1.5rem;
    }
    
    .cover h3 {
        font-size: 2rem;
    }
    
    .back-cover blockquote {
        font-size: 1.25rem;
    }
}