/* Remembrance Book core layout */

.book-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.cover-page {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f3e8;
    /* same background look as other pages */
}

.cover-inner {
    text-align: center;
    padding: 60px 20px;
}

.cover-title {
    font-family: "Great Vibes", cursive;
    font-size: 64px;
    color: #3a3227;
    margin: 0;
}


/* Turn.js handles absolute positioning of pages */
.book-pages {
    width: 100%;
    margin: 0 auto;
    position: relative;
    /* IMPORTANT: no flex, no height, no transforms */
}

/* Actual content page */
.remembrancepage {
    background: #f7f3e8;    
    border-radius: 6px;
    box-shadow:
        inset 0 0 40px rgba(0,0,0,0.15),
        0 2px 8px rgba(0,0,0,0.2);
    background-size: cover;
    background-position: center;
    overflow: hidden;
    /* IMPORTANT: no height, no min-height */
}

.remembrancepage .page-inner {
    padding: 20px;
}

.remembrancepage.empty {
    opacity: 0.7;
}

/* Handwritten name */
.name {
    font-family: "Great Vibes", cursive;
    font-size: 40px;
    text-align: center;
    margin: 20px 0;
    color: #3a3227;
}

/* Info table */
.info {
    width: 100%;
    font-size: 15px;
    border-collapse: collapse;
}

.info td {
    padding: 6px 0;
    vertical-align: top;
}

.info td:first-child {
    width: 180px;
    font-weight: bold;
    padding-right: 10px;
}

/* Image slider */
.img-slider {
    position: relative;
    text-align: center;
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.img-slider img {
    max-height: 240px;
    max-width: 100%;
    width: auto;
    display: none;
    border-radius: 4px;
    object-fit: contain;
    background: #ffffff;
    padding: 5px;
    box-shadow: 0px 1px 8px rgba(0,0,0,0.5);
}

.img-slider img.active {
    display: block;
}

.img-slider button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 22px;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.img-slider .slide-prev { left: 6px; }
.img-slider .slide-next { right: 6px; }

/* Navigation arrows */
.book-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #ffffff;
    border: none;
    font-size: 34px;
    cursor: pointer;
    opacity: 0.85;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

.book-nav:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.05);
}

.prev { left: -60px; }
.next { right: -60px; }

/* Mobile layout adjustments */
@media (max-width: 767px) {

    /* Turn.js handles page height; do NOT set height here */

    .remembrancepage {      
    }

    .name {
        font-size: 32px;
        margin-top: 10px;
        margin-bottom: 16px;
    }

    .info tr {
        display: block;
        margin-bottom: 14px;
    }

    .info td {
        display: block;
        width: 100% !important;
        border-top: 1px solid #eee;
        padding: 0 !important;
        margin: 0;
        line-height: 140%;
    }

    .info td:first-child {
        font-weight: bold;
        padding-right: 0;
        margin-bottom: 2px;
        width: 100% !important;
    }

    .img-slider {
        height: auto;
        min-height: 180px;
    }

    .img-slider img {
        max-height: 180px;
    }

    .book-nav {
        top: 20%;
        width: 48px;
        height: 48px;
        font-size: 26px;
    }

    .prev { left: -25px; }
    .next { right: -25px; }
}
