/**
 * Hartwell LP shared — brand logo performance, responsive sizing, mobile center alignment
 * Used by: /lp/book-publishing-services/, /lp/book-marketing-services/, /lp/book-writing-services/
 */

:root {
    --hwp-lp-logo-ratio: 605 / 660;
}

/* Brand logos — reserve space (CLS) and avoid expensive footer filters */
.hwp-lp-brand-logo,
.header_main_wrap_logo img,
.footer_logo_img,
header .col-md-6:first-child > a img,
footer .col-md-5 > img {
    aspect-ratio: var(--hwp-lp-logo-ratio);
    height: auto;
    object-fit: contain;
}

.footer_logo_img.hwp-lp-footer-logo,
footer .col-md-5 > img.hwp-lp-footer-logo {
    filter: none !important;
    -webkit-filter: none !important;
}

/* Below-fold sections — defer layout/paint where supported */
.hwp-lp .index_first_wrapper,
.hwp-lp .index_second_wrapper,
.hwp-lp .index_third_wrapper,
.hwp-lp .index-fourth-wrapper,
.hwp-lp .index-fifth-wrapper,
.hwp-lp .footer_wrapper,
.hwp-lp section.hm-about,
.hwp-lp section.features-col,
.hwp-lp section.cta-book,
.hwp-lp section.testimonail,
.hwp-lp section.portfolio {
    content-visibility: auto;
    contain-intrinsic-size: auto 480px;
}

/* Bootstrap LPs — desktop brand sizing */
@media only screen and (min-width: 992px) {
    .hwp-lp-bootstrap .header_main_wrap_logo {
        max-width: 220px;
    }

    .hwp-lp-bootstrap .header_main_wrap_logo img {
        max-height: 90px;
    }

    .hwp-lp-bootstrap .footer_logo_img {
        max-width: 200px;
        max-height: 88px;
    }
}

/* Bootstrap LPs — tablet */
@media only screen and (max-width: 991px) {
    .hwp-lp-bootstrap .header_main_wrap {
        flex-wrap: wrap;
        gap: 12px;
        justify-content: space-between;
        align-items: center;
    }

    .hwp-lp-bootstrap .header_main_wrap_logo {
        max-width: min(200px, 40vw);
    }

    .hwp-lp-bootstrap .header_main_wrap_logo img {
        max-height: clamp(56px, 11vw, 76px);
    }

    .hwp-lp-bootstrap .header_main_wrap_btn {
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 8px;
    }

    .hwp-lp-bootstrap .index_banner_wrapper {
        padding: 130px 0 80px;
        min-height: 0;
        height: auto;
    }

    .hwp-lp-bootstrap .index_first_wrap_text,
    .hwp-lp-bootstrap .index-fourth-wrap-text {
        text-align: center;
    }

    .hwp-lp-bootstrap .index_first_wrap_btn {
        justify-content: center;
    }
}

