/*
Theme Name: Železnice HP
Theme URI: https://zeleznice-hp.cz
Description: Šablona pro web ŽELEZNICE HP – modelová i skutečná železnice. Vzhled inspirovaný železničním návěstidlem a starými jízdními řády.
Author: Železnice HP
Version: 1.0.0
Template: twentytwentyfive
Requires at least: 6.7
Tested up to: 7.0
Requires PHP: 8.0
Text Domain: zeleznice-hp
*/

/* ==========================================================================
   1. Základ
   ========================================================================== */

:root {
	--zhp-red: #b3271e;
	--zhp-brass: #c08a2e;
	--zhp-dark: #10181f;
	--zhp-slate: #22303d;
	--zhp-line: rgba(255, 255, 255, .14);
}

body {
	overflow-x: hidden;
}

/* ==========================================================================
   2. Hlavička
   ========================================================================== */

.zhp-header {
	border-bottom: 4px solid var(--zhp-red);
	background-image: linear-gradient(180deg, #16202a 0%, #10181f 100%);
}

.zhp-header__row {
	gap: clamp(1rem, 3vw, 2.5rem);
	padding-block: .9rem;
}

.zhp-header__contact {
	text-align: right;
	line-height: 1.35;
}

.zhp-header__label {
	display: block;
	font-size: .72rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #8d99a6;
}

.zhp-header__contact a {
	font-family: "Roboto Slab", Georgia, serif;
	font-size: 1.15rem;
	font-weight: 700;
	color: #fff;
	text-decoration: none;
	letter-spacing: .04em;
}

.zhp-header__contact a:hover { color: var(--zhp-brass); }

.zhp-navbar {
	border-top: 1px solid rgba(255, 255, 255, .1);
	background: rgba(0, 0, 0, .28);
	padding-block: .1rem;
}

.zhp-brand {
	gap: 1rem !important;
	align-items: center;
}

.zhp-brand .wp-block-site-logo img {
	border-radius: 4px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .45);
}

.zhp-brand__text {
	gap: .1rem !important;
}

.zhp-brand .wp-block-site-title a {
	font-family: "Roboto Slab", Georgia, serif;
	font-size: clamp(1.15rem, 2.4vw, 1.6rem);
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #fff;
	text-decoration: none;
	line-height: 1.15;
}

.zhp-brand .wp-block-site-title a:hover {
	color: var(--zhp-brass);
}

.zhp-brand .wp-block-site-tagline {
	font-size: .78rem;
	letter-spacing: .13em;
	text-transform: uppercase;
	color: var(--zhp-brass);
	margin: 0;
}

/* Navigace */
.zhp-nav {
	font-size: .82rem;
	font-weight: 600;
	letter-spacing: .05em;
	text-transform: uppercase;
	width: 100%;
}

.zhp-nav .wp-block-navigation__container {
	gap: 0;
}

.zhp-nav .wp-block-navigation-item {
	position: relative;
}

.zhp-nav a {
	display: block;
	color: #d7dde3;
	text-decoration: none;
	padding: .8rem .85rem;
	border-bottom: 3px solid transparent;
	transition: color .15s, border-color .15s, background-color .15s;
}

.zhp-nav a:hover,
.zhp-nav .current-menu-item > a {
	color: #fff;
	background: rgba(255, 255, 255, .06);
	border-bottom-color: var(--zhp-red);
}

.zhp-nav .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--zhp-dark);
	color: #fff;
	padding-top: 4rem;
}

.zhp-nav .wp-block-navigation__responsive-container.is-menu-open a {
	font-size: 1.05rem;
}

/* ==========================================================================
   3. Hero na úvodní stránce
   ========================================================================== */

.zhp-hero {
	min-height: clamp(280px, 44vh, 460px);
}

.zhp-hero .wp-block-cover__background {
	background-color: transparent !important;
	background-image: linear-gradient(180deg, rgba(9, 14, 19, .3) 0%, rgba(9, 14, 19, .55) 45%, rgba(9, 14, 19, .85) 100%) !important;
	opacity: 1 !important;
}

.zhp-hero .wp-block-cover__inner-container {
	padding-block: clamp(2rem, 6vw, 4rem);
}

.zhp-hero__title {
	font-family: "Roboto Slab", Georgia, serif;
	font-size: clamp(1.9rem, 5.2vw, 3.4rem);
	font-weight: 700;
	line-height: 1.08;
	letter-spacing: .02em;
	text-transform: uppercase;
	text-shadow: 0 3px 18px rgba(0, 0, 0, .6);
	margin: 0;
}

.zhp-hero__title .zhp-accent {
	color: var(--zhp-brass);
}

.zhp-hero__sub {
	max-width: 46rem;
	margin-inline: auto;
	font-size: clamp(.95rem, 1.7vw, 1.15rem);
	letter-spacing: .04em;
	text-shadow: 0 2px 10px rgba(0, 0, 0, .6);
}

.zhp-hero__rule {
	width: 84px;
	height: 4px;
	background: var(--zhp-red);
	margin: 1.1rem auto;
	border: 0;
}

