/*
Theme Name: Hormiproffa
Theme URI: https://www.hormiproffa.fi/
Description: Kevyt teema Hormiproffan sivustolle. Sivujen sisältö muokataan Elementorilla, alatunniste on Elementor-malli "Alatunniste". Ylätunnisteen logo ja valikko muokataan kohdasta Ulkoasu > Mukauta ja Ulkoasu > Valikot.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: hormiproffa
License: GPLv2 or later
*/

:root {
	--hp-orange: #ff8c62;
	--hp-orange-dark: #c74300;
	--hp-text: #696969;
	--hp-header-bg: #f2f2f2;
	--hp-footer-bg: #6b6b6b;
	--hp-width: 980px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
	margin: 0;
	font-family: "Nunito Sans", "Avenir Next", Avenir, Helvetica, Arial, sans-serif;
	font-weight: 300;
	font-size: 17px;
	line-height: 1.5;
	color: var(--hp-text);
	background: #fff;
}

img { max-width: 100%; height: auto; }
a { color: var(--hp-orange-dark); }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
}
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 1000; width: auto; height: auto; clip: auto; background: #fff; padding: 8px 12px; }

/* ---------- Ylätunniste ---------- */
.hp-header { background: var(--hp-header-bg); }
.hp-header__inner {
	max-width: var(--hp-width);
	margin: 0 auto;
	padding: 14px 10px 0;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
}
.hp-header__logo img, .hp-header__logo .custom-logo { width: 160px; height: auto; display: block; }
.hp-header__logo a { text-decoration: none; }
.hp-header__site-title { font-size: 28px; font-weight: 800; color: var(--hp-orange); }
.hp-header__tools { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.hp-lang { display: flex; gap: 10px; }
.hp-lang img { width: 40px; height: 27px; display: block; }
.hp-social { display: flex; gap: 8px; }
.hp-social a { color: #8a8a8a; display: inline-flex; }
.hp-social a:hover { color: var(--hp-orange); }
.hp-social svg { width: 20px; height: 20px; fill: currentColor; }

.hp-nav { width: 100%; padding: 14px 0 22px; }
.hp-nav ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 0; }
.hp-nav li { position: relative; }
.hp-nav a {
	font-family: "Open Sans", Arial, sans-serif;
	font-weight: 400;
	font-size: 13px;
	color: #000;
	text-decoration: none;
	padding: 6px 10px;
	display: block;
}
.hp-nav a:hover, .hp-nav .current-menu-item > a, .hp-nav .current_page_item > a { color: var(--hp-orange); }
.hp-nav ul ul { display: none; position: absolute; top: 100%; left: 0; background: #fff; min-width: 180px; flex-direction: column; z-index: 50; box-shadow: 0 4px 10px rgba(0,0,0,.08); }
.hp-nav li:hover > ul, .hp-nav li:focus-within > ul { display: flex; }

.hp-nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 10px; margin-top: 18px; }
.hp-nav-toggle span { display: block; width: 26px; height: 3px; background: #333; margin: 5px 0; }

@media (max-width: 860px) {
	.hp-header__inner { align-items: center; padding-bottom: 10px; }
	.hp-header__tools { flex-direction: row; align-items: center; }
	.hp-nav-toggle { display: block; margin-top: 0; }
	.hp-nav { display: none; padding: 6px 0 10px; }
	.hp-nav.is-open { display: block; }
	.hp-nav ul { flex-direction: column; }
	.hp-nav a { font-size: 16px; padding: 10px 4px; border-bottom: 1px solid #e2e2e2; }
	.hp-nav ul ul { position: static; display: flex; box-shadow: none; background: transparent; padding-left: 16px; }
}

/* ---------- Sisältö ---------- */
.hp-main { min-height: 40vh; }
.hp-content { max-width: var(--hp-width); margin: 0 auto; padding: 40px 20px 60px; }
.hp-content h1, .hp-content h2, .hp-content h3 { color: #000; font-weight: 800; line-height: 1.2; }
.hp-post-meta { font-size: 14px; color: #999; margin-bottom: 24px; }
.hp-post-thumb img { width: 100%; height: auto; margin-bottom: 24px; }
.hp-content figcaption { font-size: 14px; color: #999; text-align: center; }

.hp-post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 32px; margin: 0; padding: 0; list-style: none; }
.hp-post-card { border: 1px solid #e6e6e6; background: #fff; display: flex; flex-direction: column; }
.hp-post-card a { text-decoration: none; color: inherit; }
.hp-post-card__img { aspect-ratio: 4 / 3; overflow: hidden; background: #f2f2f2; }
.hp-post-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hp-post-card__body { padding: 16px 18px 20px; }
.hp-post-card__title { font-size: 19px; font-weight: 800; color: #000; margin: 0 0 8px; line-height: 1.3; }
.hp-post-card__date { font-size: 13px; color: #999; }

/* Lomake */
.hp-form { max-width: 620px; }
.hp-form__row { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: start; margin-bottom: 12px; }
.hp-form label { color: #000; font-size: 15px; padding-top: 7px; }
.hp-form input[type=text], .hp-form input[type=email], .hp-form input[type=tel], .hp-form textarea {
	width: 100%; border: 1px solid #c9c9c9; padding: 8px 10px; font: inherit; font-size: 15px; background: #fff; color: #000; border-radius: 0;
}
.hp-form textarea { min-height: 120px; resize: vertical; }
.hp-form__actions { display: flex; justify-content: flex-end; align-items: center; gap: 16px; }
.hp-form button {
	background: var(--hp-orange); color: #fff; border: 0; border-radius: 50px; padding: 10px 28px; font: inherit; font-size: 15px; cursor: pointer;
}
.hp-form button:hover { background: var(--hp-orange-dark); }
.hp-form__hp { position: absolute; left: -9999px; }
.hp-form__notice { padding: 10px 14px; margin-bottom: 16px; }
.hp-form__notice--ok { background: #eef8ee; color: #245c24; }
.hp-form__notice--err { background: #fdeeee; color: #8a1f1f; }
@media (max-width: 600px) { .hp-form__row { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Alatunniste ---------- */
.hp-footer-fallback { background: var(--hp-footer-bg); color: #fff; }
.hp-footer-fallback__inner { max-width: var(--hp-width); margin: 0 auto; padding: 30px 20px; font-size: 15px; }
.hp-footer-fallback a { color: #fff; }

.hp-totop {
	position: fixed; right: 22px; bottom: 22px; width: 42px; height: 42px; border-radius: 50%;
	background: rgba(255,255,255,.9); color: var(--hp-orange); display: flex; align-items: center; justify-content: center;
	box-shadow: 0 2px 8px rgba(0,0,0,.15); opacity: 0; pointer-events: none; transition: opacity .2s; text-decoration: none; z-index: 40;
}
.hp-totop.is-visible { opacity: 1; pointer-events: auto; }
.hp-totop svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 3; }

/* Valikko yhdelle riville ja mustaksi (Elementorin linkkiväri ei saa yliajaa) */
.hp-header .hp-nav a { color: #000; padding: 6px 7px; }
.hp-header .hp-nav a:hover, .hp-header .hp-nav .current-menu-item > a { color: var(--hp-orange); }
@media (min-width: 861px) { .hp-nav ul { flex-wrap: nowrap; } }
