/* Šablona SDH Rakšice — BS5 nadstavba dle designu sdh1 (hasičská červená). Autor: Ondřej Klučka */

/* Self-hostovaný Roboto z jádra Joomly (media/vendor/roboto-fontface) */
@font-face {
	font-family: "Roboto"; font-style: normal; font-weight: 400; font-display: swap;
	src: url(/media/vendor/roboto-fontface/fonts/roboto/Roboto-Regular.woff2) format("woff2");
}
@font-face {
	font-family: "Roboto"; font-style: italic; font-weight: 400; font-display: swap;
	src: url(/media/vendor/roboto-fontface/fonts/roboto/Roboto-RegularItalic.woff2) format("woff2");
}
@font-face {
	font-family: "Roboto"; font-style: normal; font-weight: 500; font-display: swap;
	src: url(/media/vendor/roboto-fontface/fonts/roboto/Roboto-Medium.woff2) format("woff2");
}
@font-face {
	font-family: "Roboto"; font-style: normal; font-weight: 700; font-display: swap;
	src: url(/media/vendor/roboto-fontface/fonts/roboto/Roboto-Bold.woff2) format("woff2");
}

:root {
	--sdh-brand: #ec483b;
	--sdh-brand-dark: #c8362b;
	--sdh-ink: #282e3f;
	--sdh-muted: #6b6b6b;
	--sdh-soft: #f5f5f7;
	--sdh-green: #84c118;
}

/* vlastní font-stack (nezávislý na systémových fontech) */
body.site {
	font-family: "Roboto", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, "Liberation Sans", sans-serif;
	color: var(--sdh-ink);
	background: #fff;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	line-height: 1.6;
}
body.site > main { flex: 1 0 auto; }

a { color: var(--sdh-brand); text-decoration: none; }
a:hover, a:focus { color: var(--sdh-brand-dark); text-decoration: underline; }

a:focus-visible, button:focus-visible, .nav-link:focus-visible, .form-control:focus-visible {
	outline: 3px solid var(--sdh-brand);
	outline-offset: 2px;
}

