/*
Theme Name: Twenty Twenty-Five
Theme URI: https://wordpress.org/themes/skolajsk2025/
Author: the WordPress team
Author URI: https://wordpress.org
Description: Twenty Twenty-Five emphasizes simplicity and adaptability. It offers flexible design options, supported by a variety of patterns for different page types, such as services and landing pages, making it ideal for building personal blogs, professional portfolios, online magazines, or business websites. Its templates cater to various blog styles, from text-focused to image-heavy layouts. Additionally, it supports international typography and diverse color palettes, ensuring accessibility and customization for users worldwide.
Requires at least: 6.7
Tested up to: 6.7
Requires PHP: 7.2
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: skolajsk2025
Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready, wide-blocks, block-styles, style-variations, accessibility-ready, blog, portfolio, news
*/

/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */
a {
	text-decoration-thickness: 1px !important;
	text-underline-offset: .1em;
}

/* Focus styles */
:where(.wp-site-blocks *:focus) {
	outline-width: 2px;
	outline-style: solid;
}

/* Increase the bottom margin on submenus, so that the outline is visible. */
.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation-item:not(:last-child) {
	margin-bottom: 3px;
}

/* Increase the outline offset on the parent menu items, so that the outline does not touch the text. */
.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content {
	outline-offset: 4px;
}

/* Remove outline offset from the submenus, otherwise the outline is visible outside the submenu container. */
.wp-block-navigation .wp-block-navigation-item ul.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	outline-offset: 0;
}

/*
 * Progressive enhancement to reduce widows and orphans
 * https://github.com/WordPress/gutenberg/issues/55190
 */
h1, h2, h3, h4, h5, h6, blockquote, caption, figcaption, p {
	text-wrap: pretty;
}

/*
 * Change the position of the more block on the front, by making it a block level element.
 * https://github.com/WordPress/gutenberg/issues/65934
*/
.more-link {
	display: block;
}

a:focus {
	outline: none; /* Odstraní standardní focus */
}

a:focus-visible {
	outline: 2px solid #162D6F; /* Přidá zvýraznění pouze při navigaci pomocí klávesnice */
}



.custom-hr {
	width: 60%;
	margin: 20px auto;
	border: 1px solid #000;
}


.underline-link {
	display: inline-block;
	font-size: 24px;
	font-weight: bold;
	text-transform: uppercase;
	text-decoration: none; /* Odstraní standardní podtržení */
	color: black; /* Barva textu */
	position: relative; /* Pro správné umístění pseudo-elementu */
}

.underline-link::after {
	content: "";
	display: block;
	height: 2px; /* Tloušťka čáry */
	width: 30px; /* Výchozí délka čáry */
	background: #1E3A8A; /* Barva čáry */
	margin-top: 5px; /* Vzdálenost od textu */
	transition: width 0.25s ease-in-out; /* Animace */
}

/* Efekt při najetí myší */
.underline-link:hover::after {
	width: 100%; /* Čára se roztáhne na celou šířku textu */
}

.underline-title {
	display: inline-block;
	font-size: 24px;
	font-weight: bold;
	text-transform: uppercase;
	text-decoration: none; /* Odstraní standardní podtržení */
	color: black; /* Barva textu */
	position: relative; /* Pro správné umístění pseudo-elementu */
}

.underline-title::after {
	content: "";
	display: block;
	height: 2px; /* Tloušťka čáry */
	width: 30px; /* Výchozí délka čáry */
	background: #1E3A8A; /* Barva čáry */
	margin-top: 5px; /* Vzdálenost od textu */
}




/* HOME POST GRID */

/* Hlavní blok příspěvku s rovnoměrným rozdělením */
.wp-block-group-post {
	display: flex;
	flex-direction: column;
	justify-content: space-between; /* Rovnoměrné rozložení */
	height: 100%;
	min-height: 400px; /* Stejná výška všech karet */
}

