/* Additions to the Drupal theme CSS for the markup this site renders without Drupal's JavaScript
   (Superfish, FlexSlider, Bootstrap modal, Unite Gallery). Brand: green #264535, red #A42425. */
:root { --elam-green: #264535; --elam-red: #a42425; }

/* Skip link and focus */
.skip-link.visually-hidden.focusable:focus { position: fixed; top: 0; left: 0; z-index: 10000; width: auto; height: auto; clip: auto; padding: 8px 16px; background: #fff; color: var(--elam-green); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #f0c000; outline-offset: 2px; }
#main-content:focus { outline: none; }

/* Language switch as a link (Drupal had a select) */
.langvalinta .lang-switch { display: inline-flex; align-items: center; gap: 6px; color: #fff; padding: 6px 0; }
.langvalinta .lang-switch:hover, .langvalinta .lang-switch:focus { color: #fff; text-decoration: underline; }

/* Superfish dropdowns: open on keyboard focus as on hover */
.sf-menu li:focus-within > ul { left: 0; top: 2.5em; z-index: 499; }
.sf-menu ul li:focus-within > ul { left: 12em; top: 0; }
.mainmenu .sf-menu > li > ul { text-align: left; }

/* Mobile menu (Bootstrap collapse without Bootstrap JS) */
.navbar-collapse.collapse.in { display: block !important; }
@media (max-width: 767px) {
	.navbar-collapse .navbar-nav ul { list-style: none; padding-left: 15px; }
	.navbar-collapse .navbar-nav a { display: block; padding: 8px 15px; }
}

/* Left sub-menu: sector lists fold open on click; the current trail stays open */
.side-menu li > span.nolink { display: block; }
.side-menu li.is-folded > ul { display: none !important; }

/* Slider */
.flexslider { margin: 0; border: 0; border-radius: 0; box-shadow: none; position: relative; }
.flexslider .slides > li { display: block; }
.flexslider .slides > li[hidden] { display: none !important; }
.flexslider .slides > li { position: relative; }
.captiontitle .h1 { margin-top: 10px; margin-bottom: 5px; color: #fff; }
.captiontitle a, .captionfooter a { text-decoration: none; }
.captionfooter .h3 { margin-top: 0; }
.captionfooter .h3 a { text-transform: uppercase; }
.flex-direction-nav button, .flex-pauseplay button { position: absolute; z-index: 10; border: 0; background: rgba(0, 0, 0, 0.45); color: #fff; width: 44px; height: 44px; overflow: hidden; cursor: pointer; }
.flex-direction-nav { list-style: none; margin: 0; padding: 0; }
.flex-direction-nav .flex-prev { left: 0; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.45) url(../img/nuoli_left.png) center/20px no-repeat; }
.flex-direction-nav .flex-next { right: 0; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.45) url(../img/nuoli_right.png) center/20px no-repeat; }
.flex-pauseplay button { right: 10px; bottom: 10px; font: normal normal normal 16px/44px FontAwesome; }
.flex-pauseplay .flex-pause::before { content: "\f04c"; }
.flex-pauseplay .flex-play::before { content: "\f04b"; }
.flex-control-nav { position: absolute; bottom: 14px; left: 0; right: 0; z-index: 9; list-style: none; margin: 0; padding: 0; text-align: center; }
.flex-control-nav li { display: inline-block; margin: 0 4px; }
.flex-control-nav button { width: 14px; height: 14px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: transparent; overflow: hidden; cursor: pointer; }
.flex-control-nav button.flex-active { background: #fff; }

/* Home category blocks: the round marker */
.etusivunlohkoja .bottipistealign { display: flex; justify-content: center; }

/* Sector dialog (Drupal used a Bootstrap modal) */
dialog.sector-dialog { border: 0; padding: 0; width: min(600px, calc(100vw - 32px)); margin: auto; background: transparent; position: fixed; }
dialog.sector-dialog::backdrop { background: rgba(0, 0, 0, 0.5); }
dialog.sector-dialog .modal-body { max-height: 60vh; overflow: auto; }
dialog.sector-dialog .modal-title { text-transform: none; }
.tilastoja.active .block-title a { text-decoration: underline; }
.reference-list { margin: 20px 0 40px; }
.reference-list h2 { color: var(--elam-green); }

/* Reference gallery (replaces Unite Gallery) */
.reference-gallery { margin-bottom: 20px; }
.reference-gallery__main img { width: 100%; height: auto; }
.reference-gallery__thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; list-style: none; margin: 6px 0 0; padding: 0; }
.reference-gallery__thumbs img { width: 100%; height: 72px; object-fit: cover; display: block; }
.reference-gallery__thumbs a[aria-current="true"] img { outline: 3px solid var(--elam-green); outline-offset: -3px; }
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; }
dialog.lightbox::backdrop { background: rgba(0, 0, 0, 0.85); }
dialog.lightbox img { max-width: 96vw; max-height: 90vh; width: auto; height: auto; display: block; }
dialog.lightbox button { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; border: 0; background: rgba(0,0,0,0.6); color: #fff; font-size: 28px; line-height: 1; }

/* Body content */
.field--name-body img { max-width: 100%; height: auto; }
.page-title { color: var(--elam-green); }
.document-list .doc-kind { color: #555; }
/* Brochure and drawing pages */
.document-page ul { padding-left: 20px; }
.document-page a:not(.btn) { text-decoration: underline; }
.document-page code { color: inherit; background: #f2f2f2; white-space: normal; word-break: break-all; }
.document-facts { margin: 15px 0 20px; }
.document-excerpt blockquote { font-size: 1em; max-width: 46em; }
.document-back { margin-top: 20px; }
.markdown-copy { margin-top: 30px; font-size: 0.9em; }
.markdown-copy a { color: #555; }
.contact-form { max-width: 640px; }

/* Footer */
.footer-social { padding: 10px; }
.footer-social a { margin-right: 6px; }
.footer-badges img { margin-right: 8px; margin-bottom: 8px; vertical-align: middle; }
.footer-powered, .footer-powered a { color: #bbb; }
.scroll_ylos { text-decoration: none; height: 25px; width: auto; right: 0; left: auto; }
.scroll_ylos > span { text-align: center; line-height: 23px; }

/* No horizontal scroll on phones */
html, body { overflow-x: hidden; }
img { max-width: 100%; height: auto; }

/* Sector icons: equal columns on wide screens, wrapping tiles on phones */
@media (min-width: 768px) {
	.taulukkocontainer { width: calc(100% + 40px); }
	.taulukkocontainer > .region > section { width: 12.5%; max-width: none; vertical-align: top; padding: 0 6px; }
}
@media (max-width: 767px) {
	.taulukkocontainer, .taulukkocontainer > .region { display: block; margin: 0; width: auto; }
	.taulukkocontainer > .region { display: flex; flex-wrap: wrap; justify-content: center; }
	.taulukkocontainer > .region > section { display: block !important; width: 33%; max-width: 120px; }
}
.footer-badges img { height: 75px; width: auto; }

/* Slider captions: the theme styles h1/h3 there; the captions are not page headings here */
.captiontitle .h1 { background-color: rgba(0, 0, 0, 0.6); padding: 10px 15px 5px; display: inline-block; }
.captionfooter .h3 { color: #fff; background: rgba(0, 0, 0, 0.5); padding: 3px 5px; display: inline-block; }
@media (max-width: 767px) {
	.captiontitle .h1 { font-size: 20px; padding: 6px 10px 3px; }
	.captionfooter .h3 { font-size: 13px; }
	.flex-direction-nav button, .flex-pauseplay button { width: 36px; height: 36px; line-height: 36px; }
}

/* Väliaikainen ilmoitus sivuston päivityksestä (Elamin pyyntö 19.11.2026) */
.site-notice { background: #f4f1ea; border-bottom: 1px solid #e0dbd0; color: #222; padding: 10px 0; text-align: center; font-size: 15px; line-height: 1.4; }
.site-notice p { margin: 0; }
