/* Books & Resources Section */
.books-section {
    background-color: var(--color-bg);
    width: 100%;
    padding: 6.5rem 3.75rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.books-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    width: 100%;
}

.books-header__text {
    width: 48%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.books-header__text>.eyebrow-label {
    margin: 0;
    width: fit-content;
}

.books-heading {
    color: var(--color-white);
    font-weight: 700;
    line-height: 48px;
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
    margin: 0;
}

.books-paragraph {
    width: 36%;
    color: #A8B2C3;
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 30px;
    margin: 0;
    margin-top: 2.2rem;
}

.featured-book {
    display: flex;
    flex-direction: row;
    gap: 3rem;
    width: 100%;
    align-items: center;
}

.featured-book__cover {
    position: relative;
    width: 33.43%;
    aspect-ratio: 1 / 1;
    border-radius: 20px;
    overflow: hidden;
}

.featured-book__illustration {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.featured-book__badge {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    background-color: #FFFFFFE6;
    color: #12181F;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 8%;
    line-height: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: 999px;
    z-index: 2;
}

.featured-book__overlay {
    position: absolute;
    top: 4.5rem;
    left: 1.25rem;
    width: 89.2%;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 2;
}

.featured-book__overlay-label {
    width: fit-content;
    color: rgba(178, 199, 219, 1);
    font-family: "Lato", sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 8%;
    line-height: 100%;
    margin: 0;
}

.featured-book__overlay-title {
    color: #12181F;
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 120%;
    margin: 0;
    letter-spacing: 0%;
}

.featured-book__overlay-desc {
    color: #62748E;
    font-size: 0.875rem;
    line-height: 150%;
    font-weight: 500;
    letter-spacing: 0%;
    margin: 0;
    font-family: "Lato", sans-serif;
}

.featured-book__content {
    width: 57.5%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.featured-book__title {
    color: var(--color-white);
    font-weight: 600;
    font-size: clamp(2.25rem, 4vw, 2.75rem);
    font-family: "Bricolage Grotesque", sans-serif;
    line-height: 110.00000000000001%;
    letter-spacing: 0%;
    margin: 0;
}

.featured-book__desc {
    color: #B2C7DB;
    font-size: 1.125rem;
    line-height: 160%;
    margin: 0;
    font-family: "Lato", sans-serif;
    font-weight: 500;
    letter-spacing: 0%;
}

.featured-book__btn {
    width: fit-content;
    background-color: var(--color-brand-blue);
    color: var(--color-white);
    font-weight: 600;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    font-size: 1.125rem;
    line-height: 100%;
    font-family: "Lato", sans-serif;
    text-decoration: none;
    box-shadow: 0px 10px 24px 0px #0976DE33;
}

.book-cards {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    width: 100%;
}

.book-card {
    width: 23.5%;
    border: 1px solid #1E3A5F;
    border-radius: 24px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0px 18px 40px 0px #0000001A;

}

.book-card__cover {
    width: 100%;
    height: 17.25rem;
    aspect-ratio: 1 / 1;
    background-color: #17243B;
    border-radius: 20px;
    display: flex;
    border: 1.18px solid #1E3A5F;
    justify-content: center;
    /*  align-items: center;*/
}

.book-card__cover img {
    width: 77%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.book-card__title {
    color: var(--color-white);
    font-weight: 600;
    font-size: 1.5rem;
    font-family: "Bricolage Grotesque", sans-serif;
    margin: 0;
    letter-spacing: 0%;
    line-height: 100%;
}

.book-card__desc {
    color: #A8B2C3;
    font-size: 1.125rem;
    line-height: 28px;
    font-weight: 500;
    margin: 0;
    font-family: "Bricolage Grotesque", sans-serif;
    letter-spacing: 0%;
}

.book-card__btn {
    width: 100%;
    text-align: center;
    background-color: var(--color-brand-blue);
    color: var(--color-white);
    font-weight: 600;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0px 10px 24px 0px #0976DE33;
    font-size: 1.125rem;
    line-height: 100%;
    font-family: "Lato", sans-serif;
    display: block;
}

@media (max-width: 768px) {
    .books-section {
        padding: 6.25rem 1rem;
        gap: 3rem;
    }

    .books-header {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .books-header__text {
        width: 100%;
        align-items: center;
        text-align: center;
    }

    .books-heading {
        text-align: center;
        font-size: clamp(1.5rem, 1.1rem + 4vw, 2rem);
        line-height: 1.2;
    }

    .books-paragraph {
        width: 100%; /* overrides the desktop 36% */
        text-align: center;
        font-size: 0.9rem;
        margin: 0;
    }

    .featured-book {
        flex-direction: column;
        gap: 3rem;
    }

    .featured-book__cover {
        width: 100%;
        aspect-ratio: 1 / 1.27; /* taller than desktop's square, per the reference */
        border-radius: 24px;
    }

    .featured-book__badge {
        top: 1.5rem;
        left: 1.5rem;
    }

    .featured-book__overlay {
        top: 4.5rem;
        left: 1.5rem;
        width: calc(100% - 3rem); /* keeps equal left and right gaps at any phone width */
    }

    .featured-book__content {
        width: 100%;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
    }

    .featured-book__title {
        text-transform: capitalize; /* mobile design capitalizes every word */
        font-size: clamp(1.35rem, 0.8rem + 3.5vw, 1.75rem);
    }

    .featured-book__desc {
        font-size: 0.9rem;
    }

    .book-cards {
        flex-direction: column;
        gap: 1.5rem;
    }

    .book-card {
        width: 100%;
        padding: 1.5rem;
    }

    .book-card__cover {
        height: auto;
        aspect-ratio: 1 / 0.88;
    }

    .book-card__cover img {
        width: 71%; /* keeps the book's 4:5 proportion inside the squarer mobile cover area */
        height: 100%;
    }
}