/*
 * Ekopartnerit — brand tokens and project components.
 * Loaded after the Louhosteema bundle (no Sass build).
 *
 * Source of truth: Figma WEBLAYOUT_EkoPartnerit, page "Page 1 – auto layout"
 * (1920 px frames, 1600 px content). Measurements are the Figma auto-layout
 * values; fluid ones use clamp(min, value / 19.2 vw, value) so that a 1920 px
 * viewport renders exactly the Figma value and smaller screens scale down.
 */

/* --------------------------------------------------------------------------
 * Tokens
 * ----------------------------------------------------------------------- */
:root {
	/* Figma "2" — blue. 8.6:1 on white. */
	--louhos-primary: #004c92;
	--louhos-primary-rgb: 0, 76, 146;
	--louhos-primary-dark: #003a70;
	/* Figma "1" — green. 3.6:1 on white: large/bold text and fills only. */
	--louhos-accent: #699237;
	--louhos-link-color: #004c92;

	--louhos-headings: #121212;      /* Figma "Otsikot" */
	--louhos-body-color: #333;       /* Figma "Leipäteksti" */
	--louhos-grey: #f5f5f5;          /* Figma "Mild Grey" */
	--louhos-border: #c5c5c5;        /* Figma "Border #1" */
	--louhos-border-rgb: 197, 197, 197;
	--louhos-dark-1: #121212;
	--louhos-dark-1-rgb: 18, 18, 18;
	--louhos-dark-2: #004c92;
	--louhos-dark-2-rgb: 0, 76, 146;

	--louhos-font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--louhos-radius: 15px;
	--louhos-radius-lg: 25px;
	--louhos-header-height: 107px;

	--eko-font-display: urbana, "Arial Narrow", "Roboto Condensed", sans-serif;
	--eko-lh-display: 1.02;          /* Urbana "normal" line height in Figma */
	--eko-lh-body: 1.36;             /* Open Sans "normal" line height in Figma */
	--eko-green: #699237;
	--eko-green-rgb: 105, 146, 55;
	--eko-green-text: #52772a;       /* 5.2:1 on white — small green text (a11y) */
	--eko-green-on-blue: #a8d27a;    /* 5.0:1 on blue — small green text on blue (a11y) */
	--eko-placeholder: #6b6b6b;      /* Figma #919191 darkened to 4.9:1 (a11y) */
	--eko-icon-grey: #808080;        /* search icon, 3.6:1 on Mild Grey (a11y) */
	--eko-divider-on-blue: rgba(217, 217, 217, 0.3);
	/* Figma gradients, exact angles and stops */
	--eko-gradient-hero: linear-gradient(65.68deg, #004c92 0%, rgba(0, 76, 146, 0) 100%);
	--eko-gradient-subhero: linear-gradient(65.68deg, #004c92 0%, rgba(0, 76, 146, 0) 100%);
	--eko-gradient-green-tile: linear-gradient(157.85deg, #699237 0.38%, rgba(105, 146, 55, 0) 100%);
	--eko-gradient-blue-tile: linear-gradient(78.65deg, #004c92 0%, rgba(0, 76, 146, 0) 100%);
	--eko-gradient-blue-wide: linear-gradient(63.2deg, #004c92 0%, rgba(0, 76, 146, 0) 100%);
	--eko-shadow: 4px 4px 30px rgba(0, 0, 0, 0.1);
	--eko-container: min(1600px, 92vw);
	--eko-footer-gap: clamp(3rem, 5.208vw, 100px);

	--bs-success: var(--eko-green);
	--bs-success-rgb: var(--eko-green-rgb);
}

/* --------------------------------------------------------------------------
 * Base
 * ----------------------------------------------------------------------- */
body {
	background: #fff;
	font-size: 1.0625rem; /* 17px */
	line-height: var(--eko-lh-body);
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
	font-family: var(--eko-font-display);
	font-weight: 700;
	line-height: var(--eko-lh-display);
	color: var(--louhos-headings);
}

h1, .h1 { font-size: clamp(2.25rem, 3.125vw, 60px); }
h2, .h2 { font-size: clamp(1.875rem, 2.6vw, 50px); }
h3, .h3 { font-size: clamp(1.5rem, 1.823vw, 35px); }

a {
	text-underline-offset: 0.15em;
}

:focus-visible {
	outline: 3px solid var(--louhos-primary);
	outline-offset: 3px;
}

@media (min-width: 1200px) {
	.container {
		max-width: var(--eko-container);
	}
}

/* Figma icons (inc/hooks/ekopartnerit-icons.php) */
.eko-icon {
	flex-shrink: 0;
	overflow: visible;
	vertical-align: middle;
}

.eko-icon--down { transform: rotate(90deg); }
.eko-icon--back { transform: rotate(180deg); }

/* Bold text inside display headings is the green highlight (Figma). */
.eko-highlight strong {
	color: var(--eko-green);
	font-weight: inherit;
}

/* Body copy group inside pages */
.eko-prose {
	padding-block: clamp(3rem, 5.208vw, 100px) 0;
}

.eko-prose + .eko-prose {
	padding-top: 0;
}

.entry-content > .eko-prose {
	max-width: min(59.875rem, calc(100% - 2rem)); /* 958px, the list width in Figma */
}

.eko-prose h2 {
	margin-top: 2.5rem;
	margin-bottom: 1rem;
	font-size: clamp(1.75rem, 1.823vw, 35px);
}

.eko-prose h3 {
	margin-top: 2rem;
	font-size: clamp(1.375rem, 1.406vw, 27px);
}

.eko-prose > :first-child,
.eko-prose h2:first-child {
	margin-top: 0;
}

.eko-prose ul {
	padding-left: 1.25rem;
}

.eko-prose li::marker {
	color: var(--eko-green-text);
}

.eko-table {
	overflow-x: auto;
	margin-block: 1.5rem;
}

.eko-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: 1rem;
}

.eko-table th,
.eko-table td {
	padding: 0.65rem 1rem;
	border-bottom: 1px solid var(--louhos-border);
	text-align: left;
}

.eko-table th {
	background: var(--louhos-primary);
	color: #fff;
	font-weight: 700;
}

.eko-table td:last-child,
.eko-table th:last-child {
	text-align: right;
	white-space: nowrap;
}

.eko-table tbody tr:nth-child(even) {
	background: var(--louhos-grey);
}

@media (max-width: 575.98px) {
	.eko-table th,
	.eko-table td {
		padding: 0.5rem 0.625rem;
		font-size: 0.9375rem;
	}
}

.eko-meta {
	color: #595959;
	font-size: 0.9375rem;
	font-weight: 600;
}

/* --------------------------------------------------------------------------
 * Buttons — Figma "Frame 116": pill, padding 15/25, gap 10, Urbana Bold
 * ----------------------------------------------------------------------- */
.louhos-btn,
.eko-form__submit {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 15px 25px;
	border-radius: 500px;
	font-family: var(--eko-font-display);
	font-weight: 700;
	font-size: 19px;
	line-height: 1;
}

.louhos-btn .eko-icon {
	width: 14px;
	height: 14px;
	transition: transform 0.2s ease;
}

.louhos-btn:hover .eko-icon,
.louhos-btn:focus-visible .eko-icon {
	transform: translateX(3px);
}

.btn-primary {
	--bs-btn-color: #fff;
	--bs-btn-bg: var(--louhos-primary);
	--bs-btn-border-color: var(--louhos-primary);
	--bs-btn-hover-color: #fff;
	--bs-btn-hover-bg: var(--louhos-primary-dark);
	--bs-btn-hover-border-color: var(--louhos-primary-dark);
	--bs-btn-active-color: #fff;
	--bs-btn-active-bg: var(--louhos-primary-dark);
	--bs-btn-active-border-color: var(--louhos-primary-dark);
}

.btn-outline-primary {
	--bs-btn-color: var(--louhos-primary);
	--bs-btn-border-color: var(--louhos-primary);
	--bs-btn-hover-color: #fff;
	--bs-btn-hover-bg: var(--louhos-primary);
	--bs-btn-active-color: #fff;
	--bs-btn-active-bg: var(--louhos-primary);
}

.eko-btn-sm {
	min-height: 44px;
}

/* --------------------------------------------------------------------------
 * Header — Figma "Header": top bar 50 + 2 px green rule, main bar 107
 * ----------------------------------------------------------------------- */
.eko-topbar {
	background: var(--louhos-dark-1);
	border-bottom: 2px solid var(--eko-green);
	color: #fff;
	font-family: var(--eko-font-display);
	font-weight: 600;
	font-size: 19px;
	line-height: 1;
}

.eko-topbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 50px;
}

.eko-topbar ul {
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Separators: 2 px, 11.5 px tall, white at 40 %, 20 px gap on both sides */
.eko-topbar li {
	display: flex;
	align-items: center;
}

.eko-topbar li + li::before {
	content: "";
	width: 2px;
	height: 11.5px;
	margin-inline: 19px;
	background: rgba(255, 255, 255, 0.4);
}

.eko-topbar a {
	display: inline-flex;
	align-items: center;
	color: #fff;
	text-decoration: none;
}

.eko-topbar__contact a { gap: 7px; }
.eko-topbar__contact li + li a { gap: 9px; }

.eko-topbar a:hover,
.eko-topbar a:focus-visible {
	text-decoration: underline;
}

.eko-topbar .is-active a {
	color: var(--eko-green);
}

.eko-topbar .eko-icon {
	color: var(--eko-green);
}

.eko-topbar :focus-visible {
	outline-color: #fff;
}

.site-nav {
	background: #fff;
	min-height: var(--louhos-header-height);
	padding-block: 0;
}

.site-nav__inner {
	min-height: var(--louhos-header-height);
	padding-inline: calc(var(--bs-gutter-x) * 0.5);
}

.site-brand {
	margin: 0;
	padding: 0;
}

.site-brand__img {
	width: auto;
	height: clamp(48px, 3.646vw, 70px); /* 114 × 70 */
}

.site-brand__text {
	color: var(--louhos-primary);
}

.navbar-toggler {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 48px;
	min-height: 48px;
	padding: 0;
	color: var(--louhos-primary);
	border: 0;
}

.site-nav__list {
	gap: 0 25px;
}

.site-nav .nav-item {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}

.site-nav .nav-link,
.site-nav .nav-item.is-active .nav-link {
	padding: 0;
	background: none;
	color: var(--louhos-headings);
	font-family: var(--eko-font-display);
	font-weight: 600;
	font-size: 24px;
	line-height: 1;
}

.site-nav .nav-link:hover,
.site-nav .nav-link:focus-visible {
	color: var(--louhos-primary);
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.25em;
}

.site-nav .nav-item.is-active > .nav-link {
	color: var(--louhos-primary);
}

/* Dropdown toggle: Figma arrow-circle rotated 90°, 14 px, 7 px after the label */
.eko-submenu-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-left: 2px;
	padding: 5px;
	border: 0;
	border-radius: 50%;
	background: none;
	color: var(--eko-green);
	line-height: 0;
}

.eko-submenu-toggle .eko-icon {
	width: 14px;
	height: 14px;
	transition: transform 0.2s ease;
}

.eko-submenu-toggle[aria-expanded="true"] .eko-icon {
	transform: rotate(-90deg);
}

.eko-submenu {
	display: none;
	margin: 0;
	padding: 0.5rem 0;
	list-style: none;
}

.eko-submenu a {
	display: block;
	padding: 0.5rem 1rem;
	color: var(--louhos-headings);
	font-family: var(--eko-font-display);
	font-weight: 600;
	font-size: 20px;
	text-decoration: none;
}

.eko-submenu a:hover,
.eko-submenu a:focus-visible,
.eko-submenu .is-active a {
	color: var(--louhos-primary);
	text-decoration: underline;
}

.has-submenu.is-open > .eko-submenu {
	display: block;
}

/* Search — Figma "Haku": 266 × 44, Mild Grey, 1 px border, icon 14 px from the left */
.eko-search {
	position: relative;
	display: flex;
	align-items: center;
	width: min(100%, 266px);
}

.eko-search__input {
	width: 100%;
	height: 44px;
	padding: 0 1rem 0 45px;
	background: var(--louhos-grey);
	border: 1px solid var(--louhos-border);
	border-radius: 500px;
	color: var(--louhos-headings);
	font-weight: 600;
	font-size: 15px;
}

.eko-search__input::placeholder {
	color: var(--eko-placeholder);
	opacity: 1;
}

.eko-search__button {
	position: absolute;
	left: 4px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	color: var(--eko-icon-grey);
}

.eko-search__button .eko-icon {
	width: 18.82px;
	height: 18.82px;
}

.eko-search--page {
	width: min(100%, 36rem);
	margin-bottom: 2.5rem;
}

.eko-mobile-links,
.eko-mobile-contact {
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 1200px) {
	.site-nav__inner {
		flex-wrap: nowrap;
	}

	.site-nav .navbar-collapse {
		justify-content: space-between;
	}

	/* Figma: logo 114 px, then 309 px to the menu; the search sits at the right edge */
	.site-nav__list {
		margin-left: min(16.1vw, 309px);
		margin-right: auto;
	}

	.eko-search {
		flex: 0 0 266px;
	}

	.eko-submenu {
		position: absolute;
		top: 100%;
		left: -1rem;
		z-index: 1030;
		min-width: 13rem;
		background: #fff;
		border-radius: 0.75rem;
		box-shadow: var(--eko-shadow);
	}

	/* Desktop dropdown: opens on hover and with the toggle button (child.js). */
	.has-submenu:hover > .eko-submenu {
		display: block;
	}
}

@media (max-width: 1199.98px) {
	.site-nav .navbar-collapse {
		padding-block: 0.5rem 1.5rem;
	}

	.site-nav .nav-item {
		border-bottom: 1px solid var(--louhos-border);
	}

	.site-nav .nav-link,
	.site-nav .nav-item.is-active .nav-link {
		flex: 1;
		padding-block: 0.75rem;
		font-size: 22px;
	}

	.eko-submenu-toggle {
		width: 48px;
		height: 48px;
	}

	.eko-submenu {
		width: 100%;
		padding: 0 0 0.75rem;
	}

	.eko-mobile-links {
		display: flex;
		flex-wrap: wrap;
		gap: 0.25rem 1.25rem;
		margin-block: 1rem;
	}

	.eko-mobile-links a,
	.eko-mobile-contact a {
		display: inline-flex;
		align-items: center;
		gap: 0.5rem;
		min-height: 44px;
		color: var(--louhos-headings);
		font-family: var(--eko-font-display);
		font-weight: 600;
		font-size: 1.125rem;
	}

	.eko-search {
		width: 100%;
		margin-block: 0.5rem 1rem;
	}

	.eko-mobile-contact .eko-icon {
		color: var(--eko-green-text);
	}
}

/* --------------------------------------------------------------------------
 * Hero — Figma: 1600 px frame, radius 15, image + blue gradient.
 * Large (front page) 734 tall, content at 88 / 194. Compact 525 tall,
 * content bottom-aligned 78 from the bottom.
 * ----------------------------------------------------------------------- */
.eko-hero__frame {
	position: relative;
	display: flex;
	overflow: hidden;
	border-radius: var(--louhos-radius);
	background: var(--louhos-primary);
	isolation: isolate;
}

.eko-hero--large .eko-hero__frame {
	align-items: flex-start;
	min-height: clamp(30rem, 38.229vw, 734px);
}

.eko-hero--compact .eko-hero__frame {
	align-items: flex-end;
	min-height: clamp(16rem, 27.344vw, 525px);
}

.eko-hero__image {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.eko-hero__frame--gradient::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--eko-gradient-hero);
}

.eko-hero__frame--plain {
	background: linear-gradient(66deg, var(--louhos-primary) 0%, #1b6db8 100%);
}

.eko-hero__content {
	width: min(100%, 48rem);
	padding: clamp(2rem, 10.104vw, 194px) clamp(1.5rem, 4.583vw, 88px) clamp(2rem, 4.063vw, 78px);
	color: #fff;
}

.eko-hero--compact .eko-hero__content {
	padding-top: 2rem;
}

.eko-hero__title {
	margin: 0;
	color: #fff;
	font-size: clamp(2.25rem, 3.125vw, 60px);
}

.eko-hero__subtitle {
	margin: 7px 0 0;
	font-family: var(--eko-font-display);
	font-style: italic;
	font-weight: 500;
	font-size: clamp(1.5rem, 1.875vw, 36px);
	line-height: 1.03;
	opacity: 0.9;
}

.eko-hero__text {
	max-width: 462px; /* Figma 456; browser Open Sans measures ~1 % wider */
	margin-top: 18px;
	font-weight: 600;
	font-size: 17px;
}

.eko-hero--compact .eko-hero__text {
	margin-top: 7px;
}

.eko-hero__text p {
	margin-bottom: 20px;
}

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

.eko-hero .louhos-buttons {
	margin-top: 36px;
}

/* Figma: outline button — white 1 px border, icon before the label, 20 px label */
.eko-hero .btn-outline-primary {
	--bs-btn-color: #fff;
	--bs-btn-border-color: #fff;
	--bs-btn-border-width: 1px;
	--bs-btn-hover-color: var(--louhos-primary);
	--bs-btn-hover-bg: #fff;
	--bs-btn-hover-border-color: #fff;
	--bs-btn-active-color: var(--louhos-primary);
	--bs-btn-active-bg: #fff;
	font-size: 20px;
}

.eko-hero :focus-visible {
	outline-color: #fff;
}

/* Breadcrumbs — Figma: 17 px, first items bold, gap 10, green arrow-circle */
.eko-breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 10px;
	margin: 0 0 19px;
	padding: 0;
	list-style: none;
	font-size: 17px;
	font-weight: 600;
	line-height: var(--eko-lh-body);
}

.eko-breadcrumbs li {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.eko-breadcrumbs a {
	color: #fff;
	font-weight: 700;
	text-decoration: none;
}

.eko-breadcrumbs a:hover,
.eko-breadcrumbs a:focus-visible {
	text-decoration: underline;
}

.eko-breadcrumbs .eko-icon {
	width: 14px;
	height: 14px;
	color: var(--eko-green);
}

/* --------------------------------------------------------------------------
 * Section rhythm (Figma gaps between sections)
 * Front: hero → aloitus 125, aloitus → kortit 129, kortit → footer 97.
 * Referenssit: 107 / 107. Lajitteluohjeet: 100 / 100 / 100.
 * ----------------------------------------------------------------------- */
.eko-chat-intro.section { padding: clamp(3rem, 6.51vw, 125px) 0 0; }
.eko-services.section { padding: clamp(3rem, 5.208vw, 100px) 0 0; }
.eko-services--tiles.section { padding-top: clamp(3rem, 6.719vw, 129px); }
.eko-references.section { padding: clamp(3rem, 5.573vw, 107px) 0 0; }
.eko-contact.section { padding: clamp(3rem, 5.208vw, 100px) 0 0; }

body:has(.eko-services--tiles) { --eko-footer-gap: clamp(3rem, 5.052vw, 97px); }
body:has(.eko-references) { --eko-footer-gap: clamp(3rem, 5.573vw, 107px); }

/* --------------------------------------------------------------------------
 * Aloitus ja chat (front page) — Figma: 941 px wide, title 60, intro 20 (800 px)
 * Placeholder until the chat service is embedded.
 * ----------------------------------------------------------------------- */
.eko-chat-intro__head {
	max-width: 800px;
	margin-inline: auto;
	text-align: center;
}

.eko-chat-intro__title {
	margin: 0 0 20px;
	font-size: clamp(2.25rem, 3.125vw, 60px);
}

.eko-chat-intro__intro {
	margin: 0;
	font-size: clamp(1.0625rem, 1.042vw, 20px);
	color: var(--louhos-headings);
}

.eko-chat-intro__chat {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	max-width: 941px;
	min-height: clamp(12rem, 12.448vw, 239px); /* Figma chat area 941 × 239 */
	margin: clamp(2rem, 3.854vw, 74px) auto 0;
	padding-inline: clamp(0rem, 2.865vw, 55px) clamp(0rem, 3.75vw, 72px);
}

.eko-chat-intro__bubble {
	position: relative;
	max-width: 30rem;
	padding: 1.25rem 1.5rem;
	background: #ececec;
	border-radius: 1.75rem 1.75rem 1.75rem 0.25rem;
}

.eko-chat-intro__bubble p {
	margin: 0.5rem 0 0;
	font-size: 0.9375rem;
}

.eko-chat-intro__avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 50%;
	background: var(--louhos-primary);
	color: #fff;
}

.eko-chat-intro__options {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0.625rem;
	margin: 1.25rem 0 0;
	padding: 0;
	list-style: none;
}

.eko-chip {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0.5rem 1.125rem;
	border-radius: 500px;
	background: var(--eko-green-text);
	color: #fff;
	font-size: 0.9375rem;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.eko-chip:hover,
.eko-chip:focus-visible {
	background: var(--louhos-primary);
	color: #fff;
}

/* --------------------------------------------------------------------------
 * Services grid
 * ----------------------------------------------------------------------- */
.eko-services .louhos-services__title {
	margin-bottom: 1.5rem;
}

.eko-services--list .louhos-services__title {
	max-width: 958px;
	margin-inline: auto;
}

/* Tiles — Figma "Kortit": 3 × 526 + 2 × 792/797, gaps 11 (columns) and 10 (rows),
   rows 543 and 325, content at 47 / ~43, title 35 + 17 px icon (gap 15), text 16 */
.eko-tiles {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 10px 11px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.eko-tile {
	position: relative;
	grid-column: span 2;
	min-height: clamp(22rem, 28.281vw, 543px);
	overflow: hidden;
	border-radius: var(--louhos-radius);
	background: var(--louhos-primary);
	isolation: isolate;
}

/* When two tiles are left on the last row they share it (3 + 2 in Figma). */
.eko-tile:nth-child(3n + 1):nth-last-child(2),
.eko-tile:nth-child(3n + 1):nth-last-child(2) ~ .eko-tile {
	grid-column: span 3;
	min-height: clamp(16rem, 16.927vw, 325px);
}

.eko-tile:nth-child(3n + 1):last-child {
	grid-column: 1 / -1;
}

.eko-tile__image {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: scale 0.4s ease;
}

.eko-tile::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--eko-gradient-blue-tile);
}

.eko-tile:nth-child(3n + 1):nth-last-child(2)::before,
.eko-tile:nth-child(3n + 1):nth-last-child(2) ~ .eko-tile::before {
	background: var(--eko-gradient-blue-wide);
}

.eko-tile--green {
	background: var(--eko-green);
}

.eko-tile.eko-tile--green::before {
	background: var(--eko-gradient-green-tile);
}

.eko-tile:hover .eko-tile__image,
.eko-tile:focus-within .eko-tile__image {
	scale: 1.04;
}

.eko-tile__body {
	max-width: calc(380px + 2 * 43px);
	padding: clamp(1.5rem, 2.448vw, 47px) clamp(1.5rem, 2.24vw, 43px);
	color: #fff;
}

.eko-tile__title {
	display: flex;
	align-items: center;
	gap: 15px;
	margin: 0 0 10px;
	color: #fff;
	font-size: clamp(1.75rem, 1.823vw, 35px);
}

.eko-tile__title a {
	color: #fff;
	text-decoration: none;
}

.eko-tile__title .eko-icon {
	width: 17px;
	height: 17px;
	transition: transform 0.2s ease;
}

.eko-tile:hover .eko-tile__title .eko-icon,
.eko-tile:focus-within .eko-tile__title .eko-icon {
	transform: translateX(4px);
}

.eko-tile__title a:focus-visible {
	outline: none;
}

.eko-tile:focus-within {
	outline: 3px solid var(--louhos-primary);
	outline-offset: 3px;
}

.eko-tile__text {
	margin: 0;
	font-weight: 600;
	font-size: 16px;
}

@media (max-width: 991.98px) {
	.eko-tiles {
		grid-template-columns: 1fr 1fr;
	}

	.eko-tile,
	.eko-tile:nth-child(3n + 1):nth-last-child(2),
	.eko-tile:nth-child(3n + 1):nth-last-child(2) ~ .eko-tile {
		grid-column: span 1;
		min-height: 20rem;
	}

	.eko-tile:last-child:nth-child(odd) {
		grid-column: 1 / -1;
	}
}

@media (max-width: 575.98px) {
	.eko-tiles {
		grid-template-columns: 1fr;
	}

	.eko-tile,
	.eko-tile:nth-child(3n + 1):nth-last-child(2),
	.eko-tile:nth-child(3n + 1):nth-last-child(2) ~ .eko-tile {
		min-height: 13rem;
	}
}

/* Link list — Figma "Jätelajit": 958 px, rows 75 px with padding 22/25/18/30,
   gap 5, title 35 px, 28 px green arrow-circle */
.eko-linklist {
	display: grid;
	gap: 5px;
	max-width: 958px;
	margin: 0 auto;
	padding: 0;
	list-style: none;
}

.eko-linklist__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 75px;
	padding: 18px 25px 18px 30px;
	border-radius: var(--louhos-radius);
	background: var(--louhos-primary);
	color: #fff;
	font-family: var(--eko-font-display);
	font-weight: 700;
	font-size: clamp(1.5rem, 1.823vw, 35px);
	line-height: 1;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.eko-linklist__link:hover,
.eko-linklist__link:focus-visible {
	background: var(--louhos-primary-dark);
	color: #fff;
}

.eko-linklist__link .eko-icon {
	width: 28px;
	height: 28px;
	color: var(--eko-green);
	transition: transform 0.2s ease;
}

.eko-linklist__link:hover .eko-icon,
.eko-linklist__link:focus-visible .eko-icon {
	transform: translateX(4px);
}

/* Cards layout (service subpages without images) */
.eko-services--cards .louhos-card {
	border-radius: var(--louhos-radius);
	border-color: var(--louhos-border);
}

.eko-services--cards .louhos-card__title {
	font-size: clamp(1.5rem, 1.406vw, 27px);
}

.eko-services--cards .louhos-card__title a:hover,
.eko-services--cards .louhos-card__title a:focus-visible {
	color: var(--louhos-primary);
	text-decoration: underline;
}

.eko-services--cards .louhos-card__arrow {
	color: var(--louhos-primary);
	line-height: 0;
}

/* --------------------------------------------------------------------------
 * References — Figma "Referenssikortti": 318 px cards, 4 per row (1302 px),
 * row gap 87, image 211 tall r15, title 27 (+28), text 15 (+13), button (+33)
 * ----------------------------------------------------------------------- */
.eko-references__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
	gap: clamp(2.5rem, 4.531vw, 87px) 10px;
	max-width: 1302px;
	margin: 0 auto;
	padding: 0;
	list-style: none;
}

@media (min-width: 1200px) {
	.eko-references__grid {
		grid-template-columns: repeat(4, minmax(0, 318px));
		justify-content: space-between;
	}
}

.eko-ref-card {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.eko-ref-card__image {
	width: 100%;
	height: auto;
	aspect-ratio: 317 / 211;
	object-fit: cover;
	border-radius: var(--louhos-radius);
}

.eko-ref-card__title {
	margin: 28px 0 13px;
	font-size: clamp(1.375rem, 1.406vw, 27px);
	line-height: 1;
}

.eko-ref-card__text {
	margin-bottom: 33px;
	font-size: 15px;
	color: var(--louhos-headings);
}

.eko-ref-card .btn {
	align-self: flex-start;
	margin-top: auto;
}

/* --------------------------------------------------------------------------
 * Contact card — Figma "Yhteydenottokortti": 1211 px, r25, 1 px border, shadow.
 * Header: 73 top, title 60, subtitle 27 (+12), 50 bottom, divider.
 * Body: 48 top, 114 left, person column 244, gap 93, form 646, 79 bottom.
 * ----------------------------------------------------------------------- */
.eko-contact__card {
	max-width: 1211px;
	margin-inline: auto;
	background: #fff;
	border: 1px solid var(--louhos-border);
	border-radius: var(--louhos-radius-lg);
	box-shadow: var(--eko-shadow);
}

.eko-contact__header {
	padding: clamp(2rem, 3.802vw, 73px) 1.5rem clamp(1.75rem, 2.604vw, 50px);
	border-bottom: 1px solid var(--louhos-border);
	text-align: center;
}

.eko-contact__title {
	margin: 0;
	font-size: clamp(2.25rem, 3.125vw, 60px);
}

.eko-contact__subtitle {
	margin: 12px 0 0;
	font-family: var(--eko-font-display);
	font-style: italic;
	font-weight: 600;
	font-size: clamp(1.25rem, 1.406vw, 27px);
	line-height: 1.04;
	color: var(--louhos-headings);
}

.eko-contact__body {
	display: grid;
	grid-template-columns: minmax(0, 244px) minmax(0, 646px);
	gap: 2.5rem clamp(2rem, 4.844vw, 93px);
	padding: clamp(2rem, 2.5vw, 48px) clamp(1.25rem, 5.938vw, 114px) clamp(2rem, 4.115vw, 79px);
}

.eko-contact__person {
	text-align: center;
}

.eko-contact__photo {
	width: 179px;
	height: 179px;
	margin-bottom: 22px;
	border: 1px solid var(--louhos-border);
	border-radius: 50%;
	object-fit: cover;
}

.eko-contact__name {
	margin: 0 0 9px;
	font-family: var(--eko-font-display);
	font-weight: 600;
	font-size: 24px;
	line-height: 1;
	color: var(--louhos-body-color);
}

.eko-contact__links {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 17px;
	color: var(--louhos-body-color);
}

.eko-contact__links li + li {
	margin-top: 1px;
}

.eko-contact__links a,
.eko-footer__links a {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	color: inherit;
	text-decoration: none;
	overflow-wrap: anywhere;
}

.eko-contact__links a:hover,
.eko-contact__links a:focus-visible {
	color: var(--louhos-primary);
	text-decoration: underline;
}

.eko-contact__links .eko-icon {
	color: var(--eko-green);
}

@media (max-width: 767.98px) {
	.eko-contact__body {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Forms — Figma: fields 318 px, gap 10 / 19, label 17 semibold (+6), input 54 r7 */
.eko-form__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 19px 10px;
}

.eko-form__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
}

.eko-form__field--wide {
	grid-column: 1 / -1;
}

.eko-form__label {
	color: var(--louhos-headings);
	font-weight: 600;
	font-size: 17px;
	line-height: var(--eko-lh-body);
}

.eko-req {
	color: #c00;
}

.eko-form .wpcf7-form-control-wrap {
	display: block;
}

.eko-form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.eko-form textarea {
	width: 100%;
	height: 54px;
	padding: 0.75rem 1rem;
	background: var(--louhos-grey);
	border: 1px solid var(--louhos-border);
	border-radius: 7px;
	color: var(--louhos-headings);
	font-size: 1rem;
}

.eko-form textarea {
	height: 185px;
	resize: vertical;
}

.eko-form input::placeholder,
.eko-form textarea::placeholder {
	color: var(--eko-placeholder);
	opacity: 1;
}

.eko-form input[type="file"] {
	width: 100%;
	padding: 0.75rem;
	background: var(--louhos-grey);
	border: 1px dashed var(--louhos-border);
	border-radius: 7px;
}

.eko-form :is(input, textarea):focus-visible {
	outline: 3px solid var(--louhos-primary);
	outline-offset: 1px;
	border-color: var(--louhos-primary);
}

.eko-form__note {
	margin: 13px 0 0;
	font-size: 0.875rem;
}

.eko-form__actions {
	position: relative;
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-top: 13px;
}

/* Figma "Lähetä": green pill, white 19 px bold (large text: 3.6:1 passes AA) */
.eko-form__submit {
	border: 0;
	background: var(--eko-green);
	color: #fff;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

/* Figma arrow-circle as a mask (CF7 form templates cannot hold inline SVG) */
.eko-form__submit-icon {
	width: 15.7px;
	height: 15.7px;
	margin: -0.85px;
	background: currentColor;
	-webkit-mask: url("../icons/arrow-circle-full.svg") center / contain no-repeat;
	mask: url("../icons/arrow-circle-full.svg") center / contain no-repeat;
}

.eko-form__submit:hover,
.eko-form__submit:focus-visible {
	background: var(--louhos-primary);
}

.eko-form .wpcf7-not-valid {
	border-color: #c00 !important;
}

.eko-form .wpcf7-not-valid-tip {
	margin-top: 0.25rem;
	color: #b00;
	font-size: 0.875rem;
	font-weight: 600;
}

.eko-form .wpcf7-response-output {
	margin: 1.25rem 0 0 !important;
	padding: 0.75rem 1rem !important;
	border-radius: 7px;
}

@media (max-width: 575.98px) {
	.eko-form__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* --------------------------------------------------------------------------
 * News list, single, pagination
 * ----------------------------------------------------------------------- */
.eko-news {
	display: grid;
	max-width: 958px;
	margin: 0 auto;
	padding: 0;
	list-style: none;
}

.eko-news__item {
	padding-block: 1.5rem;
	border-bottom: 1px solid var(--louhos-border);
}

.eko-news__title {
	margin: 0.25rem 0 0.5rem;
	font-size: clamp(1.5rem, 1.406vw, 27px);
}

.eko-news__title a {
	color: var(--louhos-headings);
	text-decoration: none;
}

.eko-news__title a:hover,
.eko-news__title a:focus-visible {
	color: var(--louhos-primary);
	text-decoration: underline;
}

.entry-content--single {
	max-width: 958px;
}

.eko-back {
	margin-top: 2.5rem;
	font-weight: 700;
}

.eko-back a {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.eko-pagination ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
	margin: 2.5rem 0 0;
	padding: 0;
	list-style: none;
}

.eko-pagination a,
.eko-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	border-radius: 500px;
	font-weight: 700;
	text-decoration: none;
}

.eko-pagination a {
	border: 1px solid var(--louhos-border);
}

.eko-pagination [aria-current="page"] {
	background: var(--louhos-primary);
	color: #fff;
}

/* --------------------------------------------------------------------------
 * Footer — Figma "Footer": 766 tall, content 1300 px (x 310–1610).
 * Top row 64 / logo 120 × 77 / tagline 22 italic lh 25 (575 px, right).
 * Divider at 172; columns 173–700 with 1 px dividers at 0 / 354 / 954 px;
 * headings 25 at +53, columns start 26 / 31 / 29 px after their divider.
 * Bottom rule at 700, 14 px text at +22, 24 below.
 * ----------------------------------------------------------------------- */
.eko-footer {
	margin-top: var(--eko-footer-gap);
	padding: 0;
	border: 0;
	background: var(--louhos-primary);
	color: #fff;
	font-size: 17px;
}

.eko-footer a {
	color: #fff;
}

.eko-footer :focus-visible {
	outline-color: #fff;
}

.eko-footer__top {
	border-bottom: 1px solid var(--eko-divider-on-blue);
}

.eko-footer__top-inner,
.eko-footer__columns,
.eko-footer__bottom-inner {
	max-width: 1300px;
	margin-inline: auto;
}

.eko-footer__top-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1.5rem 3rem;
	padding-block: clamp(2.5rem, 3.333vw, 64px) clamp(1.5rem, 1.615vw, 31px);
}

.eko-footer__brand img {
	width: 120px;
	height: 77px;
	object-fit: contain;
}

.eko-footer__tagline {
	max-width: 575px;
	margin: 1px 0 0;
	font-family: var(--eko-font-display);
	font-style: italic;
	font-weight: 500;
	font-size: clamp(1.125rem, 1.146vw, 22px);
	line-height: 25px;
	text-align: right;
}

.eko-footer__columns {
	display: grid;
	grid-template-columns: 354fr 600fr 346fr;
	min-height: clamp(20rem, 27.448vw, 527px);
}

.eko-footer__col {
	padding: clamp(2rem, 2.76vw, 53px) 1rem 3rem clamp(1rem, 1.354vw, 26px);
	border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.eko-footer__col:nth-child(2) { padding-left: clamp(1rem, 1.615vw, 31px); }
.eko-footer__col:nth-child(3) { padding-left: clamp(1rem, 1.51vw, 29px); }

.eko-footer__col p {
	margin-bottom: 16px;
	line-height: var(--eko-lh-body);
}

.eko-footer__heading {
	margin-bottom: 20px;
	color: #fff;
	font-weight: 600;
	font-size: 25px;
	line-height: 1;
}

.eko-footer__subheading {
	margin: 0 0 8px;
	color: #fff;
	font-family: var(--louhos-font-family);
	font-style: italic;
	font-weight: 600;
	font-size: 18px;
	line-height: var(--eko-lh-body);
}

.eko-footer__item + .eko-footer__item {
	margin-top: 44px;
}

.eko-footer__col--wide .eko-footer__item + .eko-footer__item {
	margin-top: 49px;
}

.eko-footer__col--wide .eko-footer__item p {
	margin-bottom: 20px;
}

.eko-footer__col--wide .eko-footer__subheading {
	margin-bottom: 9px;
}

.eko-footer__links {
	margin: 0;
	padding: 0;
	list-style: none;
	line-height: var(--eko-lh-body);
}

.eko-footer__links a {
	gap: 7px;
}

.eko-footer__links li + li a,
.eko-contact__links li + li a {
	gap: 6.5px;
}

.eko-footer__links a:hover,
.eko-footer__links a:focus-visible {
	text-decoration: underline;
}

.eko-footer__links .eko-icon {
	color: var(--eko-green-on-blue);
}

.eko-footer__links .eko-icon--phone {
	margin-inline: 2px 0;
}

.eko-footer__bottom {
	border-top: 1px solid var(--eko-divider-on-blue);
	font-size: 14px;
}

.eko-footer__bottom-inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.5rem 2rem;
	padding-block: 22px 24px;
}

.eko-footer__bottom p {
	margin: 0;
	line-height: var(--eko-lh-body);
}

/* Figma links are #699237 on blue (2.4:1) — lighter green for AA */
.eko-footer__bottom a {
	color: var(--eko-green-on-blue);
	font-weight: 700;
	text-decoration: none;
}

.eko-footer__bottom a:hover,
.eko-footer__bottom a:focus-visible {
	text-decoration: underline;
}

@media (max-width: 991.98px) {
	.eko-footer__columns {
		grid-template-columns: 1fr 1fr;
		min-height: 0;
	}

	.eko-footer__col,
	.eko-footer__col:nth-child(2),
	.eko-footer__col:nth-child(3) {
		padding-left: 1.25rem;
	}

	.eko-footer__col--wide {
		grid-column: 1 / -1;
		border-top: 1px solid rgba(255, 255, 255, 0.3);
	}
}

@media (max-width: 575.98px) {
	.eko-footer__columns {
		grid-template-columns: 1fr;
	}

	.eko-footer__col,
	.eko-footer__col:nth-child(2),
	.eko-footer__col:nth-child(3) {
		border-left: 0;
		border-top: 1px solid rgba(255, 255, 255, 0.3);
		padding-inline: 0;
	}

	.eko-footer__tagline {
		text-align: left;
	}
}

/* Floating chat tab — placeholder for the chat service (Figma: dark pill, green circle) */
.eko-chat-tab {
	position: fixed;
	right: 1rem;
	bottom: 1.5rem;
	z-index: 1040;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.3rem 0.3rem 0.3rem 0.75rem;
	border: 2px solid #fff;
	border-radius: 500px;
	background: #1d1d1d;
	color: #fff;
	box-shadow: var(--eko-shadow);
	text-decoration: none;
}

.eko-chat-tab__arrow {
	width: 14px;
	height: 14px;
}

.eko-chat-tab__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 50%;
	background: var(--eko-green);
	color: #fff;
}

.eko-chat-tab:hover .eko-chat-tab__icon,
.eko-chat-tab:focus-visible .eko-chat-tab__icon {
	background: var(--louhos-primary);
}

@media (min-width: 1200px) {
	.eko-chat-tab {
		top: 50%;
		bottom: auto;
		right: 1.5rem;
		translate: 0 -50%;
	}
}

@media print {
	.eko-chat-tab,
	.eko-topbar,
	.eko-search {
		display: none !important;
	}
}
