/* The design lays content out in a 1137px column (1440 frame, 152px margins).
   Scoped to the site root so it beats Bootstrap's own 1320px container rule. */
@media (min-width: 1200px) {
    .ks-site-root .container {
        max-width: 1161px;
    }
}

@media (min-width: 1600px) {

    .hero-sec__visual-stack {
        max-width: 310px;
    }
}

@media (max-width: 1199px) {
    .heading-1 {
        font-size: 42px;
    }

    .heading-2,
    .ebook-sec__content .heading-2,
    .ebook-pathway-sec__header .heading-2,
    .ebook-experts-sec__header .heading-2,
    .exp-diff-sec__title,
    .editing-lead-sec__title,
    .testimonials-sec__header .heading-2,
    .faq-sec__title,
    .contact-sec__header .heading-2,
    .pub-solutions-sec__content .heading-2 {
        font-size: 38px;
    }

}

@media (min-width: 992px) {
    .ebook-pathway-sec__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1400px) and (min-width: 992px) {
    .container {
        padding-left: 24px;
        padding-right: 24px;
    }

    .header-top-bar {
        min-height: auto;
    }

    .header-top-bar__grid {
        min-height: 92px;
    }

    .header-top-bar__inner {
        padding: 10px 6px;
    }

    .header-top-bar__col--green .header-top-bar__inner {
        padding-right: 10px;
    }

    .header-top-bar__col--blue .header-top-bar__inner {
        padding-left: 10px;
    }

    .header-top-bar__inner p {
        font-size: 12px;
        line-height: 1.45;
    }

    .header-top-bar__icon {
        width: 16px;
        height: 16px;
    }

    .header-nav-wrap {
        margin-top: -58px;
    }

    .header-nav-panel {
        padding: 12px 20px;
        min-height: 68px;
    }

    .site-header .navbar-brand img {
        max-height: 28px;
    }

    .site-header .header-nav-links {
        gap: 6px;
    }

    .site-header .nav-link {
        padding: 7px 8px !important;
        font-size: 13px;
    }

    .header-cta-group {
        gap: 0.65rem;
    }

    .header-call-link__label {
        display: none;
    }

    .header-call-link__number {
        font-size: 13px;
    }

    .header-call-link__icon {
        width: 18px;
        height: 18px;
    }

    .site-header .btn-ks-nav {
        min-width: 100px;
        font-size: 13px;
        padding: 8px 14px;
    }

    .hero-sec {
        padding: 2rem 0 7.5rem;
    }

    .hero-sec .heading-1 {
        font-size: 36px;
        line-height: 1.15;
    }

    .tag-line--hero {
        font-size: 18px;
    }

    .hero-sec__desc {
        font-size: 15px;
        line-height: 1.5;
        max-width: 520px;
    }

    .hero-sec__content {
        padding-right: 1rem;
    }

    .hero-sec__visual {
        min-height: 300px;
        padding-bottom: 1.5rem;
    }

    .hero-sec__visual-stack {
        max-width: 300px;
        bottom: -150px;
    }

    .hero-sec__ui-card {
        left: -90px;
        max-width: 165px;
    }

    .hero-trust-badges {
        margin: 1rem 0 1.25rem;
    }

    .hero-trust-badges__row {
        gap: 1.25rem 1.75rem;
    }

    .hero-trust-badges__badge {
        max-height: 28px;
    }

    .stats-bar-sec {
        margin-top: -4.5rem;
    }

    .stats-bar__item {
        padding: 22px 18px;
        min-height: 150px;
    }

    .stats-bar__value {
        font-size: 30px;
    }

    .stats-bar__title {
        font-size: 18px;
    }
}

@media (max-width: 1199px) and (min-width: 992px) {
    .site-header .nav-link {
        padding: 6px 6px !important;
        font-size: 12px;
    }

    .site-header .header-nav-links {
        gap: 4px;
    }

    .header-call-link__number {
        font-size: 12px;
    }

    .site-header .btn-ks-nav {
        min-width: 92px;
        font-size: 12px;
        padding: 8px 12px;
    }

    .hero-sec .heading-1 {
        font-size: 32px;
    }

    .hero-sec__visual-stack {
        max-width: 270px;
        bottom: -130px;
    }

    .hero-sec__ui-card {
        left: -70px;
        max-width: 145px;
    }
}

