/* Shared responsive adjustments, loaded after the legacy styles. */
img, video, iframe, object, embed { max-width:100%; }
#content, #content *, footer *, .partners * { min-width:0; }
#footer-cols { display:flex; flex-wrap:wrap; gap:24px; }
#footer-cols > li { float:none; flex:1 1 220px; width:auto; margin:0 0 24px; overflow-wrap:anywhere; }
.site-video { box-sizing:border-box; width:calc(100% - 48px); max-width:804px; margin:24px auto 36px; scroll-margin-top:20px; clear:both; }
.site-video-frame { width:100%; aspect-ratio:16 / 9; background:#000; overflow:hidden; }
.site-video-frame #site-player { display:block; box-sizing:border-box; width:100%; height:100%; max-height:none; object-fit:contain; margin:0; padding:0; }
.site-video h3 { margin:14px 0 8px; }
#site-video-status:empty { display:none; }
#site-video-status { margin:10px 0; }
@media(max-width:991px) {
 .wrapper, #main { box-sizing:border-box; width:calc(100% - 32px); max-width:920px; padding-left:0; padding-right:0; }
 #main #content { box-sizing:border-box; width:100%; float:none; }
 .shadow-main { width:100%; margin-left:0; background-size:100% auto; }
 #content img { height:auto; }
 #content .pgwSlideshow img { max-width:none; }
 #content iframe { width:100%; }
 #content input, #content textarea, #content select { box-sizing:border-box; max-width:100%; }
 #content p, #content li, #content h1, #content h2, #content h3 { overflow-wrap:break-word; }
 .partners > .wrapper { width:calc(100% - 32px); }
}
@media(min-width:768px) and (max-width:991px) {
 .featured figure { box-sizing:border-box; width:calc((100% - 96px) / 3); margin-left:24px; }
 #posts-list, #post-content, #page-content { box-sizing:border-box; width:calc(67% - 36px); margin-left:24px; }
 #sidebar { box-sizing:border-box; width:calc(33% - 36px); margin-left:24px; }
}
@media(max-width:767px) {
 body { min-width:0; }
 #logo { max-width:100%; }
 #masthead { box-sizing:border-box; max-width:100%; }
 #masthead .head { margin-left:16px; }
 .featured figure, .related-projects figure { box-sizing:border-box; float:none; width:auto; margin:0 16px 28px; }
 .featured figure img { width:100%; height:auto; }
 .featured figure .thumb2 img { aspect-ratio:16 / 9; object-fit:cover; }
 .featured, .portfolio-list { padding-bottom:20px; }
 #posts-list, #post-content, #page-content, #sidebar, .project-description, .project-info { box-sizing:border-box; width:calc(100% - 32px); margin-left:16px; margin-right:16px; float:none; }
 .one-half, .one-third { box-sizing:border-box; width:100%; float:none; margin-right:0; }
 #footer-cols { padding-left:16px; padding-right:16px; }
 #footer-cols > li { width:100%; margin-left:0; flex-basis:100%; }
 .site-video { width:calc(100% - 32px); margin-top:16px; }
 .partners .row { box-sizing:border-box; max-width:100%; }
 #content table { display:block; max-width:100%; overflow-x:auto; }
 #content pre { white-space:pre-wrap; overflow-wrap:anywhere; }
 #contactForm, #commentform { box-sizing:border-box; width:100%; }
 #contactForm input:not([type=checkbox]):not([type=radio]), #contactForm textarea { width:100%; }
}
@media(prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } }

/* Self-contained footer, independent from legacy wrapper/floats. */
footer.sec-footer { clear:both; display:block; box-sizing:border-box; width:100%; height:auto; padding:32px 0 0; margin:0; }
.sec-footer .sec-footer-inner { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:32px; box-sizing:border-box; width:calc(100% - 48px); max-width:804px; margin:0 auto; padding:0 0 32px; }
.sec-footer .sec-footer-inner section { display:block; float:none; width:auto; min-width:0; margin:0; padding:0; }
.sec-footer h4 { margin:0 0 16px; line-height:1.4; }
.sec-footer p { margin:0; line-height:1.7; overflow-wrap:break-word; word-break:normal; }
.sec-footer .sec-footer-inner a { overflow-wrap:anywhere; }
.sec-footer .sec-footer-partners { clear:both; background:#fff; padding:20px 0; border-top:2px solid silver; }
.sec-footer .sec-footer-partners img { height:auto; max-width:95%; margin:0 auto; }
.sec-footer .sec-footer-credit { clear:both; box-sizing:border-box; width:100%; padding:18px 16px; background:#fff; text-align:center; line-height:1.6; overflow-wrap:normal; }
@media(max-width:600px) { .sec-footer .sec-footer-inner { grid-template-columns:minmax(0,1fr); width:calc(100% - 32px); gap:24px; } }
