/* =========================================================
   SOLUTION – EQUIPMENT HEALTH MONITORING
   Loaded AFTER page-well-schematics.css and page-resources.css.
   Only the components that don't exist on the Well Schematics
   page are styled here (plus a few small overrides).
   ========================================================= */

.ehm-section,
.ehm-services,
.ehm-proof {
    --ehm-border: #D9D9D9;
    --ehm-border-soft: #E0E0E0;
    --ehm-accent: #F36E3A;
    --ehm-accent-dark: #F04E30;
    --ehm-ink: #222431;
    --ehm-text: #5E5E68;
    --ehm-stripes: repeating-linear-gradient(
        -45deg,
        transparent 0,
        transparent 6px,
        #E3E1E3 6px,
        #E3E1E3 7px
    );
}

/* Anchor offset for the sticky nav */
section[id^="ehm-"] { scroll-margin-top: var(--ws-nav-h, 0px); }

/* Sections that are not in the Well Schematics stylesheet */
.ehm-section { border-top: 1px solid #D9D9D9; }

.ehm-section .grid {
    border-left: 1px solid #D9D9D9;
    border-right: 1px solid #D9D9D9;
    box-sizing: border-box;
}

/* ---------- Shared: two-column section header ---------- */
.ehm-section-header {
    display: flex;
    justify-content: space-between;
    gap: 80px;
    padding: 50px 45px 44px;
}

.ehm-section-header .col-one { width: 50%; }
.ehm-section-header .col-one:last-child { max-width: 520px; }

.ehm-section-header .home-tabs-title {
    width: 100%;
    margin: 0;
    font-weight: 600;
}

.ehm-section-text {
    font-family: 'Poppins';
    font-weight: 400;
    font-size: 15px;
    line-height: 150%;
    color: var(--ehm-text);
    padding-top: 30px;
}

.ehm-section-text p { margin: 0 0 8px; }
.ehm-section-text p:last-child { margin-bottom: 0; }

/* Orange lead paragraph (approach + RTOC) */
.ehm-lead {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 500;
    font-size: 20px;
    line-height: 130%;
    color: var(--ehm-accent-dark, #F04E30);
    margin: 24px 0 0;
}

/* Bullet list used by "Includes" (2 columns instead of 4) */
.ehm-includes-badge {
    display: inline-flex;
    width: auto;
    margin: 32px 0 20px;
}

.ehm-includes-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px 28px;
}

.ehm-includes-list .ws-accordion-item { width: 100%; }

/* =========================================================
   HERO – small overrides on the Well Schematics banner
   ========================================================= */
.ehm-banner-section {
    background-size: cover;
    background-position: center top;
}

.ehm-banner-section .ws-banner-subtitle { margin: 0 0 10px; }

.ehm-banner-section .ws-banner-title {
    width: 90%;
    margin-top: 0;
}

.ehm-banner-section .ws-banner-text { color: #F7F5F5; }

/* =========================================================
   OUR APPROACH – .ws-feature with a full-height image
   ========================================================= */
.ehm-approach .ws-feature {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    border-top: none;
}

.ehm-approach .ws-feature.no-image { grid-template-columns: 1fr; }

.ehm-approach .ws-feature-image {
    margin: 0;
    border-right: 1px solid #E0E0E0;
    min-height: 100%;
}

.ehm-approach .ws-feature-image img {
    display: block;
    width: 100%;
    max-width: none;
    height: 100%;
    object-fit: cover;
}

.ehm-approach-content { padding: 50px 45px; }

.ehm-approach-content .home-tabs-title { margin-top: 0; }

.ehm-approach .ws-feature-text { margin-top: 32px; }

.ehm-approach .ws-feature-text p { margin-bottom: 20px; }
.ehm-approach .ws-feature-text p:last-child { margin-bottom: 0; }

.ehm-quote { margin-top: 64px; }

.ehm-quote .ws-feature-quote-author {
    text-align: right;
    font-size: 18px;
    font-weight: 600;
    font-style: normal;
    margin-top: 24px;
}

/* =========================================================
   TABS (solution modules + lifecycle stages)
   Same look as the Home tabs, prefixed so nothing collides.
   ========================================================= */
.ehm-tabs-nav {
    display: flex;
    align-items: stretch;
    width: 100%;
    border-top: 1px solid #e5e2dc;
    border-bottom: 1px solid #e5e2dc;
    background: #F7F5F5;
    overflow-x: auto;
    scrollbar-width: none;
}

.ehm-tabs-nav::-webkit-scrollbar { display: none; }

.ehm-tabs-nav-item {
    appearance: none;
    border: none;
    border-right: 1px solid #e5e2dc;
    background: transparent;
    cursor: pointer;
    padding: 14px 45px;
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 500;
    font-size: 15px;
    line-height: 130%;
    letter-spacing: -0.03em;
    white-space: nowrap;
    color: rgba(34, 37, 49, 0.40);
    transition: background-color .25s ease, color .25s ease;
}

.ehm-tabs-nav-item:hover { color: var(--ehm-accent); }

.ehm-tabs-nav-item.is-active {
    background: var(--ehm-accent);
    color: #fff;
}

.ehm-tabs-nav-item:focus-visible {
    outline: 2px solid var(--ehm-accent);
    outline-offset: -2px;
}

.ehm-tabs-nav-filler {
    flex: 1 1 auto;
    min-width: 40px;
    background-image: var(--ehm-stripes);
}

.ehm-tabs-panel[hidden] { display: none; }

.ehm-tabs-panel.is-active { animation: ehmFadeIn .35s ease; }

@keyframes ehmFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}

/* ---------- Solution modules panel ---------- */
.ehm-modules .ehm-tabs-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 90px;
    align-items: start;
    padding: 50px 45px 110px;
}

