@charset "utf-8";

/* ===== Perusasetukset ===== */
* { box-sizing: border-box; }

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

body {
	margin: 0;
	padding: 0;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 13px;
	line-height: 1.5;
	color: #000;
	background-color: #000;
	background-image: url(images/body_bg.jpg);
	background-repeat: repeat-x;
}

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

a { color: #000; }
a:hover { color: #666; }

/* ===== Kehys ===== */
.bg {
	width: 100%;
	background-image: url(images/bg_fade.png);
	background-repeat: no-repeat;
	background-position: top center;
}

.frame {
	width: 100%;
	max-width: 990px;
	margin: 0 auto;
	background-color: #fff;
}

/* ===== Header / logo ===== */
.header {
	background-color: #161616;
	background-image: url(images/body_bg.jpg);
	background-repeat: no-repeat;
	background-position: center top;
	background-size: cover;
	padding: 14px 16px;
}
.header .logo img { display: block; max-width: 100%; height: auto; }

/* ===== Banneri + valikko ===== */
.bannerarea {
	position: relative;
	background-image: url(images/banner_bg.jpg);
	background-repeat: no-repeat;
	background-position: center top;
	background-size: cover;
	background-color: #2b2b2b;
}

/* Banneripinnan korkeus mittasuhteilla (alkuperäinen 990x416) */
.banner-image {
	width: 100%;
	aspect-ratio: 990 / 416;
}

/* Valikko */
.menu { background-color: #3a2c12; }
.menu ul {
	list-style: none;
	margin: 0 auto;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	max-width: 990px;
}
.menu li { margin: 0; }
.menu li a {
	display: block;
	padding: 14px 18px;
	color: #EBEA46;
	font-size: 18px;
	font-weight: bold;
	text-decoration: none;
	white-space: nowrap;
}
.menu li a:hover,
.menu li a.currentpage {
	color: #fff;
	background-color: #544119;
	text-decoration: none;
}

/* ===== Sisältö ===== */
.contentarea { width: 100%; }

/* Välipalkki (etusivu / yhteystiedot ylälaatikko) */
.valipalkki {
	background-image: url(images/valipalkki.jpg);
	background-repeat: no-repeat;
	background-size: cover;
	background-position: center;
	background-color: #3a2c12;
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	padding: 24px;
}
.valipalkkiTeksti {
	flex: 1 1 320px;
	color: #fff;
	font-size: 13px;
}
.valipalkkiTeksti h1 { color: #fff; }
.valipalkkiTeksti a { color: #fff; text-decoration: underline; }
.valipalkkiTeksti a:hover { color: #EBEA46; }
.valipalkkiKuvat {
	flex: 1 1 320px;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-content: flex-start;
}
.valipalkkiKuvat a { flex: 0 0 auto; }

/* Infoalue */
.infoarea {
	background-color: #fff;
	display: flex;
	flex-wrap: wrap;
	gap: 30px;
	padding: 30px 24px;
	font-size: 13px;
	color: #000;
}
.infoarea h1 { font-size: 22px; color: #000; margin-top: 0; }
.infoarea h2 { font-size: 18px; color: #000; }

.infoLeft  { flex: 1 1 300px; }
.infoRight { flex: 1 1 320px; }
.infoLeft2 { flex: 2 1 420px; }
.infoRight2{ flex: 1 1 280px; }
.infoLeft3 { flex: 1 1 100%; }
.infoRightUp, .infoRightDown { width: 100%; margin-bottom: 20px; }

.infoarea table { width: 100% !important; border-collapse: collapse; }
.infoarea td { vertical-align: top; }

/* ===== Galleria ===== */
ul.picturelist {
	list-style: none;
	margin: 16px 0 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 10px;
	width: 100%;
}
ul.picturelist li.thumb { margin: 0; padding: 0; }
ul.picturelist li.thumb a {
	display: block;
	overflow: hidden;
	border: 1px solid #ddd;
	background: #f5f5f5;
}
ul.picturelist li.thumb img {
	display: block;
	width: 100%;
	height: 150px;
	object-fit: cover;
	transition: transform .2s ease;
}
ul.picturelist li.thumb a:hover img { transform: scale(1.05); }

/* ===== Footer ===== */
.footer { width: 100%; }
.footerInfo {
	background-color: #544119;
	color: #ccc;
	text-align: center;
	font-size: 12px;
	padding: 24px 16px;
}
.footerInfo a { color: #ccc; text-decoration: underline; }
.footerInfo a:hover { color: #fff; }
.footerBottom { display: none; }

/* ===== Lightbox ===== */
.lb-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.9);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 1000;
}
.lb-overlay.open { display: flex; }
.lb-overlay img {
	max-width: 92vw;
	max-height: 88vh;
	box-shadow: 0 0 30px rgba(0,0,0,.6);
}
.lb-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0,0,0,.4);
	color: #fff;
	border: none;
	font-size: 40px;
	line-height: 1;
	padding: 12px 18px;
	cursor: pointer;
	user-select: none;
}
.lb-btn:hover { background: rgba(0,0,0,.7); }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb-close {
	position: absolute;
	top: 12px;
	right: 16px;
	background: none;
	border: none;
	color: #fff;
	font-size: 40px;
	line-height: 1;
	cursor: pointer;
}

/* ===== Mobiili ===== */
@media (max-width: 600px) {
	.menu li a { font-size: 16px; padding: 12px 12px; }
	.infoarea { padding: 20px 16px; gap: 20px; }
	.valipalkki { padding: 16px; }
	ul.picturelist { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
	ul.picturelist li.thumb img { height: 120px; }
	.lb-btn { font-size: 30px; padding: 8px 12px; }
	/* Monipalstaiset taulukot (esim. runot) pinoutuvat mobiilissa */
	.infoarea table, .infoarea tbody, .infoarea tr, .infoarea td {
		display: block;
		width: 100% !important;
	}
	.infoarea td { padding-right: 0 !important; }
}
