/* Books catalog — ACADEMY theme */

.books-page-academy {
    min-height: 100vh;
    background: var(--bg, #F4F8FB);
}

.books-page-academy .academy-page-hero {
    padding: 48px 0 36px;
}

.books-page-academy__body {
    padding: 0 0 88px;
}

.books-page-academy__body .wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding-inline: 24px;
}

.books-page-academy__toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.books-page-academy__search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 280px;
    max-width: 420px;
    background: #fff;
    border: 1px solid color-mix(in srgb, var(--blue-500, #2BA9E0) 18%, #dbe4ee);
    border-radius: 14px;
    padding: 6px 6px 6px 14px;
    box-shadow: 0 10px 28px -22px rgba(17, 36, 58, 0.35);
}

.books-page-academy__search input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 14px;
    color: var(--ink, #11243A);
    min-width: 0;
}

.books-page-academy__search button {
    border: 0;
    border-radius: 10px;
    padding: 10px 16px;
    background: linear-gradient(145deg, var(--blue-500, #2BA9E0), var(--blue-700, #1C75BC));
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}

.books-page-academy__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.books-page-academy__filter {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid #d7e2ec;
    background: #fff;
    color: var(--muted, #6A7889);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: border-color .2s, color .2s, background .2s;
}

.books-page-academy__filter:hover,
.books-page-academy__filter.is-active {
    border-color: color-mix(in srgb, var(--blue-500, #2BA9E0) 45%, transparent);
    color: var(--blue-700, #1C75BC);
    background: #EAF6FC;
}

.books-page-academy__count {
    margin: 0 0 20px;
    font-size: 14px;
    color: var(--muted, #6A7889);
}

.books-page-academy__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

@media (max-width: 992px) {
    .books-page-academy__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .books-page-academy__grid {
        grid-template-columns: 1fr;
    }
}

.book-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #e4ebf2;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 16px 36px -28px rgba(17, 36, 58, 0.45);
    transition: transform .22s ease, box-shadow .22s ease;
}

.book-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 40px -24px rgba(28, 117, 188, 0.35);
    color: inherit;
    text-decoration: none;
}

.book-card__media {
    position: relative;
    aspect-ratio: 4 / 5;
    background: #eef3f8;
    overflow: hidden;
}

.book-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.book-card__body {
    padding: 16px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.book-card__subject {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--blue-700, #1C75BC);
}

.book-card__title {
    margin: 0;
    font-family: var(--head, "Cairo", sans-serif);
    font-size: 18px;
    font-weight: 800;
    color: var(--ink, #11243A);
    line-height: 1.35;
}

.book-card__meta {
    margin-top: auto;
    padding-top: 8px;
    font-size: 13px;
    color: var(--muted, #6A7889);
}

.books-page-academy__empty {
    text-align: center;
    padding: 64px 20px;
    background: #fff;
    border-radius: 18px;
    border: 1px dashed #d7e2ec;
    color: var(--muted, #6A7889);
}

.books-page-academy__pagination {
    margin-top: 36px;
    display: flex;
    justify-content: center;
}

/* Detail */
.book-detail-academy__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 36px;
    align-items: start;
}

@media (max-width: 900px) {
    .book-detail-academy__layout {
        grid-template-columns: 1fr;
    }
}

.book-detail-academy__cover {
    border-radius: 22px;
    overflow: hidden;
    background: #eef3f8;
    border: 1px solid #e4ebf2;
    box-shadow: 0 24px 48px -32px rgba(17, 36, 58, 0.5);
}

.book-detail-academy__cover img {
    width: 100%;
    display: block;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.book-detail-academy__subject {
    display: inline-flex;
    margin-bottom: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #EAF6FC;
    color: var(--blue-700, #1C75BC);
    font-size: 12px;
    font-weight: 800;
}

.book-detail-academy__title {
    margin: 0 0 12px;
    font-family: var(--head, "Cairo", sans-serif);
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 900;
    color: var(--ink, #11243A);
    line-height: 1.2;
}

.book-detail-academy__instructor {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 18px;
}

.book-detail-academy__instructor img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.book-detail-academy__instructor strong {
    display: block;
    color: var(--ink, #11243A);
    font-size: 15px;
}

.book-detail-academy__instructor span {
    font-size: 13px;
    color: var(--muted, #6A7889);
}

.book-detail-academy__desc {
    font-size: 15px;
    line-height: 1.75;
    color: #3d4d5f;
    margin-bottom: 28px;
    white-space: pre-line;
}

.book-detail-academy__cta {
    background: linear-gradient(135deg, #11243A 0%, #1a3a5c 55%, #23486e 100%);
    border-radius: 24px;
    padding: 28px 26px;
    color: #fff;
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 20px;
    align-items: center;
    box-shadow: var(--shadow-lg, 0 18px 40px -18px rgba(17, 36, 58, .45));
}

.book-detail-academy__cta::before {
    content: "";
    position: absolute;
    top: -100px;
    left: -60px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
}

.book-detail-academy__cta::after {
    content: "";
    position: absolute;
    bottom: -100px;
    right: 8%;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(70, 182, 230, .12);
}

.book-detail-academy__cta-copy {
    position: relative;
    z-index: 2;
}

.book-detail-academy__cta h2 {
    margin: 0 0 10px;
    font-family: var(--head, "Cairo", sans-serif);
    font-size: clamp(20px, 2.4vw, 26px);
    font-weight: 800;
    color: #fff;
    line-height: 1.25;
}

.book-detail-academy__cta p {
    margin: 0;
    font-size: 15px;
    color: rgba(255, 255, 255, .88);
    line-height: 1.6;
}

.book-detail-academy__actions {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.book-detail-academy__actions .btn {
    width: 100%;
    font-size: 15px;
    padding: 12px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.book-detail-academy__actions .btn-light {
    background: #fff;
    color: var(--ink, #11243A);
}

.book-detail-academy__actions .btn-light:hover {
    transform: translateY(-2px);
}

@media (max-width: 720px) {
    .book-detail-academy__cta {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 24px 20px;
    }

    .book-detail-academy__cta-copy {
        text-align: center;
    }
}

.book-detail-academy__related {
    margin-top: 56px;
}

.book-detail-academy__related h2 {
    margin: 0 0 18px;
    font-family: var(--head, "Cairo", sans-serif);
    font-size: 22px;
    font-weight: 900;
    color: var(--ink, #11243A);
}

.book-detail-academy__back {
    display: inline-flex;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 700;
    color: var(--blue-700, #1C75BC);
    text-decoration: none;
}
