/* ==========================================================
   ALEHSAN MEDIA - BOOK DETAIL PROFILE
   Dedicated scoped stylesheet
   ========================================================== */


/* ---------- DETAIL BANNER ---------- */

.am-book-detail-banner {
    width: 100%;
    max-width: 1080px;

    margin: 0 auto 28px;

    overflow: hidden;

    aspect-ratio: 1200 / 630;

    background: #f6f8fa;

    border-radius: 16px;

    box-shadow:
        0 10px 30px rgba(23, 49, 78, .08);
}

.am-book-detail-banner img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
}


/* ---------- PROFILE ---------- */

.am-book-profile-hero {
    width: 100%;
    max-width: 1080px;

    display: grid;

    grid-template-columns:
        minmax(0, 1fr) auto;

    align-items: center;

    gap: 32px;

    margin: 0 auto 25px;

    padding: 28px 30px;

    background:
        linear-gradient(
            135deg,
            #ECF7FF 0%,
            #ffffff 78%
        );

    border: 1px solid rgba(0, 130, 222, .15);

    border-radius: 16px;

    box-shadow:
        0 10px 30px rgba(23, 49, 78, .07);
}


.am-book-profile-main {
    min-width: 0;
}


.am-book-profile-eyebrow {
    display: inline-block;

    margin-bottom: 7px;

    color: #0082DE;

    font-size: 11px;
    font-weight: 700;

    letter-spacing: .06em;

    text-transform: uppercase;
}


.am-book-profile-title {
    margin: 0;

    color: #17243a;

    font-size: clamp(28px, 3vw, 42px);

    font-weight: 700;

    line-height: 1.4;

    overflow-wrap: anywhere;
}


.am-book-profile-book-author {
    display: flex;

    align-items: center;

    gap: 8px;

    margin-top: 12px;

    color: #526378;

    font-size: 14px;
}


.am-book-profile-book-author i {
    flex: 0 0 auto;

    color: #E8553E;
}


.am-book-profile-meta {
    display: flex;

    flex-wrap: wrap;

    align-items: center;

    gap: 10px 18px;

    margin-top: 15px;
}


.am-book-profile-meta > a,
.am-book-profile-meta > span {
    display: inline-flex;

    align-items: center;

    gap: 7px;

    color: #657589;

    font-size: 12px;
}


.am-book-profile-meta i {
    color: #0082DE;
}


.am-book-profile-contributor:hover {
    color: #E8553E;
}


/* ---------- PROFILE STATS ---------- */

.am-book-profile-stats {
    display: grid;

    grid-template-columns: 1fr;

    gap: 8px;

    min-width: 145px;
}


.am-book-profile-stats > div,
.am-book-profile-share {
    appearance: none;

    display: grid;

    grid-template-columns:
        22px auto;

    align-items: center;

    gap: 1px 7px;

    width: 100%;

    padding: 10px 12px;

    background: #fff;

    border: 1px solid rgba(0, 130, 222, .15);

    border-radius: 9px;

    color: #17243a;

    font-family: inherit;

    text-align: left;
}


.am-book-profile-share {
    cursor: pointer;
}


.am-book-profile-stats i {
    grid-row: 1 / span 2;

    color: #0082DE;

    font-size: 13px;

    text-align: center;
}


.am-book-profile-stats strong {
    font-size: 14px;

    line-height: 1.1;
}


.am-book-profile-stats span {
    color: #718096;

    font-size: 9px;
}


/* ---------- BOOK DETAILS ---------- */

.am-book-details-panel {
    width: 100%;
    max-width: 1080px;

    margin: 0 auto 24px;

    padding: 24px;

    background: #fff;

    border: 1px solid rgba(22, 45, 72, .11);

    border-radius: 14px;

    box-shadow:
        0 7px 24px rgba(23, 49, 78, .05);
}


.am-book-details-heading {
    margin-bottom: 17px;
}


.am-book-details-heading > span {
    display: block;

    margin-bottom: 4px;

    color: #0082DE;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: .06em;

    text-transform: uppercase;
}


.am-book-details-heading h2 {
    margin: 0;

    color: #17243a;

    font-size: 24px;
    font-weight: 700;
}


.am-book-details-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 9px;
}


.am-book-detail-item {
    min-width: 0;

    padding: 12px 14px;

    background: #ECF7FF;

    border-radius: 8px;
}


