/*
Theme Name: Miira Sippola by Pencil
Theme URI: https://miirasippola.fi/
Author: Z-Factory
Author URI: https://www.z-factory.fi/
Description: Miira Sippolan oma teema. Etusivun, ylä- ja alatunnisteen sisältöä muokataan Pencil-editorilla suoraan sivulla; muut sivut ja kirjoitukset WordPressissä. Kaksikielinen (Polylang).
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: miirasippola-pencil
*/

/* ------------------------------------------------------------------ *
 * Base (values from the former theme)
 * ------------------------------------------------------------------ */
*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: #fff;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

p {
	margin: 0 0 1.6em;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 20px;
	clear: both;
}

ul,
ol {
	margin: 0 0 1.5em 3em;
	padding: 0;
}

img {
	max-width: 100%;
	height: auto;
	vertical-align: middle;
	border: 0;
}

figure {
	margin: 0;
}

a {
	text-decoration: none;
	transition: color 0.2s;
}

blockquote {
	margin: 1.5em;
	padding: 1.2em;
	border-left: 5px solid rgba(0, 0, 0, 0.05);
	font-style: italic;
}

.mp-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100000;
	padding: 8px 16px;
	background: #000;
	color: #fff;
}

.mp-skip-link:focus {
	left: 8px;
	top: 8px;
}

html.mp-noscroll,
html.mp-noscroll body {
	overflow: hidden;
}

/* Text links inside page text (former custom CSS). */
.mp-content p a,
.mp-content li a,
.mp-widget-text-editor a {
	color: #000;
	text-decoration: underline;
}

/* ------------------------------------------------------------------ *
 * Header navigation
 * ------------------------------------------------------------------ */
.mp-location-header {
	position: relative;
	z-index: 100;
}

.mp-widget-nav-menu > .pencil-managed-region,
.mp-widget-nav-menu > [data-pencil-managed] {
	display: contents;
}

.mp-logo-link {
	display: block;
}

.mp-location-header .mp-widget-image img {
	object-fit: contain !important;
	aspect-ratio: auto !important;
}

.mp-nav-menu--main .mp-nav-menu ul {
	display: none;
}

.mp-nav-menu--main .mp-nav-menu li:hover > ul,
.mp-nav-menu--main .mp-nav-menu li:focus-within > ul {
	display: block;
}

.mp-nav-menu--main .mp-nav-menu > li > ul {
	top: 100%;
	left: 0;
}

.mp-nav-menu--main .mp-nav-menu ul ul {
	top: 0;
	left: 100%;
}

.mp-nav-menu--dropdown.mp-nav-menu__container .sub-menu {
	display: none;
}

.mp-nav-menu--dropdown.mp-nav-menu__container li.mp-sub-open > .sub-menu {
	display: block;
}

.mp-nav-menu--dropdown .sub-arrow {
	cursor: pointer;
}

.mp-lang-switcher__list {
	display: flex;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mp-lang-switcher__lang a {
	color: #414040;
}

/* ------------------------------------------------------------------ *
 * Footer link lists (Pencil rich text)
 * ------------------------------------------------------------------ */
.mp-footer-list ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mp-footer-list li {
	margin: 0;
	padding: 0;
}

.mp-footer-list a {
	color: #3f3f3f;
	text-decoration: none;
}

.mp-footer-list a:hover {
	color: #000;
}

.mp-location-footer .mp-widget-text-editor a {
	color: inherit;
	text-decoration: none;
}

.mp-social-icon .pencil-button__text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.mp-ig-icon {
	display: block;
	width: 1em;
	height: 1em;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Share buttons */
.mp-u-share-btn__icon .mp-icon-svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* ------------------------------------------------------------------ *
 * Simple pages (no saved layout)
 * ------------------------------------------------------------------ */
.mp-simple {
	max-width: 1200px;
	margin: 0 auto;
	padding: 60px 20px 80px;
}

.mp-simple__title {
	font-family: "Bodoni Moda", serif;
	font-size: 48px;
	font-weight: 600;
	line-height: 1.4;
}

.mp-simple__item + .mp-simple__item {
	margin-top: 40px;
}

/* ------------------------------------------------------------------ *
 * Lightbox
 * ------------------------------------------------------------------ */
.mp-lightbox-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.9);
}

.mp-lightbox-overlay[hidden] {
	display: none;
}

.mp-lightbox-overlay img {
	max-width: 90vw;
	max-height: 88vh;
	width: auto;
	height: auto;
	object-fit: contain;
}

.mp-lightbox-overlay button {
	position: absolute;
	padding: 8px 16px;
	border: 0;
	background: transparent;
	color: #fff;
	font-size: 44px;
	line-height: 1;
	cursor: pointer;
	opacity: 0.8;
}