/* Zarovnání title */
.dynamic-margin-title {
	margin-bottom: 20px;
	min-height: 75px; /* Stejná výška pro nadpisy */
	display: flex;
	/*align-items: center; !* Vertikální zarovnání nadpisu *!*/
}

/* Výňatek (post-excerpt) zarovnaný vlevo */
.post-excerpt-container {
	flex-grow: 1;
	display: flex;
	align-items: flex-start;
	justify-content: flex-start;
	margin-bottom: 20px;
	min-height: 80px; /* Stejná výška výňatku */
}

/* Zarovnání tlačítka Číst dále doprava a na stejný řádek */
.wp-block-buttons {
	display: flex;
	justify-content: flex-end;
	margin-top: auto; /* Posune tlačítko dolů */
	padding-top: 18px;
	padding-bottom: 38px;
}

.wp-block-button__link {
	padding: 8px 16px;
	font-size: 0.9rem;
	background-color: var(--wp--preset--color--primary);
	color: white;
	border-radius: 5px;
	text-decoration: none;
	white-space: nowrap; /* Zabrání zalomení textu tlačítka */
}

.wp-block-button__link:hover {
	background-color: var(--wp--preset--color--primary-dark);
}

.wp-category-buttons {
	display: flex;
	gap: 3px; /* Mezera mezi tlačítky */
	flex-wrap: wrap; /* Přizpůsobí se šířce */
}

.wp-category-button__link {
	display: inline-block;
	padding: 6px 12px;
	background-color: #1E3A8A;
	color: white;
	font-size: 0.85rem;
	font-weight: 600;
	border-radius: 5px;
	text-decoration: none;
	white-space: nowrap;
}

.wp-category-button__link:hover {
	background-color: #162D6F;
}

/* Skrytí oddělovače čárky mezi kategoriemi */
.wp-block-post-terms__separator {
	display: none;
}

/* END HOME POST GRID */



/* Kontejner pro projekty - použije flexbox */
.wp-projects-container {
	display: flex;
	justify-content: space-between;
	align-items: stretch;
	gap: 40px;
}

/* Celý sloupec jako odkaz */
.wp-project-column {
	display: block;
	text-decoration: none; /* Odebere podtržení */
	padding: 20px;
	transition: all 0.3s ease-in-out;
	background-color: white;
	color: black;
}

.wp-project-column:hover {
	background-color: #f5f5f5; /* Lehké zesvětlení při hoveru */
	transform: translateY(-5px); /* Efekt nadzvednutí */
}

/* Nadpis na střed */
.wp-project-column .wp-block-post-title {
	text-align: center;
	font-weight: 600;
	margin-bottom: 10px;
}

/* Klikací sloupec nesmí mít podtržené odkazy */
.wp-project-column a {
	text-decoration: none;
	color: inherit;
	display: block;
	width: 100%;
	height: 100%;
}

/* Vertikální oddělovač - bude viditelný jen na velkých obrazovkách */
.vertical-separator {
	border-left: 1px solid #000;
	height: 125px;
	position:absolute;
	left: 50%;
	margin-top: 18px;
}

/* 📱 Na mobilu se vše změní na sloupce pod sebou */
@media (max-width: 768px) {
	.wp-projects-container {
		flex-direction: column;
		gap: 20px;
	}

	/*.wp-project-column {*/
	/*	width: 100%;*/
	/*}*/

	.vertical-separator {
		display: none;
	}
}


/*
 FOOTER
 */
/* Celkový styl footeru */
.footer-container {
	background-color: white;
	font-size: 14px;
	color: black;
	padding-bottom: 20px;
	max-width: 1280px; /* Maximální šířka footeru */
	margin: 0 auto; /* Zarovnání na střed */
	padding-top: 20px;
	padding-left: 20px; /* Přidá trochu prostoru od okraje na menších displejích */
	padding-right: 20px;
}


