/* Inner pages (everything except Home; enqueued in functions.php). Brand tokens come from main.css.
   Layout classes used in the page content (block editor → Advanced → Additional CSS class):
   nmtc-split (+ nmtc-split--reverse) on Columns: photo + text side by side
   nmtc-frame (+ nmtc-frame--natural) on Image: rounded photo with brand accents
   nmtc-cards on Columns: each column becomes a card
   nmtc-sticky on Column: stays in view while the other column scrolls (desktop)
   nmtc-lead on Paragraph, nmtc-checks on List, nmtc-role on Paragraph */

/* Page header band ------------------------------------------------------ */
.nmtc-page-hero--image { min-height: clamp(300px, 34vw, 460px); padding: 120px 0 48px; }
.nmtc-breadcrumb { margin-top: 24px; }
.nmtc-breadcrumb .uk-breadcrumb > * > * { font-size: 0.85rem; }
.nmtc-breadcrumb .uk-breadcrumb > * > a { color: var(--nmtc-muted); }
.nmtc-breadcrumb .uk-breadcrumb > * > a:hover { color: var(--nmtc-blue); text-decoration: none; }
.nmtc-breadcrumb .uk-breadcrumb > :last-child > span { color: var(--nmtc-blue-deep); }
.uk-light .nmtc-breadcrumb .uk-breadcrumb > * > a { color: rgba(255, 255, 255, 0.72); }
.uk-light .nmtc-breadcrumb .uk-breadcrumb > * > a:hover { color: #fff; }
.uk-light .nmtc-breadcrumb .uk-breadcrumb > :last-child > span { color: #fff; }
.uk-light .nmtc-breadcrumb .uk-breadcrumb > :nth-child(n+2):not(.uk-first-column)::before { color: rgba(255, 255, 255, 0.5); }

/* Sections ---------------------------------------------------------------- */
.nmtc-page-section { padding-block: clamp(56px, 7vw, 100px); }
.nmtc-related .nmtc-section-head { margin-bottom: 40px; }
.nmtc-related__media img { aspect-ratio: 4 / 3; object-fit: cover; object-position: center 30%; }
.nmtc-related .nmtc-more {
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-top: 16px;
    border-radius: 50%;
    background: rgba(23, 54, 196, 0.1);
    transition: background-color 0.2s, color 0.2s;
}
.nmtc-related .uk-link-toggle:hover .nmtc-more { background: var(--nmtc-blue); color: #fff; }

/* Content flow: text keeps a readable measure, layout blocks use the full container. */
.nmtc-page-content > * { max-width: 760px; margin-inline: auto; }
.nmtc-page-content > .wp-block-columns,
.nmtc-page-content > .alignwide,
.nmtc-page-content > .nmtc-video-frame,
.nmtc-page-content > .nmtc-cards-masonry { max-width: none; }
.nmtc-page-content > .wp-block-columns { margin-block: clamp(56px, 8vw, 112px); }
.nmtc-page-content > .wp-block-columns:first-child { margin-top: 0; }
.nmtc-page-content > .wp-block-columns:last-child { margin-bottom: 0; }
.nmtc-page-content > .wp-block-columns.nmtc-cards:has(+ .wp-block-columns.nmtc-cards) { margin-bottom: 16px; }
.nmtc-page-content > .wp-block-columns.nmtc-cards + .wp-block-columns.nmtc-cards { margin-top: 0; }
.nmtc-page-content--intro > :last-child { margin-bottom: 0; }

.nmtc-page-content .wp-block-column > :first-child { margin-top: 0; }
.nmtc-page-content .wp-block-column > :last-child { margin-bottom: 0; }
.nmtc-page-content h2 { margin-bottom: 0.6em; }
.nmtc-page-content .wp-block-column > h2:first-child { font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.5rem); line-height: 1.15; }

.nmtc-lead {
    color: var(--nmtc-blue-deep);
    font-size: clamp(1.15rem, 1.02rem + 0.45vw, 1.35rem);
    line-height: 1.55;
}
.nmtc-page-content > .nmtc-lead { text-align: center; }
.nmtc-role {
    color: var(--nmtc-red);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.nmtc-role strong { font-weight: 600; }

/* Photo + text (Columns with nmtc-split) */
.nmtc-page-content .wp-block-columns.nmtc-split { gap: clamp(36px, 6vw, 96px); }
@media (min-width: 782px) {
    .nmtc-split--reverse { flex-direction: row-reverse; }
}

/* Framed photo (Image with nmtc-frame): offset tint panel + red dot, as on the Home hero. */
.wp-block-image.nmtc-frame {
    position: relative;
    isolation: isolate;
    margin: 0 18px 18px 0;
}
.wp-block-image.nmtc-frame img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: var(--nmtc-shadow-hover);
}
.wp-block-image.nmtc-frame--natural img { aspect-ratio: auto; }
.wp-block-image.nmtc-frame::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 36px -18px -18px 36px;
    border-radius: 28px;
    background: var(--nmtc-tint);
}
.wp-block-image.nmtc-frame::after {
    content: "";
    position: absolute;
    top: -16px;
    left: -16px;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--nmtc-red);
    opacity: 0.9;
    z-index: -1;
}
/* nmtc-frame--dotted: dotted outline around the photo instead of the shadow and tint panel. */
.wp-block-image.nmtc-frame--dotted { margin: 16px; }
.wp-block-image.nmtc-frame--dotted img { box-shadow: none; }
.wp-block-image.nmtc-frame--dotted::before {
    inset: -14px;
    border: 3px dotted var(--nmtc-blue);
    border-radius: 34px;
    background: none;
    opacity: 0.7;
}
.wp-block-image.nmtc-frame--dotted::after { top: -30px; left: -30px; }
@media (max-width: 639px) {
    .wp-block-image.nmtc-frame--dotted::after { top: -24px; left: -16px; }
}
.nmtc-split--reverse .wp-block-image.nmtc-frame { margin: 0 0 18px 18px; }
.nmtc-split--reverse .wp-block-image.nmtc-frame::before { inset: 36px 36px -18px -18px; }
.nmtc-split--reverse .wp-block-image.nmtc-frame::after { left: auto; right: -16px; }
@media (max-width: 639px) {
    .wp-block-image.nmtc-frame::after { top: -10px; left: -6px; width: 52px; height: 52px; }
}
@media (max-width: 781px) {
    .nmtc-split--reverse .wp-block-image.nmtc-frame { margin: 0 18px 18px 0; }
    .nmtc-split--reverse .wp-block-image.nmtc-frame::before { inset: 36px -18px -18px 36px; }
    .nmtc-split--reverse .wp-block-image.nmtc-frame::after { left: -6px; right: auto; }
}

