/*
Theme Name: MiBla Block
Theme URI: https://mibla.cz
Author: MiBla
Author URI: https://mibla.cz
Description: Blokový (FSE) motiv webu mibla.cz. Věrná kopie vzhledu klasického motivu MiBla (původně Earth Pro od VAthemes.com) postavená na theme.json, šablonách a template parts.
Version: 3.1.5
Requires at least: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: license.txt
Text Domain: mibla-block
Tags: blog, two-columns, right-sidebar, custom-colors, full-site-editing, block-styles, wide-blocks, translation-ready

Based on Earth Pro (VAthemes.com), itself based on Underscores, (C) 2012-2014 Automattic, Inc.
*/

/* Ikony (Dashicons) */
.mibla-icon::before,
.wp-block-post-date::before,
.taxonomy-category::before,
.taxonomy-post_tag::before,
.wp-block-post-comments-link::before {
	font-family: dashicons;
	font-size: 18px;
	line-height: 1;
	vertical-align: middle;
	margin-right: 4px;
	font-weight: 400;
	font-style: normal;
	text-decoration: none;
	display: inline-block;
}
.wp-block-post-date::before { content: "\f469"; }
.taxonomy-category::before { content: "\f318"; }
.taxonomy-post_tag::before { content: "\f323"; }
.wp-block-post-comments-link::before { content: "\f101"; }