.mp-lightbox-overlay button:hover,
.mp-lightbox-overlay button:focus {
	opacity: 1;
	background: transparent;
}

.mp-lightbox-close {
	top: 12px;
	right: 12px;
}

.mp-lightbox-prev {
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
}

.mp-lightbox-next {
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
}

.mp-lightbox--single .mp-lightbox-prev,
.mp-lightbox--single .mp-lightbox-next {
	display: none;
}

/* ------------------------------------------------------------------ *
 * Popups
 * ------------------------------------------------------------------ */
.mp-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.mp-modal[hidden] {
	display: none;
}

.mp-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.8);
}

.mp-modal__box {
	position: relative;
	max-width: 100%;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	background: #fff;
	box-shadow: 2px 8px 23px 3px rgba(0, 0, 0, 0.2);
}

.mp-modal__close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #1f1f1f;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.mp-modal__close:hover,
.mp-modal__close:focus {
	background: transparent;
	color: #000;
}

/* ------------------------------------------------------------------ *
 * Front page: background images as Pencil images, card links, button icon
 * ------------------------------------------------------------------ */
.mp-has-bg {
	position: relative;
	isolation: isolate;
}

.mp-bg {
	position: absolute;
	inset: 0;
	z-index: -1;
	overflow: hidden;
	pointer-events: none;
}

.mp-bg img {
	display: block;
	width: 100%;
	height: 100% !important;
	max-width: none;
	aspect-ratio: auto !important;
	object-fit: cover;
}

.mp-card-click {
	cursor: pointer;
}

