.mtc-resource-gallery { margin-bottom: 20px; }
.mtc-gallery-stage { width: 100%; margin: 0 0 14px; display: grid; place-items: center; }
.mtc-gallery-stage img { width: 100%; height: auto; max-height: 760px; object-fit: contain; margin: 0; }
.mtc-gallery-stage.is-portrait-video { aspect-ratio: 9 / 16; background: #f4f6f6; }
.mtc-gallery-stage.is-landscape-video { aspect-ratio: 16 / 9; background: #f4f6f6; }
.mtc-gallery-stage iframe { width: 100%; height: 100%; border: 0; }
.mtc-nonmember .resource-image.mtc-gallery-stage.is-gallery-preview::before { content: none; }
.mtc-gallery-thumbnails { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.mtc-gallery-thumbnail { position: relative; width: 78px; height: 78px; padding: 3px; border: 3px solid transparent; background: #fff; color: #333; border-radius: 4px; cursor: pointer; }
.mtc-gallery-thumbnail img { width: 100%; height: 100%; object-fit: cover; margin: 0; }
.mtc-gallery-thumbnail.is-active { border-color: #d84650; }
.mtc-gallery-thumbnail:focus-visible, .mtc-grade-tab:focus-visible { outline: 3px solid #19675b; outline-offset: 3px; }
.mtc-play-icon { position: absolute; inset: 20px; display: grid; place-items: center; background: #222a; color: #fff; border: 2px solid #fff; border-radius: 50%; font-size: 20px; }
.mtc-tpt-button { display: block; width: 100%; text-align: center; margin: 15px 0 24px; background: #d84650; color: #fff; }
.mtc-member-downloads { margin-top: 20px; }
.mtc-member-downloads .mtc-join-download { margin-top: 20px; }
.mtc-local-media-note { padding: 20px; text-align: center; font-size: 15px; line-height: 1.5; }
.mtc-resource-extras { clear: both; margin: 40px auto; max-width: 1200px; }
.mtc-resource-extras .alignwide { max-width: 100%; }
/* Grade heading inherits the original responsive .ruler styling from homepage.css. */
.mtc-grade-resources .ruler h2 { margin: 0; }
.mtc-grade-content { background: #E1EFEA; padding: 28px 20px 38px; }
.mtc-grade-content .container { display: block; width: 100%; max-width: 1200px; margin: 0 auto; }
.mtc-grade-intro { text-align: center; font-size: 16px; }
.mtc-grade-tabs { display: grid; grid-template-columns: repeat(6,1fr); gap: 12px; margin: 20px 0; }
.mtc-grade-tab { border: 1px solid #54b2a1; border-radius: 4px; background: #fff; color: #273832; padding: 12px 8px; font-size: 15px; }
.mtc-grade-tab[aria-selected="true"] { background: #299e8d; color: #fff; }
.mtc-grade-panel[hidden] { display: none !important; }
.mtc-grade-panel .resource-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 40px; }
.mtc-grade-panel .resource-item { margin: 0; padding: 0; }
.mtc-grade-panel .resource-item img { width: 100%; height: auto; }
.mtc-grade-panel .resource-item h3 { font-size: 18px; line-height: 1.25; text-align: center; text-transform: none; margin-top: 15px; }
.mtc-grade-more { text-align: center; margin: 30px 0 0; }
.mtc-grade-more .button { background: #299e8d; }
.mtc-block-home > .wp-block-group { max-width: 1200px; margin: 36px auto; padding: 0 20px; }
.mtc-block-home > .wp-block-group:empty { margin: 0; padding: 0; }
.mtc-block-home > .mtc-local-sample { padding: 32px; border: 2px dashed #84b8aa; border-radius: 12px; background: #f4faf7; }
.mtc-sample-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: #216b60; }
.mtc-local-sample .wp-block-columns, .mtc-resource-extras .wp-block-columns { gap: 28px; }
.mtc-local-sample .wp-block-button__link, .mtc-resource-extras .wp-block-button__link { background: #216b60; color: #fff; font-size: 15px; border-radius: 5px; }
.mtc-local-sample h3, .mtc-resource-extras h3 { font-size: 22px; }
@media (max-width: 600px) {
    .mtc-block-home > .mtc-local-sample { padding: 22px 18px; margin-left: 12px; margin-right: 12px; }
    .mtc-gallery-thumbnail { width: 66px; height: 66px; }
    .mtc-resource-extras { padding: 0 18px; }
    .mtc-grade-tabs { grid-template-columns: repeat(3,1fr); gap: 8px; }
    .mtc-grade-panel .resource-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 25px; }
    .mtc-grade-panel .resource-item h3 { font-size: 14px; }
}
