/*
 * Mercury – WordPressi-spetsiifilised lisastiilid.
 * Algne kujundus asub failis skmercury.css; siin on ainult see, mida WordPress lisaks vajab.
 */

/* ---------- Ligipääsetavus ---------- */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.skip-link:focus {
	clip: auto;
	clip-path: none;
	height: auto;
	width: auto;
	left: 10px;
	top: 10px;
	z-index: 100000;
	background: #f6f3ee;
	color: #083D77;
	padding: 10px 16px;
	border-radius: 8px;
}

/* ---------- Admin-riba (sisseloginud kasutajale) ---------- */
.admin-bar .nav {
	top: 32px;
}

@media screen and (max-width: 782px) {
	.admin-bar .nav {
		top: 46px;
	}
}

@media screen and (max-width: 600px) {
	#wpadminbar {
		position: fixed;
	}
}

/* ---------- Menüü ---------- */
.menu li.arvuti_socials {
	list-style: none;
}

/* Algsel saidil olid arvuti ikoonid menüüloendist väljas – menüülinkide 17px suurus neid ei mõjutanud. */
.menu li.arvuti_socials a {
	font-size: inherit;
	font-weight: inherit;
}

/* Aktiivse lehe esiletõstmine on algsel saidil puudu; soovi korral lisa siia näiteks:
   .menu li.current > a { color: #b0abab; } */

/* ---------- Sisu konteiner ---------- */
.site-main {
	display: block;
}

/* Plokiredaktoriga lisatud tavaline tekst lehtedel */
.mercury-page > p,
.mercury-page > h2,
.mercury-page > h3,
.mercury-page > ul,
.mercury-page > ol,
.mercury-page > figure,
.mercury-page > .wp-block-image,
.mercury-page > .wp-block-buttons,
.mercury-page > .wp-block-columns {
	max-width: 900px;
	margin-left: auto;
	margin-right: auto;
	padding: 0 20px;
	color: #f6f3ee;
}

.mercury-page > p {
	margin-bottom: 1em;
	line-height: 1.6;
}

/* ---------- Uudisekaardid ---------- */
.post {
	height: auto;
	min-height: 400px;
	max-width: 100%;
}

.post .post-link {
	display: block;
	color: inherit;
	text-decoration: none;
	height: 100%;
}

.post .post-link:focus-visible {
	outline: 3px solid #f6f3ee;
	outline-offset: 3px;
}

.post--tyhi {
	min-height: 0;
}

.uudised-pealkiri {
	color: #f6f3ee;
	margin-top: 0;
	font-size: 40px;
}

/* Lehekülgede numbrid */
.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
}

.pagination .page-numbers {
	color: #f6f3ee;
	text-decoration: none;
	padding: 8px 14px;
	border: 1px solid rgba(246, 243, 238, 0.5);
	border-radius: 14px;
}

.pagination .page-numbers.current,
.pagination a.page-numbers:hover {
	background: #f6f3ee;
	color: #083D77;
}

/* ---------- Üksik uudis ---------- */
.post--tais {
	min-height: 0;
	width: 800px;
}

.post--tais:hover {
	transform: none;
}

.post--tais .post-tais-pilt {
	width: 100%;
	height: auto;
	max-height: 480px;
	object-fit: cover;
}

.post--tais .post-content {
	padding: 20px 28px 28px;
}

.post--tais .post-title {
	font-size: 34px;
	margin: 6px 0 4px;
	color: #083D77;
}

.post--tais .entry-content {
	margin-top: 18px;
	color: #111;
	line-height: 1.65;
}

.post--tais .entry-content > * + * {
	margin-top: 1em;
}

.post--tais .entry-content p,
.post--tais .entry-content li {
	color: #111;
	font-size: 18px;
}

.post--tais .entry-content a,
.post--tais .entry-content p a {
	color: #083D77;
	text-decoration: underline;
}

.post--tais .entry-content h2,
.post--tais .entry-content h3,
.post--tais .entry-content h4 {
	color: #083D77;
	text-align: left;
	margin-top: 1.4em;
	font-size: 26px;
}

.post--tais .entry-content ul,
.post--tais .entry-content ol {
	padding-left: 1.4em;
}