.am-book-detail-item > span {
    display: block;

    margin-bottom: 4px;

    color: #6d7b8e;

    font-size: 9px;
    font-weight: 700;

    letter-spacing: .04em;

    text-transform: uppercase;
}


.am-book-detail-item > strong {
    display: block;

    color: #24364b;

    font-size: 13px;
    font-weight: 600;

    line-height: 1.55;

    overflow-wrap: anywhere;
}


/* ---------- ACTION BLOCK ALIGNMENT ---------- */

.post__book__cover__details.cta-buttons-block {
    width: 100% !important;
    max-width: 1080px !important;
    min-width: 0 !important;

    margin-left: auto !important;
    margin-right: auto !important;
}


/* ---------- TABLET ---------- */

@media (max-width: 991.98px) {

    .am-book-profile-hero {
        gap: 22px;

        padding: 24px;
    }

}


/* ---------- MOBILE ---------- */

@media (max-width: 575.98px) {

    .am-book-detail-banner {
        margin-bottom: 18px;

        border-radius: 11px;
    }


    .am-book-profile-hero {
        display: block;

        margin-bottom: 18px;

        padding: 20px 16px;

        border-radius: 13px;

        text-align: center;
    }


    .am-book-profile-title {
        font-size: 26px;
    }


    .am-book-profile-book-author,
    .am-book-profile-meta {
        justify-content: center;
    }


    .am-book-profile-book-author {
        font-size: 13px;
    }


    .am-book-profile-stats {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        gap: 5px;

        min-width: 0;

        margin-top: 18px;
    }


    .am-book-profile-stats > div,
    .am-book-profile-share {
        display: flex;

        flex-direction: column;

        align-items: center;
        justify-content: center;

        gap: 3px;

        min-width: 0;

        padding: 9px 3px;

        text-align: center;
    }


    .am-book-profile-stats i {
        font-size: 12px;
    }


    .am-book-profile-stats strong {
        font-size: 13px;
    }


    .am-book-profile-stats span {
        font-size: 8px;
    }


    .am-book-details-panel {
        padding: 18px 14px;

        border-radius: 12px;
    }


    .am-book-details-heading h2 {
        font-size: 21px;
    }


    .am-book-details-grid {
        grid-template-columns: 1fr;

        gap: 7px;
    }

}

/* === ALEHSAN BOOK ACTIONS START === */

.am-book-actions-panel {
    width: 100% !important;
    max-width: 1080px !important;
    min-width: 0 !important;

    margin: 0 auto 30px !important;

    padding: 24px;

    background: #fff;

    border: 1px solid rgba(22, 45, 72, .11);
    border-radius: 14px;

    box-shadow:
        0 7px 24px rgba(23, 49, 78, .05);
}


.am-book-actions-heading {
    display: flex;

    align-items: flex-end;
    justify-content: space-between;

    gap: 25px;

    margin-bottom: 18px;
}


.am-book-actions-heading span {
    display: block;

    margin-bottom: 3px;

    color: #0082DE;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: .06em;

    text-transform: uppercase;
}


.am-book-actions-heading h2 {
    margin: 0;

    color: #17243a;

    font-size: 23px;
    font-weight: 700;
}


.am-book-actions-heading p {
    max-width: 420px;

    margin: 0;

    color: #718096;

    font-size: 12px;
    line-height: 1.5;

    text-align: right;
}


/* Existing Read / Download elements */

.am-book-actions {
    display: grid !important;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    align-items: stretch !important;

    gap: 12px !important;

    padding: 0 !important;

    border: 0 !important;
}


.am-book-actions .btn {
    min-height: 54px;

    display: inline-flex !important;

    align-items: center;
    justify-content: center !important;

    gap: 10px !important;

    width: 100%;

    margin: 0 !important;

    padding: 12px 18px;

    border-radius: 10px;

    font-size: 14px;
    font-weight: 700;

    line-height: 1.25;

    box-shadow: none;

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}


/* Read Online */

.am-book-actions .btn-primary {
    background: #0082DE;

    border-color: #0082DE;

    color: #fff;
}


/* Download */

.am-book-actions .btn-secondary,
.am-book-actions .hover-primary {
    background: #E8553E;

    border: 1px solid #E8553E;

    color: #fff;
}


.am-book-actions .btn i {
    font-size: 14px;
}


