/*
Theme Name: Taloyhtiöklubi
Theme URI:
Author:
Author URI:
Description:
Requires at least: 6.8
Tested up to: 6.8
Requires PHP: 5.6
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
Text Domain: taloyhtioklubi
Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, translation-ready, wide-blocks, block-styles, accessibility-ready, blog, portfolio, news
*/

/* Anchors without href are not interactive */
a:not([href]) {
	cursor: default !important;
}

/* Palvelut archive: 3 → 2 columns at 900px, WP default only does 3 → 1 at ~600px */
@media (max-width: 900px) and (min-width: 600px) {
	.post-type-archive-palvelu .wp-block-post-template.is-flex-container.columns-3 > li {
		flex-basis: calc(50% - var(--wp--style--block-gap, 1.5rem) / 2) !important;
	}
}

/* Palvelut archive: card shadow and hover animation */
.post-type-archive-palvelu .wp-block-post {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	border-radius: 4px;
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	padding: 0 0 24px;
	display: flex;
	flex-direction: column;
}
.post-type-archive-palvelu .wp-block-post .wp-block-read-more {
	margin-top: auto;
	font-size: 14px;
}
.post-type-archive-palvelu .wp-block-post:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.13);
}
.post-type-archive-palvelu .wp-block-post .wp-block-post-title,
.post-type-archive-palvelu .wp-block-post .wp-block-post-excerpt,
.post-type-archive-palvelu .wp-block-post .wp-block-read-more {
	padding-left: 20px;
	padding-right: 20px;
}

/* =============================================================================
   MAX MEGA MENU – Custom Design
   Brand: Good House / Taloyhtiöklubi
   ============================================================================= */

/* ── 1. TOP-LEVEL NAV BAR ─────────────────────────────────────────────────── */

[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] {
	padding: 0;
}