.post--tais .entry-content img {
	max-width: 100%;
	height: auto;
	border-radius: 10px;
}

.post--tais .entry-content figure {
	margin: 1.2em 0;
}

.post--tais .entry-content figcaption {
	font-size: 14px;
	opacity: 0.7;
	text-align: center;
	margin-top: 6px;
}

.post--tais .entry-content .wp-block-gallery {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.post--tais .entry-content iframe,
.post--tais .entry-content video {
	max-width: 100%;
}

.post-navigation-mercury {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 15px;
	max-width: 800px;
}

.post-navigation-mercury a {
	color: #f6f3ee;
	text-decoration: none;
}

.post-navigation-mercury a:hover {
	color: #b0abab;
}

.post-navigation-mercury .btn {
	margin-top: 0;
}

.post-navigation-mercury .nav-vanem {
	text-align: right;
}

@media (max-width: 1024px) {
	.post--tais {
		width: 100%;
	}
}

@media (max-width: 600px) {
	.post--tais .post-title {
		font-size: 26px;
	}

	.post--tais .post-content {
		padding: 15px;
	}

	.post-navigation-mercury {
		grid-template-columns: 1fr;
		text-align: center;
	}

	.post-navigation-mercury .nav-vanem {
		text-align: center;
	}
}

/* Joondused plokiredaktorist */
.alignleft {
	float: left;
	margin: 0 1.5em 1em 0;
}

.alignright {
	float: right;
	margin: 0 0 1em 1.5em;
}

.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.wp-caption-text,
.gallery-caption {
	font-size: 14px;
}

.sticky .post-content h3::before {
	content: "📌 ";
}

/* ---------- Külgriba vidinad ---------- */
.social-feed .widget {
	background: #f6f3ee;
	border-radius: 14px;
	padding: 18px;
	color: #111;
}

.social-feed .widget-title {
	color: #083D77;
	margin-bottom: 10px;
}

.social-feed .widget a {
	color: #083D77;
}

.social-feed .widget ul {
	padding-left: 1.2em;
}

/* ---------- Kontaktivorm ---------- */
.mercury-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.vormi-teade {
	padding: 12px 16px;
	border-radius: 10px;
	margin-bottom: 15px;
	font-size: 16px;
}

.vormi-teade--ok {
	background: #e6f4ea;
	color: #1e6b34;
}

.vormi-teade--viga {
	background: #fdecea;
	color: #8a1c1c;
}

/* ---------- Kommentaarid ---------- */
.mercury-comments {
	max-width: 800px;
	color: #f6f3ee;
}

.mercury-comments a {
	color: #f6f3ee;
}

.mercury-comments textarea,
.mercury-comments input[type="text"],
.mercury-comments input[type="email"],
.mercury-comments input[type="url"] {
	width: 100%;
	padding: 10px;
	border-radius: 8px;
	border: none;
}

/* ---------- Otsing ---------- */
.search-form {
	display: flex;
	gap: 10px;
}

.search-field {
	flex: 1;
	padding: 10px;
	border-radius: 10px;
	border: none;
}

/* ---------- 404 ---------- */
.mercury-404 {
	text-align: center;
	padding-top: 40px;
	padding-bottom: 80px;
}

.mercury-404 .btn {
	display: inline-block;
	margin-top: 25px;
}

/* ---------- Videote helinupp ---------- */
.mercury-video-wrap {
	position: relative;
	display: block;
}

.mercury-heli {
	position: absolute;
	right: 12px;
	bottom: 12px;
	z-index: 5;
	width: 40px;
	height: 40px;
	border: 1px solid rgba(255, 255, 255, 0.6);
	border-radius: 50%;
	background: rgba(8, 61, 119, 0.75);
	color: #f6f3ee;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease;
}

.mercury-heli:hover,
.mercury-heli:focus-visible {
	background: rgba(8, 61, 119, 1);
	outline: none;
	box-shadow: 0 0 0 2px #f6f3ee;
}

@media (max-width: 600px) {
	.mercury-heli {
		width: 36px;
		height: 36px;
		right: 8px;
		bottom: 8px;
	}
}