.ehm-modules .ehm-tabs-panel[hidden] { display: none; }

.ehm-tabs-panel-title {
    font-family: 'Poppins';
    font-weight: 500;
    font-size: 28px;
    line-height: 130%;
    letter-spacing: -0.03em;
    color: var(--ehm-accent-dark);
    margin: 0;
}

.ehm-tabs-panel-tagline {
    font-family: 'Poppins';
    font-weight: 600;
    font-size: 15px;
    line-height: 150%;
    color: var(--ehm-ink);
    margin: 20px 0 0;
}

.ehm-tabs-panel-desc {
    font-family: 'Poppins';
    font-weight: 400;
    font-size: 15px;
    line-height: 150%;
    color: var(--ehm-text);
    margin-top: 16px;
}

.ehm-tabs-panel-desc p { margin: 0 0 8px; }
.ehm-tabs-panel-desc p:last-child { margin-bottom: 0; }

.ehm-tabs-panel-text .cta-ws { margin-top: 12px; }

.ehm-tabs-panel-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
}

/* =========================================================
   REAL-TIME OPERATIONS CENTER
   ========================================================= */
.ehm-rtoc-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 50px 45px 50px;
}

.ehm-rtoc .home-tabs-title {
    width: 100%;
    margin: 0;
    font-weight: 600;
}

.ehm-rtoc-text { margin-top: 32px; }

.ehm-rtoc-text p { margin: 0 0 20px !important; }

/* Image with the same double-line frame used on the cards */
.ehm-framed-image {
    padding: 10px;
    border: 1px solid #E3E1E3;
    border-radius: 8px;
    box-shadow: inset 0 0 0 3px #F7F5F5, inset 0 0 0 4px #E3E1E3;
    background: #F7F5F5;
}

.ehm-framed-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 2px;
}

.ehm-rtoc-aside .ehm-includes-badge { margin-top: 44px; }

/* =========================================================
   LIFECYCLE STAGES
   ========================================================= */
.ehm-stages {
    padding: 0 45px;
    background-image: var(--ehm-stripes);
    border-top: 1px solid #e5e2dc;
}

.ehm-stages-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    grid-auto-flow: column;
    background: #F7F5F5;
    border-bottom: 1px solid #e5e2dc;
}

.ehm-stages-nav-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    text-align: left;
    white-space: normal;
    color: var(--ehm-ink);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.03em;
}

