
/* โครงหลัก */
.ebooks-container {
    display: grid;
    grid-template-columns: 25% 75%;
    gap: 20px;
    margin: 0 auto;
    align-items: start;
}

/* ฝั่งซ้าย */
.container-ebook-title{
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* ดัน nav-buttons ลงล่าง */
    height: 350px; /* กำหนดความสูงของ container ตามต้องการ */
    width: 100%;
    padding-bottom: 20px;
}
.ebooks-info {
    text-align: start; 
    display: flex;
    flex-direction: column;
    align-items: start; 
}

.ebooks-info h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.ebooks-info h3 {
    font-size: 1.3rem;
    margin: 8px 0;
}

.ebooks-info p {
    margin-bottom: 10px;
}

.ebooks-info a {
    display: inline-block;
    margin-bottom: 20px;
    color: #0056b3;
}

.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.nav-buttons button {
    background: #3883c1;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
}

.nav-buttons button:hover {
    background: #0056b3;
    color: #fff;
}

.nav-buttons button:hover {
    background: #0056b3;
    color: #fff;
}

/* ฝั่งขวา */
.ebooks-slider-wrapper {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.ebooks-slider {
    display: flex;
    transition: transform 0.4s ease-in-out;
    align-items: flex-end;
}

.ebooks-slider img {
    width: auto;
    height: 100%;
    max-height: 280px;
    margin-right: 15px;
    border-radius: 10px;
    transition: transform 0.3s;
    border: 1px solid #D9D9D9;
    transform: scale(0.90);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.ebooks-slider img.active-left {
    transition: transform 0.3s;
    width: auto;
    height: 100%;
    max-height: 350px;

    transform: scale(0.9);
    z-index: 2;
}
.ebooks-slider img:hover {
    transition: transform 0.3s;
    transform: scale(1);
}

/* Responsive */
@media (max-width: 768px) {
    .ebooks-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
}