/* Bootstrap LPs — mobile center + compact header */
@media only screen and (max-width: 767px) {
    .hwp-lp-bootstrap .header_wrapper {
        position: relative;
        padding: 14px 0;
    }

    .hwp-lp-bootstrap .header_main_wrap {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    .hwp-lp-bootstrap .header_main_wrap_logo {
        max-width: min(180px, 58vw);
        margin: 0 auto;
    }

    .hwp-lp-bootstrap .header_main_wrap_logo img {
        max-height: clamp(52px, 14vw, 68px);
        margin: 0 auto;
    }

    .hwp-lp-bootstrap .header_main_wrap_btn {
        width: 100%;
        justify-content: center;
    }

    .hwp-lp-bootstrap .header_main_wrap_btn .common_btn {
        min-width: 0;
        max-width: 100%;
    }

    .hwp-lp-bootstrap .index_banner_wrapper {
        padding: 40px 0 48px;
        height: auto;
        min-height: 0;
    }

    .hwp-lp-bootstrap .index_banner_text,
    .hwp-lp-bootstrap .index_banner_text h1,
    .hwp-lp-bootstrap .index_banner_text h6,
    .hwp-lp-bootstrap .index_banner_text ul,
    .hwp-lp-bootstrap .index_banner_btn {
        text-align: center;
        justify-content: center;
    }

    .hwp-lp-bootstrap .index_banner_text ul {
        flex-direction: column;
        align-items: center;
    }

    .hwp-lp-bootstrap section .container .row > [class*="col-"],
    .hwp-lp-bootstrap .index_first_wrap_text,
    .hwp-lp-bootstrap .index_first_wrap_text h6,
    .hwp-lp-bootstrap .index_first_wrap_text p,
    .hwp-lp-bootstrap .index_first_wrap_text ul,
    .hwp-lp-bootstrap .index-fourth-wrap-text,
    .hwp-lp-bootstrap .index-fourth-wrap-text h2,
    .hwp-lp-bootstrap .index-fourth-wrap-text h3,
    .hwp-lp-bootstrap .index-fourth-wrap-text ul,
    .hwp-lp-bootstrap .index_second_top_text,
    .hwp-lp-bootstrap .index-fifth-wrap-text,
    .hwp-lp-bootstrap .index_third_wrapper .row > [class*="col-"] {
        text-align: center;
    }

    .hwp-lp-bootstrap .index_first_wrap_btn,
    .hwp-lp-bootstrap .index_banner_btn {
        align-items: center;
        justify-content: center;
    }

    .hwp-lp-bootstrap .index_first_wrap_btn .common_btn {
        margin-left: auto;
        margin-right: auto;
    }

    .hwp-lp-bootstrap .index_third_img {
        width: min(100%, 320px);
        margin-left: auto;
        margin-right: auto;
    }

    .hwp-lp-bootstrap .index-fourth-wrap-img {
        text-align: center;
    }

    .hwp-lp-bootstrap .footer_wrapper .row {
        text-align: center;
        justify-content: center;
    }

    .hwp-lp-bootstrap .footer_logo {
        justify-content: center;
    }

    .hwp-lp-bootstrap .footer_logo_img {
        max-width: min(180px, 62vw);
        margin: 0 auto;
    }

    .hwp-lp-bootstrap .footer_nav ul {
        flex-direction: column;
        align-items: center;
        gap: 14px;
    }

    .hwp-lp-bootstrap .footer_nav ul li a {
        justify-content: center;
    }

    .hwp-lp-bootstrap .footer_nav ul li a::before {
        display: none;
    }

    .hwp-lp-bootstrap .copyright_flex,
    .hwp-lp-bootstrap .copyright_text p {
        text-align: center;
    }

    .hwp-lp-bootstrap .modal-body input,
    .hwp-lp-bootstrap .modal-body textarea,
    .hwp-lp-bootstrap .index-banner-box-input input,
    .hwp-lp-bootstrap .index-banner-box-input textarea {
        text-align: left;
    }
}

@media only screen and (max-width: 575px) {
    .hwp-lp-bootstrap .common_btn.long_btn {
        font-size: 13px;
        padding: 0 16px;
        min-width: 0;
        width: auto;
        max-width: 100%;
    }
}

/* Writing LP — tablet */
@media only screen and (max-width: 991px) {
    .hwp-lp-writing header .col-md-6:first-child > a img {
        max-height: clamp(56px, 11vw, 72px);
    }

    .hwp-lp-writing footer .col-md-5 > img {
        max-height: clamp(64px, 12vw, 84px);
    }
}

/* Writing LP — mobile center + responsive brand */
@media only screen and (max-width: 900px) {
    .hwp-lp-writing header .container > .row {
        text-align: center;
        justify-content: center;
    }

    .hwp-lp-writing header .col-md-6 {
        width: 100%;
        float: none;
        text-align: center;
    }

    .hwp-lp-writing header .col-md-6:first-child > a {
        margin: 0 auto;
    }

    .hwp-lp-writing header .col-md-6:first-child > a img {
        max-height: clamp(52px, 14vw, 68px);
        margin: 0 auto;
    }

    .hwp-lp-writing section.banner,
    .hwp-lp-writing section.banner h1,
    .hwp-lp-writing section.banner p,
    .hwp-lp-writing ul.banner-features,
    .hwp-lp-writing section.hm-about,
    .hwp-lp-writing section.hm-about h2,
    .hwp-lp-writing section.hm-about p,
    .hwp-lp-writing section.hm-about .row > [class*="col-"],
    .hwp-lp-writing section.hm-about ul,
    .hwp-lp-writing section.hm-about ul li,
    .hwp-lp-writing section.features-col,
    .hwp-lp-writing section.features-col h2,
    .hwp-lp-writing section.portfolio,
    .hwp-lp-writing section.portfolio h2,
    .hwp-lp-writing section.portfolio h2 + p,
    .hwp-lp-writing section.portfolio .toolbar,
    .hwp-lp-writing section.cta-book,
    .hwp-lp-writing section.cta-book .col-md-5,
    .hwp-lp-writing section.cta-book .col-md-7,
    .hwp-lp-writing section.cta-book h2,
    .hwp-lp-writing section.cta-book p,
    .hwp-lp-writing section.cta-book ul,
    .hwp-lp-writing section.cta-book ul li,
    .hwp-lp-writing section.testimonail,
    .hwp-lp-writing section.testimonail .col-md-6,
    .hwp-lp-writing section.testimonail h2,
    .hwp-lp-writing section.testimonail p,
    .hwp-lp-writing section.brands,
    .hwp-lp-writing footer,
    .hwp-lp-writing footer .row > [class*="col-"],
    .hwp-lp-writing footer ul,
    .hwp-lp-writing footer ul li {
        text-align: center !important;
    }

    .hwp-lp-writing section.hm-about ul,
    .hwp-lp-writing section.cta-book ul,
    .hwp-lp-writing ul.banner-features {
        display: inline-block;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    .hwp-lp-writing section.cta-book img,
    .hwp-lp-writing section.features-col img {
        margin-left: auto;
        margin-right: auto;
        display: block;
    }

    .hwp-lp-writing footer .col-md-5 > img {
        margin-left: auto;
        margin-right: auto;
        display: inline-block;
    }

    .hwp-lp-writing ul.banner-features + a,
    .hwp-lp-writing ul.banner-features + a + a,
    .hwp-lp-writing section.hm-about a,
    .hwp-lp-writing section.cta-book a {
        margin-left: auto;
        margin-right: auto;
        display: block;
    }

    .hwp-lp-writing .popupform input,
    .hwp-lp-writing .popupform textarea,
    .hwp-lp-writing .popupform select,
    .hwp-lp-writing div#bouncepopupform input,
    .hwp-lp-writing div#bouncepopupform textarea {
        text-align: left;
    }
}