@media (max-width: 1100px) and (min-width: 992px) {
    .header-call-link__text {
        display: none;
    }

    .header-call-link {
        padding: 6px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.08);
    }

    .header-call-link__icon {
        width: 22px;
        height: 22px;
    }
}

@media (max-width: 1199px) {
    .heading-1 {
        font-size: 38px;
    }

    .heading-2 {
        font-size: 32px;
    }

    .header-cta-group {
        gap: 0.75rem;
    }

    .site-header .nav-link {
        padding: 8px 10px !important;
    }

    .site-header .header-nav-links {
        gap: 8px;
    }

    .stats-bar__value {
        font-size: 28px;
    }

    .stats-bar__title {
        font-size: 20px;
    }

    .header-nav-wrap {
        margin-top: -60px;
    }

    .header-nav-panel {
        padding: 12px 16px;
    }
}

@media (max-width: 991px) {
    .hero-sec {
        padding: 2rem 0 2.5rem;
    }

    .hero-sec::after {
        display: none;
    }

    .hero-sec__bg-shape {
        width: 75%;
        opacity: 0.35;
    }

    .hero-sec__content {
        text-align: center;
        margin-bottom: 0;
        max-width: 640px;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-sec__desc {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-sec .btn-group-ks {
        justify-content: center;
    }

    .hero-trust-badges__row {
        justify-content: center;
    }

    .hero-trust-badges__badge {
        margin: 0 auto;
    }

    .header-top-bar {
        display: none;
    }

    .header-nav-wrap {
        margin-top: 0;
    }

    .header-nav-panel {
        border-radius: 0;
    }

    .stats-bar-sec {
        margin-top: 1.25rem;
        margin-bottom: 2.5rem;
    }

    .stats-bar__grid .stats-bar__item--divider {
        border-right: 0;
    }

    .site-header .header-nav-collapse {
        background: var(--navy-dark);
        padding: 1rem;
        margin-top: 1rem;
        border-radius: 12px;
        flex-direction: column;
        align-items: stretch;
    }

    .site-header .header-nav-links {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 4px;
        width: 100%;
    }

    .site-header .navbar-nav .nav-item {
        width: 100%;
    }

    .site-header .nav-link {
        width: 100%;
        justify-content: flex-start;
        font-size: 15px;
        padding: 10px 12px !important;
    }

    .header-cta-group {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        margin: 1rem 0 0;
    }

    .header-call-link {
        justify-content: center;
    }

    .header-call-link__label {
        display: block;
    }

    .site-header .btn-ks-blue {
        width: 100%;
    }

    .site-header .btn-ks-nav {
        min-width: 0;
        width: 100%;
    }

    .ebook-sec__figure {
        margin-bottom: 2rem;
    }

    .ebook-sec__content {
        text-align: center;
    }

    .ebook-sec__content .btn-group-ks {
        justify-content: center;
    }

    .content-split-sec--inner.ebook-sec {
        padding: 3rem 0 3.5rem;
    }

    .content-split-sec--inner .ebook-sec__content p {
        max-width: none;
        margin-left: auto;
        margin-right: auto;
    }

    .ebook-experts-sec__nav {
        display: flex;
    }

    .pub-solutions-sec__bleed {
        display: none;
    }

    .pub-solutions-sec__content-side {
        position: relative;
        min-height: auto;
        max-width: none;
        padding: 3rem 2rem;
        background-color: #e7ecfa;
        overflow: hidden;
    }

    .pub-solutions-sec__content-side::before {
        content: "";
        position: absolute;
        inset: 0;
        background: url('/main/images/pub-sol-left-bg.svg') center / cover no-repeat;
        pointer-events: none;
    }

    .pub-solutions-sec__content-side::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        width: min(653px, 92%);
        height: 100%;
        background: url('/main/images/pub-sol-left-shape.svg') left bottom / cover no-repeat;
        pointer-events: none;
    }

    .pub-solutions-sec {
        min-height: auto;
    }

    .pub-solutions-sec__container {
        min-height: auto;
    }

    .pub-solutions-sec__content-side {
        min-height: auto;
    }

    .pub-solutions-sec__content {
        position: relative;
        z-index: 1;
        max-width: none;
        text-align: left;
        margin: 0 auto;
        padding: 0 0.25rem;
    }

    .pub-solutions-sec__content .heading-2 {
        max-width: none;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    .pub-solutions-sec__content .tag-line--section {
        text-align: center;
        display: block;
    }

    .pub-solutions-sec__content .btn-group-ks {
        justify-content: center;
        margin-top: 1.5rem;
    }

    .stats-bar__slider .stats-bar__item--slide {
        border-right: 0;
        justify-content: center;
        gap: 16px;
        padding: 24px 20px;
    }

    .stats-bar__slider-wrap {
        padding-bottom: 2.25rem;
    }

    .ebook-pathway-sec__slider-wrap {
        padding: 0.75rem 0.5rem 0;
    }

    .ebook-pathway-sec__slider .swiper-slide {
        padding: 12px 8px 16px;
    }

    .ebook-pathway-sec__pagination {
        margin-top: 1rem;
        padding-top: 0.5rem;
    }

    .ebook-pathway-sec__header {
        margin-bottom: 1.5rem;
        padding: 0 0.5rem;
    }

    .pub-solutions-sec__slider-breakout {
        position: relative;
        top: auto;
        right: auto;
        width: 100%;
        min-height: 380px;
        padding: 2.5rem 1.25rem;
        background: url('/main/images/pub-sol-slider-bg.webp') center / cover no-repeat;
    }

    .pub-solutions-sec__slider-breakout::after {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(0, 51, 122, 0.8);
        pointer-events: none;
    }

    .pub-solutions-sec__slider-inner {
        width: calc(100% - 5rem);
        max-width: 273px;
    }

    .pub-solutions-sec__nav--prev {
        left: 0.75rem;
    }

    .pub-solutions-sec__nav--next {
        right: 0.75rem;
    }

    .testimonials-sec__slider-wrap {
        max-width: 100%;
        padding: 0.75rem 2.75rem 0.25rem;
        overflow: visible;
    }

    .testimonials-sec__slider {
        overflow: visible;
        padding: 0.5rem 0;
    }

    .testimonials-sec__slider .swiper-slide {
        width: 100%;
        box-sizing: border-box;
        padding: 10px 6px;
    }

    .testimonials-sec__card--text {
        min-height: auto;
    }
}

@media (max-width: 767px) {
    .hero-sec {
        padding: 1.85rem 0 2.25rem;
    }

    .hero-sec__content {
        padding-top: 0.5rem;
    }

    .heading-1 {
        font-size: 32px;
    }

    .heading-2 {
        font-size: 28px;
    }

    .tag-line--hero,
    .tag-line--section {
        font-size: 18px;
    }

    .stats-bar {
        min-height: auto;
    }

    .stats-bar__item--slide {
        flex-direction: row;
        align-items: center;
        text-align: left;
        padding: 22px 18px;
        min-height: 130px;
    }

    .stats-bar__item--slide .stats-bar__title {
        max-width: none;
        font-size: 17px;
        line-height: 1.25;
    }

    .stats-bar__slider-wrap .stats-bar__value {
        font-size: 28px;
    }

    .stats-bar__slider-wrap .stats-bar__icon {
        width: 56px;
        height: 56px;
    }

    .stats-bar__slider-wrap .stats-bar__icon img {
        width: 56px;
        height: 56px;
    }

    .pub-solutions-sec__content-side {
        padding: 2.5rem 1.25rem;
    }

    .pub-solutions-sec__content .heading-2 {
        font-size: 26px;
        line-height: 1.2;
        margin-bottom: 0.75rem;
    }

    .pub-solutions-sec__lead {
        text-align: left;
        line-height: 1.55;
    }

    .ebook-sec__content .heading-2 {
        font-size: 28px;
    }

    .pub-solutions-sec__content .heading-2,
    .ebook-pathway-sec__header .heading-2,
    .ebook-experts-sec__header .heading-2,
    .exp-diff-sec__title,
    .editing-lead-sec__title,
    .testimonials-sec__header .heading-2,
    .faq-sec__title,
    .contact-sec__header .heading-2 {
        font-size: 28px;
    }

    .content-split-sec--inner.ebook-sec {
        padding: 2rem 0 3rem;
    }

    .content-split-sec--inner .ebook-sec__figure {
        display: none;
    }

    .contact-sec__info-card {
        padding-bottom: 3rem;
    }

    .contact-sec--page {
        padding-top: 2rem;
    }

    .contact-sec__woman {
        display: none;
    }

    .contact-sec__form-title,
    .contact-sec__info-title {
        font-size: 22px;
    }

    .faq-sec {
        min-height: auto;
    }

    .faq-sec__bleed-shape {
        width: min(420px, 75vw);
    }

    .faq-sec__accordion {
        margin-left: 0;
        max-width: none;
    }

    .faq-sec__accordion .accordion-button {
        font-size: 17px;
        padding-right: 2.5rem;
    }

    .faq-sec__video {
        max-width: none;
    }

    .testimonials-sec__slider-wrap {
        padding: 0 2.25rem;
    }

    .testimonials-sec__nav {
        width: 28px;
        height: 28px;
    }

    .testimonials-sec__nav img {
        width: 28px;
        height: 28px;
    }

    .testimonials-sec__nav--prev {
        left: 0;
    }

    .testimonials-sec__nav--next {
        right: 0;
    }

    .ebook-experts-sec {
        min-height: auto;
    }

    .ebook-experts-sec__bleed-shape {
        width: min(420px, 70vw);
    }

    .ebook-experts-sec__slider-wrap {
        padding: 0 2.25rem;
    }

    .ebook-experts-sec__card {
        min-height: 300px;
    }

    .ebook-experts-sec__card-title {
        font-size: 22px;
    }

    .ebook-experts-sec__card-num {
        font-size: 34px;
    }

    .ebook-pathway-sec {
        padding: 2.5rem 0 3rem;
    }

    .ebook-pathway-sec__header .heading-2 {
        font-size: 26px;
        line-height: 1.2;
    }

    .ebook-pathway-sec__header .tag-line--section {
        font-size: 18px;
    }

    .ebook-pathway-sec__card {
        min-height: 140px;
        padding: 1.5rem 1.25rem;
    }

    .ebook-pathway-sec__logo {
        max-width: 200px;
        max-height: 80px;
        width: auto;
        height: auto;
        margin: 0 auto;
    }

    .ebook-pathway-sec__slider .swiper-slide {
        display: flex;
        justify-content: center;
        padding-bottom: 18px;
    }

    .ebook-pathway-sec__pagination {
        margin-top: 1.1rem;
        padding-top: 0.65rem;
    }

    .pub-solutions-sec__slider-inner {
        width: calc(100% - 4.5rem);
        max-width: 273px;
    }

    .pub-solutions-sec__nav {
        width: 31px;
        height: 31px;
    }

    .btn-group-ks {
        flex-direction: column;
        width: 100%;
    }

    .btn-group-ks .btn-ks {
        width: 100%;
    }
}

@media (max-width: 575px) {
    .heading-1 {
        font-size: 28px;
    }

    .heading-2 {
        font-size: 24px;
    }

    .hero-sec {
        padding: 1.75rem 0 2rem;
    }

    .stats-bar-sec {
        margin-top: 1rem;
    }

    .pub-solutions-sec__content-side {
        padding: 2rem 1rem;
    }

    .pub-solutions-sec__content .heading-2 {
        font-size: 22px;
    }

    .pub-solutions-sec__slider-breakout {
        min-height: 340px;
        padding: 2rem 1rem;
    }

    .ebook-pathway-sec__header .heading-2 {
        font-size: 22px;
    }

    .testimonials-sec__slider-wrap {
        padding: 0 1.75rem;
    }

    .footer-modern__newsletter {
        padding: 1.5rem 1.25rem;
    }

    .footer-modern__newsletter-form {
        margin-left: 0;
        max-width: none;
    }

    .footer-modern__glow--left {
        left: 10px;
        top: 30px;
        max-width: 80px;
    }

    .footer-modern__glow--right {
        right: 10px;
        bottom: 60px;
        max-width: 70px;
    }

    .footer-modern__bottom-bar {
        flex-direction: column;
        text-align: center;
    }

    .footer-modern__bottom-bar ul {
        justify-content: center;
    }
}

@media (max-width: 767px) {
    .ebook-experts-sec--inner .ebook-experts-sec__header .heading-2 {
        font-size: 26px;
    }

    .content-split-sec--inner .ebook-sec__content .heading-2 {
        font-size: 26px;
    }
}

@media (max-width: 991px) {
    .exp-diff-sec {
        padding: 3rem 0 4rem;
    }

    .exp-diff-sec__slider-wrap {
        max-width: 100%;
        padding: 0 2.25rem;
    }

    .exp-diff-sec__pagination {
        margin-top: 1.1rem;
        padding-top: 0.5rem;
    }

    .exp-diff-sec__wave {
        width: 65%;
        height: 100%;
    }

    .exp-diff-sec__title {
        font-size: 32px;
    }

    .exp-diff-card {
        min-height: 300px;
        max-width: 100%;
    }

    .exp-diff-card__body {
        padding-top: 2rem;
    }
}

@media (max-width: 575px) {
    .exp-diff-sec__header .tag-line {
        font-size: 18px;
    }

    .exp-diff-sec__title {
        font-size: 28px;
    }

    .exp-diff-card__title {
        font-size: 22px;
    }

    .exp-diff-card__body {
        padding: 1.5rem 18px 22px;
    }

    .exp-diff-card__icon-wrap {
        padding: 14px 18px 0;
    }
}

/* Editing lead — Figma node 100:785 */
@media (max-width: 1199px) {
    .editing-lead-sec__form-card {
        max-width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 991px) {
    .editing-lead-sec {
        padding: 3.5rem 0 4rem;
    }

    .editing-lead-sec__title {
        font-size: 38px;
        max-width: 100%;
    }

    .editing-lead-sec__desc {
        max-width: 100%;
    }

    .editing-lead-sec__form-banner-title {
        font-size: 28px;
    }

    .editing-lead-sec__form {
        padding: 1.25rem 1.5rem 1.5rem;
    }
}

@media (max-width: 575px) {
    .editing-lead-sec {
        padding: 2.5rem 0 3rem;
    }

    .editing-lead-sec__title {
        font-size: 28px;
    }

    .editing-lead-sec__checklist {
        margin-bottom: 1.5rem;
    }

    .editing-lead-sec__checklist > [class*='col-']:first-child {
        margin-bottom: 0.5rem;
    }

    .editing-lead-sec__form-banner {
        min-height: 76px;
        padding: 0.75rem 1rem;
    }

    .editing-lead-sec__form-banner-title {
        font-size: 24px;
    }

    .editing-lead-sec__form {
        padding: 1rem 1.125rem 1.25rem;
    }

    .editing-lead-sec__actions.btn-group-ks {
        flex-direction: column;
        align-items: stretch;
    }

    .editing-lead-sec__actions .btn-ks {
        width: 100%;
    }
}



@media (max-width: 575px) {





    .legal-content-sec {
        padding: 2rem 0 3.5rem;
    }

    .legal-content-sec__heading {
        font-size: 24px;
    }

    .legal-content-sec__subheading {
        font-size: 18px;
    }
}

/* Enquiry modal */
@media (max-width: 575px) {
    .enquiry-modal__dialog {
        max-width: calc(100% - 2rem);
        margin: 1rem;
    }

    .enquiry-modal__body {
        padding: 1.5rem 1.25rem 1.25rem;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .enquiry-modal__title {
        font-size: 24px;
    }

    .enquiry-modal__subtitle {
        font-size: 14px;
        margin-bottom: 1.25rem;
    }

    .enquiry-modal__close {
        top: 0.75rem;
        right: 0.75rem;
    }

    .enquiry-modal__submit {
        min-height: 48px;
    }
}

/* ============================================================
   Horizon revamp — responsive rules for the new home sections
   ============================================================ */

@media (max-width: 1399px) {
    .ebook-sec__badge {
        right: -16px;
    }

    .why-choose-sec__photo--second {
        right: 0;
    }
}

@media (max-width: 1199px) {
    .heading-1,
    .heading-2,
    .award-banner-sec__title {
        font-size: 38px;
    }

    .stats-bar__value {
        font-size: 32px;
    }

    .stats-bar__title {
        font-size: 20px;
        line-height: 26px;
    }

    .award-banner-sec__badges img {
        height: 92px;
    }

    .why-choose-sec__collage-ring {
        width: 360px;
        height: 360px;
        left: 24%;
    }
}

@media (max-width: 991px) {
    .hero-sec__content {
        padding: 28px 0 44px;
    }

    .services-cards-sec__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .services-cards-sec .row {
        margin-top: 40px;
    }

    .services-cards-sec__card {
        margin-top: 46px;
    }

    .ebook-experts-sec__steps {
        flex-direction: column;
        align-items: center;
        gap: 40px;
        min-height: 0;
    }

    .ebook-experts-sec__connector {
        display: none;
    }

    .ebook-experts-sec__card--down .ebook-experts-sec__card-media {
        position: static;
        transform: none;
        margin-bottom: 22px;
        order: -1;
    }

    .award-banner-sec {
        text-align: center;
    }

    .award-banner-sec__title {
        max-width: none;
        margin-bottom: 10px;
    }

    .award-banner-sec__badges {
        justify-content: center;
    }

    .ebook-sec__badge {
        right: 0;
        bottom: 24px;
        width: 120px;
        padding: 18px 12px 28px;
    }

    .ebook-sec__badge strong {
        font-size: 34px;
    }

    .ebook-sec__badge span {
        font-size: 22px;
    }

    .footer-modern {
        padding-top: 56px;
    }

    .footer-modern__newsletter {
        padding: 24px;
    }

    .footer-modern__main {
        padding: 40px 0 20px;
    }

    .contact-sec__info-card {
        min-height: 420px;
    }
}

@media (max-width: 575px) {
    .heading-1,
    .heading-2,
    .award-banner-sec__title {
        font-size: 30px;
    }

    .tag-line--hero,
    .tag-line--section {
        font-size: 18px;
    }

    .stats-bar {
        padding: 24px 12px;
    }

    .portfolio-sec__item {
        padding: 14px;
    }

    .services-cards-sec__icon-circle {
        width: 104px;
        height: 104px;
    }

    .ebook-experts-sec__card-text {
        max-width: 320px;
    }

    .why-choose-sec__feature-title,
    .services-cards-sec__card-title,
    .ebook-experts-sec__card-title,
    .contact-sec__info-title,
    .footer-modern__heading,
    .footer-modern__newsletter-title,
    .contact-sec__form-title {
        font-size: 21px;
    }

    .contact-sec__woman {
        width: 130px;
    }

    .contact-sec__woman-halo {
        width: 92px;
        height: 92px;
        right: 36px;
        bottom: 96px;
    }

    .footer-modern__bottom-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}


@media (max-width: 991px) {


    .service-intro-sec {
        padding: 64px 0;
    }

    .service-intro-sec__corner {
        top: -10px;
        right: -10px;
        width: 110px;
        height: 110px;
        border-width: 7px;
    }
}

/* ============================================================
   Horizon overrides — neutralize legacy header/hero tweaks that
   were built for the old Keystone layout.
   ============================================================ */

@media (max-width: 1400px) and (min-width: 992px) {
    .header-nav-wrap {
        margin-top: 0;
    }

    .header-top-bar__grid {
        min-height: 0;
    }

    .site-header .navbar-brand img {
        max-height: none;
    }

    .hero-sec {
        padding: 0;
    }

    .hero-sec__visual {
        min-height: 0;
        padding-bottom: 0;
    }

    .stats-bar-sec {
        margin-top: -88px;
    }

    .stats-bar__item {
        min-height: 0;
    }
}

@media (max-width: 1199px) and (min-width: 992px) {
    .header-nav-wrap {
        margin-top: 0;
    }
}

@media (max-width: 991px) {
    .ks-site-root .services-cards-sec__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .ks-site-root .services-cards-sec__grid {
        grid-template-columns: 1fr;
    }

    .ks-site-root .portfolio-sec__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 991px) {
    .ks-site-root .ebook-sec__row {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .ks-site-root .contact-sec__row,
    .ks-site-root .faq-sec__row {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 575px) {
    .ks-site-root .contact-sec__fields {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 991px) {
    .ks-site-root .service-intro-sec__row {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .service-intro-sec__figure {
        height: auto;
    }

}

@media (max-width: 991px) {
    .ks-site-root .service-guide-sec__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575px) {
    .ks-site-root .service-guide-sec__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991px) {
    /* The hero wave that makes these pills read on desktop is scaled down on
       phones, so give them a hairline edge to stay visible. */
    .btn-ks-hero-outline {
        border: 1px solid rgba(255, 255, 255, 0.55);
    }
}

/* ---- tablet polish ---- */
@media (max-width: 991px) {
    /* Service cards: the icon disc overhangs 40px, so rows need clearance */
    .ks-site-root .services-cards-sec__grid {
        gap: 62px 15px;
    }

    /* Book covers stay readable at two per row */
    .ks-site-root .portfolio-sec__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stats-bar__item--divider {
        border-right: 1px solid rgba(255, 255, 255, 0.4);
    }

    .stats-bar__grid .stats-bar__item:last-child {
        border-right: 0;
    }
}

@media (max-width: 767px) {
    .stats-bar__item--divider {
        border-right: 0;
    }
}

@media (max-width: 991px) {
    /* Covers scale with the card instead of holding the design's fixed 194px */
    .ks-site-root .portfolio-sec__item {
        padding: 22px;
    }

    .ks-site-root .portfolio-sec__item img {
        width: 100%;
        height: auto;
        max-width: 194px;
        object-fit: contain;
    }
}

@media (max-width: 575px) {
    .ks-site-root .portfolio-sec__item {
        padding: 14px;
    }
}

/* ---- inner-page hero + contact card on small screens ---- */
@media (max-width: 991px) {
    /* The 3D character has no room beside centred copy on phones/tablets */
    .about-hero-sec__character {
        display: none;
    }

    .about-hero-sec__inner {
        padding: 56px 0;
    }
}

@media (max-width: 991px) {
    /* Keep the halo with its figure — hide both when the figure is hidden */
    .contact-sec__woman-halo {
        display: none;
    }
}

@media (max-width: 991px) {
    .ks-site-root .why-choose-sec__row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991px) {
    .ks-site-root .footer-modern__main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575px) {
    .ks-site-root .footer-modern__main {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Small-screen polish (arrow-era leftovers and slider details)
   ============================================================ */
@media (max-width: 991px) {
    /* The arrows are gone, so the slider no longer needs side gutters */
    .testimonials-sec__slider-wrap {
        padding: 0;
        max-width: 100%;
        overflow: visible;
    }

    /* Inside the slider every step looks the same: circle on top, number on
       the circle. The desktop zigzag offsets must be fully reset. */
    .ebook-experts-sec__slider .ebook-experts-sec__card--down .ebook-experts-sec__card-media {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        bottom: auto;
        transform: none;
    }

    /* Bring the service disc inside the card so the icon is never clipped */
    .services-cards-sec__slider .services-cards-sec__icon-wrap {
        height: 104px;
    }

    .services-cards-sec__slider .services-cards-sec__icon-circle {
        left: -18px;
        top: -18px;
        width: 112px;
        height: 112px;
    }

    .services-cards-sec__slider .services-cards-sec__icon-circle img {
        transform: none;
        max-width: 50px;
        max-height: 58px;
    }

    /* Stats stack in the panel instead of paging one at a time */
    .stats-bar__item--divider {
        border-right: 0;
    }
}

@media (max-width: 767px) {
    .stats-bar {
        padding: 26px 16px;
    }

    .stats-bar__grid .row > * + * .stats-bar__item {
        border-top: 1px solid rgba(255, 255, 255, 0.35);
        padding-top: 18px;
        margin-top: 18px;
    }

    .stats-bar__value {
        font-size: 32px;
    }

    .stats-bar__title {
        font-size: 20px;
        line-height: 26px;
    }

    /* Legal links stay on one line each and centre under the copyright */
    .footer-modern__bottom-bar {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 14px;
    }

    .footer-modern__bottom-bar ul {
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px 20px;
    }

    .footer-modern__bottom-bar ul a {
        white-space: nowrap;
    }
}
