/*
Theme Name: Együtt Mucsiért
Description: Az Együtt Mucsiért Alapítvány honlapja (magyar + német, Polylang). A régi honlapom.hu-s oldal elrendezése saját CSS-sel újraírva — a builder stíluslapjaiból semmi nincs átvéve, csak a mért értékek (színek, betűk, méretek).
Version: 1.0.1
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: mucsi
*/

/* ---- design tokens (measured from the old skin, design/1/colors/28) ---- */
:root {
	--mu-teal: #69b6b3;
	--mu-ink: #404040;
	--mu-bar: #464040;
	--mu-grey: #808080;
	--mu-line: #cbcbcb;
	--mu-light: #e8e8e8;
	--mu-font: Verdana, Arial, "Trebuchet MS", sans-serif;
	--mu-width: 980px;
}

/* ---- base ---- */
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font: 11px/1.45 var(--mu-font);
	color: var(--mu-ink);
	/* thin dark strip + light teal band behind the header, like the old body_bg */
	background:
		linear-gradient(var(--mu-ink), var(--mu-ink)) 0 0 / 100% 6px no-repeat,
		linear-gradient(#ecf7f6, #b4dcd9) 0 6px / 100% 182px no-repeat,
		linear-gradient(#8fc9c5, #8fc9c5) 0 188px / 100% 1px no-repeat,
		#fff;
}
a { color: var(--mu-teal); text-decoration: none; }
a:hover, a:focus { color: var(--mu-ink); }
img { max-width: 100%; }
img:not([height]) { height: auto; }

#page { width: var(--mu-width); max-width: 100%; margin: 0 auto; padding-top: 6px; }

/* ---- header ---- */
#masthead {
	position: relative;
	height: 259px;
	background-repeat: no-repeat;
	background-size: cover;
	background-position: center top;
}
.lang-switch {
	position: absolute; top: 0; left: 0;
	margin: 0; padding: 4px 10px; list-style: none;
	background: rgba(0, 0, 0, .3);
	font-size: 12px; line-height: 1.4;
}
.lang-switch li { display: inline; }
.lang-switch li + li::before { content: "|"; color: #fff; margin: 0 6px; }
.lang-switch a { color: #ddd; }
.lang-switch .active a { color: #fff; font-weight: bold; }
.lang-switch a:hover { color: #fff; }
.site-brand {
	position: absolute; top: 0; right: 0; bottom: 0;
	width: 340px; box-sizing: border-box; padding: 10px;
	background: linear-gradient(rgba(64, 64, 64, .45) 0, rgba(64, 64, 64, .45) 36px, rgba(64, 64, 64, .3) 36px);
}
.site-title { margin: 0; font-size: 16px; font-weight: bold; line-height: 1.3; }
.site-title a { color: #fff; }
.site-slogan { position: absolute; left: 10px; bottom: 12px; margin: 0; color: #fff; font-size: 11px; font-weight: bold; }

/* ---- top menu ---- */
#topnav {
	margin-top: 11px;
	background: linear-gradient(#5d5d5d, #383838);
	border-bottom: 5px solid var(--mu-teal);
}
.menu-top { display: flex; flex-wrap: wrap; margin: 0; padding: 0 0 0 0; list-style: none; }
.menu-top li { margin: 0; }
.menu-top a { display: block; padding: 11px 22px 12px; color: #fff; font-size: 14px; font-weight: bold; }
.menu-top a:hover { color: var(--mu-teal); }
.menu-top .current-menu-item > a,
.menu-top .current-menu-ancestor > a,
.menu-top .current-menu-parent > a,
.menu-top .current-post-ancestor > a,
.menu-top .current-category-ancestor > a {
	color: var(--mu-teal);
	background: linear-gradient(#4a4a4a, #383838);
	box-shadow: 0 5px 0 #383838;      /* the active tab runs through the teal line */
}
.menu-toggle, .menu-mobile { display: none; }

/* ---- three columns: left 200 · content 540 · right 200 ---- */
#columns {
	display: grid;
	grid-template-columns: 200px 540px 200px;
	grid-template-areas: "left content right";
	column-gap: 20px;
	padding-top: 39px;
	align-items: start;
}
#content { grid-area: content; font-size: 13px; min-width: 0; }
#left { grid-area: left; }
#right { grid-area: right; }

/* side menu */
.menu-side { margin: 0 0 20px; padding: 0; list-style: none; }
.menu-side a {
	display: block; padding: 10px 0;
	color: var(--mu-ink); font-size: 13px; font-weight: bold;
	border-bottom: 2px solid var(--mu-ink);
}
.menu-side a:hover,
.menu-side .current-menu-item > a,
.menu-side .current-page-ancestor > a,
.menu-side .current-page-parent > a { color: var(--mu-teal); }

/* sidebar boxes (widgets) */
.box { margin: 0 0 20px; font-size: 11px; overflow-wrap: anywhere; }
.box h3 {
	margin: 0 0 6px; padding: 7px 10px;
	background: var(--mu-teal); color: #fff;
	font-size: 12px; border-bottom: 2px solid var(--mu-bar);
}
.box p { margin: 10px 0; }

/* ---- content ---- */
.section-title {
	margin: 0 0 16px; padding: 4px 10px 5px;
	background: var(--mu-bar); color: #fff;
	font-size: 18px; font-weight: normal; line-height: 1.3;
	border-bottom: 2px solid var(--mu-teal);
}
.section-title a { color: #fff; }
.section-title a:hover { color: var(--mu-teal); }
#content h3 { font-size: 16px; }
.entry-date { margin: 0 0 8px; font-size: 10px; }
.entry-content { overflow-wrap: break-word; }
.entry-content::after { content: ""; display: block; clear: both; }
.entry-content p { margin: 0 0 1em; }
.lead { font-weight: bold; }
.insert-pic-center { display: block; margin: 0 auto; }
.insert-pic-left { float: left; margin: 0 12px 8px 0; }
.insert-pic-right { float: right; margin: 0 0 8px 12px; }
.entry-content table { max-width: 100%; }
.entry-back { margin: 16px 0 0; }
.entry-back a::before { content: "◂ "; }

/* framed thumbnails: the article's main picture, list pictures */
.mu-mainpic { float: left; margin: 0 14px 8px 0; }
.mu-mainpic .piccont,
.row-pic,
.row .piccont {
	display: block; width: 100px; height: 100px; padding: 4px;
	background: var(--mu-ink); line-height: 0;
}
.mu-mainpic img,
.row-pic img,
.row .piccont img { width: 100px; height: 100px; object-fit: contain; }

/* post lists (archives, home teaser) + the old builder lists on parent pages */
.row {
	margin: 0 0 18px; padding: 0 0 12px;
	border-bottom: 1px solid var(--mu-line);
}
.row::after { content: ""; display: block; clear: both; }
.row h3 { margin: 0 0 2px; font-size: 16px; }
.row .date { display: block; margin: 0 0 6px; font-size: 10px; }
.row-pic, .row .piccont { float: left; margin: 0 10px 6px 0; }
.row .excerpt p, .row > p { margin: 0 0 6px; }
.more, .link-all { font-weight: bold; }
.more { float: right; clear: right; margin-top: 8px; }
.more::after, .link-all::after { content: " ▸"; }
.link-all { display: inline-block; margin: 0 0 22px; }
.lang-note {
	display: inline-block; margin: 0 0 6px; padding: 1px 6px;
	background: var(--mu-light); color: var(--mu-grey); font-size: 10px;
}
.home-news { margin-bottom: 4px; }
.home-news .row { border-bottom: 0; margin-bottom: 0; }

/* builder galleries: 100×100 thumbs in dark frames, five to a row */
.gallery-row { padding: 16px 0 0; border-top: 1px solid var(--mu-line); margin-bottom: 30px; }
.home-blocks .gallery-row:first-of-type, #content > article .gallery-row:first-child { border-top: 0; padding-top: 0; }
.gallery-row h3 { margin: 0 0 12px; }
.gallery-container { display: grid; grid-template-columns: repeat(auto-fill, 104px); gap: 4px; }
.gallery-container .piccont { display: block; padding: 2px; background: var(--mu-ink); line-height: 0; }
.gallery-container img { width: 100px; height: 100px; object-fit: contain; }

/* sponsor box (contentbox) on the home page */
.mu-sponsor {
	margin: 0 0 20px; padding: 6px 6px 16px;
	background: #e4e4e3; text-align: center; font-size: 11px;
	border-bottom: 4px solid var(--mu-grey);
}
.mu-sponsor .picture { display: block; }
.mu-sponsor .title { margin: 10px 0 4px; font-size: 14px; }
.mu-sponsor .lead { margin: 0 0 8px; font-weight: normal; }
.mu-sponsor .button {
	display: block; margin: 0 20px; padding: 4px;
	background: var(--mu-teal); color: #fff; font-size: 14px; font-weight: bold;
}
.mu-sponsor .button:hover { background: var(--mu-ink); }

/* pager */
.posts-navigation .nav-links { display: flex; justify-content: space-between; font-weight: bold; }
.posts-navigation .nav-previous { order: 2; }

/* ---- comments: guestbook + articles ---- */
.comments { margin-top: 24px; }
.comment-form p { margin: 0 0 10px; }
.comment-form label { display: block; font-weight: bold; margin-bottom: 3px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
	width: 100%; box-sizing: border-box; padding: 5px;
	border: 1px solid var(--mu-line); font: 13px var(--mu-font);
}
.comment-form .comment-form-consent label { display: inline; font-weight: normal; }
.comment-form .submit {
	padding: 6px 18px; border: 0; cursor: pointer;
	background: var(--mu-teal); color: #fff; font: bold 13px var(--mu-font);
}
.comment-form .submit:hover { background: var(--mu-ink); }
.mu-hp { position: absolute; left: -9999px; }
.comment-list { margin: 20px 0 0; padding: 0; list-style: none; }
.comment-list .entry { margin: 0 0 14px; padding: 0 0 10px; border-bottom: 1px solid var(--mu-line); }
.comment-list h4 { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 6px; font-size: 12px; }
.comment-list .right { font-weight: normal; color: var(--mu-grey); white-space: nowrap; }
.comment-list .text p { margin: 0 0 .6em; }
.comment-list .awaiting { color: var(--mu-teal); font-style: italic; }
.no-comments { color: var(--mu-grey); }

/* ---- footer ---- */
#colophon { margin-top: 20px; }
.footer-bar { height: 39px; background: linear-gradient(#5d5d5d, #383838); }
.site-info { margin: 0; padding: 12px 0 34px; text-align: center; font-size: 10px; color: var(--mu-grey); }

/* ---- lightbox (js/site.js) ---- */
.mu-lightbox {
	position: fixed; inset: 0; z-index: 9999;
	display: none; align-items: center; justify-content: center;
	background: rgba(0, 0, 0, .85);
}
.mu-lightbox.open { display: flex; }
.mu-lightbox figure { margin: 0; text-align: center; }
.mu-lightbox img { max-width: 92vw; max-height: 84vh; height: auto; background: #fff; }
.mu-lightbox figcaption { margin-top: 8px; color: #eee; font-size: 13px; }
.mu-lightbox button {
	position: absolute; border: 0; background: none; color: #fff;
	font-size: 44px; line-height: 1; cursor: pointer; padding: 10px 16px;
}
.mu-lb-close { top: 6px; right: 10px; }
.mu-lb-prev { left: 6px; top: 50%; transform: translateY(-50%); }
.mu-lb-next { right: 6px; top: 50%; transform: translateY(-50%); }
.mu-lightbox.single .mu-lb-prev, .mu-lightbox.single .mu-lb-next { display: none; }

/* ---- block editor content written later by the editors ---- */
.wp-block-image img { height: auto; }
.alignleft { float: left; margin: 0 12px 8px 0; }
.alignright { float: right; margin: 0 0 8px 12px; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }

/* ---- below 1000px: one column, menus in a drawer ---- */
@media (max-width: 1000px) {
	body { background: #fff; }
	#page { padding-top: 0; }
	/* not aspect-ratio + min-height: the min-height would widen the box past the screen */
	#masthead { height: max(140px, calc(100vw * 259 / 980)); }
	.site-brand { width: 55%; max-width: 340px; }
	#topnav { margin-top: 0; }
	.menu-toggle {
		display: block; width: 100%; padding: 12px 16px; border: 0;
		background: none; color: #fff; text-align: left; cursor: pointer;
		font: bold 15px var(--mu-font);
	}
	.menu-toggle::before { content: "☰  "; }
	#topnav .menu-top, #topnav .menu-mobile { display: none; }
	#topnav.open .menu-top, #topnav.open .menu-mobile { display: block; }
	.menu-top a { padding: 10px 16px; border-top: 1px solid #555; }
	#topnav .menu-mobile { margin: 0; background: #fff; padding: 0 16px; }
	#left .menu-side-wrap { display: none; }
	#columns {
		grid-template-columns: 1fr;
		grid-template-areas: "content" "left" "right";
		padding: 20px 16px 0;
	}
	.gallery-container { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
	.gallery-container img { width: 100%; height: auto; aspect-ratio: 1; }
}
@media (max-width: 480px) {
	.site-title { font-size: 14px; }
	.mu-mainpic { float: none; margin: 0 0 10px; }
	.row-pic, .row .piccont { width: 72px; height: 72px; }
	.row-pic img, .row .piccont img { width: 72px; height: 72px; }
}