/* Top-level links */
[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.mega-menu-item > a.mega-menu-link {
	display: inline-flex !important;
	align-items: center !important;
	letter-spacing: 0.04em !important;
	color: #333 !important;
	padding: 8px 12px !important;
	border: none !important;
	position: relative;
	overflow: visible;
	line-height: 1 !important;
	transition: color 0.2s ease !important;
}

/* Default text color for megamenu column items (cascades to links) */
[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.mega-menu-megamenu > ul.mega-sub-menu li.mega-menu-column-standard,
[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.mega-menu-megamenu > ul.mega-sub-menu li.mega-menu-column > ul.mega-sub-menu > li.mega-menu-item {
	color: #333 !important;
	font-weight: 600 !important;
}

/* Animated underline */
[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.mega-menu-item > a.mega-menu-link::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 12px;
	right: 12px;
	height: 2px;
	background: #76b729;
	transform: scaleX(0);
	transform-origin: center;
	transition: transform 0.22s ease;
}

[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.mega-menu-item:hover > a.mega-menu-link,
[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.mega-menu-item.mega-toggle-on > a.mega-menu-link {
	color: #76b729 !important;
	background: transparent !important;
}

[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.mega-menu-item:hover > a.mega-menu-link::after,
[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.mega-menu-item.mega-toggle-on > a.mega-menu-link::after,
[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.mega-current-menu-item > a.mega-menu-link::after,
[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.mega-current-menu-ancestor > a.mega-menu-link::after {
	transform: scaleX(1);
}

/* Active page: top-level links get the green text + underline (no background) */
[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.mega-current-menu-item > a.mega-menu-link,
[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.mega-current-menu-ancestor > a.mega-menu-link {
	color: #76b729 !important;
}

/* Chevron indicator */
[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.mega-menu-item > a.mega-menu-link .mega-indicator {
	margin-left: 3px;
	font-size: 0.5rem;
	opacity: 0.45;
	display: inline-block;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (min-width: 1181px) {
	[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.mega-menu-item.mega-toggle-on > a.mega-menu-link .mega-indicator {
		transform: rotate(180deg);
		opacity: 0.75;
	}
}

/* ── 2. SHARED DROPDOWN PANEL ─────────────────────────────────────────────── */

[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.mega-menu-item > ul.mega-sub-menu {
	background: #ffffff !important;
	border: none !important;
	border-radius: 14px !important;
	box-shadow: 0 10px 28px rgba(30, 111, 181, 0.22), 0 2px 8px rgba(0, 0, 0, 0.08) !important;
	margin-top: 6px !important;
}

/* ── 3. MEGAMENU PANEL – Palvelut (4 columns) ─────────────────────────────── */

/* Panel outer padding + width override so 4 columns fit (menu sits on the right
   of the header, so we anchor the panel to the right edge and let it grow left). */
[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] li.mega-menu-megamenu > ul.mega-sub-menu {
	padding: 1.25rem 0 1.75rem !important;
	width: min(1400px, 95vw) !important;
	max-width: 95vw !important;
	left: auto !important;
	right: 0 !important;
	overflow: hidden;
}

/* Row + column wrappers: no borders, no row padding */
[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] li.mega-menu-row,
[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] li.mega-menu-column {
	border: none !important;
}

[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] li.mega-menu-megamenu > ul.mega-sub-menu > li.mega-menu-row {
	padding: 0 !important;
}

/* Column inner padding and right divider */
[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] li.mega-menu-megamenu li.mega-menu-column > ul.mega-sub-menu {
	padding: 0 1.75rem 0.5rem !important;
	border-right: 1px solid #e4e8ed !important;
}

[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] li.mega-menu-megamenu li.mega-menu-column:last-child > ul.mega-sub-menu {
	border-right: none !important;
}

/* Column list items: tight vertical rhythm, full-width so link padding controls spacing */
[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] li.mega-menu-megamenu > ul.mega-sub-menu li.mega-menu-column > ul.mega-sub-menu > li.mega-menu-item {
	padding: 2px 0 !important;
	width: 100% !important;
}

/* Column heading (Custom HTML widget used as label) */
[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] li.mega-menu-megamenu li.mega-menu-item-type-widget.widget_custom_html {
	padding: 0 !important;
	margin: 0 0 0.5rem !important;
	border-bottom: 1px solid #e9ecef !important;
}

[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] li.mega-menu-megamenu li.mega-menu-item-type-widget.widget_custom_html > h4.mega-block-title {
	display: block !important;
	margin: 0 !important;
	padding: 0 0.75rem 1rem !important;
	font-size: 0.6875rem !important;
	font-weight: 700 !important;
	letter-spacing: 0.12em !important;
	text-transform: uppercase !important;
	color: #76b729 !important;
	line-height: 1.2 !important;
}

[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] li.mega-menu-megamenu li.mega-menu-item-type-widget.widget_custom_html > div.textwidget:empty {
	display: none;
}

/* Sub-items inside the mega panel: pill-hover language matching the CTA flyout */
[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] li.mega-menu-megamenu li.mega-menu-item-type-post_type > a.mega-menu-link,
[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] li.mega-menu-megamenu li.mega-menu-item-type-custom > a.mega-menu-link {
	font-size: 0.9rem !important;
	font-weight: 500 !important;
	padding: 0.5rem 0.85rem !important;
	margin: 2px 0;
	border: none !important;
	border-radius: 8px !important;
	transition: color 0.15s ease, background 0.15s ease !important;
	display: block;
	background: transparent !important;
	color: #333 !important;
}

[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] li.mega-menu-megamenu li.mega-menu-item-type-post_type > a.mega-menu-link:hover,
[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] li.mega-menu-megamenu li.mega-menu-item-type-custom > a.mega-menu-link:hover {
	background: #e9f1f9 !important;
	color: #1E6FB5 !important;
}

/* ── 4. FLYOUT DROPDOWN – ILMOITA ─────────────────────────────────────────── */

[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] li.mega-menu-flyout.mega-menu-item-has-children > ul.mega-sub-menu {
	padding: 0.5rem 0 !important;
	min-width: 210px !important;
	border-top-color: #1E6FB5 !important;
}

[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] li.mega-menu-flyout.mega-menu-item-has-children li.mega-menu-item > a.mega-menu-link {
	font-size: 0.875rem !important;
	font-weight: 400 !important;
	color: #121111 !important;
	padding: 0.65rem 1.5rem 0.65rem 1.25rem !important;
	background: transparent !important;
	border: none !important;
	border-left: 2px solid transparent !important;
	transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, padding-left 0.18s ease !important;
	display: block;
}

[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] li.mega-menu-flyout.mega-menu-item-has-children li.mega-menu-item > a.mega-menu-link:hover {
	color: #1E6FB5 !important;
	border-left-color: #1E6FB5 !important;
	padding-left: 1.5rem !important;
}

/* ── 5. CTA BUTTONS – TILAA (ghost) + ILMOITA (solid) ─────────────────────── */

/* Shared: pill shape, no underline animation */
[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.menu-btn {
	margin-left: 0.5rem !important;
}

[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.menu-btn > a.mega-menu-link {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 0.5rem 1.1rem !important;
	border-radius: 999px !important;
	font-weight: 700 !important;
	letter-spacing: 0.06em !important;
	line-height: 1 !important;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.08s ease !important;
}

/* Kill the top-level underline effect for button items */
[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.menu-btn > a.mega-menu-link::after {
	content: none !important;
}

[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.menu-btn > a.mega-menu-link:active {
	transform: translateY(1px);
}

/* Solid (default) – ILMOITA */
[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.menu-btn > a.mega-menu-link {
	background: #76b729 !important;
	color: #ffffff !important;
	border: 2px solid #76b729 !important;
	box-shadow: 0 2px 6px rgba(118, 183, 41, 0.25);
}

[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.menu-btn:hover > a.mega-menu-link,
[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.menu-btn.mega-toggle-on > a.mega-menu-link {
	background: #5e9820 !important;
	border-color: #5e9820 !important;
	color: #ffffff !important;
	box-shadow: 0 4px 12px rgba(118, 183, 41, 0.35);
}

/* Chevron sits nicely inside the solid pill */
[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.menu-btn > a.mega-menu-link .mega-indicator {
	opacity: 0.9;
	margin-left: 6px;
}

/* CTA flyout panel: extension of the button's visual language
   - right-anchored to the button edge
   - rounded corners echo the pill shape
   - green-tinted shadow mirrors the button's shadow
   - tighter gap so it feels attached to the button */
[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.menu-btn.mega-menu-item-has-children > ul.mega-sub-menu {
	left: auto !important;
	right: 0 !important;
	margin-top: 6px !important;
	padding: 8px !important;
	width: max-content !important;
	min-width: 0 !important;
	border: none !important;
	border-top: none !important;
	border-radius: 14px !important;
	background: #ffffff !important;
	box-shadow: 0 10px 28px rgba(30, 111, 181, 0.22), 0 2px 8px rgba(0, 0, 0, 0.08) !important;
	overflow: hidden;
}

/* Small "connector" notch so the panel visually hangs off the button */
[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.menu-btn.mega-menu-item-has-children > ul.mega-sub-menu::before {
	content: '';
	position: absolute;
	top: -5px;
	right: 22px;
	width: 10px;
	height: 10px;
	background: #ffffff;
	transform: rotate(45deg);
	box-shadow: -1px -1px 2px rgba(0, 0, 0, 0.04);
}

/* CTA flyout items: pill-shaped hover that echoes the button */
[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.menu-btn.mega-menu-item-has-children li.mega-menu-item > a.mega-menu-link {
	display: block;
	padding: 0.65rem 0.9rem !important;
	margin: 1px 0 !important;
	border: none !important;
	border-left: none !important;
	border-radius: 8px !important;
	font-size: 0.9rem !important;
	font-weight: 500 !important;
	line-height: 1.4 !important;
	color: #333 !important;
	background: transparent !important;
	transition: background 0.15s ease, color 0.15s ease, padding-left 0.15s ease !important;
}

[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.menu-btn.mega-menu-item-has-children li.mega-menu-item > a.mega-menu-link:hover {
	background: #e9f1f9 !important;
	color: #1E6FB5 !important;
	border-left: none !important;
	padding-left: 0.9rem !important;
}

/* Ghost – TILAA */
[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.menu-btn.btn-ghost > a.mega-menu-link {
	background: transparent !important;
	color: #76b729 !important;
	border: 2px solid #76b729 !important;
	box-shadow: none;
}

[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.menu-btn.btn-ghost:hover > a.mega-menu-link,
[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.menu-btn.btn-ghost.mega-toggle-on > a.mega-menu-link {
	background: #76b729 !important;
	color: #ffffff !important;
	border-color: #76b729 !important;
	box-shadow: 0 4px 12px rgba(118, 183, 41, 0.35);
}


/* ── 6. MOBILE DRAWER OVERRIDES ──────────────────────────────────────────
 */

@media only screen and (max-width: 1180px) {

	body:has([id^="mega-menu-wrap-max_mega_menu"] .mega-menu-toggle.mega-menu-open) header {
		position: relative;
		z-index: 9999;
	}

	/* Widen the drawer so the megamenu columns breathe */
	[id^="mega-menu-wrap-max_mega_menu"] .mega-menu-toggle + [id^="mega-menu-max_mega_menu"] {
		width: min(360px, 92vw) !important;
		padding: 24px 16px !important;
		left: -100%;
	}

	[id^="mega-menu-wrap-max_mega_menu"] .mega-menu-toggle.mega-menu-open + [id^="mega-menu-max_mega_menu"] {
		left: 0 !important;
	}

	[id^="mega-menu-wrap-max_mega_menu"] .mega-menu-toggle.mega-menu-open ~ button.mega-close {
		left: calc(min(100vw - 40px, 360px)) !important;
	}

	/* Top-level rows: full width, taller touch targets, pill hover.
	   Exclude .menu-btn so CTAs keep their desktop pill shape and green fill. */
	[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.mega-menu-item:not(.menu-btn) > a.mega-menu-link {
		display: flex !important;
		justify-content: space-between !important;
		padding: 12px 14px !important;
		line-height: 1.4 !important;
		height: auto !important;
		font-size: 0.95rem !important;
		border-radius: 8px !important;
	}
	[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.mega-menu-item > a.mega-menu-link::after {
		display: none !important;
	}
	[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.mega-menu-item:not(.menu-btn):hover > a.mega-menu-link,
	[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.mega-menu-item:not(.menu-btn).mega-toggle-on > a.mega-menu-link {
		background: transparent !important;
		color: #76b729 !important;
	}
	[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.mega-current-menu-item:not(.menu-btn) > a.mega-menu-link,
	[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.mega-current-menu-ancestor:not(.menu-btn) > a.mega-menu-link {
		color: #76b729 !important;
	}

	/* Chevron to the right edge of the row */
	[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.mega-menu-item:not(.menu-btn) > a.mega-menu-link .mega-indicator {
		margin-left: auto;
		font-size: 0.7rem;
	}


	/* Flatten megamenu panel inside the drawer (drawer already owns shadow/radius) */
	[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.mega-menu-item > ul.mega-sub-menu,
	[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] li.mega-menu-megamenu > ul.mega-sub-menu {
		background: transparent !important;
		box-shadow: none !important;
		border-radius: 0 !important;
		border: none !important;
		margin-top: 0 !important;
		padding: 4px 0 8px !important;
		width: 100% !important;
		max-width: 100% !important;
		left: auto !important;
		right: auto !important;
	}

	/* Stacked columns: drop vertical divider, use thin horizontal separator */
	[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] li.mega-menu-megamenu li.mega-menu-column > ul.mega-sub-menu {
		padding: 0 8px 10px !important;
		border-right: none !important;
	}
	[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] li.mega-menu-megamenu li.mega-menu-column:last-child > ul.mega-sub-menu {
		border-bottom: none !important;
	}

	/* Column heading */
	[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] li.mega-menu-megamenu li.mega-menu-item-type-widget.widget_custom_html {
		margin: 0 0 0.35rem !important;
	}
	[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] li.mega-menu-megamenu li.mega-menu-item-type-widget.widget_custom_html > div.textwidget {
		display: none !important;
	}
	[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] li.mega-menu-megamenu li.mega-menu-item-type-widget.widget_custom_html > h4.mega-block-title {
		display: flex !important;
		align-items: center !important;
		min-height: 40px !important;
		padding: 0 14px !important;
		line-height: 1 !important;
	}
	/* First column has no previous border above — neutralise the mega panel's
	   top padding so the first heading isn't pushed down extra. */
	[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] li.mega-menu-megamenu > ul.mega-sub-menu {
		padding-top: 0 !important;
	}

	/* Sub-item links: larger tap target */
	[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] li.mega-menu-megamenu li.mega-menu-item-type-post_type > a.mega-menu-link,
	[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] li.mega-menu-megamenu li.mega-menu-item-type-custom > a.mega-menu-link {
		padding: 0.65rem 0.85rem !important;
		font-size: 0.95rem !important;
	}

	/* ILMOITA flyout: flatten inside drawer */
	[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] li.mega-menu-flyout.mega-menu-item-has-children > ul.mega-sub-menu {
		padding: 0 0 8px !important;
		min-width: 0 !important;
		border-top: none !important;
		background: transparent !important;
		box-shadow: none !important;
		border-radius: 0 !important;
	}
	[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] li.mega-menu-flyout.mega-menu-item-has-children li.mega-menu-item > a.mega-menu-link {
		padding: 0.65rem 0.9rem 0.65rem 1.5rem !important;
		font-size: 0.95rem !important;
	}

	/* CTA pills become full-width stacked blocks */
	[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.menu-btn {
		margin: 6px 0 !important;
		width: 100% !important;
	}
	[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.menu-btn > a.mega-menu-link {
		display: flex !important;
		width: 100% !important;
		padding: 0.8rem 1.1rem !important;
		justify-content: center !important;
		font-size: 0.95rem !important;
		height: auto !important;
		line-height: 1.2 !important;
	}

	/* CTA flyout panel: drop the notch + right-anchored positioning */
	[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.menu-btn.mega-menu-item-has-children > ul.mega-sub-menu {
		left: auto !important;
		right: auto !important;
		width: 100% !important;
		padding: 4px 0 !important;
		margin-top: 4px !important;
		background: transparent !important;
		box-shadow: none !important;
		border-radius: 0 !important;
	}
	[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.menu-btn.mega-menu-item-has-children > ul.mega-sub-menu::before {
		display: none !important;
	}
	[id^="mega-menu-wrap-max_mega_menu"] [id^="mega-menu-max_mega_menu"] > li.menu-btn.mega-menu-item-has-children li.mega-menu-item > a.mega-menu-link {
		padding: 0.65rem 0.9rem !important;
		font-size: 0.95rem !important;
	}
}


/* ── 7. SINGLE PALVELU HERO ─────────────────────────────────────────────── */

/* Single palvelu hero: make featured image fill the column like a background cover */
@media (min-width: 768px) {
	.single-palvelu .stk-d8e9f0a {
		position: relative;
	}
	.single-palvelu .stk-d8e9f0a .stk-column-wrapper {
		position: absolute;
		inset: 0;
		margin: 0 !important;
		overflow: hidden;
	}
	.single-palvelu .stk-d8e9f0a .stk-block-content {
		height: 100%;
	}
}
.single-palvelu .stk-d8e9f0a .wp-block-post-featured-image {
	height: 100%;
	overflow: hidden;
}
.single-palvelu .stk-d8e9f0a .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

@media (max-width: 767px) {
	.single-palvelu .hero-separator {
		margin-top: 8px !important;
	}
}

/* Green checkmark list markers on single palvelu pages */
.single-palvelu ul {
	list-style: none;
	padding-left: 1.75em;
}
.single-palvelu ul li {
	position: relative;
}
.single-palvelu ul li::before {
	content: "✓";
	color: #76b729;
	font-weight: 700;
	position: absolute;
	left: -1.5em;
}

.single-palvelu .gform-theme--foundation .gfield textarea.large {
	min-block-size: 8rem;
}


.gform_required_legend {
	display: none !important;
}

/* GravityForms input fields */
.gform_wrapper input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.gform_wrapper textarea,
.gform_wrapper select {
	border-radius: 8px !important;
}

/* GravityForms submit button – matches solid green header CTA */
.gform_wrapper .gform_button,
.gform_wrapper input[type="submit"] {
	background: #76b729 !important;
	color: #ffffff !important;
	border: 2px solid #76b729 !important;
	box-shadow: 0 2px 6px rgba(118, 183, 41, 0.25) !important;
	border-radius: 999px !important;
	cursor: pointer !important;
	transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.gform_wrapper .gform_button:hover,
.gform_wrapper input[type="submit"]:hover {
	background: #5e9820 !important;
	border-color: #5e9820 !important;
	box-shadow: 0 4px 12px rgba(118, 183, 41, 0.35) !important;
}


/* ── 8. BUTTON BLOCK – hover states & transitions ───────────────────────────── */
/* Colors/border/weight are defined in theme.json (core/button + variations.outline). */

.wp-block-button .wp-block-button__link {
	box-shadow: 0 2px 6px rgba(118, 183, 41, 0.25);
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.08s ease;
	line-height: 1;
}

.wp-block-button .wp-block-button__link:hover,
.wp-block-button .wp-block-button__link:focus-visible {
	background: #5e9820;
	border-color: #5e9820;
	box-shadow: 0 4px 12px rgba(118, 183, 41, 0.35);
}

.wp-block-button .wp-block-button__link:active {
	transform: translateY(1px);
}

/* Outline variant – no shadow at rest, fills on hover */
.wp-block-button.is-style-outline .wp-block-button__link {
	box-shadow: none;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover,
.wp-block-button.is-style-outline .wp-block-button__link:focus-visible {
	background: #76b729;
	color: #ffffff;
	border-color: #76b729;
	box-shadow: 0 4px 12px rgba(118, 183, 41, 0.35);
}

.wp-block-button__ext-icon {
	display: inline-block;
	vertical-align: middle;
	margin-left: 0.35em;
	flex-shrink: 0;
	margin-bottom: 0.1em;
	width: 0.85em;
	height: 0.85em;
}
