/* --- Books Page Styles --- */

/* Static Page Header Style (if you don't want video) */
.page-header-static {
    background: url('https://placehold.co/1920x400/214b85/ffffff?text=Ыйман+Китепканасы') no-repeat center center/cover;
    height: 20vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.page-header-static h1 {
    font-size: 1rem;
    font-weight: 500;
    z-index: 2;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}


/* Books Grid Styles */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.book-item {
    cursor: pointer;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.book-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.book-item img {
    width: 100%;
    height: auto;
    display: block;
}

.book-item .book-title {
    padding: 15px 10px;
    font-weight: 600;
    background-color: #f9f9f9;
}


/* --- Modal Styles --- */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; 
    background-color: rgba(0,0,0,0.6); 
    animation: fadeIn 0.5s;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 900px;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    animation: slideIn 0.5s;
}

.modal-body {
    display: flex;
    gap: 30px;
}

.modal-image {
    flex: 0 0 40%; /* Fixed width for image container */
    max-width: 300px;
}

.modal-image img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

.modal-description {
    flex: 1; /* Takes remaining space */
}

.modal-description h2 {
    margin-top: 0;
    color: #214b85;
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 35px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: #333;
    text-decoration: none;
    cursor: pointer;
}

/* Animations */
@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

@keyframes slideIn {
    from {transform: translateY(-50px); opacity: 0;}
    to {transform: translateY(0); opacity: 1;}
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modal-body {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .modal-image {
        max-width: 250px;
    }
    .modal-content {
        width: 90%;
        margin: 10% auto;
        padding: 20px;
    }
}