/* Responsive and multilingual layout — override loaded last. */
:root {--museum-edge:clamp(16px,3.2vw,56px);}
html {overflow-x:clip;}
body {max-width:100%;overflow-x:clip;}
*,*::before,*::after {box-sizing:border-box;}
img,video,svg,canvas {max-width:100%;}
img {height:auto;}
main,section,article,aside,header,footer {min-width:0;}
main :is(h1,h2,h3,h4,p,a,span,strong), .footer-shell :is(a,p,small) {overflow-wrap:break-word;}
:where(.footer-shell,.archive-grid,.shop-grid,.sessions-grid,.awards-grid,.mission-grid,.quick-grid,.news-grid,.museum-news-grid,.about-stats,.about-intro,.about-story,.library-grid,.gallery-grid,.national-grid,.exhibitions-grid) > * {min-width:0;}
/* Language selector stays accessible without covering page titles. */
.museum-language-control {isolation:isolate;max-width:min(220px,calc(100vw - 32px));min-height:36px;}
.museum-language-control select {width:auto;min-width:86px;max-width:135px;white-space:nowrap;text-overflow:ellipsis;}
.museum-language-control.inside-page {position:absolute;top:12px;inset-inline-start:var(--museum-edge);left:auto;right:auto;}
html[dir="ltr"] .museum-language-control.inside-page {left:var(--museum-edge);right:auto;}
html[dir="rtl"] .museum-language-control.inside-page {right:var(--museum-edge);left:auto;}
body:not(:has(header.site-header)) > main {padding-top:0;}
/* Keep natural reading order for longer translations. */
html[dir="ltr"] :is(.about-hero-copy,.about-intro-copy,.news-hero-copy,.shop-hero-copy,.sessions-hero-copy,.library-hero-copy,.exhibitions-hero-copy,.awards-hero-copy,.research-hero-copy,.national-hero-copy,.footer-links,.archive-content) {text-align:left;direction:ltr;}
html[dir="rtl"] :is(.about-hero-copy,.about-intro-copy,.news-hero-copy,.shop-hero-copy,.sessions-hero-copy,.library-hero-copy,.exhibitions-hero-copy,.awards-hero-copy,.research-hero-copy,.national-hero-copy,.footer-links,.archive-content) {text-align:right;direction:rtl;}
html[dir="ltr"] :is(.about-hero,.news-hero,.shop-hero,.sessions-hero,.exhibitions-hero,.awards-hero,.library-hero) {direction:ltr;}
html[dir="ltr"] :is(.hero-title,.section-title,.about-hero h1) {text-wrap:balance;}
/* Tablet landscape and compact laptop. */
@media (min-width:769px) and (max-width:1180px) {
 .footer-shell {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;}
 .archive-grid,.shop-grid,.sessions-grid,.awards-grid,.museum-news-grid {grid-template-columns:repeat(2,minmax(0,1fr))!important;}
 .mission-grid,.about-stats {grid-template-columns:repeat(2,minmax(0,1fr))!important;}
 .about-hero,.news-hero,.shop-hero,.sessions-hero,.exhibitions-hero,.awards-hero,.library-hero {min-width:0;}
 .about-hero h1 {font-size:clamp(34px,4vw,52px);}
}
@media (max-width:768px) {
 :is(.archive-grid,.shop-grid,.sessions-grid,.awards-grid,.museum-news-grid,.quick-grid,.gallery-grid,.national-grid,.exhibitions-grid,.library-grid) {grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important;}
 :is(.footer-shell,.about-intro,.about-story) {grid-template-columns:1fr!important;}
 :is(.news-hero,.shop-hero,.sessions-hero,.exhibitions-hero,.awards-hero,.library-hero) {min-height:0!important;max-height:none!important;}
 :is(.news-hero-copy,.shop-hero-copy,.sessions-hero-copy,.exhibitions-hero-copy,.awards-hero-copy,.library-hero-copy,.about-hero-copy) {min-width:0;padding-inline:var(--museum-edge)!important;}
 .museum-language-control.inside-header {margin:4px!important;}
 .about-hero {height:auto!important;min-height:0!important;}
 .about-hero img {object-fit:contain!important;}
 .footer-shell {gap:12px;}
 .mission-grid,.about-stats {grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
@media (max-width:540px) {
 :is(.archive-grid,.shop-grid,.sessions-grid,.awards-grid,.museum-news-grid,.quick-grid,.gallery-grid,.national-grid,.exhibitions-grid,.library-grid,.mission-grid) {grid-template-columns:minmax(0,1fr)!important;gap:14px!important;}
 .about-stats {grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;}
 :is(.archive-card,.shop-card,.session-card,.museum-news-card,.quick-card,.awards-card,.gallery-card) {width:100%!important;max-width:100%!important;min-width:0!important;}
 :is(.museum-news-card-image,.archive-image,.shop-media,.session-image-button) img {width:100%;max-height:340px;object-fit:contain;}
 .museum-language-control {padding:4px 7px;}
 .museum-language-control select {max-width:120px;font-size:12px;}
 .museum-hero-slide {min-height:0;}
 .about-hero h1 {font-size:clamp(30px,9vw,42px);}
 .about-hero-visual img {max-height:180px!important;object-fit:contain!important;}
}
@media (min-width:1600px) {
 :is(.footer-shell,.archive-grid,.shop-grid,.sessions-grid,.about-intro,.about-story,.museum-news-grid,.mission-grid) {max-width:1440px;margin-inline:auto;}
}
@media (prefers-reduced-motion:reduce) {
 .museum-language-control * {transition:none!important;}
}

/* Fixed language selector on inner pages: no overlay on hero content */
body:not(:has(header.site-header)) .museum-language-control.inside-page {position:relative!important;top:auto!important;left:auto!important;right:auto!important;margin:12px clamp(16px,4vw,60px) 0!important;display:inline-flex;}
body:not(:has(header.site-header)) {overflow-x:hidden;}
@media (max-width: 768px) {
 .about-hero {display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:14px!important;}
 .about-hero-visual {min-height:0!important;height:auto!important;}
 .about-hero-visual img {height:auto!important;max-height:210px!important;object-fit:contain!important;}
 .about-hero-copy {padding:20px!important;}
 .footer-shell>* {min-width:0;}
}
@media (max-width: 540px) {
 body {font-size:clamp(13px,3.5vw,16px);}
 .about-hero {padding:12px!important;}
 .about-hero-copy {padding:12px!important;}
 .about-stats article {min-width:0;}
}
