/* MPC page-specific Semplice refinements.
 * Every selector is scoped to one page and known content modules.
 */

/* Projects — page 32
 * Preserve Semplice image dimensions; standardise only the copy beneath cards.
 */
#content-32 smp-column:has(> smp-content-wrapper > .image-hover-zoom) > smp-content-wrapper > smp-content[data-module="text"] {
    padding-right: 0 !important;
    padding-left: 0 !important;
}

#content-32 smp-column:has(> smp-content-wrapper > .image-hover-zoom) > smp-content-wrapper > smp-content[data-module="text"] p {
    margin: 14px 0 6px !important;
}

#content-32 smp-column:has(> smp-content-wrapper > .image-hover-zoom) > smp-content-wrapper > smp-content[data-module="text"] h5 {
    margin: 0 0 48px !important;
    line-height: 1.3 !important;
}

/* Consultancy — page 474
 * These are the five copy modules paired with imagery/video on this page.
 */
#content-474 :is(
    #content_e007ec1d7,
    #content_j266e7snm,
    #content_0aadf89cb,
    #content_8023822bd,
    #content_e0c31a858
) {
    box-sizing: border-box;
    padding: 25px 0 !important;
}

/* Case-study card rows on the pages that contain them. The image and linked
   title must be in the same column, so regular image/copy bands cannot match. */
:is(
    #content-32,
    #content-46,
    #content-117,
    #content-118,
    #content-119,
    #content-120,
    #content-543
) smp-column:has(.image-hover-zoom):has(smp-content[data-module="text"] a) smp-content[data-module="text"] p {
    margin: 14px 0 5px !important;
}

:is(
    #content-32,
    #content-46,
    #content-117,
    #content-118,
    #content-119,
    #content-120,
    #content-543
) smp-column:has(.image-hover-zoom):has(smp-content[data-module="text"] a) smp-content[data-module="text"] h5 {
    margin: 0 0 30px !important;
    line-height: 1.3 !important;
}

#content-474 :is(
    #content_e007ec1d7,
    #content_j266e7snm,
    #content_0aadf89cb,
    #content_8023822bd,
    #content_e0c31a858
) h3 {
    margin-bottom: 18px !important;
}

#content-474 :is(
    #content_e007ec1d7,
    #content_j266e7snm,
    #content_0aadf89cb,
    #content_8023822bd,
    #content_e0c31a858
) p {
    margin-bottom: 18px !important;
}

#content-474 :is(
    #content_e007ec1d7,
    #content_j266e7snm,
    #content_0aadf89cb,
    #content_8023822bd,
    #content_e0c31a858
) p:last-child {
    margin-bottom: 0 !important;
}

@media screen and (max-width: 767.98px) {
    #content-32 smp-column:has(> smp-content-wrapper > .image-hover-zoom) > smp-content-wrapper > smp-content[data-module="text"] h5 {
        margin-bottom: 30px !important;
    }

    #content-474 :is(
        #content_e007ec1d7,
        #content_j266e7snm,
        #content_0aadf89cb,
        #content_8023822bd,
        #content_e0c31a858
    ) {
        padding: 20px 0 !important;
    }

    :is(
        #content-32,
        #content-46,
        #content-117,
        #content-118,
        #content-119,
        #content-120,
        #content-543
    ) smp-column:has(.image-hover-zoom):has(smp-content[data-module="text"] a) smp-content[data-module="text"] h5 {
        margin-bottom: 24px !important;
    }
}

/* Service detail pages — each page is explicitly scoped.
 * Only copy-module spacing is normalised; imagery remains untouched.
 */
:is(
    #content-46,
    #content-117,
    #content-118,
    #content-119,
    #content-120,
    #content-121,
    #content-335,
    #content-362,
    #content-463,
    #content-529,
    #content-543,
    #content-555
) smp-row:has(.image-hover-zoom) smp-content[data-module="text"] {
    box-sizing: border-box;
    padding-top: 25px !important;
    padding-bottom: 25px !important;
}

:is(
    #content-46,
    #content-117,
    #content-118,
    #content-119,
    #content-120,
    #content-121,
    #content-335,
    #content-362,
    #content-463,
    #content-529,
    #content-543,
    #content-555
) smp-row:has(.image-hover-zoom) smp-content[data-module="text"] .is-content > :is(h2, h3, h4, h5) {
    margin-bottom: 18px !important;
}

:is(
    #content-46,
    #content-117,
    #content-118,
    #content-119,
    #content-120,
    #content-121,
    #content-335,
    #content-362,
    #content-463,
    #content-529,
    #content-543,
    #content-555
) smp-row:has(.image-hover-zoom) smp-content[data-module="text"] .is-content > p {
    margin-bottom: 18px !important;
}

:is(
    #content-46,
    #content-117,
    #content-118,
    #content-119,
    #content-120,
    #content-121,
    #content-335,
    #content-362,
    #content-463,
    #content-529,
    #content-543,
    #content-555
) smp-row:has(.image-hover-zoom) smp-content[data-module="text"] .is-content > :last-child {
    margin-bottom: 0 !important;
}

@media screen and (max-width: 767.98px) {
    :is(
        #content-46,
        #content-117,
        #content-118,
        #content-119,
        #content-120,
        #content-121,
        #content-335,
        #content-362,
        #content-463,
        #content-529,
        #content-543,
        #content-555
    ) smp-row:has(.image-hover-zoom) smp-content[data-module="text"] {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }
}