/* Červený horní pruh */
.footer-top-bar {
	background-color: #1E3A8A;
	height: 52px;
	width: 100%;
}

/* Hlavní obsah footeru */
.footer-content {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 40px;
	padding: 20px 0;
}

/* Styl pro jednotlivé sloupce */
.footer-column {
	width: 33%;
	min-width: 200px;
}

/* Oddělovač mezi sloupci */
.footer-separator {
	width: 1px;
	background-color: black;
	height: auto;
	min-height: 100px;
	align-self: stretch;
}

/* Logo */
.footer-logo {
	width: 150px;
	height: auto;
	margin-bottom: 10px;
	padding-left: 60px;
}
.footer-logo-center {
	display: flex;
	justify-content: center; /* Zarovná na střed */
	align-items: center;
	margin-top: 15px; /* Volitelná mezera */
}

/* Styl odkazů ve footeru */
.footer-column a {
	color: #1e3a8a;
	text-decoration: none;
	font-weight: 600;
}

.footer-column a:hover {
	text-decoration: underline;
}

/* Spodní navigace */
.footer-bottom {
	text-align: center;
	padding-top: 15px;
	font-size: 1rem;
}

.footer-bottom a {
	color: #0044CC;
	text-decoration: none;
	font-weight: 600;
}

.footer-bottom a:hover {
	text-decoration: underline;
}

/* 📱 Responzivita pro mobilní zařízení */
@media (max-width: 768px) {
	.footer-content {
		flex-direction: column;
		align-items: center;
		text-align: center;
		gap: 20px;
	}

	.footer-column {
		width: 100%;
	}

	.footer-separator {
		display: none;
	}

	.footer-bottom {
		text-align: center;
		padding-top: 15px;
		font-size: 13px;
	}

	.footer-logo {
		width: 150px;
		height: auto;
		margin-bottom: 10px;
		padding: 0;
	}
}
/*
 END FOOTER
 */


/*POST*/

/* Kontejner pro příspěvek */
.single-post-container {
	max-width: 800px;
	margin: 0 auto;
	padding: 20px;
}

/* Titulek příspěvku */
.single-post-title {
	text-transform: uppercase;
	text-align: center;
	font-size: 2rem;
	font-weight: bold;
	margin-bottom: 20px;
}

/* Kategorie (odkazy jako štítky) */
.single-post-categories {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin-bottom: 20px;
}

.category-badge {
	background-color: #173F96; /* Modrá barva */
	color: white;
	padding: 8px 12px;
	border-radius: 5px;
	font-size: 14px;
	text-decoration: none;
	font-weight: bold;
}

.category-badge:hover {
	background-color: #0F2A6C; /* Tmavší modrá při hoveru */
}

/* Hlavní obrázek */
.single-post-featured-image {
	text-align: center;
	margin-bottom: 20px;
}

.single-post-featured-image img {
	max-width: 900px; /* Maximální šířka */
	width: 100%; /* Responsivní přizpůsobení */
	height: auto;
	border-radius: 8px;
	display: block; /* Zabrání mezeře pod obrázkem */
	margin: 0 auto; /* Zarovnání na střed */
}

/* Obsah příspěvku */
.single-post-content {
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.7;
}


/*404*/

/* Kontejner pro 404 */
.error-404-container {
	max-width: 800px;
	margin: 0 auto;
	text-align: center;
	padding: 80px 20px;
}

/* Nadpis 404 */
.error-404-title {
	font-size: 2rem;
	font-weight: bold;
	text-transform: uppercase;
	margin-bottom: 20px;
}

/* Text pod nadpisem */
.error-404-text {
	font-size: 1rem;
	color: #666;
	margin-bottom: 20px;
}

/* Styl vyhledávacího formuláře */
.error-404-container .search-form {
	display: flex;
	justify-content: center;
	margin-top: 20px;
}

