/* =========================
   Training Book Download
   Clean Full Background UI
========================= */

.training-book-section {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

/* =========================
   Header
========================= */

.training-book-header {
    margin-bottom: 34px;
}

.training-book-header .training-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #eef3ff;
    color: #203866;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 900;
    margin-bottom: 20px;
}

.training-book-header h1 {
    color: #203866;
    font-size: 52px;
    font-weight: 900;
    line-height: 1.15;
    margin: 0 0 14px;
}

.training-book-header p {
    max-width: 980px;
    color: #64748b;
    font-size: 18px;
    line-height: 1.8;
    margin: 0;
}

/* =========================
   Search
========================= */

.training-book-search {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 170px;
    gap: 18px;
    margin-bottom: 26px;
}

.training-book-search input {
    width: 100%;
    height: 62px;
    border: 1px solid #dbe3f0;
    border-radius: 18px;
    padding: 0 22px;
    font-size: 16px;
    outline: none;
    background: #ffffff;
    color: #172033;
    transition: 0.25s ease;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.03);
}

.training-book-search input::placeholder {
    color: #64748b;
}

.training-book-search input:focus {
    border-color: #203866;
    box-shadow: 0 0 0 4px rgba(32, 56, 102, 0.08);
}

.training-book-search button {
    height: 62px;
    border: none;
    border-radius: 18px;
    background: linear-gradient(135deg, #203866, #2f4f8f);
    color: #ffffff;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: 0.25s ease;
    box-shadow: 0 14px 28px rgba(32, 56, 102, 0.18);
}

.training-book-search button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(32, 56, 102, 0.24);
}

/* =========================
   Category Tabs
========================= */

.training-book-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 42px;
}

.training-book-tab {
    min-height: 50px;
    padding: 0 26px;
    border-radius: 999px;
    border: 1px solid #dbe3f0;
    background: #ffffff;
    color: #172033;
    text-decoration: none;
    font-size: 16px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.25s ease;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.03);
}

.training-book-tab:hover,
.training-book-tab.active {
    background: #203866;
    color: #ffffff;
    border-color: #203866;
    box-shadow: 0 14px 26px rgba(32, 56, 102, 0.18);
}

/* =========================
   Books Grid
========================= */

.training-books-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
}

/* =========================
   Book Card
========================= */

.training-book-card {
    background: #ffffff;
    border: 1px solid #e8edf8;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
    transition: 0.25s ease;
}

.training-book-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.13);
}

/* =========================
   Book Cover
========================= */

