/* ==========================================================================
   Foxbau Blog – barvy převzaté z foxbau.cz
   Úpravy dělejte ve Vzhled › Přizpůsobit › Doplňující CSS přepsáním proměnných.
   ========================================================================== */
:root {
	--fb-accent: #ff3131;        /* červená tlačítka Foxbau */
	--fb-accent-hover: #e02020;
	--fb-accent-text: #ffffff;
	--fb-heading: #2b2f38;       /* tmavá nadpisů */
	--fb-text: #5d6167;          /* šedý text webu */
	--fb-card-bg: #f2f2f2;       /* pozadí karty */
	--fb-radius: 0;              /* zaoblení rohů (karty, box se strojem, galerie, video); 0 = rovné */
	--fb-btn-radius: 3px;
	--fb-gap: 30px;
	--fb-img-ratio: 16 / 9;
	--fb-font: "Poppins", sans-serif;
	--fb-title-lines: 2;         /* nadpis má vždy výšku 2 řádků, delší se zkrátí „…“ */
	--fb-excerpt-lines: 3;       /* popis má vždy výšku 3 řádků */
}

.fb-blog { font-family: var(--fb-font); color: var(--fb-text); }
/* Poppins všude – i tam, kde téma nastavuje vlastní písmo nadpisům, tlačítkům a odkazům */
.fb-blog, .fb-blog *:not(svg):not(path), .fb-lb, .fb-lb * { font-family: var(--fb-font) !important; }
.fb-blog *, .fb-blog *::before, .fb-blog *::after { box-sizing: border-box; }

/* --------------------------------------------------------------------------
   Karta
   -------------------------------------------------------------------------- */
.fb-card {
	display: flex; flex-direction: column; height: 100%;
	background: var(--fb-card-bg); border-radius: var(--fb-radius); overflow: hidden;
	transition: transform .25s ease, box-shadow .25s ease;
}
.fb-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(43, 47, 56, .14); }