.error-404-container .search-field {
	padding: 10px;
	border: 1px solid #ccc;
	border-radius: 5px 0 0 5px;
	font-size: 1rem;
	width: 250px;
}

.error-404-container .search-submit {
	background-color: #173F96;
	color: white;
	border: none;
	padding: 10px 15px;
	border-radius: 0 5px 5px 0;
	font-size: 1rem;
	cursor: pointer;
}

.error-404-container .search-submit:hover {
	background-color: #0F2A6C;
}


/* END 404 */


/* SEARCH */

/* Hlavní kontejner vyhledávání */
.search-container {
	margin: 0 auto;
	padding: 40px 20px;
}

/* Titulek vyhledávání */
.search-header h1 {
	font-size: 2rem;
	text-transform: uppercase;
	font-weight: bold;
	margin-bottom: 20px;
}

/* Vlastní styl pro vyhledávací formulář */
.custom-search-form {
	display: flex;
	justify-content: center;
	margin-bottom: 30px;
}

.custom-search-form input[type="search"] {
	width: 100%;
	max-width: 400px;
	padding: 10px;
	border: 1px solid #ccc;
	border-radius: 5px 0 0 5px;
	font-size: 1rem;
}

.custom-search-form button {
	background-color: #173F96;
	color: white;
	border: none;
	padding: 10px 15px;
	border-radius: 0 5px 5px 0;
	font-size: 1rem;
	cursor: pointer;
}

.custom-search-form button:hover {
	background-color: #0F2A6C;
}


/* END SEARCH */


/* PAGINATION */
/* Paginace - hlavní kontejner */
.custom-pagination .pagination-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-size: 1rem;
	font-weight: 600;
	padding: 40px 0;
}

/* Číslované stránky - základní styl */
.custom-pagination .pagination-nav .page-numbers a {
	display: inline-block;
	padding: 8px 12px;
	border-radius: 5px;
	text-decoration: none;
	transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
	font-weight: bold;
	border: 2px solid transparent;
	color: #173F96;
}

/* Aktivní číslo stránky */
.custom-pagination .pagination-nav .page-numbers .current {
	background-color: #1E3A8A;
	color: white;
	border-color: #1E3A8A;
	padding: 8px 12px;
	border-radius: 5px;
	font-weight: bold;
	cursor: default;
}

/* ✅ Hover efekt výhradně na číslo stránky */
.custom-pagination .pagination-nav .page-numbers a:hover {
	background-color: rgba(30, 58, 138, 0.15); /* Jemné modré pozadí */
	color: #1E3A8A;
	border-color: rgba(30, 58, 138, 0.5);
	box-shadow: 0px 0px 6px rgba(30, 58, 138, 0.3); /* Jemný stín */
	cursor: pointer;
}

/* Hover NEBUDE fungovat na aktivní stránku */
.custom-pagination .pagination-nav .page-numbers .current:hover {
	background-color: #1E3A8A;
	color: white;
	border-color: #1E3A8A;
	box-shadow: none;
	cursor: default;
}

/* Odkazy na předchozí a další stránku */
.custom-pagination .pagination-nav .prev-page a,
.custom-pagination .pagination-nav .next-page a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 16px;
	background: #173F96;
	color: white;
	font-size: 1rem;
	font-weight: bold;
	border-radius: 5px;
	border: 2px solid #173F96;
	transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
	text-decoration: none;
}

/* Hover efekt pro tlačítka Předchozí / Další */
.custom-pagination .pagination-nav .prev-page a:hover,
.custom-pagination .pagination-nav .next-page a:hover {
	background: white;
	color: #173F96;
	border-color: #173F96;
	box-shadow: 0px 0px 8px rgba(30, 58, 138, 0.4); /* Jemný stín */
	cursor: pointer;
}