.training-book-cover {
    height: 235px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.training-book-cover i {
    color: rgba(255, 255, 255, 0.88);
    font-size: 72px;
}

.training-book-cover span {
    position: absolute;
    top: 18px;
    left: 18px;
    background: #f3c84b;
    color: #ffffff;
    padding: 9px 20px;
    border-radius: 999px;
    font-weight: 900;
    font-size: 14px;
}

.training-book-cover.red {
    background: linear-gradient(135deg, #ef4444, #203866);
}

.training-book-cover.blue {
    background: linear-gradient(135deg, #38bdf8, #2563eb);
}

.training-book-cover.green {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.training-book-cover.purple {
    background: linear-gradient(135deg, #8b5cf6, #4c1d95);
}

.training-book-cover.orange {
    background: linear-gradient(135deg, #f59e0b, #c2410c);
}

/* =========================
   Book Info
========================= */

.training-book-info {
    padding: 24px;
}

.training-book-info small {
    display: inline-flex;
    align-items: center;
    background: #eef3ff;
    color: #203866;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    margin-bottom: 14px;
}

.training-book-info h3 {
    margin: 0 0 12px;
    color: #203866;
    font-size: 21px;
    font-weight: 900;
    line-height: 1.35;
}

.book-author {
    color: #64748b;
    font-size: 15px;
    margin: 0 0 14px;
}

.book-author i {
    margin-right: 8px;
}

.book-desc {
    color: #172033;
    font-size: 15px;
    line-height: 1.7;
    min-height: 78px;
    margin: 0 0 18px;
}

.book-meta {
    border-top: 1px solid #e2e8f0;
    padding-top: 15px;
    margin: 16px 0 18px;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    color: #64748b;
    font-size: 14px;
}

.book-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

/* =========================
   Download Button
========================= */

.training-download-book-btn {
    width: 100%;
    height: 52px;
    border-radius: 15px;
    background: linear-gradient(135deg, #203866, #2f4f8f);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 900;
    transition: 0.25s ease;
}

.training-download-book-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(32, 56, 102, 0.20);
}

/* =========================
   Empty State
========================= */

.no-training-books {
    grid-column: 1 / -1;
    text-align: center;
    background: #ffffff;
    border: 1px solid #e8edf8;
    border-radius: 22px;
    padding: 55px 30px;
    color: #64748b;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.no-training-books i {
    font-size: 50px;
    color: #203866;
    margin-bottom: 16px;
}

.no-training-books h3 {
    margin: 0 0 10px;
    color: #203866;
    font-size: 24px;
    font-weight: 900;
}

.no-training-books p {
    margin: 0;
    color: #64748b;
}

/* =========================
   Responsive
========================= */

/* Laptop / Tablet */
@media (max-width: 1200px) {
    .training-book-header h1 {
        font-size: 42px;
    }

    .training-books-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Tablet Portrait */
@media (max-width: 992px) {
    .training-book-search {
        grid-template-columns: 1fr;
    }

    .training-book-search button {
        width: 100%;
    }
}

/* Phone */
@media (max-width: 767px) {
    .training-book-header h1 {
        font-size: 32px;
    }

    .training-book-header p {
        font-size: 15px;
    }

    .training-book-tab {
        width: 100%;
        min-height: 48px;
    }

    .training-books-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .training-book-cover {
        height: 215px;
    }

    .training-book-info {
        padding: 20px;
    }
}

/* Small Phone */
@media (max-width: 480px) {
    .training-book-header h1 {
        font-size: 28px;
    }

    .training-book-search input,
    .training-book-search button {
        height: 56px;
        border-radius: 15px;
    }

    .training-book-cover {
        height: 200px;
    }
}
/* Book Cover - First Page */
.training-book-cover {
    position: relative;
    overflow: hidden;
}

.training-book-cover-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
}

.training-book-badge {
    position: absolute;
    z-index: 2;
    top: 20px;
    left: 20px;
}

/* ==========================================
   BOOK CARD - FULL WIDTH COVER
   Same layout as reference image
========================================== */

.training-books-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
    align-items: stretch;
}

/* Card */
.training-book-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid #e4ebf6;
}

/* Remove all gradient backgrounds */
.training-book-cover,
.training-book-cover.red,
.training-book-cover.blue,
.training-book-cover.green,
.training-book-cover.purple,
.training-book-cover.orange {
    background: #ffffff !important;
}

/* Full width cover */
.training-book-cover {
    width: 100%;
    height: 390px;
    min-height: 0;
    padding: 0;
    margin: 0;
    display: block;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #e8edf8;
}

/* Cover image fills the available width */
.training-book-cover .training-book-cover-image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center top;
}

/* Hide old placeholder icon */
.training-book-cover > i {
    display: none !important;
}

/* Hide New / Featured / Popular badge */
.training-book-cover .training-book-badge,
.training-book-cover > span {
    display: none !important;
}

/* Information area */
.training-book-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 24px 28px 28px;
}

/* Keep title and category styling */
.training-book-info h3 {
    margin-bottom: 12px;
}

/* Meta and download at bottom */
.training-book-info .book-meta {
    margin-top: auto;
    margin-bottom: 18px;
}

.training-download-book-btn {
    flex-shrink: 0;
    min-height: 58px;
}

/* Responsive */
@media (max-width: 992px) {
    .training-books-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    .training-book-cover {
        height: 300px;
    }
}

@media (max-width: 767px) {
    .training-books-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .training-book-cover {
        height: 340px;
    }

    .training-book-info {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .training-book-cover {
        height: 270px;
    }
}
/* =========================================
   TRAINING BOOKS - 3 CARDS PER ROW
========================================= */

/* GRID */
.training-book-section .training-books-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 22px !important;
    align-items: stretch;
}

/* CARD */
.training-book-section .training-book-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e1e8f4;
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(32, 56, 102, 0.07);
    transition: transform .25s ease, box-shadow .25s ease;
}

.training-book-section .training-book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 30px rgba(32, 56, 102, 0.13);
}

/* FULL WIDTH COVER */
.training-book-section .training-book-cover {
    display: block;
    width: 100%;
    height: 220px !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0;
    overflow: hidden;
    background: #f3f6fb;
    border-bottom: 1px solid #e7edf5;
}

/* COVER IMAGE FILLS AREA */
.training-book-section .training-book-cover img,
.training-book-section .training-book-cover-image {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center top;
}

/* BODY */
.training-book-section .training-book-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 16px;
    min-width: 0;
}

/* CATEGORY */
.training-book-section .training-book-info small {
    display: block;
    padding: 7px 12px;
    margin-bottom: 12px;
    background: #edf2ff;
    color: #203866;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
}

/* TITLE */
.training-book-section .training-book-info h3 {
    margin: 0 0 12px;
    color: #203866;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

/* DESCRIPTION */
.training-book-section .book-author,
.training-book-section .book-desc {
    margin-bottom: 10px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
}

/* META */
.training-book-section .book-meta {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    margin-bottom: 12px;
    padding-top: 12px;
    border-top: 1px solid #e7edf5;
    color: #64748b;
    font-size: 12px;
}

/* DOWNLOAD BUTTON */
.training-book-section .training-download-book-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 45px;
    padding: 10px 12px;
    background: #203866;
    color: #fff;
    border-radius: 11px;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.training-book-section .training-download-book-btn:hover {
    background: #31549a;
    color: #fff;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .training-book-section .training-books-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 16px !important;
    }
}

@media (max-width: 600px) {
    .training-book-section .training-books-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .training-book-section .training-book-cover {
        height: 200px !important;
    }
}

/* ==========================================
   BOOK COVER - CLICK TO PREVIEW
========================================== */

.training-book-section .training-book-cover {
    position: relative;
    height: 220px !important;
    overflow: hidden;
    padding: 0 !important;
}

.training-book-section .book-preview-trigger {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    appearance: none;
    cursor: pointer;
}

.training-book-section .book-preview-trigger img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center top;
}

/* No preview icon or overlay */

.training-book-section .book-preview-overlay {
    display: none !important;
}

.training-book-section .book-preview-trigger:hover {
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
}

.training-book-section .book-preview-trigger:focus-visible {
    outline: 3px solid #31549a;
    outline-offset: -3px;
}