/* ---------- TOPBAR ---------- */
.sdh-topbar {
	background: var(--sdh-brand);
	color: #fff;
	padding: .4rem 0;
	font-size: .85rem;
}
.sdh-topbar a { color: #fff; }
.sdh-topbar a:hover, .sdh-topbar a:focus { color: #fff; text-decoration: underline; }
.sdh-topbar ul { list-style: none; display: inline-flex; gap: .75rem; margin: 0; padding: 0; flex-wrap: wrap; }
.sdh-topbar .custom > * { display: inline; }

/* ---------- HEADER + MENU ---------- */
.sdh-header {
	background: #fff;
	border-bottom: 4px solid var(--sdh-brand);
	box-shadow: 0 2px 12px rgba(0,0,0,.07);
	padding: .5rem 0;
}
.sdh-logo, .sdh-header .navbar-brand img { max-height: 74px; width: auto; }

/* hlavní menu — vlastní horizontální styl (mod_menu nemá navbar-nav) */
.sdh-header .mod-menu,
.sdh-header ul.nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: .15rem;
}
.sdh-header .mod-menu li { position: relative; }
.sdh-header .mod-menu a {
	display: block;
	padding: .65rem .95rem;
	color: var(--sdh-ink);
	font-weight: 600;
	text-decoration: none;
	border-radius: .35rem;
	white-space: nowrap;
	transition: background .15s, color .15s;
}
.sdh-header .mod-menu a:hover,
.sdh-header .mod-menu a:focus { color: var(--sdh-brand); background: var(--sdh-soft); }
.sdh-header .mod-menu .current > a,
.sdh-header .mod-menu .active > a { color: #fff; background: var(--sdh-brand); }

/* podmenu (dropdown) */
.sdh-header .mod-menu ul {
	list-style: none;
	margin: 0;
	padding: .35rem 0;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 230px;
	background: #fff;
	border: 1px solid #e6e6e6;
	border-top: 3px solid var(--sdh-brand);
	box-shadow: 0 8px 24px rgba(0,0,0,.14);
	border-radius: 0 0 .4rem .4rem;
	display: none;
	z-index: 1000;
}
.sdh-header .mod-menu li:hover > ul,
.sdh-header .mod-menu li:focus-within > ul { display: block; }
.sdh-header .mod-menu ul a { border-radius: 0; padding: .5rem 1rem; font-weight: 500; }

@media (max-width: 991.98px) {
	.sdh-header .mod-menu { flex-direction: column; align-items: stretch; }
	.sdh-header .mod-menu ul { position: static; box-shadow: none; border: 0; border-left: 3px solid var(--sdh-brand); display: block; }
}

/* ---------- HERO / SLIDESHOW ---------- */
.sdh-hero { background: var(--sdh-ink); }
.sdh-hero .carousel-item img { width: 100%; height: auto; max-height: 560px; object-fit: cover; }
.sdh-hero .carousel-caption { background: rgba(40,46,63,.6); border-radius: .4rem; }

/* ---------- WELCOME (červený pruh, foto + text) ---------- */
.sdh-welcome { background: var(--sdh-brand); color: #fff; padding: 2.25rem 0; }
.sdh-welcome-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 1.75rem; align-items: center; }
.sdh-welcome-grid > * { min-width: 0; }
.sdh-welcome img { width: 100%; height: auto; border-radius: .5rem; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.sdh-welcome h1, .sdh-welcome h2, .sdh-welcome h3 { color: #fff; }
.sdh-welcome a { color: #fff; text-decoration: underline; }
.sdh-welcome .moduletable { margin: 0; }
@media (max-width: 767.98px) { .sdh-welcome-grid { grid-template-columns: 1fr; } }

/* ---------- HLAVNÍ OBSAH ---------- */
.sdh-main { background: #fff; }
main h1.page-header, main .page-header h1, main > .container h1:first-child {
	border-left: 5px solid var(--sdh-brand);
	padding-left: .75rem;
	font-weight: 700;
}

/* karty modulů */
.moduletable { margin-bottom: 1.5rem; }
.sdh-sidebar .moduletable, .card { border: 1px solid #eaeaea; border-radius: .5rem; overflow: hidden; }
.sdh-sidebar .moduletable > h3,
.moduletable.card > h3,
.card-header {
	background: var(--sdh-brand);
	color: #fff;
	padding: .6rem 1rem;
	margin: 0 0 0 0;
	font-size: 1.05rem;
	font-weight: 600;
}
.sdh-sidebar .moduletable > *:not(h3) { padding: 0 1rem; }
.sdh-sidebar .moduletable { padding-bottom: 1rem; }

/* tlačítka */
.btn-primary {
	--bs-btn-bg: var(--sdh-brand);
	--bs-btn-border-color: var(--sdh-brand);
	--bs-btn-hover-bg: var(--sdh-brand-dark);
	--bs-btn-hover-border-color: var(--sdh-brand-dark);
	--bs-btn-active-bg: var(--sdh-brand-dark);
}

/* články */
.item-page img, .com-content-article__body img,
.com-content-category-blog__item img { max-width: 100%; height: auto; border-radius: .35rem; }
.item-page h1, .com-content-article__title { border-left: 5px solid var(--sdh-brand); padding-left: .75rem; }

/* ---------- FOOTER ---------- */
.sdh-footer { margin-top: 2rem; }
.sdh-footer-main { background: var(--sdh-ink); color: #fff; }
.sdh-footer a { color: #fff; }
.sdh-footer a:hover, .sdh-footer a:focus { color: var(--sdh-brand); }
.sdh-footer-title { color: #fff; border-left: 4px solid var(--sdh-brand); padding-left: .6rem; margin-bottom: .75rem; }
.sdh-footer ul { list-style: none; padding: 0; margin: 0; }
.sdh-footer h3 { color: #fff; font-size: 1.05rem; border-left: 4px solid var(--sdh-brand); padding-left: .6rem; margin-bottom: .75rem; }

/* sociální ikony (inline SVG) */
.sdh-social-icons .sdh-social { display: flex; gap: .6rem; flex-wrap: wrap; margin: 0; }
.sdh-footer .text-md-end .sdh-social-icons .sdh-social { justify-content: flex-end; }
.sdh-social-icons .sdh-social a {
	display: inline-flex; align-items: center; justify-content: center;
	width: 42px; height: 42px; border-radius: 50%;
	background: rgba(255,255,255,.1); color: #fff;
}
.sdh-social-icons .sdh-social a:hover, .sdh-social-icons .sdh-social a:focus { background: var(--sdh-brand); color: #fff; }
.sdh-social-icons .sdh-social svg { width: 20px; height: 20px; }

/* sociální ikony v topbaru */
.sdh-topbar .sdh-social { display: inline-flex; gap: .5rem; margin: 0; vertical-align: middle; }
.sdh-topbar .sdh-social a { display: inline-flex; align-items: center; color: #fff; }
.sdh-topbar .sdh-social a:hover, .sdh-topbar .sdh-social a:focus { color: #ffe3df; }
.sdh-topbar .sdh-social svg { width: 17px; height: 17px; }

/* partnerská loga — plnošířkový pruh, řada */
.sdh-partners-band { background: #20242f; }
.sdh-partners-band p {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
	gap: .75rem 1.5rem; margin: 0;
}
.sdh-partners-band a { display: inline-flex; }
.sdh-partners-band img {
	height: 44px; width: auto;
	transition: transform .15s;
}
.sdh-partners-band a:hover img, .sdh-partners-band a:focus img { transform: translateY(-2px); }

/* copyright pruh */
.sdh-footer-copyright { background: #171a23; color: rgba(255,255,255,.7); }
.sdh-footer-copyright a { color: rgba(255,255,255,.85); }

@media (max-width: 767.98px) {
	.sdh-footer .text-md-end .sdh-social-icons { justify-content: flex-start; }
	.sdh-partners-band p { justify-content: center; }
}
