/* Base styles */
body {
    background-image: url("images/background.jpg");
    font-family: serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-size: 18px; /* Base font size */
    line-height: 1.8;
    
}

/* Adjust text scaling */
h2 {
    font-size: clamp(0.9rem, 2.5vw, 1.5rem);
    margin-top: clamp(8px, 1.5vw, 20px);
    margin-bottom: clamp(8px, 1.5vw, 15px);
}

p {
    font-size: clamp(0.9rem, 1.4vw, 1.3rem);
    line-height: 1.2;
    margin-bottom: clamp(6px, 1.2vw, 12px);
}

ul li {
    line-height: 1.6;
    font-size: clamp(0.75rem, 1.2vw, 1.1rem);
}


/* Flipbook Container */
#flipbook {
    position: relative;
    width: 98%; /* Increased from 95% */
    height: 85vh; /* Increased from 80vh */
    margin: 10px auto; /* Reduced from 20px */
    box-sizing: border-box;
    transition: all 0.3s ease;
    max-width: 1500px;
}


#flipbook .turn-page {
    background-color: rgba(255,255,255,0);
}

/* Page Styles */
.cover, .left-page, .right-page {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: auto;

}

.cover-title {
    color:#fbd36b;
}

.left-page,
.right-page {
    width: 50%;
}

.page-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: fill; /* Makes images cover their container */
    object-position: center; /* Centers the image within its container */

}

/* Overlay Content */
.cover-overlay-content,
.left-overlay-content,
.right-overlay-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    min-height: 100%; /* Ensure it takes up at least full height */
    z-index: 20;
    padding: clamp(10px, 3vw, 20px);
    padding-bottom: clamp(20px, 4vw, 30px); /* Extra padding at bottom */
    padding-top: 8%;
    box-sizing: border-box;
    pointer-events: auto;
    overflow-y: auto; /* Allow scrolling if needed */
}

/* Overlay Content */
.cover-overlay-content h2,
.left-overlay-content h2,
.right-overlay-content h2 {
    text-align: center;
    line-height: 1.2em;
}

/* Page Content */
.left-page ul,
.right-page ul {
    width: 90%;
    padding: 0 5%;
    margin: 0;
}

.cover h1 {
    position: relative;
    margin: 85% auto 0 auto;
    text-align: center;
    font-weight: 300;
    z-index: 20;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    padding-left:10%;
}

.profile {
    max-width: clamp(80px, 15vw, 120px);
    height: auto;
    border-radius: 5px;
    display: block;
    margin: 0 auto;
}

.inner-page {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.7);
    padding: clamp(8px, 1.5vw, 15px);
    border-radius: 10px;
    margin: clamp(5px, 1vw, 10px);
    /* Adjust font size range for better readability at small sizes */
    font-size: clamp(0.75rem, 1.2vw, 1rem);
    height: auto; /* Allow height to adjust to content */
    min-height: calc(100% - 20px); /* Minimum height accounting for margins */
    max-height: none; /* Remove max-height restriction */
    overflow-y: auto;
    box-sizing: border-box;
}

/* Back Cover */
#back-cover {
    background: url("images/book-back.png");
    background-size: 100% 100%; /* Stretches image to fill exactly */
    background-repeat: no-repeat;
    background-position: center;
    width: 100%;
    height: 100%;

}

/* Button Controls */
#button-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: clamp(5px, 1vw, 10px);
    padding: 10px;
}

#button-wrapper button {
    padding: clamp(8px, 2vw, 10px) clamp(15px, 3vw, 20px);
    margin: clamp(5px, 1vw, 10px);
    background-color: #4a200f;
    color: #fbd36b;
    border: none;
    border-radius: 5px;
    font-size: clamp(14px, 1vw, 16px);
    cursor: pointer;
    transition: all 0.3s ease;
}

#button-wrapper button:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

/* List Styles */
.name-list {
    padding-left: clamp(10%, 15%, 20%)!important;
}

ul.name-list li a {
font-size: clamp(20px, 1.2vw, 24px);
    line-height: 2.2;
    text-decoration: none;
}

}

.name-list a {
    text-decoration: none;
    color: black;
    transition: all 0.3s ease;
    pointer-events: auto; /* Explicitly enable pointer events for links */
    cursor: pointer; /* Add cursor pointer for better UX */
    pointer-events: auto;
    position: relative;
    z-index: 30;


}


.name-list li a:visited,
.name-list li a:link {
    text-decoration: none;
    color: black;
}

.name-list li a:hover {

}

.center-date {
    text-align: center;
    font-weight: 600;
    margin: 0;
    padding: 0;
    font-size: 1.2rem;
}
