/*
Theme Name: Palkansaajasäätiö by Pencil
Theme URI: https://palkansaajasaatio.fi/
Author: Kotisivupalvelut
Author URI: https://www.kotisivupalvelut.fi/
Description: Räätälöity, kevyt teema Palkansaajasäätiölle. Ulkoasu on teemassa, ja sivujen tekstejä ja kuvia muokataan suoraan sivulla Pencil by Rino -lisäosalla. Haitarien kohteet (Myönnetyt apurahat, UKK) muokataan WordPressissä. Ei sivunrakentajia.
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: palkansaajasaatio-pencil
*/

/* ---------- Tokens ---------- */
:root {
	--palk-text: #272626;
	--palk-heading: #000f2b;
	--palk-teal: #296974;
	--palk-teal-dark: #1a6c7a;
	--palk-mint: #52beaf;
	--palk-navy: #153243;
	--palk-purple: #281d67;
	--palk-line: #d5d8dc;
	--palk-line-soft: #dbe8eb;
	--palk-white: #fff;
	--palk-font: "Montserrat", sans-serif;
	--palk-font-head: "Zilla Slab", serif;
	--palk-container: 1140px;
	--palk-header-h: 171px;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--palk-white);
	color: var(--palk-text);
	font-family: var(--palk-font);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.8;
	-webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0;
	color: var(--palk-heading);
	font-family: var(--palk-font-head);
	font-weight: 400;
}

p {
	margin: 0 0 35px;
}

a {
	color: var(--palk-teal-dark);
}

img {
	max-width: 100%;
	height: auto;
}

.palk-visually-hidden,
.palk-skip-link:not(:focus) {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.palk-skip-link:focus {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 1000;
	padding: 10px 16px;
	background: var(--palk-white);
	color: var(--palk-heading);
}

.palk-container {
	width: 100%;
	max-width: var(--palk-container);
	margin: 0 auto;
}

.palk-container--wide {
	max-width: 1200px;
}

/* ---------- Header ---------- */
.palk-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--palk-white);
	transition: box-shadow 0.3s;
}

.admin-bar .palk-header {
	top: 32px;
}

.palk-header.is-scrolled {
	box-shadow: 0 1px 10px rgba(0, 0, 0, 0.08);
}

.palk-header__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-height: var(--palk-header-h);
	padding: 16px 20px 16px;
}

.palk-header__brand {
	display: block;
	line-height: 0;
}

.palk-logo-frame {
	display: block;
	overflow: hidden;
	aspect-ratio: 971 / 210;
}

.palk-logo-frame img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.palk-logo-frame--header {
	width: 274px;
}

.palk-nav {
	margin-top: 16px;
}

.palk-nav__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.palk-nav__list li {
	margin: 0;
}

.palk-nav__list a {
	display: block;
	padding: 0 20px;
	color: var(--palk-teal);
	font-size: 16px;
	line-height: 64px;
	text-decoration: none;
	transition: color 0.2s;
}

.palk-nav__list a:hover,
.palk-nav__list a:focus-visible,
.palk-nav__list .current-menu-item > a,
.palk-nav__list .current_page_item > a {
	color: var(--palk-purple);
}

.palk-nav__list .sub-menu {
	display: none;
}

.palk-nav-toggle {
	display: none;
}

/* ---------- Buttons ---------- */
.palk-btn {
	display: inline-block;
	padding: 16px 40px;
	border: 2px solid var(--palk-white);
	border-radius: 0;
	background: transparent;
	color: var(--palk-white);
	font-family: var(--palk-font);
	font-size: 12px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: 2px;
	text-decoration: none;
	text-transform: uppercase;
	transition: all 0.3s;
}

.palk-btn--outline:hover,
.palk-btn--outline:focus-visible {
	border-color: var(--palk-teal-dark);
	color: var(--palk-white);
}