@media (hover:hover) {

    .am-book-actions .btn:hover {
        transform: translateY(-2px);

        box-shadow:
            0 8px 18px rgba(22, 45, 72, .12);
    }

}


/* Mobile */

@media (max-width: 575.98px) {

    .am-book-actions-panel {
        padding: 18px 14px;

        margin-bottom: 24px !important;

        border-radius: 12px;
    }


    .am-book-actions-heading {
        display: block;

        margin-bottom: 14px;
    }


    .am-book-actions-heading h2 {
        font-size: 21px;
    }


    .am-book-actions-heading p {
        margin-top: 5px;

        font-size: 11px;

        text-align: left;
    }


    .am-book-actions {
        grid-template-columns: 1fr;
    }


    .am-book-actions .btn {
        min-height: 50px;

        font-size: 13px;
    }

}

/* === ALEHSAN BOOK ACTIONS END === */

/* === ALEHSAN BOOK ACTION NORMALIZE START === */

/*
 * Neutralize legacy CTA sizing.
 * Both actions must occupy equal grid columns.
 */

.post__book__cover__details.am-book-actions-panel
.am-book-actions {
    width: 100% !important;

    display: grid !important;

    grid-template-columns:
        repeat(2, minmax(0, 1fr)) !important;

    gap: 12px !important;

    align-items: stretch !important;

    justify-content: initial !important;

    padding: 0 !important;

    margin: 0 !important;

    border: 0 !important;
}


.post__book__cover__details.am-book-actions-panel
.am-book-actions > .btn,

.post__book__cover__details.am-book-actions-panel
.am-book-actions > button,

.post__book__cover__details.am-book-actions-panel
.am-book-actions > a {
    position: static !important;

    float: none !important;

    flex: none !important;

    width: 100% !important;

    min-width: 0 !important;
    max-width: none !important;

    min-height: 54px !important;

    margin: 0 !important;

    display: flex !important;

    align-items: center !important;
    justify-content: center !important;

    gap: 10px !important;

    padding: 12px 18px !important;

    border-radius: 10px !important;

    line-height: 1.2 !important;

    text-align: center !important;
}


/* Read Online */

.post__book__cover__details.am-book-actions-panel
.am-book-actions > .btn-primary {
    background: #0082DE !important;

    border-color: #0082DE !important;

    color: #fff !important;
}


/* Download */

.post__book__cover__details.am-book-actions-panel
.am-book-actions > .btn-secondary,

.post__book__cover__details.am-book-actions-panel
.am-book-actions > .hover-primary {
    background: #E8553E !important;

    border-color: #E8553E !important;

    color: #fff !important;
}


/* One action only = full width */

.post__book__cover__details.am-book-actions-panel
.am-book-actions > :only-child {
    grid-column: 1 / -1;
}


/* Mobile = stacked */

@media (max-width: 575.98px) {

    .post__book__cover__details.am-book-actions-panel
    .am-book-actions {
        grid-template-columns: 1fr !important;
    }

}

/* === ALEHSAN BOOK ACTION NORMALIZE END === */

/* === ALEHSAN BOOK FINAL POLISH START === */


/* ==========================================================
   COMMENTS
   ========================================================== */

.comment__box {
    width: 100%;
    max-width: 1080px;

    margin: 38px auto 42px;
    padding: 0;

    background: transparent;

    border: 0;

    box-shadow: none;
}


.comment__box .single-post__comment,
.comment__box .single-post__leave__comment {
    padding: 24px;

    background: #fff;

    border: 1px solid rgba(22, 45, 72, .11);
    border-radius: 14px;

    box-shadow:
        0 7px 24px rgba(23, 49, 78, .05);
}


.comment__box .single-post__comment {
    margin-bottom: 18px;
}


.comment__box .single-post__comment > h4,
.comment__box .single-post__leave__comment > h4 {
    margin: 0 0 18px;

    color: #17243a;

    font-size: 21px;
    font-weight: 700;
}


/* Existing comments */

.comment__box .single-post__comment__item {
    padding: 15px 0;

    border-bottom:
        1px solid rgba(22, 45, 72, .08);
}


.comment__box
.single-post__comment__item:last-child {
    border-bottom: 0;
}


.comment__box
.single-post__comment__item__text h6 {
    color: #17243a;

    font-weight: 700;
}


.comment__box
.single-post__comment__item__text p {
    margin-bottom: 0;

    color: #627084;

    line-height: 1.7;
}