/* Pull quote between sections */
.nmtc-page-content > .wp-block-quote {
    position: relative;
    max-width: 880px;
    margin-block: clamp(56px, 8vw, 104px);
    padding: 36px 0 0;
    border: 0;
    font-size: clamp(1.45rem, 1.15rem + 1.3vw, 2.15rem);
    line-height: 1.35;
    text-align: center;
}
.nmtc-page-content > .wp-block-quote::before {
    content: "\201C";
    position: absolute;
    top: -0.35em;
    left: 50%;
    transform: translateX(-50%);
    color: var(--nmtc-red);
    font-family: var(--nmtc-serif);
    font-size: 4.5rem;
    font-style: normal;
    line-height: 1;
}

/* Check list (List with nmtc-checks) */
.nmtc-prose ul.nmtc-checks { padding: 0; list-style: none; }
.nmtc-checks li { position: relative; padding-left: 38px; }
.nmtc-checks li + li { margin-top: 12px; }
.nmtc-checks li::before {
    content: "";
    position: absolute;
    top: 0.2em;
    left: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(23, 54, 196, 0.1);
}
.nmtc-checks li::after {
    content: "";
    position: absolute;
    top: calc(0.2em + 7px);
    left: 8px;
    width: 8px;
    height: 5px;
    border-left: 2px solid var(--nmtc-blue);
    border-bottom: 2px solid var(--nmtc-blue);
    transform: rotate(-45deg);
}

