/* =========================================================================
   pemfit/pemf-info-grid — "What is PEMF?" information grid
   Append to blocks/block-styles.css, then bump ?ver= / filemtime.
   ====================================================================== */
 
.three-image-text-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    -moz-column-gap: var(--pemf-grid-column-gap, var(--pemf-space-m, 2rem));
    column-gap: var(--pemf-grid-column-gap, var(--pemf-space-m, 2rem));
    row-gap: var(--pemf-grid-row-gap, var(--pemf-space-m, 2rem));
    align-items: start;
}

.three-image-text-grid.is-reversed {
    direction: rtl;
}

.three-image-text-grid.is-reversed > * {
    direction: ltr;
}

.three-image-text-grid.has-text-align-center .title-p,
.three-image-text-grid.has-text-align-center .p-cta {
    text-align: center;
}

.three-image-text-grid.has-text-align-right .title-p,
.three-image-text-grid.has-text-align-right .p-cta {
    text-align: right;
}

/* --- Text columns ------------------------------------------------------ */
.three-image-text-grid .title-p,
.three-image-text-grid .p-cta {
    display: flex;
    flex-direction: column;
    gap: var(--pemf-space-s, 1rem);
    align-self: center;
}

.three-image-text-grid .pemf-info-grid__title {
    color: var(--pemf-heading-colour, currentColor);
    margin: 0;
}

.three-image-text-grid .pemf-info-grid__description {
    margin: 0;
}

.three-image-text-grid .p-cta .cta {
    align-self: flex-start;
}

.three-image-text-grid.has-text-align-center .p-cta .cta {
    align-self: center;
}

.three-image-text-grid.has-text-align-right .p-cta .cta {
    align-self: flex-end;
}

/* --- Media slots ------------------------------------------------------- */
.three-image-text-grid .pemf-info-grid__media {
    /* position, overflow, height and padding-bottom are set inline per
	   block instance (padding-bottom intrinsic-ratio box, matching the
	   same technique used on the HTI image block) — not set here, since
	   the ratio is per-block, not fixed in the stylesheet. */
    margin: 0;
    background-color: var(--pemf-colour-neutral-100, #f2f2f0);
    line-height: 0;

    /* stops descender gap under replaced elements */
}

/* The ratio-box fill wrapper — absolutely positioned inline per instance
   (top/left/width/height) so image, video and embed content all fill the
   padding-bottom box identically, the same way a plain <img> would. */
.three-image-text-grid .pemf-info-grid__media-inner {
    line-height: normal;
}

.three-image-text-grid .pemf-info-grid__media-inner img,
.three-image-text-grid .pemf-info-grid__media-inner > video {
    display: block;
    width: 100%;
    height: 100%;
}

.three-image-text-grid .pemf-info-grid__media-inner img.is-cover,
.three-image-text-grid .pemf-info-grid__media-inner > video.is-cover {
    -o-object-fit: cover;
    object-fit: cover;
}

.three-image-text-grid .pemf-info-grid__media-inner img.is-contain,
.three-image-text-grid .pemf-info-grid__media-inner > video.is-contain {
    -o-object-fit: contain;
    object-fit: contain;
}

/* Embeds / shortcode output — force any iframe or player to fill the frame.
   No position:absolute here — the .pemf-info-grid__media-inner wrapper
   above already handles that when a fixed aspect ratio is set. */
.three-image-text-grid .pemf-info-grid__embed {
    width: 100%;
    height: 100%;
}

.three-image-text-grid .pemf-info-grid__embed > *,
.three-image-text-grid .pemf-info-grid__embed iframe,
.three-image-text-grid .pemf-info-grid__embed video,
.three-image-text-grid .pemf-info-grid__embed .wp-video,
.three-image-text-grid .pemf-info-grid__embed .mejs-container {
    width: 100% !important;
    height: 100% !important;
    max-width: none;
    border: 0;
    display: block;
}

/* 'auto' aspect (no ratio box, no .pemf-info-grid__media-inner wrapper) —
   content sizes naturally, embed/video allowed to set their own height. */
.three-image-text-grid .pemf-info-grid__media > .pemf-info-grid__embed:only-child {
    width: 100%;
}

/* --- Editor-only affordances ------------------------------------------ */
.pemf-info-grid__media-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--pemf-colour-neutral-300, #c9c9c4);
    line-height: normal;
}

.pemf-info-grid__embed--placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
    border: 1px dashed var(--pemf-colour-neutral-300, #c9c9c4);
    overflow: hidden;
}

.pemf-info-grid__embed-label {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.6;
}

.pemf-info-grid__embed--placeholder code {
    font-size: 0.75rem;
    word-break: break-all;
    max-height: 6em;
    overflow: hidden;
}

.pemf-media-slot__buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