/* ==========================================================================
   4. Záhlaví stránky (podstránky)
   ========================================================================== */

.zhp-pagehead {
	background:
		repeating-linear-gradient(135deg, rgba(255, 255, 255, .028) 0 12px, transparent 12px 24px),
		linear-gradient(180deg, #22303d 0%, #16202a 100%);
	border-bottom: 4px solid var(--zhp-red);
	padding-block: clamp(1.6rem, 4vw, 2.8rem);
}

.zhp-pagehead .wp-block-post-title {
	font-family: "Roboto Slab", Georgia, serif;
	font-size: clamp(1.5rem, 3.6vw, 2.4rem);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: #fff;
	margin: 0;
}

.zhp-pagehead .zhp-breadcrumb {
	font-size: .78rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--zhp-brass);
	margin: 0 0 .45rem;
}

.zhp-pagehead .zhp-breadcrumb a {
	color: inherit;
	text-decoration: none;
}

/* ==========================================================================
   5. Obsah – typografie přenesená z Webnode
   ========================================================================== */

.zhp-content {
	padding-block: clamp(2rem, 5vw, 3.4rem);
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5 {
	font-family: "Roboto Slab", Georgia, serif;
	line-height: 1.25;
	color: #16202a;
	margin: 2.2rem 0 .8rem;
	letter-spacing: .01em;
}

.entry-content h1 { font-size: clamp(1.5rem, 3.4vw, 2.05rem); }
.entry-content h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); }
.entry-content h3 { font-size: clamp(1.15rem, 2.4vw, 1.4rem); }
.entry-content h4 { font-size: 1.15rem; }
.entry-content h5 { font-size: 1.02rem; font-weight: 600; }

/* první nadpis nemá odsazovat od záhlaví */
.entry-content > *:first-child { margin-top: 0; }

/* podtržený nadpis = z Webnode; nahradíme decentní linkou */
.entry-content h1 u,
.entry-content h2 u,
.entry-content h3 u,
.entry-content h4 u,
.entry-content h5 u {
	text-decoration: none;
	border-bottom: 3px solid var(--zhp-red);
	padding-bottom: .12em;
}

.entry-content p {
	margin: 0 0 1.1rem;
	line-height: 1.75;
}

.entry-content a {
	color: var(--zhp-red);
	text-underline-offset: .18em;
}

.entry-content a:hover {
	color: #8d1c15;
}

.entry-content ul,
.entry-content ol {
	margin: 0 0 1.2rem 1.4rem;
	line-height: 1.7;
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 1.4rem;
	font-size: .95rem;
}

.entry-content table td,
.entry-content table th {
	border: 1px solid #ddd6cb;
	padding: .5rem .65rem;
	vertical-align: top;
}

.entry-content blockquote {
	border-left: 4px solid var(--zhp-brass);
	margin: 1.4rem 0;
	padding: .3rem 0 .3rem 1.1rem;
	font-style: italic;
	color: #3d4a56;
}

/* Fotografie */
.entry-content .zhp-lb {
	display: block;
	margin: 1.5rem auto;
	max-width: 100%;
	width: fit-content;
	line-height: 0;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 6px 22px rgba(16, 24, 31, .16);
	transition: transform .18s ease, box-shadow .18s ease;
}

.entry-content .zhp-lb:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 30px rgba(16, 24, 31, .26);
}

.entry-content img.zhp-photo {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: 8px;
}

/* dvě a více fotek za sebou v jednom odstavci = mřížka */
.entry-content p:has(> .zhp-lb + .zhp-lb),
.entry-content h1:has(> .zhp-lb + .zhp-lb),
.entry-content h3:has(> .zhp-lb + .zhp-lb) {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 1rem;
	align-items: start;
}

.entry-content p:has(> .zhp-lb + .zhp-lb) .zhp-lb,
.entry-content h1:has(> .zhp-lb + .zhp-lb) .zhp-lb,
.entry-content h3:has(> .zhp-lb + .zhp-lb) .zhp-lb {
	margin: 0;
	width: 100%;
}

.entry-content p:has(> .zhp-lb + .zhp-lb) img,
.entry-content h1:has(> .zhp-lb + .zhp-lb) img,
.entry-content h3:has(> .zhp-lb + .zhp-lb) img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

/* ==========================================================================
   6. Lightbox
   ========================================================================== */

.zhp-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(8, 12, 16, .93);
	padding: clamp(.5rem, 3vw, 2.5rem);
}

.zhp-lightbox.is-open { display: flex; }

.zhp-lightbox img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	border-radius: 6px;
	box-shadow: 0 12px 50px rgba(0, 0, 0, .6);
}

.zhp-lightbox__btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255, 255, 255, .1);
	border: 1px solid rgba(255, 255, 255, .25);
	color: #fff;
	font-size: 1.9rem;
	line-height: 1;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	cursor: pointer;
	display: grid;
	place-items: center;
}