html { background: #404040; overflow-y: scroll; }
body { background: #fff; }

/* Rozvržení */
.mibla-page { max-width: 100%; }
.mibla-container { max-width: 1100px; width: 100%; margin-left: auto; margin-right: auto; }
.mibla-header { padding: 40px 0; }
.mibla-header .wp-block-site-title { margin: 0; line-height: 1.1; letter-spacing: -3px; text-shadow: 0 1px 1px #666; }
.mibla-header .wp-block-site-title a { color: #fff; text-decoration: none; }
.mibla-header .wp-block-site-tagline { margin: 0; }

/* Horní lišta s menem a vyhledáváním */
.mibla-topbar { min-height: 48px; }
.mibla-topbar .wp-block-navigation a.wp-block-navigation-item__content {
	display: block;
	padding: 15px 20px;
	color: rgba(255,255,255,0.8);
	font-weight: 200;
	font-size: 12px;
	text-transform: uppercase;
	transition: all 0.3s ease;
	text-decoration: none;
}
.mibla-topbar .wp-block-navigation-item:hover > a,
.mibla-topbar .wp-block-navigation a:hover { background: #32a7db; color: #fff; }
.mibla-topbar .current-menu-item > a,
.mibla-topbar .wp-block-navigation-item__content[aria-current="page"] { background: #017ab0; border-left: 2px solid #32a7db; }
.mibla-topbar .wp-block-navigation__submenu-container { background: #fdfdfd; box-shadow: 0 3px 3px rgba(0,0,0,0.2); }
.mibla-topbar .wp-block-navigation__submenu-container a { color: #333 !important; width: 200px; padding: 10px 15px !important; }
.mibla-topbar .wp-block-search .wp-block-search__button {
	background: #017ab0; color: #fff; border-radius: 0; margin: 0; padding: 13px 20px 13px 17px;
}
.mibla-topbar .wp-block-search .wp-block-search__button:hover { background: #32a7db; }
.mibla-topbar .wp-block-search__inside-wrapper { border: 0 !important; padding: 0 !important; }
.mibla-topbar .wp-block-search__input { border: 0; border-radius: 0; background: #fff; font-size: 14px; }

/* Obsah a sidebar */
.mibla-content { padding-top: 40px; }
.mibla-main { border-right: 1px dotted #ddd; padding-right: 3%; padding-bottom: 20px; }
.mibla-sidebar { padding-left: 0.5%; }

/* Příspěvky */
.mibla-post { border-bottom: 1px dotted #ddd; margin: 0 0 2.5em; padding: 0 0 3em; }
.mibla-post .wp-block-post-title { margin: 0; }
.mibla-post .wp-block-post-title a { color: inherit; text-decoration: none; }
.mibla-meta, .mibla-footer-meta { font-size: 13px; color: #bbb; font-weight: 300; margin-top: 10px; }
.mibla-meta a, .mibla-footer-meta a { color: #32a7db; }
.mibla-meta > *, .mibla-footer-meta > * { margin: 0; line-height: 1.1; }
.mibla-post .wp-block-post-featured-image { margin-bottom: 1.5em; }
.mibla-post .wp-block-post-featured-image img,
.wp-block-post-featured-image img { opacity: 0.85; transition: opacity 0.5s ease; }
.mibla-post .wp-block-post-featured-image img:hover { opacity: 1; }
.wp-block-post-excerpt { margin-top: 1.5em; }
.wp-block-post-excerpt__excerpt { margin-bottom: 1.5em; }
.wp-block-post-excerpt__more-link,
.wp-element-button, .wp-block-button__link, .wp-block-search__button, .wp-block-post-comments-form input[type="submit"] {
	display: inline-block; border: 0; border-radius: 0; background: #1988BA; color: rgba(255,255,255,.9);
	font-size: 14px; font-weight: 300; line-height: 1; padding: 15px 20px; text-decoration: none;
	transition: background .5s ease; margin-bottom: 20px;
}
.wp-block-post-excerpt__more-link:hover, .wp-element-button:hover, .wp-block-button__link:hover { background: #32a7db; text-decoration: none; }
.wp-block-search__button { margin: 0; }
.wp-block-search__input { padding: 0 10px; font-size: 14px; }

.page-header { border-bottom: 1px dotted #ddd; margin-bottom: 2.5em; padding-bottom: 2.5em; }
.page-header .wp-block-query-title { font-size: 40px; font-weight: 300; margin: 0; }
.page-header .wp-block-term-description { font-weight: 200; font-size: 18px; }

/* Stránkování */
.wp-block-query-pagination { margin: 0 0 1.5em; }
/* Novější příspěvky vlevo, starší vpravo */
.wp-block-query-pagination .wp-block-query-pagination-next { margin-left: auto !important; margin-right: 0 !important; }
.wp-block-query-pagination .wp-block-query-pagination-previous { margin-left: 0 !important; margin-right: 0 !important; }
/* Předchozí / další příspěvek jako dvě karty */
.wp-block-post-navigation-link {
	flex: 0 1 calc(50% - 8px);
	box-sizing: border-box;
	margin: 0 0 1.5em;
	padding: 14px 18px;
	background: #fff;
	border: 1px solid #e6e9ee;
	border-radius: 12px;
	line-height: 1.4;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.wp-block-post-navigation-link:hover { border-color: #32a7db; box-shadow: 0 4px 14px rgba(20, 40, 70, .1); }
.wp-block-post-navigation-link .post-navigation-link__label {
	display: block;
	margin-bottom: 4px;
	color: #6b7785;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
}
.post-navigation-link-previous .post-navigation-link__label::before { content: "← "; }
.post-navigation-link-next { margin-left: auto; text-align: right; }
.post-navigation-link-next .post-navigation-link__label::after { content: " →"; }
.wp-block-post-navigation-link a { font-weight: 600; text-decoration: none; }
.wp-block-post-navigation-link a:hover { text-decoration: underline; }

/* Totéž v editoru: blok tam obsahuje upravitelný popisek a ukázkový odkaz */
.wp-block-post-navigation-link [data-wp-block-attribute-key="label"] { display: block; margin-bottom: 4px; color: #6b7785 !important; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-decoration: none !important; text-transform: uppercase; }
.wp-block-post-navigation-link:first-child [data-wp-block-attribute-key="label"]::before { content: "← "; }
.wp-block-post-navigation-link:last-child [data-wp-block-attribute-key="label"]::after { content: " →"; }
.wp-block-post-navigation-link:last-child:has([data-wp-block-attribute-key="label"]) { margin-left: auto; text-align: right; }

/* Widgety v sidebaru */
.mibla-sidebar .widget { margin: 0 0 4em; font-size: 12px; }
.mibla-sidebar .widget-title { background-color: #32A7DB; color: #fff; font-size: 17px; font-weight: 300; padding: 10px; margin: 0; }
.mibla-sidebar .widget ul { list-style: none; margin: 10px 0; padding: 0; }
.mibla-sidebar .widget ul li { display: block; padding: 7px; border-bottom: 1px dotted #ddd; margin: 0; }
.mibla-sidebar .wp-block-tag-cloud { display: flex; justify-content: space-around; flex-wrap: wrap; align-items: baseline; }
.mibla-sidebar .wp-block-tag-cloud .tag-cloud-link { display: inline-block; padding: 3px; }
.mibla-sidebar .wp-block-search__inside-wrapper { border: 1px solid #ccc; padding: 0; }
.mibla-sidebar > .wp-block-search { margin: 0 0 48px; }
/* Reklama Seznamu (shortcode) a mezera nad následujícím widgetem */
.mibla-sidebar > [class*="sssp-seznam-ad"] + .widget { margin-top: 48px; }

/* Vložené iframe (např. mapa) se nesmí vylévat ze sloupce */
.mibla-main .wp-block-column { min-width: 0; }
.mibla-main iframe, .mibla-main embed, .mibla-main object { max-width: 100%; }

/* Galerie: jednotné čtvercové buňky, obrázky se do nich vejdou celé a jsou na střed */
.mibla-main .wp-block-gallery.has-nested-images { gap: 16px; }
.mibla-main .wp-block-gallery.has-nested-images figure.wp-block-image {
	margin: 0;
	aspect-ratio: 1 / 1;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	padding: 8px;
	background: #fff;
	border: 1px solid #e6e9ee;
	border-radius: 12px;
	overflow: hidden;
}
.mibla-main .wp-block-gallery.has-nested-images figure.wp-block-image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

/* Komentáře */
.wp-block-comment-template { margin: 0; padding: 0; list-style: none; }
.wp-block-comment-template li { padding: 20px; margin-bottom: 20px; background: rgba(0,0,0,0.05); border-radius: 3px; }
.wp-block-comment-author-name { font-weight: 700; text-transform: uppercase; font-size: 14px; }

/* Patička */
.mibla-footer .site-info { text-align: center; color: #f2efdc; font-size: 14px; padding: 40px 0; font-weight: 200; margin: 0; }
.mibla-footer .site-info a { color: #fff; }

/* Reklamy Seznamu */
ins { background-color: transparent; }
ins[data-adsbygoogle-status!=done] { display: none !important; }
ins[data-ad-status=unfilled][data-adsbygoogle-status=done] { display: none !important; }
ins[data-ad-status=filled][data-adsbygoogle-status=done] { display: block !important; }
.page-id-45 [data-szn-ssp-ad-type="inarticle"] { display: none !important; }
@media (max-width: 768px) {
	.seznam-reklama-loop, .seznam-mobilni-reklama, iframe[id^="sssp"], div[id^="sssp"] {
		max-width: 100% !important; width: 100% !important; box-sizing: border-box !important; overflow: hidden !important;
	}
}

/* Responzivita */
@media (max-width: 1110px) { .mibla-content { padding-left: 1%; padding-right: 1%; } }
@media (max-width: 781px) {
	.mibla-main { border-right: 0; padding-right: 0; }
	.mibla-sidebar { padding-left: 0; }
}

/*--------------------------------------------------------------
Redesign 1: hlavička a menu
--------------------------------------------------------------*/
:root { --mb-accent: #1988ba; --mb-accent-light: #32a7db; --mb-ink: #1f2933; --mb-muted: #6b7785; --mb-line: #e6e9ee; }
.mibla-header { background: #fff !important; padding: 36px 0 30px !important; border-bottom: 1px solid var(--mb-line); }
.mibla-header .mibla-container, .mibla-topbar .mibla-container { padding: 0 20px; }
.mibla-header .wp-block-site-title { text-align: center !important; font-size: 40px !important; font-weight: 800 !important; letter-spacing: -0.5px !important; text-shadow: none !important; }
.mibla-header .wp-block-site-title a { color: var(--mb-accent) !important; text-shadow: none !important; }
.mibla-header .wp-block-site-tagline { text-align: center !important; margin-top: 6px !important; color: var(--mb-muted) !important; font-size: 15px !important; font-weight: 400 !important; }
.mibla-topbar { background: #fff !important; border-bottom: 1px solid var(--mb-line); box-shadow: 0 1px 0 var(--mb-line), 0 6px 14px -10px rgba(20, 40, 70, .25); position: sticky; top: 0; z-index: 50; }
.mibla-topbar .wp-block-navigation a.wp-block-navigation-item__content { padding: 14px 14px 12px; border-left: 0 !important; border-bottom: 3px solid transparent; color: var(--mb-ink) !important; font-size: 13px; font-weight: 600; letter-spacing: .04em; }
.mibla-topbar .wp-block-navigation-item:hover > a,
.mibla-topbar .wp-block-navigation a:hover { background: transparent !important; border-bottom-color: var(--mb-accent-light); color: var(--mb-accent) !important; }
.mibla-topbar .current-menu-item > a,
.mibla-topbar .wp-block-navigation-item__content[aria-current="page"] { background: transparent !important; border-bottom-color: var(--mb-accent) !important; color: var(--mb-accent) !important; }
/* Lupa: trvale podbarvené kolečko, při najetí tmavší odstín; bez stínu, aby ho obal neořezával */
.mibla-topbar .wp-block-search .wp-block-search__button { margin: 0 !important; padding: 10px !important; border-radius: 999px !important; background: #e8f4fa !important; color: var(--mb-accent) !important; box-shadow: none !important; transform: none !important; }
.mibla-topbar .wp-block-search .wp-block-search__button:hover,
.mibla-topbar .wp-block-search .wp-block-search__button:focus-visible { background: #cbe6f3 !important; color: #0f6d96 !important; box-shadow: none !important; transform: none !important; }

/*--------------------------------------------------------------
Redesign 2: pozadí a typografie
--------------------------------------------------------------*/
html, body { background: #f4f6f9 !important; }
body { color: var(--mb-ink); font-size: 17px !important; line-height: 1.7 !important; }
a { color: var(--mb-accent) !important; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
.mibla-content { padding: 36px 20px 0; }
.mibla-main { padding-right: 28px !important; border-right: 0 !important; }
.mibla-post .wp-block-post-title, h1.wp-block-post-title { font-size: 30px !important; font-weight: 800 !important; line-height: 1.25; letter-spacing: -0.01em; color: var(--mb-ink); }
.mibla-post .wp-block-post-title a { color: var(--mb-ink) !important; }
.mibla-post .wp-block-post-title a:hover { color: var(--mb-accent) !important; text-decoration: none; }
.wp-block-post-excerpt__excerpt, .wp-block-post-content p { font-size: 17px; line-height: 1.7; }
.mibla-meta, .mibla-footer-meta { color: var(--mb-muted) !important; font-size: 14px !important; }
@media (max-width: 781px) { .mibla-main { padding-right: 0 !important; } }

/*--------------------------------------------------------------
Redesign 3: karty (příspěvky, detail, sidebar) a obrázky
--------------------------------------------------------------*/
.mibla-post { margin: 0 0 28px !important; padding: 28px 30px !important; background: #fff; border: 1px solid var(--mb-line) !important; border-radius: 14px; box-shadow: 0 2px 12px rgba(20, 40, 70, .06); transition: box-shadow .25s ease, transform .25s ease; }
.mibla-post:hover { box-shadow: 0 8px 24px rgba(20, 40, 70, .12); transform: translateY(-2px); }
/* Detail příspěvku a stránky jako bílá karta */
main.wp-block-group > article.wp-block-group:not(.mibla-post) { padding: 28px 30px; background: #fff; border: 1px solid var(--mb-line); border-radius: 14px; box-shadow: 0 2px 12px rgba(20, 40, 70, .06); }
.mibla-footer-meta { margin-top: 8px !important; padding-top: 14px; border-top: 1px solid var(--mb-line); }
/* Obrázky v obsahu se zaoblenými rohy */
.wp-block-post-content img:not(.emoji):not(.wp-smiley), .mibla-main .wp-block-image img, .wp-block-post-featured-image img { border-radius: 10px; opacity: 1 !important; }
.wp-block-post-content .wp-block-gallery.has-nested-images figure img { border-radius: 6px; }
/* Sidebar */
.mibla-sidebar .widget { padding: 0 18px 12px; background: #fff; border: 1px solid var(--mb-line); border-radius: 14px; box-shadow: 0 2px 12px rgba(20, 40, 70, .05); font-size: 14px !important; overflow: hidden; }
.mibla-sidebar .widget-title { display: inline-block; margin: 0 0 6px -18px !important; padding: 16px 18px 10px !important; border-bottom: 3px solid var(--mb-accent-light); background: transparent !important; color: var(--mb-ink) !important; font-size: 16px !important; font-weight: 800 !important; }
.mibla-sidebar .widget ul li { padding: 9px 0 !important; border-bottom: 1px solid var(--mb-line) !important; }
.mibla-sidebar .widget ul li:last-child { border-bottom: 0 !important; }
.mibla-sidebar .wp-block-search__inside-wrapper { border: 1px solid var(--mb-line) !important; border-radius: 999px !important; background: #fff; overflow: hidden; }
.mibla-sidebar .wp-block-search__input { padding: 0 16px !important; }
@media (max-width: 781px) { .mibla-post, main.wp-block-group > article.wp-block-group:not(.mibla-post) { padding: 20px !important; } }

/*--------------------------------------------------------------
Redesign 4: tlačítka, stránkování a patička
--------------------------------------------------------------*/
.wp-block-post-excerpt__more-link, .wp-element-button, .wp-block-button__link, .wp-block-search__button {
	padding: 12px 22px !important; border-radius: 999px !important; background: var(--mb-accent) !important; color: #fff !important;
	box-shadow: 0 2px 6px rgba(25, 136, 186, .3); font-size: 14px !important; font-weight: 600 !important; letter-spacing: .01em; text-decoration: none !important;
	transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.wp-block-post-excerpt__more-link:hover, .wp-element-button:hover, .wp-block-search__button:hover { background: #0f6d96 !important; box-shadow: 0 6px 14px rgba(25, 136, 186, .35); transform: translateY(-1px); }
.mibla-sidebar .wp-block-search__button { margin: 3px !important; }
.wp-block-query-pagination a { padding: 10px 20px; border: 1px solid var(--mb-line); border-radius: 999px; background: #fff; font-size: 14px; font-weight: 600; text-decoration: none !important; }
.wp-block-query-pagination a:hover { border-color: var(--mb-accent-light); }
.mibla-footer { background: #1f2933 !important; }
.mibla-footer .site-info { padding: 28px 0 !important; color: #aab4c0 !important; font-size: 13px !important; }

/*--------------------------------------------------------------
Redesign 5: mobilní menu
--------------------------------------------------------------*/
.mibla-topbar .wp-block-navigation__responsive-container-open,
.mibla-topbar .wp-block-navigation__responsive-container-close { padding: 10px; border-radius: 999px; background: #e8f4fa; color: var(--mb-accent); transition: background .2s ease; }
.mibla-topbar .wp-block-navigation__responsive-container-open:hover,
.mibla-topbar .wp-block-navigation__responsive-container-close:hover { background: #cbe6f3; color: #0f6d96; }
.mibla-topbar .wp-block-navigation__responsive-container-open svg,
.mibla-topbar .wp-block-navigation__responsive-container-close svg { width: 26px; height: 26px; }
.mibla-topbar .wp-block-navigation__responsive-container.is-menu-open { padding: 20px 24px 40px; background: #fff; color: var(--mb-ink); }
.mibla-topbar .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close { top: 16px; right: 20px; }
.mibla-topbar .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { align-items: stretch; padding-top: 56px; }
.mibla-topbar .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { align-items: stretch; gap: 0; width: 100%; }
.mibla-topbar .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { width: 100%; border-bottom: 1px solid var(--mb-line); }
.mibla-topbar .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:last-child { border-bottom: 0; }
.mibla-topbar .wp-block-navigation__responsive-container.is-menu-open a.wp-block-navigation-item__content { display: block; width: 100%; padding: 18px 8px !important; border-bottom: 0 !important; border-left: 0 !important; font-size: 18px; font-weight: 700; letter-spacing: .03em; text-align: center; }
.mibla-topbar .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content[aria-current="page"] { background: #e8f4fa !important; border-radius: 10px; }
