/* Book Modal Styles */
.book-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.book-modal.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

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

.book-modal-content {
    background: #ffffff;
    border-radius: 15px;
    width: 95%;
    height: 90%;
    max-width: 1400px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

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

.book-modal-header {
    padding: 20px 25px;
    background: linear-gradient(135deg, #2980b9 0%, #1a5f8f 100%);
    color: #ffffff;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.book-modal-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

.book-modal-actions {
    display: flex;
    gap: 10px;
}

.book-modal-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.book-modal-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.book-modal-btn:active {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(0);
}

.book-modal-body {
    flex: 1;
    padding: 0;
    overflow: hidden;
    position: relative;
    min-height: 0;
}

/* Floating close button – hidden (close is in header) */
.book-modal-close-float {
    display: none !important;
}

.book-modal-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0 0 15px 15px;
}

@media (max-width: 768px) {
    .book-modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .book-modal-header {
        padding: 15px 20px;
        border-radius: 0;
        flex-wrap: wrap;
        position: relative;
        min-height: 60px;
    }

    .book-modal-header h2 {
        font-size: 18px;
        flex: 1;
        min-width: 0;
        word-break: break-word;
        padding-right: 10px;
    }

    .book-modal-actions {
        flex-shrink: 0;
    }

    .book-modal-btn {
        padding: 10px 16px;
        font-size: 13px;
        white-space: nowrap;
        min-width: 50px;
        min-height: 44px;
    }

    .book-modal-iframe {
        border-radius: 0;
    }
}

@media (max-width: 480px) {
    .book-modal-header {
        padding: 12px 15px;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        min-height: 56px;
    }

    .book-modal-header h2 {
        font-size: 15px;
        margin: 0;
        flex: 1;
        padding-right: 10px;
        line-height: 1.4;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .book-modal-actions {
        flex-shrink: 0;
    }

    .book-modal-btn {
        padding: 10px 16px;
        font-size: 13px;
        min-width: 50px;
        min-height: 44px;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.25);
        border: 2px solid rgba(255, 255, 255, 0.4);
    }

    .book-modal-btn span {
        display: inline;
        font-size: 12px;
    }

    .book-modal-btn i {
        font-size: 16px;
        margin-left: 6px;
    }

    .book-modal-btn:active {
        background: rgba(255, 255, 255, 0.4);
        transform: scale(0.98);
    }

}

@media (max-width: 360px) {
    .book-modal-header {
        padding: 10px 12px;
    }

    .book-modal-header h2 {
        font-size: 14px;
    }

    .book-modal-btn {
        padding: 8px 14px;
        font-size: 12px;
        min-width: 45px;
        min-height: 40px;
    }

    .book-modal-btn span {
        font-size: 12px;
    }

    .book-modal-btn i {
        font-size: 14px;
        margin-left: 4px;
    }

}

/* Section titles for Old / New books */
.books-section-title {
    font-size: 22px;
    font-weight: 700;
    color: #2980b9;
    margin: 30px 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 3px solid #e67e22;
    width: 100%;
}
.books-section-title:first-of-type {
    margin-top: 0;
}

/* Book card – تەنها وێنە، هەمان سایزی کارتی کەتەگۆری، بێ تێکست */
.book-item-card {
    padding: 40px 30px !important;
    min-height: 250px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: center !important;
}
.book-card-thumb-wrap {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 0;
    border-radius: 10px;
    overflow: hidden;
    background: #e8e8e8;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15), 0 8px 25px rgba(0,0,0,0.1);
}
.book-card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}
.book-card-thumb-placeholder {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #e8e8e8 0%, #d8d8d8 100%);
    border-radius: 10px;
}
/* تێکستی ناو لەژێر وێنە */
.book-item-card h3 {
    display: block !important;
    margin: 0;
    padding: 10px 6px 0;
    font-size: 15px;
    font-weight: 700;
    color: #2c2c2c;
    text-align: center;
    line-height: 1.35;
    flex-shrink: 0;
}
.book-item-card:hover h3 {
    color: #2980b9;
}
.book-item-card .book-item-icon {
    display: none !important;
}
@media (max-width: 768px) {
    .book-item-card h3 {
        font-size: 14px;
        padding: 8px 4px 0;
    }
}
@media (max-width: 480px) {
    .book-item-card h3 {
        font-size: 13px;
        padding: 6px 2px 0;
    }
}
@media (max-width: 768px) {
    .book-item-card {
        min-height: 220px !important;
        padding: 30px 20px !important;
    }
}
@media (max-width: 480px) {
    .book-item-card {
        min-height: 200px !important;
        padding: 25px 15px !important;
    }
}