.mp-btn-chevron {
	display: inline-block;
	width: 0.6em;
	height: 0.6em;
	margin-left: 6px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512'%3E%3Cpath d='M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512'%3E%3Cpath d='M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.mp-heading-title > a,
.mp-heading-title > a:hover {
	color: inherit;
}

/* Pages that sat inside the former theme's boxed content area. */
.mp-boxed {
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 20px;
}

.mp-repeater-item-1d45711 .mp-ig-icon {
	background: #080808;
}


/* Dropdown width fix: grow to fit the longest item so text stays on the background */
.mp-nav-menu--main .mp-nav-menu ul.sub-menu {
	width: max-content;
	min-width: 12em;
	max-width: 22em;
}
.mp-nav-menu--main .mp-nav-menu ul.sub-menu a {
	white-space: normal;
	line-height: 1.35;
}

/* Flyout fix: third-level menu opens level with its parent item so the pointer can reach it */
.mp-nav-menu--main .mp-nav-menu ul.sub-menu li {
	position: relative;
}
.mp-nav-menu--layout-horizontal .mp-nav-menu > li ul.sub-menu ul.sub-menu,
.mp-nav-menu--main .mp-nav-menu ul.sub-menu ul.sub-menu {
	top: 0 !important;
	left: 100%;
	margin-top: 0;
}

/* Mobile header layout: logo left, hamburger right, language switch inside the menu */
.mp-dropdown-lang { display: none; }
@media (max-width: 1024px) {
	.mp-5114 .mp-element.mp-element-9abf8f1 { justify-content: space-between; align-items: center; }
	.mp-5114 .mp-element.mp-element-8a750c6 { --width: auto; width: auto; flex: 1 1 auto; max-width: 60%; }
	.mp-5114 .mp-element.mp-element-e176000 { --width: auto; width: auto; flex: 0 0 auto; margin-left: auto; --align-items: flex-end; align-items: flex-end; }
	.mp-5114 .mp-element.mp-element-a8bf423 .mp-menu-toggle { margin-left: auto; margin-right: 0; }
	.mp-5114 .mp-element.mp-element-9b1a49d { display: none; }
	.mp-dropdown-lang { display: block; border-top: 1px solid rgba(0,0,0,.08); padding: 14px 20px; }
	.mp-dropdown-lang .mp-lang-switcher__list { display: flex; gap: 18px; margin: 0; padding: 0; }
	.mp-dropdown-lang .mp-lang-switcher__lang a { display: inline-block; padding: 0; font-size: 13px; letter-spacing: .08em; }
}
/* Mobile dropdown full width under the header */
@media (max-width: 1024px) {
	.mp-5114 .mp-element.mp-element-9abf8f1 { position: relative; }
	.mp-5114 .mp-element.mp-element-e176000,
	.mp-5114 .mp-element.mp-element-a8bf423 { position: static; }
	.mp-5114 .mp-element.mp-element-a8bf423 .mp-nav-menu__container.mp-nav-menu--dropdown {
		left: 0; right: 0; top: 100%; width: 100%; margin-top: 0;
		box-shadow: 0 10px 24px rgba(0,0,0,.08);
	}
}
/* Larger hamburger: bigger icon and a 48px tap area */
@media (max-width: 1024px) {
	.mp-5114 .mp-element.mp-element-a8bf423 div.mp-menu-toggle {
		font-size: 30px;
		padding: 9px;
		min-width: 48px;
		min-height: 48px;
		margin-right: -9px;
		cursor: pointer;
	}
	.mp-5114 .mp-element.mp-element-a8bf423 div.mp-menu-toggle svg {
		width: 30px;
		height: 30px;
	}
}
/* Mobile submenu arrows: clear tap target that opens the submenu */
@media (max-width: 1024px) {
	.mp-5114 nav.mp-nav-menu--dropdown { max-height: calc(100vh - 80px); overflow-y: auto; }
	.mp-5114 nav.mp-nav-menu--dropdown li.menu-item-has-children > a {
		display: flex; align-items: center; justify-content: space-between; position: relative; padding-right: 64px;
	}
	.mp-5114 nav.mp-nav-menu--dropdown .sub-arrow {
		position: absolute; top: 0; right: 0; bottom: 0;
		width: 56px; margin: 0; padding: 0;
		display: flex; align-items: center; justify-content: center;
		border-left: 1px solid rgba(0,0,0,.08);
		color: #fff;
	}
	.mp-5114 nav.mp-nav-menu--dropdown .sub-arrow svg {
		width: 18px; height: 18px; fill: currentColor; transition: transform .2s;
	}
	.mp-5114 nav.mp-nav-menu--dropdown li.mp-sub-open > a > .sub-arrow svg { transform: rotate(180deg); }
	.mp-5114 nav.mp-nav-menu--dropdown .sub-menu {
		position: static; width: auto; margin: 0; padding: 0;
		background: rgba(0,0,0,.035); box-shadow: none; border: 0;
	}
	.mp-5114 nav.mp-nav-menu--dropdown .sub-menu a { padding-left: 36px; }
	.mp-5114 nav.mp-nav-menu--dropdown .sub-menu .sub-menu a { padding-left: 52px; }
}
/* Mobile submenu arrow: white arrow on a dark square */
@media (max-width: 1024px) {
	.mp-5114 nav.mp-nav-menu--dropdown .sub-arrow { border-left: 0; }
	.mp-5114 nav.mp-nav-menu--dropdown .sub-arrow::before {
		content: ""; position: absolute; width: 30px; height: 30px; border-radius: 4px;
		background: #33373d; top: 50%; left: 50%; transform: translate(-50%, -50%);
	}
	.mp-5114 nav.mp-nav-menu--dropdown .sub-arrow svg { position: relative; width: 14px; height: 14px; }
	.mp-5114 nav.mp-nav-menu--dropdown li.mp-sub-open > a > .sub-arrow::before { background: #a20a2a; }
}

/* Back to top button */
body button.mp-to-top {
	position: fixed; right: 20px; bottom: 20px; z-index: 9990;
	width: 48px; height: 48px; border-radius: 50%; border: 0; padding: 0;
	background: #33373d; background-image: none; color: #fff; cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	box-shadow: 0 4px 14px rgba(0,0,0,.2);
	opacity: 0; visibility: hidden; transform: translateY(10px);
	transition: opacity .25s, transform .25s, visibility .25s, background-color .2s;
}
body button.mp-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
body button.mp-to-top:hover, body button.mp-to-top:focus-visible { background: #a20a2a; }
body button.mp-to-top:focus-visible { outline: 2px solid #fff; outline-offset: -5px; }
body button.mp-to-top svg { width: 24px; height: 24px; fill: currentColor; }
@media (max-width: 767px) { body button.mp-to-top { right: 14px; bottom: 14px; } }
/* Language switch as button in the mobile menu */
@media (max-width: 1024px) {
	.mp-5114 nav.mp-nav-menu--dropdown .mp-dropdown-lang { padding: 16px 20px 18px; }
	.mp-5114 nav.mp-nav-menu--dropdown .mp-dropdown-lang .mp-lang-switcher__lang a {
		display: inline-flex; align-items: center; justify-content: center;
		min-width: 64px; min-height: 40px; padding: 8px 20px;
		border: 1px solid #33373d; border-radius: 999px;
		background: #fff; color: #33373d;
		font-size: 13px; font-weight: 600; letter-spacing: .1em; text-decoration: none;
		transition: background-color .2s, color .2s;
	}
	.mp-5114 nav.mp-nav-menu--dropdown .mp-dropdown-lang .mp-lang-switcher__lang a:hover,
	.mp-5114 nav.mp-nav-menu--dropdown .mp-dropdown-lang .mp-lang-switcher__lang a:focus-visible {
		background: #33373d; color: #fff;
	}
}