/* Cards (Columns with nmtc-cards) */
.nmtc-page-content .wp-block-columns.nmtc-cards { gap: 16px; align-items: stretch; }
.nmtc-cards > .wp-block-column {
    box-sizing: border-box;
    min-width: 0;
    padding: clamp(18px, 1.8vw, 24px);
    border-radius: var(--nmtc-radius);
    background: #fff;
    box-shadow: var(--nmtc-shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}
.nmtc-cards > .wp-block-column:hover { transform: translateY(-3px); box-shadow: var(--nmtc-shadow-hover); }
.nmtc-page-content .nmtc-cards > .wp-block-column > h2,
.nmtc-page-content .nmtc-cards > .wp-block-column > h3,
.nmtc-cards-masonry .uk-card-title { margin: 0 0 10px; font-size: 1.2rem; }
.nmtc-page-content .nmtc-cards > .wp-block-column > .nmtc-role,
.nmtc-cards-masonry .nmtc-role { margin: -4px 0 10px; }
.nmtc-prose .nmtc-cards ul { padding: 0; list-style: none; }
.nmtc-cards li + li { margin-top: 4px; }
.nmtc-cards a { word-break: normal; }
.nmtc-cards .nmtc-checks li { padding-left: 28px; font-size: 0.95rem; line-height: 1.4; }
.nmtc-cards .nmtc-checks li + li { margin-top: 4px; }
.nmtc-cards .nmtc-checks li::before { width: 18px; height: 18px; }
.nmtc-cards .nmtc-checks li::after {
    top: calc(0.2em + 5px);
    left: 6px;
    width: 6px;
    height: 4px;
}
@media (min-width: 782px) and (max-width: 1099px) {
    .nmtc-page-content .wp-block-columns.nmtc-cards { flex-wrap: wrap !important; }
    .nmtc-page-content .nmtc-cards > .wp-block-column { flex: 1 1 calc(50% - 8px) !important; }
}

/* Sticky column (profile photo, form intro) */
@media (min-width: 960px) {
    .nmtc-page-content .wp-block-column.nmtc-sticky { position: sticky; top: 110px; align-self: flex-start; }
}

/* Forms (nmtc-core shortcodes) as a card */
.nmtc-page-content .nmtc-form-wrap,
.nmtc-contact-form .nmtc-form-wrap {
    margin: 0;
    padding: clamp(24px, 4vw, 48px);
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--nmtc-shadow);
}
.nmtc-page-content .nmtc-form-wrap .uk-alert,
.nmtc-contact-form .nmtc-form-wrap .uk-alert { margin-bottom: 24px; }

/* Page video band */
.nmtc-video-frame {
    max-width: 1000px;
    margin-inline: auto;
    padding: clamp(10px, 1.4vw, 16px);
    border: 2px dashed rgba(23, 54, 196, 0.25);
    border-radius: 28px;
}
.nmtc-video-frame .nmtc-video { border-radius: 18px; box-shadow: var(--nmtc-shadow-hover); }
.nmtc-page-content--intro .nmtc-video-frame { margin-top: 48px; }
.nmtc-page-section + .nmtc-page-video { padding-top: 0; }

/* Course page: outcome lists as cards */
.single-nmtc_course .nmtc-block:not(.nmtc-video-wrap) {
    padding: clamp(24px, 3vw, 40px);
    border-radius: var(--nmtc-radius);
    background: #fff;
    box-shadow: var(--nmtc-shadow);
}
.single-nmtc_course .nmtc-block .uk-list { margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
    .nmtc-cards > .wp-block-column { transition: none; }
}
