/* Shared, scoped styles for independently usable Train2invest gallery plugins. */
.t2i-gallery,.t2i-gallery *,.t2i-gallery-dialog,.t2i-gallery-dialog *{box-sizing:border-box}
.t2i-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;width:100%;max-width:1180px;margin:24px auto;font:18px/1.65 system-ui,sans-serif;color:#20324b;align-items:start}
.t2i-gallery .t2i-gallery-card{display:flex;flex-direction:column;align-items:stretch;min-width:0;height:auto;padding:24px;border:1px solid #c6d2e2;border-radius:16px;background:#fff;box-shadow:0 3px 12px #152f5210;overflow:hidden}
.t2i-gallery .t2i-gallery-title{margin:0 0 18px;color:#254c85;font:700 22px/1.4 system-ui,sans-serif;text-align:var(--t2i-title-align,center);overflow-wrap:anywhere}
.t2i-gallery .t2i-gallery-copy{font-size:18px;line-height:1.65;color:#25354b;width:100%;overflow-wrap:anywhere;text-align:start}
.t2i-gallery-copy p{margin:0 0 14px}.t2i-gallery-copy :is(h1,h2,h3,h4){line-height:1.4;font-size:1.2em;overflow-wrap:anywhere}.t2i-gallery-copy a{color:#174d91;text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere}
.t2i-gallery .t2i-gallery-preview img{display:block;max-width:100%;height:auto;margin:12px auto 18px;border-radius:8px;object-fit:contain}
.t2i-gallery .t2i-gallery-can-open .t2i-gallery-preview{max-height:390px;overflow:hidden;position:relative}
.t2i-gallery .t2i-gallery-can-open .t2i-gallery-preview:after{content:"";position:absolute;inset:auto 0 0;height:36px;background:linear-gradient(transparent,#fff);pointer-events:none}
.t2i-gallery .t2i-gallery-open{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:50px;margin-top:18px;padding:12px 16px;border:1px solid #2e5292;border-radius:8px;background:#2e5292;color:#fff;cursor:pointer;text-align:start;font:600 16px/1.5 system-ui,sans-serif}
.t2i-gallery .t2i-gallery-open:hover{background:#203e74}.t2i-gallery button:focus-visible,.t2i-gallery-dialog :focus-visible{outline:3px solid #b27700;outline-offset:3px}
.t2i-gallery-dialog{width:min(1000px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:0;border:0;border-radius:14px;color:#20324b;background:#fff;box-shadow:0 20px 80px #0005;font:18px/1.7 system-ui,sans-serif;overscroll-behavior:contain}
.t2i-gallery-dialog::backdrop{background:#09162bd9}.t2i-gallery-toolbar{position:sticky;top:0;z-index:1;display:flex;gap:8px;align-items:center;justify-content:space-between;padding:12px 18px;border-bottom:1px solid #ccd6e4;background:#fff}
.t2i-gallery-toolbar button{min-height:48px;min-width:80px;border:1px solid #92a7c2;border-radius:8px;padding:8px 14px;background:#f1f5fb;color:#173962;cursor:pointer;font:600 16px/1.4 system-ui,sans-serif}
.t2i-gallery-toolbar button:disabled{opacity:.4;cursor:default}.t2i-gallery-counter{font-size:15px;color:#455874}
.t2i-gallery-reader{padding:24px 32px;overflow-wrap:anywhere}.t2i-gallery-reader h2{font:700 26px/1.4 system-ui,sans-serif;color:#254c85;margin:0 0 22px}.t2i-gallery-reader img{display:block;max-width:100%;height:auto;margin:18px auto;object-fit:contain}.t2i-gallery-reader a{color:#174d91}.t2i-gallery-reader p{margin:0 0 16px}
.t2i-gallery-reader iframe,.t2i-gallery-reader video{max-width:100%}
@media(max-width:700px){.t2i-gallery{grid-template-columns:minmax(0,1fr);gap:18px}.t2i-gallery .t2i-gallery-card{padding:20px}.t2i-gallery .t2i-gallery-title{font-size:21px}.t2i-gallery-reader{padding:20px}.t2i-gallery-toolbar{padding:10px;gap:6px}.t2i-gallery-toolbar button{min-width:64px;font-size:14px;padding:8px}.t2i-gallery-counter{font-size:13px}}
@media(prefers-reduced-motion:reduce){.t2i-gallery *,.t2i-gallery-dialog *{scroll-behavior:auto!important}}

/* Saved page layouts can nest the gallery in several padded columns. */
@media(max-width:782px){
 body .wp-block-columns:has(.t2i-gallery),body .wp-block-column:has(.t2i-gallery){padding:0!important;min-width:0!important;gap:0!important}
 body .wp-block-group:has(> .wp-block-columns .t2i-gallery){padding-inline:0!important}
 body .t2i-gallery{width:100%!important;max-width:100%!important;grid-template-columns:minmax(0,1fr)!important}
}

/* Clear visual distinction: market records in navy, student voices in warm gold. */
.t2i-gallery-section{box-sizing:border-box;margin:28px 0 42px;padding:26px;border-radius:18px;border:1px solid #cbd7e6;background:#f0f5fc;scroll-margin-top:140px}
.t2i-gallery-section .t2i-gallery{margin:22px auto;max-width:100%!important}
.t2i-gallery-intro{max-width:850px;margin:0 auto 20px;text-align:left;font-family:system-ui,sans-serif}
.t2i-gallery-intro .t2i-section-label{display:inline-flex;align-items:center;min-height:32px;padding:4px 12px;border-radius:5px;background:#244c82;color:#fff;font:700 13px/1.4 system-ui,sans-serif;letter-spacing:.08em}
.t2i-gallery-intro>h3{margin:14px 0 10px;font:700 clamp(23px,2.2vw,30px)/1.35 Georgia,serif;color:#1a3b66}
.t2i-gallery-intro>p{margin:0;font:18px/1.65 system-ui,sans-serif;color:#334b68}
.t2i-section-tm{background:#fcf8ed;border-color:#d9c99f}.t2i-section-tm .t2i-section-label{background:#79591e;color:#fff}.t2i-section-tm .t2i-gallery-intro>h3{color:#5f461f}.t2i-section-tm .t2i-gallery-card{border-color:#ded0b4}.t2i-section-tm .t2i-gallery-title{color:#644920}.t2i-section-tm .t2i-gallery-open{background:#29486d;border-color:#a38752}
.t2i-gallery-more{display:flex;flex-direction:column;align-items:center;gap:10px;padding-top:6px}
.t2i-load-more{display:flex;align-items:center;justify-content:center;gap:14px;min-height:54px;padding:13px 24px;border:1px solid #9b7b42;border-radius:9px;background:#244c82;color:#fff;font:600 18px/1.45 system-ui,sans-serif;cursor:pointer;max-width:100%;text-align:center}
.t2i-load-more:hover{background:#183b6d}.t2i-load-more:disabled{opacity:.65;cursor:wait}.t2i-load-more[hidden]{display:none!important}.t2i-load-more:focus-visible{outline:3px solid #a47a2b;outline-offset:3px}.t2i-load-status{font:15px/1.5 system-ui,sans-serif;color:#4b607a;margin:0;text-align:center}
.t2i-section-tm .t2i-load-more{background:#5c481f;border-color:#9b7b42}.t2i-gallery-card{scroll-margin-top:145px}
@media(max-width:782px){.t2i-gallery-section{padding:18px 12px;margin:22px 0 30px}.t2i-gallery-intro>h3{font-size:24px}.t2i-gallery-intro>p{font-size:17px}.t2i-load-more{font-size:17px;padding:12px 16px}.t2i-gallery-section .t2i-gallery-card{padding:18px}.t2i-gallery-card{scroll-margin-top:140px}}