/* Comment form */

.comment__box
.single-post__leave__comment form
.input-list {
    gap: 12px;
}


.comment__box input,
.comment__box textarea {
    width: 100%;

    border:
        1px solid rgba(22, 45, 72, .15) !important;

    border-radius: 9px !important;

    background: #fff !important;

    color: #24364b !important;

    box-shadow: none !important;
}


.comment__box input {
    min-height: 48px;

    padding: 10px 14px !important;
}


.comment__box textarea {
    min-height: 130px;

    padding: 13px 14px !important;

    resize: vertical;
}


.comment__box input:focus,
.comment__box textarea:focus {
    border-color: #0082DE !important;

    outline: 0;

    box-shadow:
        0 0 0 3px rgba(0, 130, 222, .08) !important;
}


.comment__box button[type="submit"] {
    min-height: 46px;

    padding: 10px 22px;

    border: 1px solid #0082DE;
    border-radius: 9px;

    background: #0082DE;

    color: #fff;

    font-weight: 700;

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}


@media (hover:hover) {

    .comment__box button[type="submit"]:hover {
        transform: translateY(-2px);

        box-shadow:
            0 7px 18px rgba(0, 130, 222, .18);
    }

}


/* ==========================================================
   RELATED BOOKS
   Existing Related system remains untouched.
   Only normalize vertical rhythm on Book Detail.
   ========================================================== */

.am-related-books {
    margin-top: 42px !important;
    margin-bottom: 38px !important;
}


.am-related-books
.section-heading {
    margin-bottom: 28px !important;
}


.am-related-books
.book__short__card {
    height: 100%;
}


/* ==========================================================
   BOOK DETAIL ADVERTISEMENT
   Preserve existing placement after Related Books.
   ========================================================== */

.post-section .ad__cont.horizontal {
    max-width: 1080px;

    margin-left: auto;
    margin-right: auto;

    overflow: hidden;

    border-radius: 12px;
}


.post-section .ad__cont.horizontal img {
    display: block;

    max-width: 100%;

    margin: 0 auto;
}


/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 575.98px) {

    .comment__box {
        margin-top: 28px;
        margin-bottom: 32px;
    }


    .comment__box .single-post__comment,
    .comment__box .single-post__leave__comment {
        padding: 18px 14px;

        border-radius: 12px;
    }


    .comment__box
    .single-post__comment > h4,
    .comment__box
    .single-post__leave__comment > h4 {
        margin-bottom: 14px;

        font-size: 19px;
    }


    .comment__box input {
        min-height: 45px;
    }


    .comment__box textarea {
        min-height: 115px;
    }


    .comment__box button[type="submit"] {
        width: 100%;
    }


    .am-related-books {
        margin-top: 30px !important;
        margin-bottom: 30px !important;
    }

}

/* === ALEHSAN BOOK FINAL POLISH END === */

/* === ALEHSAN AD VISUAL NORMALIZATION START === */

/*
 * Book Detail is a standalone document and does not load global-ui.css.
 */

.post-section .ad__cont.horizontal {
    width: 100% !important;

    max-width: 1080px !important;

    height: auto !important;
    min-height: 0 !important;

    margin-left: auto !important;
    margin-right: auto !important;

    background: transparent;

    border-radius: 10px;

    transform: none !important;

    box-shadow: none !important;
}


.post-section .ad__cont.horizontal picture {
    display: block !important;

    width: 100% !important;

    height: auto !important;
    min-height: 0 !important;

    overflow: hidden;
}


.post-section .ad__cont.horizontal picture img {
    display: block;

    width: 100% !important;
    height: auto !important;

    object-fit: contain !important;
    object-position: center !important;

    margin: 0 auto;
}


.post-section .ad__cont.horizontal i.fa-ad {
    top: 8px !important;
    left: 8px !important;

    width: 28px;
    height: 24px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 5px;

    background: rgba(17, 29, 42, .72);

    color: #fff !important;

    font-size: 12px !important;

    z-index: 3;
}


@media (hover:hover) {

    .post-section .ad__cont.horizontal:hover {
        transform: none !important;

        border-color:
            rgba(0, 130, 222, .42);

        box-shadow:
            0 7px 20px rgba(20, 48, 77, .09) !important;
    }

}

/* === ALEHSAN AD VISUAL NORMALIZATION END === */