.fb-card-media { position: relative; display: block; aspect-ratio: var(--fb-img-ratio); overflow: hidden; background: #d9d9d9; }
.fb-card-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.fb-card:hover .fb-card-media img { transform: scale(1.05); }
.fb-card-noimg { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #e6e6e6, #cfcfcf); }

/* Štítek kategorie – přilepený na spodní hraně obrázku vlevo */
.fb-badge {
	position: absolute; left: 0; bottom: 0; z-index: 1;
	min-width: 40%; padding: 9px 26px; text-align: center;
	background: var(--fb-accent); color: var(--fb-accent-text);
	font-size: 15px; font-weight: 700; line-height: 1.2; letter-spacing: .03em; text-transform: uppercase;
}

.fb-card-body { display: flex; flex-direction: column; flex: 1; padding: 22px 24px 30px; }

.fb-blog .fb-card-title {
	margin: 0 0 18px; font-family: var(--fb-font);
	font-size: 22px; line-height: 1.25; font-weight: 700; color: var(--fb-heading);
	/* pevná výška = všechny karty zarovnané bez ohledu na délku nadpisu */
	height: calc(1.25em * var(--fb-title-lines)); overflow: hidden;
	display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--fb-title-lines); line-clamp: var(--fb-title-lines);
}
.fb-card-title a { color: inherit !important; text-decoration: none !important; }
.fb-card-title a:hover { color: var(--fb-accent) !important; }

.fb-card-meta { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fb-card-meta li { display: flex; align-items: center; gap: 10px; margin: 0; padding: 0; font-size: 16px; line-height: 1.4; color: var(--fb-text); }
.fb-card-meta svg { flex: 0 0 auto; color: var(--fb-accent); }

.fb-card-excerpt {
	margin: 0 0 24px; font-size: 15px; line-height: 1.6; color: var(--fb-text);
	height: calc(1.6em * var(--fb-excerpt-lines)); overflow: hidden;
	display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--fb-excerpt-lines); line-clamp: var(--fb-excerpt-lines);
}

.fb-card-actions { margin-top: auto; text-align: center; }

/* --------------------------------------------------------------------------
   Tlačítka (stejný styl jako „Detail“ na foxbau.cz)
   -------------------------------------------------------------------------- */
.fb-btn,
.fb-blog .fb-btn {
	display: inline-block; padding: 13px 30px; border: 0; border-radius: var(--fb-btn-radius);
	background: var(--fb-accent); color: var(--fb-accent-text) !important;
	font-family: var(--fb-font); font-size: 15px; font-weight: 700; line-height: 1.2;
	letter-spacing: .02em; text-transform: uppercase; text-decoration: none !important;
	transition: background-color .2s ease, transform .2s ease;
}
.fb-btn:hover, .fb-btn:focus-visible { background: var(--fb-accent-hover); color: var(--fb-accent-text) !important; transform: translateY(-1px); }

.fb-all { margin-top: 40px; text-align: center; }

/* --------------------------------------------------------------------------
   Carousel
   -------------------------------------------------------------------------- */
.fb-carousel { --fb-per-view: var(--fb-cols, 3); position: relative; }
@media (max-width: 1024px) { .fb-carousel { --fb-per-view: min(var(--fb-cols, 3), 2); } }
@media (max-width: 680px)  { .fb-carousel { --fb-per-view: 1; } }

.fb-track {
	display: grid; grid-auto-flow: column;
	grid-auto-columns: calc((100% - (var(--fb-per-view) - 1) * var(--fb-gap)) / var(--fb-per-view));
	gap: var(--fb-gap);
	overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth;
	padding: 6px 0 14px; scrollbar-width: none;
}
.fb-track::-webkit-scrollbar { display: none; }
.fb-track:focus-visible { outline: 2px solid var(--fb-accent); outline-offset: 4px; }
.fb-track > .fb-card { scroll-snap-align: start; }
@media (max-width: 680px) {
	/* na mobilu vykoukne kousek další karty, aby bylo jasné, že se dá posouvat */
	.fb-track { grid-auto-columns: 86%; gap: 16px; }
}

.fb-nav { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 24px; }
.fb-nav[hidden] { display: none; }
.fb-arrow {
	width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center;
	border: 2px solid var(--fb-heading); border-radius: 50%; background: transparent; color: var(--fb-heading);
	cursor: pointer; padding: 0; transition: background-color .2s, color .2s, border-color .2s, opacity .2s;
}
.fb-arrow:hover:not(:disabled) { background: var(--fb-accent); border-color: var(--fb-accent); color: #fff; }
.fb-arrow:disabled { opacity: .3; cursor: default; }

.fb-dots { display: flex; gap: 8px; }
.fb-dot {
	width: 10px; height: 10px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
	background: #cfcfcf; transition: width .25s ease, background-color .25s ease;
}
.fb-dot.is-active { width: 28px; background: var(--fb-accent); }

/* --------------------------------------------------------------------------
   Mřížka (zobrazeni="mrizka")
   -------------------------------------------------------------------------- */
.fb-grid { display: grid; gap: var(--fb-gap); grid-template-columns: repeat(var(--fb-cols, 3), minmax(0, 1fr)); }
@media (max-width: 1024px) { .fb-grid { grid-template-columns: repeat(min(var(--fb-cols, 3), 2), minmax(0, 1fr)); } }
@media (max-width: 680px)  { .fb-grid { grid-template-columns: 1fr; } }

.fb-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0 0 var(--fb-gap); }
.fb-filter a {
	padding: 10px 22px; border-radius: var(--fb-btn-radius); background: var(--fb-card-bg); color: var(--fb-heading);
	font-weight: 700; font-size: 14px; text-transform: uppercase; text-decoration: none; transition: background-color .2s, color .2s;
}
.fb-filter a:hover, .fb-filter a.is-active { background: var(--fb-accent); color: var(--fb-accent-text); }

.fb-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: var(--fb-gap); }
.fb-pagination .page-numbers {
	min-width: 42px; padding: 10px 12px; border-radius: var(--fb-btn-radius); text-align: center;
	background: var(--fb-card-bg); color: var(--fb-heading); font-weight: 700; text-decoration: none;
}
.fb-pagination .page-numbers.current, .fb-pagination a.page-numbers:hover { background: var(--fb-accent); color: #fff; }
.fb-pagination .page-numbers.dots { background: none; }

/* --------------------------------------------------------------------------
   Video
   -------------------------------------------------------------------------- */
.fb-video { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 1.5em 0; border-radius: var(--fb-radius); overflow: hidden; background: #000; }
.fb-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.fb-empty { text-align: center; color: var(--fb-text); }

@media (prefers-reduced-motion: reduce) {
	.fb-track { scroll-behavior: auto; }
	.fb-card, .fb-card-media img, .fb-btn, .fb-dot { transition: none; }
}

@media (max-width: 680px) {
	.fb-blog .fb-card-title { font-size: 20px; }
	.fb-card-body { padding: 20px 20px 26px; }
	.fb-btn, .fb-blog .fb-btn { padding: 12px 22px; white-space: nowrap; }
}

/* ==========================================================================
   Detail článku
   ========================================================================== */
body.fb-single-page { overflow-x: clip; }
.fb-single { flex: 1 1 100%; width: 100%; max-width: 100%; margin: 0; padding: 0; }
/* Šablona Astra dává článkům vlastní odsazení a rámeček – u blogu ho rušíme,
   aby záhlaví s obrázkem navazovalo přímo na menu. */
.ast-separate-container article.fb-single,
.ast-plain-container article.fb-single,
.ast-page-builder-template article.fb-single,
article.fb-single.fb-single {
	padding: 0 !important; margin: 0 !important; border: 0 !important;
	background: transparent !important; box-shadow: none !important;
}

/* Záhlaví s obrázkem přes celou šířku */
.fb-hero {
	position: relative; display: flex; align-items: flex-end; min-height: 480px;
	margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
	background: var(--fb-heading); color: #fff; overflow: hidden;
}
.fb-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; max-width: none; }
.fb-hero.has-image::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(20, 22, 27, .25) 0%, rgba(20, 22, 27, .55) 45%, rgba(20, 22, 27, .9) 100%);
}
.fb-hero-inner { position: relative; z-index: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 56px 24px 52px; }
.fb-back {
	display: inline-flex; align-items: center; gap: 8px; margin-bottom: 34px;
	color: #fff !important; opacity: .85; font-weight: 600; font-size: 15px; text-decoration: none !important;
}
.fb-back:hover { opacity: 1; }
.fb-hero-inner > .fb-back + .fb-hero-badge { margin-top: 0; }
.fb-hero-badge {
	display: table; padding: 8px 22px; background: var(--fb-accent); color: var(--fb-accent-text);
	font-size: 14px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.fb-blog .fb-hero-title {
	max-width: 960px; margin: 18px 0 16px; color: #fff !important; font-family: var(--fb-font);
	font-size: clamp(30px, 4.6vw, 56px); line-height: 1.1; font-weight: 800; letter-spacing: -.01em;
	text-shadow: 0 2px 18px rgba(0,0,0,.25);
}
.fb-hero-meta { display: flex; align-items: center; gap: 10px; font-size: 16px; color: rgba(255,255,255,.9); }
.fb-hero-meta svg { color: var(--fb-accent); }

/* Obsah */
.fb-single-wrap { max-width: 860px; margin: 0 auto; padding: 56px 24px 10px; }
.fb-lead {
	margin: 0 0 36px; padding-left: 22px; border-left: 4px solid var(--fb-accent);
	font-size: 21px; line-height: 1.6; font-weight: 500; color: var(--fb-heading);
}
.fb-content { font-size: 17px; line-height: 1.8; color: var(--fb-text); }
.fb-content::after { content: ""; display: table; clear: both; }
.fb-content > *:first-child { margin-top: 0; }
.fb-content p { margin: 0 0 1.3em; }
.fb-content h2, .fb-content h3, .fb-content h4 { font-family: var(--fb-font); color: var(--fb-heading); font-weight: 700; line-height: 1.3; }
.fb-content h2 { font-size: 28px; margin: 1.7em 0 .6em; }
.fb-content h3 { font-size: 22px; margin: 1.5em 0 .5em; }
.fb-content h4 { font-size: 18px; margin: 1.4em 0 .5em; }
.fb-content a { color: var(--fb-accent); text-decoration: underline; text-underline-offset: 3px; }
.fb-content strong { color: var(--fb-heading); }
.fb-content ul, .fb-content ol { margin: 0 0 1.3em 1.4em; padding: 0; }
.fb-content li { margin-bottom: .45em; }
.fb-content ul li::marker { color: var(--fb-accent); }
.fb-content img { max-width: 100%; height: auto; border-radius: var(--fb-radius); }
.fb-content figure, .fb-content .wp-caption { max-width: 100%; margin: 1.8em 0; }
.fb-content .wp-caption-text, .fb-content figcaption { margin-top: 8px; font-size: 14px; color: #8a8d93; text-align: center; }
.fb-content .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.fb-content .alignleft { float: left; margin: .4em 1.6em 1em 0; max-width: 50%; }
.fb-content .alignright { float: right; margin: .4em 0 1em 1.6em; max-width: 50%; }
.fb-content blockquote {
	margin: 1.8em 0; padding: 20px 26px; background: var(--fb-card-bg); border-left: 4px solid var(--fb-accent);
	border-radius: 0; font-size: 19px; font-style: italic; color: var(--fb-heading);
}
.fb-content blockquote p:last-child { margin-bottom: 0; }
.fb-content table { width: 100%; border-collapse: collapse; margin: 0 0 1.5em; font-size: 16px; }
.fb-content th, .fb-content td { padding: 10px 14px; border-bottom: 1px solid #e3e3e3; text-align: left; }
.fb-content th { color: var(--fb-heading); background: var(--fb-card-bg); }

/* Sekce Video / Fotogalerie / Další články */
.fb-section { margin-top: 56px; }
.fb-blog .fb-section-title {
	position: relative; margin: 0 0 26px; padding-bottom: 14px; font-family: var(--fb-font);
	font-size: 28px; line-height: 1.2; font-weight: 800; text-transform: uppercase; color: var(--fb-heading);
}
.fb-section-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 4px; background: var(--fb-accent); }
.fb-section-video .fb-video { margin: 0 0 20px; }

.fb-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 680px) { .fb-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }
.fb-gallery-item { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--fb-radius); overflow: hidden; background: #e6e6e6; }
.fb-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s ease; }
.fb-gallery-zoom {
	position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
	background: rgba(43, 47, 56, .45); color: #fff; opacity: 0; transition: opacity .25s ease;
}
.fb-gallery-item:hover img, .fb-gallery-item:focus-visible img { transform: scale(1.06); }
.fb-gallery-item:hover .fb-gallery-zoom, .fb-gallery-item:focus-visible .fb-gallery-zoom { opacity: 1; }