.zhp-lightbox__btn:hover { background: var(--zhp-red); border-color: var(--zhp-red); }
.zhp-lightbox__prev { left: max(.6rem, 2vw); }
.zhp-lightbox__next { right: max(.6rem, 2vw); }

.zhp-lightbox__close {
	position: absolute;
	top: max(.6rem, 2vw);
	right: max(.6rem, 2vw);
	transform: none;
}

.zhp-lightbox__count {
	position: absolute;
	bottom: max(.7rem, 2vw);
	left: 0;
	right: 0;
	text-align: center;
	color: rgba(255, 255, 255, .75);
	font-size: .82rem;
	letter-spacing: .1em;
}

@media (max-width: 600px) {
	.zhp-lightbox__btn { width: 42px; height: 42px; font-size: 1.5rem; }
}

/* ==========================================================================
   7. Patička
   ========================================================================== */

.zhp-footer {
	background-image: linear-gradient(180deg, #16202a 0%, #0c1319 100%);
	border-top: 4px solid var(--zhp-red);
	color: #cfd6dd;
	font-size: .95rem;
}

.zhp-footer h2,
.zhp-footer h3 {
	font-family: "Roboto Slab", Georgia, serif;
	font-size: .92rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--zhp-brass);
	margin: 0 0 .8rem;
}

.zhp-footer p { margin: 0 0 .45rem; line-height: 1.6; }
.zhp-footer a { color: #fff; text-decoration: none; border-bottom: 1px solid var(--zhp-line); }
.zhp-footer a:hover { color: var(--zhp-brass); border-color: currentColor; }

.zhp-footer .wp-block-page-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: .35rem;
	font-size: .92rem;
}

.zhp-footer .wp-block-page-list a { border: 0; }

.zhp-footer__bottom {
	border-top: 1px solid var(--zhp-line);
	margin-top: 2rem;
	padding-top: 1.1rem;
	font-size: .82rem;
	color: #8d99a6;
}

.zhp-footer__bottom a { border: 0; color: #b6c0ca; }

/* ==========================================================================
   8. Rozcestník na úvodu
   ========================================================================== */

.zhp-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 1.1rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.zhp-cards a {
	display: block;
	padding: 1.15rem 1.2rem;
	background: #fff;
	border: 1px solid #e4ded4;
	border-left: 4px solid var(--zhp-red);
	border-radius: 6px;
	text-decoration: none;
	color: #16202a;
	font-family: "Roboto Slab", Georgia, serif;
	font-weight: 700;
	font-size: .98rem;
	letter-spacing: .02em;
	box-shadow: 0 2px 10px rgba(16, 24, 31, .06);
	transition: transform .15s, box-shadow .15s, border-color .15s;
}

.zhp-cards a:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 24px rgba(16, 24, 31, .14);
	border-left-color: var(--zhp-brass);
	color: var(--zhp-red);
}

.zhp-cards span {
	display: block;
	margin-top: .3rem;
	font-family: "Fira Sans", sans-serif;
	font-weight: 400;
	font-size: .84rem;
	color: #5c6772;
	letter-spacing: 0;
}

/* Výpis aktualit */
.zhp-postcard {
	background: #fff;
	border: 1px solid #e4ded4;
	border-left: 4px solid var(--zhp-red);
	border-radius: 6px;
	padding: 1.3rem 1.5rem;
	margin-bottom: 1.2rem;
	box-shadow: 0 2px 10px rgba(16, 24, 31, .06);
}

.zhp-postcard .wp-block-post-title {
	margin: .3rem 0 .6rem;
	font-size: clamp(1.2rem, 2.6vw, 1.5rem);
}

.zhp-postcard .wp-block-post-title a {
	color: #16202a;
	text-decoration: none;
}

.zhp-postcard .wp-block-post-title a:hover { color: var(--zhp-red); }

.zhp-postcard .wp-block-post-excerpt__excerpt { color: #4a5561; }

.zhp-postcard .wp-block-post-excerpt__more-link {
	display: inline-block;
	margin-top: .4rem;
	font-weight: 600;
	color: var(--zhp-red);
}

/* nadpis sekce */
.zhp-sectitle {
	font-family: "Roboto Slab", Georgia, serif;
	font-size: clamp(1.2rem, 2.6vw, 1.5rem);
	text-transform: uppercase;
	letter-spacing: .06em;
	color: #16202a;
	margin: 0 0 1.2rem;
	padding-bottom: .5rem;
	border-bottom: 3px solid var(--zhp-red);
}

/* ==========================================================================
   9. Drobnosti
   ========================================================================== */

.wp-block-post-date,
.zhp-meta {
	font-size: .82rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #5c6772;
}

@media (max-width: 781px) {
	.zhp-header__row { row-gap: .5rem; }
	.zhp-header__label { display: none; }
	.zhp-navbar { background: transparent; border-top: 0; }
	.zhp-nav { width: auto; }
	.entry-content .zhp-lb { margin: 1.1rem auto; }
}

@media (max-width: 600px) {
	.zhp-header__contact { text-align: left; }
	.zhp-brand .wp-block-site-title a { font-size: 1.1rem; }
}
