/* ========================================
   Booklets Page Styles
   ======================================== */

/* Filter Box */
.booklet-filter-box {
    background: #f0f7fb;
    border: 1px solid #d4e8f3;
    border-radius: 8px;
    padding: 20px 25px;
    margin-bottom: 30px;
}

.booklet-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.filter-label {
    font-size: 16px;
    font-weight: 400;
    color: #333;
}

.booklet-reset-btn {
    font-size: 14px;
    color: #555;
    text-decoration: none;
    transition: color 0.3s;
}

.booklet-reset-btn:hover {
    color: #1a7bb5;
}

.booklet-filter-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.booklet-search-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.booklet-search-wrap input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.booklet-search-wrap input:focus {
    border-color: #1a7bb5;
}

.booklet-search-wrap .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

.booklet-category-wrap {
    flex: 1;
    min-width: 200px;
}

.booklet-category-wrap select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    outline: none;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.3s;
    appearance: auto;
}

.booklet-category-wrap select:focus {
    border-color: #1a7bb5;
}

.booklet-apply-btn {
    background: #0d6eb6;
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 27px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.3s;
}

.booklet-apply-btn:hover {
    background: #135f8c;
}

/* Booklet Grid */
.booklet-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    position: relative;
    min-height: 100px;
}

.booklet-grid.booklet-loading {
    opacity: 0.5;
    pointer-events: none;
}

.booklet-grid.booklet-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 36px;
    margin: -18px 0 0 -18px;
    border: 3px solid #ccc;
    border-top-color: #1a7bb5;
    border-radius: 50%;
    animation: booklet-spin 0.7s linear infinite;
}

@keyframes booklet-spin {
    to { transform: rotate(360deg); }
}

/* Booklet Card */
.booklet-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s;
}

.booklet-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Type Badge */
.booklet-type-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #fff;
    color: #0D6EB6;
    font-size: 14px;
    font-weight: 400;
    padding: 4px 10px;
    border-radius: 6px;
    z-index: 2;
    text-transform: capitalize;
    transition: 250ms all ease-in-out;
}

.booklet-card:hover .booklet-type-badge {
    background: rgb(242, 122, 40);;
    color: #fff;
}

/* Card Image */
.booklet-card-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}

.booklet-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

.booklet-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #aaa;
    font-size: 14px;
}

/* Card Content */
.booklet-card-content {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    text-align: center;
}

.booklet-category-label {
	color: #0d6eb6;
	font-size: 15px;
	font-weight: 300;
	margin-bottom: 6px;
	display: block;
	line-height: 26px;
}

.booklet-card-title {
	font-size: 21px;
	font-weight: 400;
	color: #0c0c0c;
	margin: 0 0 10px;
	line-height: 158%;
}

.booklet-card-excerpt {
	font-size: 15px;
	color: #6f6f6f;
	line-height: 174%;
	margin: 0 0 18px;
	flex: 1;
	font-weight: 300;
}

/* Card Actions */
.booklet-card-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: auto;
}

.btn-booklet {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 27px;
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    text-align: center;
    transition: background 0.3s, color 0.3s;
    cursor: pointer;
}

.btn-view {
    background: rgb(13, 110, 182);
    color: #fff;
}

.btn-view:hover {
    background: rgb(242, 122, 40);
    color: #fff;
}

.btn-download {
    color: #fff;
    background: rgb(13, 110, 182);
}

.btn-download:hover {
    background: rgb(242, 122, 40);
    color: #fff;
}

/* No Results */
.no-booklets-found {
    grid-column: 1 / -1;
    text-align: center;
    color: #888;
    font-size: 16px;
    padding: 40px 0;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1440px) {
    .booklet-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 991px) {
    .booklet-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .booklet-card-title { font-size: 19px; }
}

@media (max-width: 767px) {
    .booklet-filter-controls {
        flex-direction: column;
    }

    .booklet-search-wrap,
    .booklet-category-wrap {
        min-width: 100%;
    }

    .booklet-apply-btn {
        width: 100%;
    }

    .booklet-card-image {
        height: 180px;
    }
}
@media (max-width: 680px) {
    .booklet-card-actions { flex-wrap: wrap; }
    .btn-booklet { width: 100%; }
}
@media (max-width: 600px) {
    .booklet-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}