/*
Theme Name: Perrašymas
Theme URI: https://perrasymas.lt
Author: webstudio.lt
Author URI: https://webstudio.lt
Description: Perrasymas.lt tema – senojo „stats“ dizaino kopija, pritaikyta mobiliesiems. Lengva klasikinė tema be puslapių kūrėjų.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: perrasymas
*/

:root {
	--bg: #e5ecfa;
	--green: #98ba54;
	--green-light: #a2c164;
	--green-dark: #6f8f2e;
	--link: #6f8a00;
	--blue: #4f8dff;
	--blue-head-top: #82aeff;
	--blue-head-mid: #4888ff;
	--text: #444;
	--wrap: 907px;
	--radius: 8px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 14px/1.55 Tahoma, Verdana, Arial, sans-serif;
}

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

a, a:visited { color: var(--link); text-decoration: underline; }
a:hover, a:focus { text-decoration: none; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
	position: fixed; top: 8px; left: 8px; z-index: 1000; clip: auto; width: auto; height: auto;
	background: #fff; padding: 8px 12px; border-radius: 4px;
}

.wrap { max-width: var(--wrap); margin: 0 auto; }

/* ---------- Viršutinė juosta ---------- */
.topbar {
	margin-top: 12px;
	background: #fff;
	border-radius: var(--radius) var(--radius) 0 0;
	padding: 8px 12px;
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
}
.topbar__home {
	display: inline-flex; align-items: center; justify-content: center;
	width: 46px; height: 26px; border-radius: 6px;
	background: linear-gradient(#b2cc80, var(--green));
}
.topbar__home img { height: 20px; width: auto; }
.topbar__item { display: flex; align-items: center; gap: 6px; line-height: 1.15; }
.topbar__item img { width: 12px; height: auto; }
.topbar__item small { display: block; color: #2e8b2e; font-size: 10px; text-transform: uppercase; }
.topbar__item a, .topbar__item strong { color: #5a7a00; font-weight: bold; font-size: 14px; }
.topbar__search { margin-left: auto; }

.search-form { display: flex; gap: 5px; }
.search-form input[type="search"] {
	width: 140px; height: 28px; padding: 3px 8px;
	border: 1px solid #b9d08a; background: #f5f8ee; color: #557700; font: inherit; font-size: 13px;
}
.search-form button, .button {
	height: 28px; padding: 0 12px; border: 1px solid #690; cursor: pointer;
	background: linear-gradient(#a8c862, #84ad35); color: #fff; font: bold 12px Tahoma, sans-serif;
}

/* ---------- Header ---------- */
.masthead {
	background: linear-gradient(var(--blue-head-top), var(--blue-head-mid) 50%, var(--blue-head-top));
	border-radius: 0 0 var(--radius) var(--radius);
	padding: 0 14px 0 0;
	display: grid;
	grid-template-columns: 320px 1fr 1fr;
	gap: 18px;
	color: #fff;
	position: relative;
	overflow: hidden;
}
.masthead::before { /* horizontalios juostelės kaip originale */
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background: repeating-linear-gradient(0deg, rgba(255,255,255,.05) 0 2px, transparent 2px 6px);
}
.tv { position: relative; width: 320px; aspect-ratio: 320 / 216; background: url(assets/img/tv.png) center / 100% 100% no-repeat; }
.tv__screen {
	position: absolute; left: 6.8%; top: 7.7%; width: 86.4%; height: 70.7%;
	background: #000; overflow: hidden;
}
.tv__screen iframe, .tv__screen button { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tv__screen button { cursor: pointer; padding: 0; background: #000 center / cover no-repeat; }
.tv__screen button::after {
	content: ""; position: absolute; left: 50%; top: 50%; width: 56px; height: 40px; transform: translate(-50%, -50%);
	border-radius: 10px; background: #e00 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 26px no-repeat;
	box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.masthead__col { position: relative; padding: 12px 0 14px; }
.masthead__col h2 { margin: 0 0 6px; font: bold 15px Tahoma, sans-serif; color: #fff; text-transform: uppercase; }
.masthead__col ul { margin: 0; padding: 0 0 0 14px; list-style: none; }
.masthead__col li { font-size: 12px; line-height: 1.25; text-transform: uppercase; }
.masthead__col li.news { text-transform: none; }
.masthead__col a, .masthead__col a:visited { color: #e3ecff; text-decoration: none; }
.masthead__col a:hover { color: #fff; text-decoration: underline; }

/* ---------- Turinys ---------- */
.layout {
	margin-top: 8px;
	background: #fff;
	border-radius: var(--radius);
	padding: 8px 10px 16px;
	display: grid;
	grid-template-columns: 180px minmax(0, 1fr) 180px;
	gap: 14px;
}
.col-left { order: 1; }
.col-main { order: 2; min-width: 0; }
.col-right { order: 3; }

.box { margin-bottom: 16px; }
.box__title {
	margin: 0 0 6px; padding: 4px 10px; border-radius: 6px;
	background: linear-gradient(var(--green-light), var(--green));
	color: #fff; font: bold 13px/22px Tahoma, sans-serif; text-transform: uppercase;
	box-shadow: 0 2px 0 #d3e1b5;
}
.box ul { margin: 0; padding: 0; list-style: none; }
.box li a {
	display: block; padding: 4px 4px 3px; font-size: 12px; text-decoration: none;
	color: var(--blue); border-bottom: 1px dashed var(--blue);
}
.box li a:hover, .box li.current-menu-item > a { background: var(--blue); color: #fff; }
.box--center { text-align: center; }
.box--center a { display: inline-block; margin: 3px 0; }
.social { display: flex; justify-content: center; gap: 8px; margin: 6px 0 10px; }
.social a {
	display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center;
	border-radius: 6px; color: #fff !important; text-decoration: none; font: bold 16px Arial, sans-serif;
}
.social .fb { background: #3b5998; }
.social .yt { background: #e00; }

/* ---------- Įrašai ---------- */
.entry-title {
	margin: 6px 0 12px; color: var(--link); font: italic bold 19px/1.3 Tahoma, sans-serif;
}
.entry-title a { color: inherit; }
.entry-meta { margin: -6px 0 12px; color: #84ad33; font-size: 12px; }
.entry-content { overflow-wrap: anywhere; }
.entry-content p { margin: 0 0 10px; }
.entry-content h2, .entry-content h3, .entry-content h4 {
	margin: 18px 0 8px; color: var(--blue); font-family: Tahoma, sans-serif; line-height: 1.3;
}
.entry-content h2 { font-size: 15px; }
.entry-content h3 { font-size: 14px; }
.entry-content h2 a, .entry-content h3 a { color: var(--link); }
.entry-content ul { padding-left: 20px; }
.entry-content table { border-collapse: collapse; margin: 10px 0 14px; max-width: 100%; height: auto !important; }
.entry-content tr, .entry-content td { height: auto !important; }
.entry-content td, .entry-content th { border: 1px solid #999; padding: 5px 6px; vertical-align: middle; }
.entry-content td p { margin: 0; text-align: left; }
.entry-content table:has(img) td { border: 0; padding: 3px; }
.entry-content table[align] { float: none; }
.entry-content hr, .entry-content .sep { clear: both; border: 0; border-top: 1px dashed #b9cdf2; margin: 18px 0 8px; }
.entry-content img { display: inline-block; }
.entry-content iframe { max-width: 100%; }
.entry-content .wp-block-embed, .entry-content .wp-embed-aspect-16-9 { margin: 12px 0; }
.alignleft { float: left; margin: 0 12px 8px 0; }
.alignright { float: right; margin: 0 0 8px 12px; }
.aligncenter { display: block; margin: 0 auto 10px; }

.post-list { margin: 0; padding: 0; list-style: none; }
.post-list li { padding: 10px 0; border-bottom: 1px dashed #c9d8f5; }
.post-list h2 { margin: 0 0 3px; font: bold 15px/1.35 Tahoma, sans-serif; }
.post-list time { color: #84ad33; font-size: 12px; }
.post-list p { margin: 4px 0 0; }
.pagination { margin: 16px 0 0; display: flex; gap: 6px; flex-wrap: wrap; }
.pagination .page-numbers { padding: 3px 9px; border: 1px solid #b9d08a; text-decoration: none; }
.pagination .current { background: var(--green); color: #fff; border-color: var(--green); }
.post-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; font-size: 13px; }

/* ---------- Footer ---------- */
.site-footer {
	margin: 8px auto 20px; padding: 14px; text-align: center;
	background: #fff; border-radius: var(--radius); color: var(--green); font-size: 12px;
}
.site-footer a { color: var(--green-dark); }

.call-btn { display: none; }

/* ---------- Planšetė ---------- */
@media (max-width: 920px) {
	.wrap { margin: 0 10px; }
	.masthead { grid-template-columns: 300px 1fr; }
	.tv { width: 300px; }
	.masthead__news { display: none; }
	.layout { grid-template-columns: 180px minmax(0, 1fr); }
	.col-right { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 14px; }
}

/* ---------- Telefonas ---------- */
@media (max-width: 640px) {
	body { font-size: 15px; padding-bottom: 60px; }
	.wrap { margin: 0; }
	.topbar { margin-top: 0; border-radius: 0; gap: 10px; }
	.topbar__item--konsultacija { display: none; }
	.topbar__search { margin-left: 0; width: 100%; }
	.search-form input[type="search"] { flex: 1; width: auto; }
	.masthead { grid-template-columns: 1fr; border-radius: 0; padding: 0 0 4px; gap: 0; }
	.tv { width: 100%; max-width: 420px; margin: 0 auto; }
	.masthead__col { padding: 6px 12px 10px; }
	.masthead__services ul { padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
	.masthead__services li a {
		display: block; padding: 8px 6px; text-align: center; border-radius: 6px;
		background: rgba(255,255,255,.18); color: #fff; font-size: 12px;
	}
	.layout { grid-template-columns: 1fr; border-radius: 0; margin-top: 0; }
	.col-left { order: 3; }
	.col-right { order: 4; display: block; }
	.box li a { padding: 9px 6px; font-size: 14px; }
	.entry-title { font-size: 21px; }
	.entry-content table { display: block; overflow-x: auto; width: 100% !important; }
	.entry-content p, .entry-content [style*="justify"] { text-align: left !important; }
	.entry-content table td { min-width: 80px; }
	.site-footer { border-radius: 0; margin: 0; }
	.call-btn {
		display: flex; position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 50;
		align-items: center; justify-content: center; gap: 8px; height: 46px; border-radius: 23px;
		background: linear-gradient(#a8c862, #6f8f2e); color: #fff !important; text-decoration: none;
		font: bold 16px Tahoma, sans-serif; box-shadow: 0 3px 10px rgba(0,0,0,.3);
	}
}