.ehm-stage-number {
    font-family: 'Poppins';
    font-weight: 200;
    font-size: 14px;
    line-height: 130%;
}

.ehm-stage-name { line-height: 140%; }

.ehm-stages-nav-item:hover { color: var(--ehm-accent); }
.ehm-stages-nav-item.is-active,
.ehm-stages-nav-item.is-active:hover { color: #fff; }

.ehm-stages-content { background: #fff; }

.ehm-stage-panel { padding: 45px 45px 50px; }

.ehm-stage-panel.has-image:not([hidden]) {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 50px;
    align-items: center;
}

.ehm-stage-title {
    font-family: 'Poppins';
    font-weight: 600;
    font-size: 26px;
    line-height: 130%;
    letter-spacing: -0.03em;
    color: var(--ehm-ink);
    margin: 12px 0 28px;
}

.ehm-stage-text {
    font-family: 'Poppins';
    font-weight: 400;
    font-size: 15px;
    line-height: 150%;
    color: var(--ehm-text);
}

.ehm-stage-text p { margin: 0 0 8px; }
.ehm-stage-text p:last-child { margin-bottom: 0; }

.ehm-stage-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
}

/* =========================================================
   SOFTWARE-ENABLED SERVICES – icon boxes overrides
   ========================================================= */
.ehm-services .grid { padding-bottom: 0; }

.ehm-services .ehm-section-header .cta-ws { margin-top: 12px; }

.ehm-services .platform-foundations-grid {
    border-top: 1px solid #e0e0e0;
    border-bottom: none;
    margin: 0;
    background-image: var(--ehm-stripes);
}

.ehm-services .platform-box { padding: 34px 32px 50px; }

.ehm-services .platform-box-header { gap: 12px; align-items: flex-start; }

.ehm-services .platform-box-icon { flex: 0 0 34px; }

.ehm-services .platform-box-icon img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.ehm-services .platform-box-title {
    width: auto;
    margin: 4px 0 0;
}

.ehm-services .platform-box-text p { margin: 16px 0 0; }

/* =========================================================
   THE PROOF – small overrides
   ========================================================= */
.ehm-proof .ws-proof-header .home-tabs-title {
    font-weight: 600;
    margin: 0;
}

.ehm-proof .resources-card { background: #F7F5F5; }

.ehm-proof .resources-card-tags { margin: 16px 0; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
    .ehm-section-header { gap: 40px; }
    .ehm-modules .ehm-tabs-panel { gap: 48px; }

    .ehm-stages-nav {
        display: flex;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .ehm-stages-nav::-webkit-scrollbar { display: none; }
    .ehm-stages-nav-item { flex: 0 0 180px; }
}

@media (max-width: 900px) {
    .ehm-section,
    .ehm-approach { padding: 0 20px; }

    .ehm-section-header {
        flex-direction: column;
        gap: 16px;
        padding: 50px 16px 32px;
    }

    .ehm-section-header .col-one,
    .ehm-section-header .col-one:last-child {
        width: 100%;
        max-width: none;
        display: block;
    }

    .ehm-section-text { padding-top: 0; font-size: 14.5px; }

    .ehm-lead { font-size: 17px; }

    /* Approach */
    .ehm-approach .ws-feature {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0;
    }
    .ehm-approach .ws-feature-image { border-right: none; }
    .ehm-approach .ws-feature-image img { max-height: 420px; }
    .ehm-approach-content { padding: 40px 16px 50px; }
    .ehm-quote { margin-top: 40px; padding: 20px; }
    .ehm-quote p { font-size: 17px; }

    /* Module tabs */
    .ehm-tabs-nav-item { padding: 14px 20px; font-size: 14px; }

    .ehm-modules .ehm-tabs-panel {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 40px 16px 60px;
    }
    .ehm-tabs-panel-image { order: -1; }
    .ehm-tabs-panel-title { font-size: 24px; }

    /* RTOC */
    .ehm-rtoc-wrapper {
        grid-template-columns: 1fr;
        padding: 50px 16px;
    }
    .ehm-rtoc-aside .ehm-includes-badge { margin-top: 32px; }

    /* Lifecycle */
    .ehm-stages { padding: 0 16px; }
    .ehm-stage-panel { padding: 32px 20px 40px; }
    .ehm-stage-panel.has-image:not([hidden]) { grid-template-columns: 1fr; gap: 24px; }
    .ehm-stage-title { font-size: 22px; margin-bottom: 16px; }

    /* Services */
    .ehm-services .platform-foundations-grid { padding: 0 16px; }
}

@media (max-width: 560px) {
    .ehm-includes-list { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .ehm-tabs-panel.is-active { animation: none; }
    .ehm-tabs-nav-item { transition: none; }
}

@media(max-width:991px){
    .ws-banner-image{
        margin-bottom: 0px!important;
    }
    .ehm-approach{
        padding-top: 20px;
    }
}

/* EHM – Fix Includes list on mobile */
@media (max-width: 767px) {
    .ehm-includes-list {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .ehm-includes-list .ws-accordion-item {
        width: 100% !important;
        max-width: none !important;
        min-width: 0;
    }

    .ehm-includes-list .ws-accordion-item > span {
        flex: 1 1 auto !important;
        width: auto !important;
        max-width: none !important;
        min-width: 0;
        white-space: normal;
    }
}

/* Equipment Health Monitoring – Fix navbar anchor offset */
@media (min-width: 902px) {
    section[id^="ehm-"] {
        scroll-margin-top: 130px;
    }
}

/* Equipment Health Monitoring – Mobile Hero background */
@media (max-width: 767px) {
    body.page-id-4568 .ws-banner-section {
        background-position: center 548px !important;
        background-repeat: no-repeat !important;
        background-color: #222431 !important;
    }
}

/* Equipment Health Monitoring – Mobile Hero media padding */
@media (max-width: 767px) {
    body.page-id-4568 .ws-banner-section .ws-banner-image {
        padding: 8px 5px 0 !important;
    }
}

/* EHM – Mobile Hero background */
@media (max-width: 767px) {
    body.page-id-4568 .ws-banner-section {
        background-image:
            linear-gradient(
                to right,
                rgba(255, 255, 255, 0.045) 1px,
                transparent 1px
            ),
            linear-gradient(
                to bottom,
                rgba(255, 255, 255, 0.045) 1px,
                transparent 1px
            ),
            url("/wp-content/uploads/2026/10/hero-section-EHM-scaled.png") !important;

        background-size:
            48px 48px,
            48px 48px,
            cover !important;

        background-position:
            0 0,
            0 0,
            center 548px !important;

        background-repeat:
            repeat,
            repeat,
            no-repeat !important;

        background-color: #222431 !important;
    }
}

/* EHM – Mobile Solution Modules navigation */
#ehm-modules .pt-mobile-arrows {
    display: none;
}

@media (max-width: 767px) {
    #ehm-modules .pt-mobile-arrows {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 16px 0;
    }

    #ehm-modules .pt-mobile-arrows button {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        padding: 0;
        border: 1px solid #dedede;
        border-radius: 50%;
        background: transparent;
        color: #f45132;
        cursor: pointer;
        font-size: 28px;
        line-height: 1;
    }

    #ehm-modules .pt-mobile-arrows button:focus-visible {
        outline: 2px solid #f45132;
        outline-offset: 3px;
    }
}

/* Mobile arrows – SVG icons perfectly centered */
@media (max-width: 767px) {
    :is(.home-mobile-arrows, .pt-mobile-arrows) button {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
        background-size: 20px 20px !important;
    }

    /* Hide the original text arrows */
    :is(.home-mobile-arrows, .pt-mobile-arrows) button span {
        display: none !important;
    }

    /* Previous arrow */
    :is(.home-arrow-prev, .pt-arrow-prev) {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15 18l-6-6 6-6' fill='none' stroke='%23f45132' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    }

    /* Next arrow */
    :is(.home-arrow-next, .pt-arrow-next) {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 18l6-6-6-6' fill='none' stroke='%23f45132' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    }
}