/* Box s odkazem na stroj */
.fb-cta {
	display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap;
	margin: 56px 0 20px; padding: 36px 40px; border-radius: var(--fb-radius);
	background: var(--fb-heading); color: #fff;
	background-image: linear-gradient(120deg, var(--fb-heading) 60%, #3a404c 100%);
}
.fb-cta-text { flex: 1 1 340px; }
.fb-blog .fb-cta h2 { margin: 0 0 6px; color: #fff !important; font-family: var(--fb-font); font-size: 24px; line-height: 1.3; font-weight: 800; }
.fb-cta p { margin: 0; color: rgba(255,255,255,.8); font-size: 16px; line-height: 1.5; }
.fb-cta .fb-btn { padding: 15px 34px; font-size: 16px; }

/* Další články – pás přes celou šířku */
.fb-related {
	margin: 70px calc(50% - 50vw) 0; padding: 70px 0 80px; background: #f9f9f9;
}
.fb-related-inner { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.fb-related .fb-section-title { text-align: center; }
.fb-related .fb-section-title::after { left: 50%; transform: translateX(-50%); }
.fb-related .fb-card { background: #fff; }

@media (max-width: 680px) {
	.fb-hero { min-height: 380px; }
	.fb-hero-inner { padding: 40px 20px 34px; }
	.fb-back { margin-bottom: 22px; }
	.fb-single-wrap { padding: 36px 20px 0; }
	.fb-lead { font-size: 18px; padding-left: 16px; }
	.fb-content { font-size: 16px; }
	.fb-content h2 { font-size: 23px; }
	.fb-content .alignleft, .fb-content .alignright { float: none; margin: 1.4em 0; max-width: 100%; }
	.fb-blog .fb-section-title { font-size: 23px; }
	.fb-cta { padding: 28px 24px; }
	.fb-cta .fb-btn { width: 100%; text-align: center; }
	.fb-related { padding: 50px 0 60px; }
}

/* ==========================================================================
   Lightbox galerie
   ========================================================================== */
.fb-lb {
	position: fixed; inset: 0; z-index: 999999; display: flex; align-items: center; justify-content: center;
	background: rgba(14, 16, 20, .95); opacity: 0; transition: opacity .2s ease; font-family: var(--fb-font);
}
.fb-lb.is-open { opacity: 1; }
.fb-lb-figure { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: 92vw; }
.fb-lb-img { display: block; max-width: 92vw; max-height: 82vh; width: auto; height: auto; border-radius: 0; box-shadow: 0 10px 40px rgba(0,0,0,.5); user-select: none; }
.fb-lb-caption { margin-top: 14px; color: rgba(255,255,255,.85); font-size: 15px; text-align: center; min-height: 1em; }
.fb-lb-counter { position: absolute; top: 22px; left: 26px; color: rgba(255,255,255,.75); font-size: 15px; font-weight: 600; }
.fb-lb button {
	position: absolute; display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; padding: 0;
	border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; transition: background-color .2s;
}
.fb-lb button:hover, .fb-lb button:focus-visible { background: var(--fb-accent); outline: none; }
.fb-lb-close { top: 14px; right: 16px; font-size: 30px; line-height: 1; }
.fb-lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.fb-lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
.fb-lb.is-single .fb-lb-prev, .fb-lb.is-single .fb-lb-next, .fb-lb.is-single .fb-lb-counter { display: none; }
@media (max-width: 680px) {
	.fb-lb-prev, .fb-lb-next { top: auto; bottom: 18px; transform: none; }
	.fb-lb-prev { left: calc(50% - 64px); }
	.fb-lb-next { right: calc(50% - 64px); }
	.fb-lb-img { max-height: 70vh; }
}