.palk-btn--invert:hover,
.palk-btn--invert:focus-visible {
	border-color: var(--palk-white);
	background: var(--palk-white);
	color: var(--palk-teal-dark);
}

.palk-btn--solid {
	border-color: var(--palk-teal-dark);
	background: var(--palk-teal-dark);
}

/* ---------- Hero bands ---------- */
.palk-hero {
	position: relative;
	overflow: hidden;
	clip-path: inset(0);
	background-color: #494949;
	color: var(--palk-white);
	text-align: center;
}

.palk-hero__media,
.palk-cta__media {
	position: absolute;
	inset: 0;
}

.palk-hero__media img,
.palk-cta__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.palk-hero__overlay,
.palk-cta__overlay {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.palk-hero__overlay--inner {
	background-image: linear-gradient(180deg, var(--palk-mint) 0%, var(--palk-teal-dark) 100%);
	opacity: 0.6;
}

.palk-hero__overlay--home {
	background-image: radial-gradient(at center center, var(--palk-navy) 0%, var(--palk-teal-dark) 100%);
	opacity: 0.5;
}

.palk-hero__content {
	position: relative;
	z-index: 1;
	margin: 0 auto;
	padding: 42px 10px 107px;
}

.palk-hero__title {
	color: var(--palk-white);
	font-family: var(--palk-font-head);
	font-size: 65px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 2.5px;
}

.palk-hero__title--home {
	letter-spacing: normal;
}

/* Inner pages: the background stays put while the page scrolls (desktop). */
@media (min-width: 1025px) {
	.palk-hero--inner .palk-hero__media img,
	.palk-cta__media img {
		position: fixed;
		top: 0;
		left: 0;
		width: 100vw;
		height: 100vh;
	}
}

/* Home hero */
.palk-hero--home {
	min-height: 531px;
}

.palk-hero--home .palk-hero__media img {
	object-position: 50% 55%;
}

.palk-hero__content--home {
	max-width: 920px;
	padding: 42px 10px 113px;
}

.palk-hero__text {
	margin-top: 30px;
	color: var(--palk-white);
}

.palk-hero__text p {
	margin: 0 0 35px;
}

.palk-hero__text p:last-child {
	margin-bottom: 0;
}

.palk-hero__actions {
	margin-top: 85px;
}

/* ---------- Sections ---------- */
.palk-section {
	background: var(--palk-white);
}

.palk-grid {
	display: grid;
}

.palk-grid--2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.palk-grid--3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.palk-narrow {
	max-width: 790px;
}

.palk-h2 {
	margin-bottom: 20px;
	color: var(--palk-heading);
	font-family: var(--palk-font-head);
	font-size: 28px;
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: 2.5px;
}

.palk-divider {
	width: 30%;
	height: 20px;
	margin: 15px 0 35px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none' viewBox='0 0 24 24' fill='%23296974'%3E%3Cpath d='M24,8v12H0V8H24z M24,4v1H0V4H24z'/%3E%3C/svg%3E");
	background-repeat: repeat-x;
	background-size: 24px 20px;
}

.palk-prose {
	margin-bottom: 20px;
}

.palk-prose p:last-child {
	margin-bottom: 0;
}

.palk-prose ul,
.palk-prose ol {
	margin: 0 0 35px;
	padding-left: 20px;
}

.palk-prose a {
	color: var(--palk-text);
}

.palk-spacer {
	height: 30px;
}

/* Home intro */
.palk-home-intro {
	padding: 50px 0 70px;
}

.palk-home-intro .palk-col {
	padding: 50px;
}

.palk-home-intro .palk-prose {
	margin-bottom: 40px;
}

/* Home call to action */
.palk-cta {
	position: relative;
	overflow: hidden;
	clip-path: inset(0);
	padding: 190px 20px;
	text-align: center;
}

.palk-cta__overlay {
	background-image: radial-gradient(at center center, var(--palk-mint) 0%, var(--palk-teal-dark) 100%);
	opacity: 0.4;
}

.palk-cta__content {
	position: relative;
	z-index: 1;
	max-width: 600px;
	margin: 0 auto;
}

.palk-cta__title {
	margin-bottom: 50px;
	color: var(--palk-white);
	font-family: var(--palk-font-head);
	font-size: 28px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 2.5px;
	text-transform: uppercase;
}

/* Plain WordPress pages */
.palk-section--page {
	padding: 60px 0 100px;
}

.palk-entry h1,
.palk-entry h2,
.palk-entry h3 {
	margin: 0 0 20px;
	line-height: 1.3;
	letter-spacing: 2.5px;
}

.palk-entry h1 {
	font-size: 40px;
}

.palk-entry h2 {
	font-size: 28px;
}

.palk-entry h3 {
	font-size: 22px;
}

/* Apurahat */
.palk-section--apurahat {
	padding: 30px 0 100px;
}

.palk-section--apurahat .palk-narrow,
.palk-section--page .palk-narrow {
	padding: 0 10px;
}

.palk-notice {
	padding: 30px;
	background: var(--palk-teal);
	color: var(--palk-white);
}

.palk-notice p {
	margin-bottom: 35px;
}

.palk-notice p:last-child {
	margin-bottom: 35px;
}

/* Accordion (replaces the old Elementor toggle) */
.palk-accordion__item {
	margin: 0;
}

.palk-accordion__heading {
	margin: 0;
	font-family: var(--palk-font);
	font-size: 16px;
	line-height: 1;
}

.palk-accordion__toggle {
	display: flex;
	align-items: center;
	width: 100%;
	margin: 0;
	padding: 15px;
	border: 0;
	border-bottom: 1px solid var(--palk-line);
	background: none;
	color: var(--palk-text);
	font-family: var(--palk-font);
	font-size: 16px;
	font-weight: 400;
	line-height: 1;
	text-align: left;
	cursor: pointer;
}

.palk-accordion__toggle:focus-visible {
	outline: 2px solid var(--palk-teal-dark);
	outline-offset: 2px;
}

.palk-accordion__icon {
	flex: 0 0 1em;
	width: 1em;
	height: 1em;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 192 512'%3E%3Cpath d='M0 384.662V127.338c0-17.818 21.543-26.741 34.142-14.142l128.662 128.662c7.81 7.81 7.81 20.474 0 28.284L34.142 398.804C21.543 411.404 0 402.48 0 384.662z'/%3E%3C/svg%3E") left center / auto 1em no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 192 512'%3E%3Cpath d='M0 384.662V127.338c0-17.818 21.543-26.741 34.142-14.142l128.662 128.662c7.81 7.81 7.81 20.474 0 28.284L34.142 398.804C21.543 411.404 0 402.48 0 384.662z'/%3E%3C/svg%3E") left center / auto 1em no-repeat;
}

.palk-accordion__item.is-open .palk-accordion__icon {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512'%3E%3Cpath d='M288.662 352H31.338c-17.818 0-26.741-21.543-14.142-34.142l128.662-128.662c7.81-7.81 20.474-7.81 28.284 0l128.662 128.662c12.6 12.599 3.676 34.142-14.142 34.142z'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512'%3E%3Cpath d='M288.662 352H31.338c-17.818 0-26.741-21.543-14.142-34.142l128.662-128.662c7.81-7.81 20.474-7.81 28.284 0l128.662 128.662c12.6 12.599 3.676 34.142-14.142 34.142z'/%3E%3C/svg%3E");
}

.palk-accordion__item.is-open .palk-accordion__toggle {
	border-bottom-color: transparent;
}

.palk-accordion__panel {
	padding: 15px;
	border-bottom: 1px solid var(--palk-line);
}

.palk-accordion__content p {
	margin-bottom: 35px;
}

.palk-accordion__content > :last-child {
	margin-bottom: 0;
}

/* Apurahatarinat */
.palk-stories {
	display: grid;
	grid-template-columns: 75.094% 24.906%;
}

.palk-stories__main {
	padding: 45px;
}

.palk-prose--stories p {
	margin-bottom: 1.8em;
}

.palk-prose--stories a {
	color: #101010;
}

/* Toimintakertomukset */
.palk-section--reports {
	padding: 25px;
	border-bottom: 2px solid var(--palk-teal);
}

.palk-reports .palk-col {
	padding: 10px;
}

.palk-filelist {
	padding: 20px;
}

.palk-filelist ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.palk-filelist li {
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
	font-size: 20px;
}

.palk-filelist li + li {
	margin-top: 15px;
}

.palk-filelist li::before {
	content: "";
	flex: 0 0 30px;
	width: 30px;
	height: 30px;
	margin-right: 15px;
	background-color: var(--palk-teal);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'%3E%3Cpath d='M181.9 256.1c-5-16-4.9-46.9-2-46.9 8.4 0 7.6 36.9 2 46.9zm-1.7 47.2c-7.7 20.2-17.3 43.3-28.4 62.7 18.3-7 39-17.2 62.9-21.9-12.7-9.6-24.9-23.4-34.5-40.8zM86.1 428.1c0 .8 13.2-5.4 34.9-40.2-6.7 6.3-29.1 24.5-34.9 40.2zM248 160h136v328c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V24C0 10.7 10.7 0 24 0h200v136c0 13.2 10.8 24 24 24zm-8 171.8c-20-12.2-33.3-29-42.7-53.8 4.5-18.5 11.6-46.6 6.2-64.2-4.7-29.4-42.4-26.5-47.8-6.8-5 18.3-.4 44.1 8.1 77-11.6 27.6-28.7 64.6-40.8 85.8-.1 0-.1.1-.2.1-27.1 13.9-73.6 44.5-54.5 68 5.6 6.9 16 10 21.5 10 17.9 0 35.7-18 61.1-61.8 25.8-8.5 54.1-19.1 79-23.2 21.7 11.8 47.1 19.5 64 19.5 29.2 0 31.2-32 19.7-43.4-13.9-13.6-54.3-9.7-73.6-7.2zM377 105L279 7c-4.5-4.5-10.6-7-17-7h-6v128h128v-6.1c0-6.3-2.5-12.4-7-16.9zm-74.1 255.3c4.1-2.7-2.5-11.9-42.8-9 37.1 15.8 42.8 9 42.8 9z'/%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 384 512'%3E%3Cpath d='M181.9 256.1c-5-16-4.9-46.9-2-46.9 8.4 0 7.6 36.9 2 46.9zm-1.7 47.2c-7.7 20.2-17.3 43.3-28.4 62.7 18.3-7 39-17.2 62.9-21.9-12.7-9.6-24.9-23.4-34.5-40.8zM86.1 428.1c0 .8 13.2-5.4 34.9-40.2-6.7 6.3-29.1 24.5-34.9 40.2zM248 160h136v328c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V24C0 10.7 10.7 0 24 0h200v136c0 13.2 10.8 24 24 24zm-8 171.8c-20-12.2-33.3-29-42.7-53.8 4.5-18.5 11.6-46.6 6.2-64.2-4.7-29.4-42.4-26.5-47.8-6.8-5 18.3-.4 44.1 8.1 77-11.6 27.6-28.7 64.6-40.8 85.8-.1 0-.1.1-.2.1-27.1 13.9-73.6 44.5-54.5 68 5.6 6.9 16 10 21.5 10 17.9 0 35.7-18 61.1-61.8 25.8-8.5 54.1-19.1 79-23.2 21.7 11.8 47.1 19.5 64 19.5 29.2 0 31.2-32 19.7-43.4-13.9-13.6-54.3-9.7-73.6-7.2zM377 105L279 7c-4.5-4.5-10.6-7-17-7h-6v128h128v-6.1c0-6.3-2.5-12.4-7-16.9zm-74.1 255.3c4.1-2.7-2.5-11.9-42.8-9 37.1 15.8 42.8 9 42.8 9z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.palk-filelist a {
	color: var(--palk-text);
	text-decoration: none;
}

.palk-filelist a:hover {
	color: var(--palk-teal);
}

.palk-image-frame {
	display: block;
	overflow: hidden;
}

.palk-image-frame img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.palk-image-frame--3x2 {
	aspect-ratio: 1280 / 853;
}

.palk-image-frame--2x3 {
	aspect-ratio: 2 / 3;
}

/* Hae apurahaa */
.palk-section--apply {
	padding: 100px 0;
}

.palk-apply {
	display: grid;
	grid-template-columns: 72.719% 27.281%;
}

.palk-apply__form,
.palk-apply__side {
	padding: 0 30px;
}

.palk-apply__side {
	text-align: center;
}

.palk-apply__icon {
	width: 109px;
	height: 109px;
	margin-bottom: 20px;
	color: var(--palk-teal);
}

.palk-apply__email {
	text-align: left;
}

/* WPForms application form: modern fields, the field being filled in is highlighted */
.palk-apply .wpforms-container {
	margin: 0;
}

.palk-apply .wpforms-form {
	--palk-f-border: #cfd9dc;
	--palk-f-active-bg: #eef6f7;
	--palk-f-ring: rgba(26, 108, 122, 0.18);
	--palk-f-error: #c0392b;
}

/* Section headings ("Hakijan tiedot", "Hakemuksen tiedot") */
.palk-apply .wpforms-form .wpforms-field-divider {
	margin-top: 30px;
	padding: 0 0 12px;
	border-bottom: 2px solid var(--palk-teal);
}

.palk-apply .wpforms-form .wpforms-field-divider:first-child {
	margin-top: 0;
}

.palk-apply .wpforms-form .wpforms-field-divider h3 {
	margin: 0;
	color: var(--palk-heading);
	font-family: var(--palk-font-head);
	font-size: 24px;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: 1px;
}

/* Each field is a card that lights up while it is being filled in */
.palk-apply .wpforms-form .wpforms-field:not(.wpforms-field-divider):not(.wpforms-field-hidden) {
	position: relative;
	margin: 6px 0;
	padding: 14px 18px 16px;
	border-radius: 10px;
	transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.palk-apply .wpforms-form .wpforms-field:not(.wpforms-field-divider)::before {
	content: "";
	position: absolute;
	top: 12px;
	bottom: 12px;
	left: 0;
	width: 4px;
	border-radius: 4px;
	background: var(--palk-teal-dark);
	opacity: 0;
	transform: scaleY(0.4);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.palk-apply .wpforms-form .wpforms-field:not(.wpforms-field-divider):focus-within {
	background: var(--palk-f-active-bg);
}

.palk-apply .wpforms-form .wpforms-field:not(.wpforms-field-divider):focus-within::before {
	opacity: 1;
	transform: scaleY(1);
}

.palk-apply .wpforms-form .wpforms-field-label {
	margin: 0 0 8px;
	color: var(--palk-text);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	transition: color 0.2s ease;
}

.palk-apply .wpforms-form .wpforms-field:focus-within > .wpforms-field-label {
	color: var(--palk-teal-dark);
}

.palk-apply .wpforms-form .wpforms-required-label {
	color: var(--palk-teal-dark);
}

.palk-apply .wpforms-form .wpforms-field-sublabel,
.palk-apply .wpforms-form .wpforms-field-description {
	margin-top: 6px;
	color: #5f6b6e;
	font-size: 14px;
}

/* Inputs */
.palk-apply .wpforms-form input[type="text"],
.palk-apply .wpforms-form input[type="email"],
.palk-apply .wpforms-form input[type="tel"],
.palk-apply .wpforms-form input[type="url"],
.palk-apply .wpforms-form input[type="number"],
.palk-apply .wpforms-form input[type="date"],
.palk-apply .wpforms-form select,
.palk-apply .wpforms-form textarea {
	display: block;
	width: 100%;
	height: auto;
	padding: 13px 16px;
	border: 1px solid var(--palk-f-border);
	border-radius: 8px;
	background: var(--palk-white);
	box-shadow: 0 1px 2px rgba(0, 15, 43, 0.04);
	color: var(--palk-text);
	font-family: var(--palk-font);
	font-size: 16px;
	line-height: 1.5;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.palk-apply .wpforms-form input:hover,
.palk-apply .wpforms-form select:hover,
.palk-apply .wpforms-form textarea:hover {
	border-color: #a9bcc0;
}

.palk-apply .wpforms-form input:focus,
.palk-apply .wpforms-form select:focus,
.palk-apply .wpforms-form textarea:focus {
	border-color: var(--palk-teal-dark);
	outline: 0;
	box-shadow: 0 0 0 4px var(--palk-f-ring);
}

.palk-apply .wpforms-form textarea {
	min-height: 140px;
	resize: vertical;
}

.palk-apply .wpforms-form input::placeholder,
.palk-apply .wpforms-form textarea::placeholder {
	color: #93a1a4;
}

/* Radio choices */
.palk-apply .wpforms-form .wpforms-field-radio ul {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 4px 0 0;
	padding: 0;
	list-style: none;
}

.palk-apply .wpforms-form .wpforms-field-radio li {
	margin: 0;
	padding: 0;
}

.palk-apply .wpforms-form .wpforms-field-radio li label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px 10px 14px;
	border: 1px solid var(--palk-f-border);
	border-radius: 999px;
	background: var(--palk-white);
	font-size: 15px;
	cursor: pointer;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.palk-apply .wpforms-form .wpforms-field-radio li input {
	position: absolute;
	opacity: 0;
}

.palk-apply .wpforms-form .wpforms-field-radio li label::before {
	content: "";
	width: 16px;
	height: 16px;
	border: 2px solid #a9bcc0;
	border-radius: 50%;
	background: var(--palk-white);
	transition: border 0.2s ease;
}

.palk-apply .wpforms-form .wpforms-field-radio li.wpforms-selected label,
.palk-apply .wpforms-form .wpforms-field-radio li input:checked + label {
	border-color: var(--palk-teal-dark);
	background: var(--palk-f-active-bg);
	color: var(--palk-teal-dark);
}

.palk-apply .wpforms-form .wpforms-field-radio li input:checked + label::before {
	border: 5px solid var(--palk-teal-dark);
}

.palk-apply .wpforms-form .wpforms-field-radio li input:focus-visible + label {
	box-shadow: 0 0 0 4px var(--palk-f-ring);
}

/* Math captcha */
.palk-apply .wpforms-form .wpforms-captcha-math {
	display: flex;
	align-items: center;
	gap: 12px;
}

.palk-apply .wpforms-form .wpforms-captcha-equation {
	font-size: 18px;
	font-weight: 600;
}

.palk-apply .wpforms-form input.wpforms-captcha-math-input,
.palk-apply .wpforms-form .wpforms-captcha-math input[type="text"] {
	display: inline-block;
	width: 90px;
}

/* Errors */
.palk-apply .wpforms-form input.wpforms-error,
.palk-apply .wpforms-form textarea.wpforms-error,
.palk-apply .wpforms-form select.wpforms-error {
	border-color: var(--palk-f-error);
}

.palk-apply .wpforms-form label.wpforms-error,
.palk-apply .wpforms-form em.wpforms-error {
	display: block;
	margin-top: 6px;
	color: var(--palk-f-error);
	font-size: 14px;
	font-style: normal;
}

/* Submit */
.palk-apply .wpforms-form .wpforms-submit-container {
	padding: 20px 18px 0;
}

.palk-apply .wpforms-form .wpforms-submit {
	padding: 16px 36px;
	border: 0;
	border-radius: 8px;
	background: var(--palk-teal-dark);
	box-shadow: 0 6px 16px rgba(26, 108, 122, 0.25);
	color: var(--palk-white);
	font-family: var(--palk-font);
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.5px;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.palk-apply .wpforms-form .wpforms-submit:hover {
	background: var(--palk-teal);
	transform: translateY(-1px);
	box-shadow: 0 8px 20px rgba(26, 108, 122, 0.3);
}

.palk-apply .wpforms-form .wpforms-submit:focus-visible {
	outline: 0;
	box-shadow: 0 0 0 4px var(--palk-f-ring);
}

@media (max-width: 767px) {
	.palk-apply .wpforms-form .wpforms-field:not(.wpforms-field-divider):not(.wpforms-field-hidden) {
		padding: 12px 12px 14px;
	}

	.palk-apply .wpforms-form .wpforms-field-small input,
	.palk-apply .wpforms-form .wpforms-field-medium input,
	.palk-apply .wpforms-form .wpforms-field-small textarea,
	.palk-apply .wpforms-form .wpforms-field-medium textarea {
		max-width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.palk-apply .wpforms-form * {
		transition: none !important;
	}
}

/* Yhteystiedot */
.palk-section--contact {
	padding: 100px 0;
}

.palk-contact__title {
	margin-bottom: 20px;
	font-size: 40px;
	line-height: 1.3;
	letter-spacing: 2.5px;
}

.palk-contact__subtitle {
	margin-bottom: 12px;
	font-size: 28px;
	line-height: 1.3;
	letter-spacing: 2.5px;
}

.palk-map {
	position: relative;
	line-height: 0;
}

.palk-map__label {
	display: none;
}

html.pencil-selection-active .palk-map__label {
	display: block;
	margin: 0;
	padding: 10px 20px;
	line-height: 1.8;
}

.palk-map__frame {
	display: block;
	width: 100%;
	height: 400px;
	border: 0;
	filter: saturate(0);
	transition: filter 0.5s;
}

.palk-map__frame:hover {
	filter: none;
}

/* UKK */
.palk-section--faq {
	padding: 100px 0;
}

.palk-faq {
	display: grid;
	grid-template-columns: 67.544% 32.456%;
}

.palk-faq__main,
.palk-faq__side {
	padding: 0 30px;
}

/* 404 */
.palk-404 {
	padding: 80px 10px;
}

/* ---------- Footer ---------- */
.palk-footer__main {
	padding: 50px 0;
	background: var(--palk-white);
}

.palk-footer__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
}

.palk-footer__col {
	padding: 10px;
}

.palk-logo-frame--footer {
	width: 51%;
}

.palk-footer__address {
	margin-top: 20px;
	color: var(--palk-teal-dark);
	font-family: var(--palk-font-head);
	font-size: 20px;
	line-height: 1.5;
	letter-spacing: 1px;
	text-transform: capitalize;
}

.palk-footer__address p {
	margin: 0;
}

.palk-footer__bottom {
	padding: 20px 15px 20px 0;
	border-top: 1px solid var(--palk-line-soft);
	text-align: center;
}

.palk-footer__copy {
	margin-bottom: 35px;
}

/* Back to top */
.palk-to-top {
	position: fixed;
	right: 30px;
	bottom: 30px;
	z-index: 40;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 31.5px;
	height: 31.5px;
	border-radius: 2px;
	background: var(--palk-teal-dark);
	color: var(--palk-white);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s, visibility 0.3s;
}

.palk-to-top svg {
	width: 12px;
	height: 15px;
}

.palk-to-top.is-visible {
	opacity: 1;
	visibility: visible;
}

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
	.palk-hero__content {
		padding: 60px 80px 80px;
	}

	.palk-hero__title {
		font-size: 40px;
	}

	.palk-home-intro {
		padding: 15px 10px 40px;
	}

	.palk-section--apurahat,
	.palk-section--apply,
	.palk-section--contact,
	.palk-section--faq {
		padding: 50px;
	}

	.palk-cta {
		padding: 50px;
	}

	.palk-apply,
	.palk-faq {
		grid-template-columns: 1fr;
	}

	.palk-apply__side,
	.palk-faq__side {
		padding-top: 30px;
	}

	.palk-grid--3 {
		grid-template-columns: 45% 55%;
	}

	.palk-footer__main {
		padding: 50px 30px;
	}

	.palk-footer__bottom {
		padding: 18px 30px;
	}
}

/* ---------- Mobile header (same breakpoint as before) ---------- */
@media (max-width: 921px) {
	:root {
		--palk-header-h: 66px;
	}

	.palk-header__inner {
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: space-between;
		align-items: center;
		min-height: 66px;
		padding: 8px 20px;
	}

	.palk-logo-frame--header {
		width: 160px;
	}

	.palk-nav-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 54px;
		height: 50px;
		padding: 0 12px;
		border: 0;
		border-radius: 2px;
		background: var(--palk-teal-dark);
		color: var(--palk-white);
		cursor: pointer;
	}

	.palk-nav-toggle__bars,
	.palk-nav-toggle__bars::before,
	.palk-nav-toggle__bars::after {
		display: block;
		width: 20px;
		height: 2px;
		background: currentColor;
		transition: transform 0.2s;
	}

	.palk-nav-toggle__bars {
		position: relative;
	}

	.palk-nav-toggle__bars::before,
	.palk-nav-toggle__bars::after {
		content: "";
		position: absolute;
		left: 0;
	}

	.palk-nav-toggle__bars::before {
		top: -6px;
	}

	.palk-nav-toggle__bars::after {
		top: 6px;
	}

	.palk-nav-open .palk-nav-toggle__bars {
		background: transparent;
	}

	.palk-nav-open .palk-nav-toggle__bars::before {
		transform: translateY(6px) rotate(45deg);
	}

	.palk-nav-open .palk-nav-toggle__bars::after {
		transform: translateY(-6px) rotate(-45deg);
	}

	.palk-nav {
		display: none;
		flex-basis: calc(100% + 40px);
		max-width: none;
		margin: 8px -20px -8px;
		background: var(--palk-white);
	}

	.palk-nav-open .palk-nav {
		display: block;
	}

	.palk-nav__list {
		display: block;
		border-top: 1px solid #ddd;
	}

	.palk-nav__list a {
		padding: 0 20px;
		border-bottom: 1px solid #ddd;
		line-height: 48px;
	}
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
	.palk-hero__content {
		padding: 84px 80px 90px;
	}

	.palk-hero__title {
		font-size: 30px;
	}

	.palk-hero--home {
		min-height: 0;
	}

	.palk-hero__content--home {
		padding: 84px 20px 50px;
	}

	.palk-grid--2,
	.palk-grid--3,
	.palk-stories,
	.palk-footer__grid {
		grid-template-columns: 1fr;
	}

	.palk-home-intro {
		padding: 0;
	}

	.palk-home-intro .palk-col {
		padding: 20px 30px 0;
	}

	.palk-section--apurahat,
	.palk-section--apply,
	.palk-section--contact,
	.palk-section--faq {
		padding: 50px 30px;
	}

	.palk-section--apurahat .palk-narrow {
		padding: 0;
	}

	.palk-cta {
		padding: 50px 30px;
	}

	.palk-stories__main {
		padding: 35px 20px;
	}

	.palk-apply__form,
	.palk-apply__side,
	.palk-faq__main,
	.palk-faq__side {
		padding-left: 0;
		padding-right: 0;
	}

	.palk-map__frame {
		height: 250px;
	}

	.palk-footer__main {
		padding: 40px 20px;
	}

	.palk-logo-frame--footer {
		width: 55%;
	}

	.palk-footer__bottom {
		padding: 20px 55px;
	}
}