@media screen and (max-aspect-ratio: 1/1) {
    .page-template-PULSE-PEMF .full-height-hero,
    .page-template-Optimal-Hydration .full-height-hero {
        min-height: 40svh;
        height: 80vw;
    }
}

/* @media screen and (max-height: 600px) {
    .page-template-PULSE-PEMF .full-height-hero,
    .page-template-Optimal-Hydration .full-height-hero {
        min-height: 70svh;
        height: 80vw;
    }
} */
@media screen and (min-width: 2000px) {
    .wp-block-pemfit-stat-counter .stat-counter-grid {
        grid-template-rows: 2vw 2vw 5vw 5vw 2vw 2vw !important;
    }
}

@media screen and (max-width: 2000px) {
    .author.half-hero h1 {
        min-width: 0;
    }

    .author figure {
        flex-basis: 50%;
    }

    .author .hero-text-container {
        flex-basis: 50%;
    }
}

@media screen and (max-width: 1600px) {
    .echelon-hero .cover-image img {
        -o-object-position: 80% 50%;
        object-position: 80% 50%;
    }
}

@media screen and (max-width: 1500px) {
    .info-snippet {
        grid-template-columns: repeat(2, auto);
        justify-content: start;
    }

    .author figure {
        flex-basis: 60%;
    }

    .author .hero-text-container {
        flex-basis: 40%;
    }

    .four-card-pricing {
        padding: var(--medium-gutter) var(--large-gutter);
    }

    .four-card-pricing .card-container {
        flex-wrap: wrap;
        gap: var(--large-gutter);
        width: calc(100% + var(--large-gutter));
    }

    .four-card-pricing .card {
        flex-basis: calc(50% - var(--large-gutter));
    }
}

@media screen and (max-width: 1400px) {
    .four-card:not(.four-card-pricing) {
        padding: var(--thin-gutter);
    }

    .four-card:not(.four-card-pricing) .card-info .cta-container {
        width: 100%;
    }

    .borderless-image-right .inner-hero-wrap {
        height: 80%;
    }

    .infographic:not(.our-story) figure:nth-of-type(1),
    .infographic:not(.our-story) figure:nth-of-type(2) {
        align-self: center;
    }

    /* .half-text-image figure {
        -ms-flex-item-align: stretch;
            align-self: stretch;
    } */
    .half-text-image figure {
        align-self: flex-start;
    }
}

@media screen and (max-width: 1200px) {
    .main-menu ul:not(.dropdown-menu) li a:not(#socials a) {
        padding: 1.5rem 1.2rem;
    }

    .regenerus-logo {
        width: 40%;
        max-width: none;
    }

    .echelon-hero h2 span {
        display: inline;
    }

    .OH-product-intro {
        width: 80%;
    }

    .search-nav h3 {
        display: none;
    }

    #pete-comparison .flex {
        gap: 2rem;
    }

    .author {
        padding: 0 var(--medium-gutter);
    }

    .author .inner-hero-wrap {
        gap: var(--medium-gutter);
    }

    .four-card .card-inner {
        flex-basis: calc(33.33% - var(--medium-gutter));
    }

    .three-card-grid figure {
        padding: 3rem;
    }

    .infographic:not(.our-story) figure:nth-of-type(1) {
        align-self: flex-end;
        margin-bottom: 2rem;
    }

    .infographic figure:nth-of-type(2) {
        align-self: flex-start;
        margin-top: 2rem;
    }

    #footer-info {
        padding: 3rem;
    }

    .three-image-text-grid {
        grid-template-columns: 35% 5% 5% 35% 20%;
        grid-template-rows: 5vw auto 5vw auto;
    }

    .three-image-text-grid figure:nth-of-type(1) {
        grid-area: 1 / 4 / 3 / 6;
        margin: 0;
    }

    .three-image-text-grid figure:nth-of-type(2) {
        grid-area: 3 / 1 / 6 / 3;
        margin: 5vw 0 0 0;
    }

    .three-image-text-grid figure:nth-of-type(2) img {
        -o-object-position: 50% 35%;
        object-position: 50% 35%;
    }

    .three-image-text-grid figure:nth-of-type(3) {
        grid-area: 4 / 4 / 7 / 6;
        margin: 0;
    }

    .three-image-text-grid .p-cta {
        grid-area: 4 / 4 / auto / 6;
        margin: 0;
    }

    .three-image-text-grid .title-p {
        grid-area: 1 / 1 / 3 / 3;
    }

    .infographic.our-story .info-container {
        grid-area: 1 / 1 / 3 / 3;
    }

    .infographic.our-story .summary {
        grid-area: 1 / 4 / 2 / 7;
    }

    .infographic.our-story figure {
        grid-area: 2 / 4 / 3 / 7;
    }

    .infographic.our-story figure img {
        -o-object-position: 30% 50%;
        object-position: 30% 50%;
    }

    /* .home-hero {
        min-height: 80svh
    } */
}