/* Mobilní zobrazení */
@media (max-width: 768px) {
	.custom-pagination .pagination-nav {
		gap: 5px;
		overflow-x: auto;
		white-space: nowrap;
		justify-content: center;
	}

	/* Omezíme zobrazení čísel na aktuální stránku + 1 číslo před a za ní */
	.custom-pagination .page-numbers {
		display: none;
	}

	.custom-pagination .page-numbers.current,
	.custom-pagination .page-numbers.current + a,
	.custom-pagination .page-numbers.current - a {
	display: inline-block;
}

	/* Upravíme tlačítka Předchozí/Další */
	.custom-pagination .prev-page a,
	.custom-pagination .next-page a {
		padding: 8px 12px;
		font-size: 0.9rem;
	}
}


/* END PAGINATION */


/* === POST GRID === */
.custom-post-grid {
	padding-bottom: 40px;
}

/* Styl pro grid příspěvků */
.post-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

/* Každý příspěvek bude mít stejnou výšku */
.post-item {
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	padding: 16px;
	padding-top: 15px;
	padding-bottom: 5px;
	display: flex;
	flex-direction: column;
	height: 100%; /* Každý post-item bude mít stejnou výšku */
	position: relative;
}

.post-item a.full-link {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 10;
	text-decoration: none; /* Odstraní podtržení */
}

/* Obrázek příspěvku */
.post-image-link {
	width: 100%;
	height: 180px;
	display: block;
	overflow: hidden;
	border-radius: 8px;
	position: relative;
}

.post-thumbnail {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease-in-out;
}

/* Overlay efekt přes obrázek při hoveru na celý příspěvek */
.post-item:hover .post-image-link::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(30, 58, 138, 0.5); /* Modrá průhledná vrstva */
	opacity: 1;
	transition: opacity 0.3s ease-in-out;
	border-radius: 8px;
}

.post-image-link::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(30, 58, 138, 0.5);
	opacity: 0;
	transition: opacity 0.3s ease-in-out;
	border-radius: 8px;
}

/* Podtržení titulku při hoveru */
.post-item:hover .post-title a {
	text-decoration: underline;
}

/* Kategorie příspěvku */
.post-categories {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	padding-top: 12px;
}

/* Každá kategorie ve vlastním obdélníku */
.category-badge {
	background-color: #1E3A8A;
	color: white;
	padding: 3px 6px;
	font-size: 0.85rem;
	font-weight: 600;
	border-radius: 5px;
	text-decoration: none;
	display: inline-block;
	white-space: nowrap;
}

.category-badge a {
	color: white;
	text-decoration: none;
	display: flex;
	justify-content: center;
	align-items: center;
}

.category-badge:hover {
	background-color: #162D6F;
}

/* Titulek příspěvku - nastavíme minimální výšku */
.post-title {
	font-size: 1.2rem;
	font-weight: 700;
	margin-bottom: 10px;
	min-height: 56px; /* Stejná výška pro všechny titulky */
}

.post-title a {
	text-decoration: none;
	color: black;
}

.post-title a:hover {
	color: #1E3A8A;
}

/* Výňatek - nastavíme minimální výšku */
.post-excerpt {
	font-size: var(--wp--preset--font-size--medium);
	color: #333;
	flex-grow: 1;
	line-height: 1.7;
	min-height: 130px; /* Stejná výška pro všechny výňatky */
}

/* Tlačítko Číst dále - zarovnáme dolů */
.read-more-container {
	display: flex;
	justify-content: flex-end;
	margin-top: auto; /* Posune tlačítko dolů, aby byly všechny stejné */
}

.read-more {
	display: inline-block;
	background: #1E3A8A;
	color: white;
	text-decoration: none;
	padding: 8px 12px;
	border-radius: 4px;
	font-weight: 600;
	font-size: 0.9rem;
}

.read-more:hover {
	background: #162D6F;
}

/* === RESPONSIVITA === */
@media (max-width: 1024px) {
	.post-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.post-grid {
		grid-template-columns: repeat(1, 1fr);
	}
}
