/* =====================================================================
   marlow_j6 – responzívna šablóna sidlovec.sk
   Vychádza z marlow-j3 (rovnaké farby, hlavička, moduly), plynulá šírka.
   ===================================================================== */

:root {
	--bg: #efead7;
	--page: #ffffff;
	--text: #222222;
	--muted: #666666;
	--link: #006699;
	--link-hover: #013a78;
	--menu-link: #4189b7;
	--menu-current: #b3e7ff;
	--menu-active: #ededed;
	--menu-hover: #dbdbdb;
	--line: #e4e4e4;
	--head-1: #5d636b;
	--head-2: #4f565e;
	--dark: #444444;
	--radius: 6px;
	--gap: 48px;
	--side: 220px;
	--right: 240px;
}

/* ---------- základ ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg) url(../images/background.png) repeat-x left top;
	color: var(--text);
	font-family: Arial, Helvetica, sans-serif;
	font-size: 15px;
	line-height: 1.6;
}
img { max-width: 100%; height: auto; border: 0; }
a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
a:hover, a:focus { color: var(--link-hover); text-decoration: none; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1.2em 1.6em; padding: 0; }
li { margin-bottom: .3em; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; font-weight: normal; }
h1 { font-size: 28px; color: var(--link); }
h2 { font-size: 22px; }
h3 { font-size: 18px; font-weight: bold; }
h4 { font-size: 16px; }
table { border-collapse: collapse; max-width: 100%; }
input, select, textarea, button { font: inherit; }

.skip-link { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }

/* skryté pre čítačky (Joomla 4+) */
.visually-hidden, .element-invisible.sr-only {
	position: absolute !important; width: 1px !important; height: 1px !important;
	padding: 0 !important; margin: -1px !important; overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important;
}
.clearfix::after { content: ""; display: table; clear: both; }
.float-start, .pull-left { float: left; margin: 0 1em 1em 0; }
.float-end, .pull-right { float: right; margin: 0 0 1em 1em; }

/* ---------- stránka ---------- */
.page {
	max-width: 1200px;
	margin: 16px auto 24px;
	background: var(--page);
	border-radius: var(--radius);
	box-shadow: 0 2px 14px rgba(60, 50, 20, .18);
	overflow: hidden;
}

/* ---------- hlavička ---------- */
.header {
	position: relative;
	display: flex;
	height: 150px;
	background: #fff;
}
.header__logo { flex: 0 0 202px; display: block; line-height: 0; }
.header__logo img { width: 202px; height: 150px; object-fit: cover; }
.header__banner {
	flex: 1 1 auto;
	background: #9cc3e6 url(../images/krajina.jpg) no-repeat left center;
	background-size: cover;
}
.header__top { position: absolute; right: 16px; top: 16px; color: #fff; }
.header__top a { color: #fff; }

/* ---------- lišta pod hlavičkou ---------- */
.bar {
	display: flex;
	align-items: stretch;
	min-height: 38px;
	background: linear-gradient(#fafafa, #ececec 60%, #e2e2e2);
	border-bottom: 1px solid #c8c8c8;
}
.bar__toggle {
	display: none;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 0 16px;
	border: 0;
	background: transparent;
	color: #222;
	font-weight: bold;
	text-transform: uppercase;
	letter-spacing: .04em;
	cursor: pointer;
}
.bar__icon { display: inline-flex; flex-direction: column; justify-content: space-between; width: 20px; height: 14px; }
.bar__icon span { display: block; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-open .bar__icon span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-open .bar__icon span:nth-child(2) { opacity: 0; }
.nav-open .bar__icon span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* horné menu (pozícia user3) */
.hornav .moduletable { margin: 0; }
.hornav .moduletable > h3 { display: none; }
.hornav ul { list-style: none; margin: 0 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; }
.hornav li { position: relative; margin: 0; }
.hornav li a { display: block; padding: 9px 12px; color: #000; text-decoration: none; text-transform: uppercase; font-size: 13px; font-weight: bold; }
.hornav li a:hover, .hornav li.active > a { background: var(--dark); color: #fff; }
.hornav li ul { display: none; position: absolute; top: 100%; left: 0; z-index: 50; min-width: 210px; margin: 0; background: #d3d3d3; flex-direction: column; }
.hornav li:hover > ul, .hornav li:focus-within > ul { display: flex; }
.hornav li li a { text-transform: none; font-weight: normal; border-left: 3px solid #999; border-top: 1px solid #ddd; }

/* ---------- rozloženie stĺpcov ---------- */
.layout {
	display: grid;
	grid-template-columns: var(--side) minmax(0, 1fr) var(--right);
	grid-template-areas: "left main right";
	gap: var(--gap);
	padding: 20px 20px 28px;
	border-top: 4px solid #ededed;
}
.layout--left .layout  { grid-template-columns: var(--side) minmax(0, 1fr); grid-template-areas: "left main"; }
.layout--right .layout { grid-template-columns: minmax(0, 1fr) var(--right); grid-template-areas: "main right"; }
.layout--full .layout  { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main"; }
.col--left  { grid-area: left; }
.col--main  { grid-area: main; min-width: 0; }
.col--right { grid-area: right; }

/* ---------- moduly v bočných stĺpcoch ---------- */
.col--left .moduletable, .col--left .moduletable_menu,
.col--right .moduletable, .col--right .moduletable_menu,
.col--right [class^="moduletable"] {
	margin: 0 0 20px;
	border-radius: var(--radius);
	overflow: hidden;
	background: #fff;
}
.col--left [class^="moduletable"] > h3,
.col--right [class^="moduletable"] > h3 {
	margin: 0 0 10px;
	padding: 9px 12px;
	background: linear-gradient(var(--head-1), var(--head-2));
	color: #fff;
	font-size: 14px;
	font-weight: bold;
	letter-spacing: .02em;
	border-radius: var(--radius) var(--radius) 0 0;
}
.col--right .custom { padding: 0 6px; font-size: 14px; }
.col--right h2 { font-size: 15px; font-weight: bold; margin: 18px 0 6px; }

/* bočné menu (moduletable_menu) */
ul.menu { list-style: none; margin: 0; padding: 0; }
ul.menu li { margin: 0; padding: 0; }
ul.menu li a {
	display: block;
	padding: 6px 12px 6px 16px;
	color: var(--menu-link);
	text-decoration: none;
	line-height: 1.4;
	border-radius: 4px;
}
ul.menu li a:hover { background: var(--menu-hover); color: var(--link-hover); }
ul.menu li.active > a { background: var(--menu-active); color: var(--link-hover); }
ul.menu li.current > a { background: var(--menu-current); color: var(--link-hover); }
ul.menu ul { margin: 0; padding: 0; list-style: none; }
ul.menu ul li a { padding-left: 32px; }
ul.menu ul ul li a { padding-left: 48px; }

/* prihlásenie (J3 markup z overridu mod_login) */
#login-form { padding: 0 6px; }
#login-form .control-group { margin-bottom: 8px; }
#login-form label, #login-form .element-invisible { display: block; color: var(--muted); font-size: 14px; }
#login-form .add-on [class^="icon-"] { display: none; }
#login-form input.input-small {
	width: 100%;
	max-width: 260px;
	padding: 6px 8px;
	border: 1px solid #c9c9c9;
	border-radius: 4px;
	font-size: 15px;
}
#login-form #form-login-remember { display: none; }
#login-form .login-button {
	margin-top: 6px;
	padding: 6px 18px;
	border: 1px solid #8f8f8f;
	border-radius: 4px;
	background: linear-gradient(#fbfbfb, #e6e6e6);
	color: #222;
	cursor: pointer;
}
#login-form .login-button:hover { background: linear-gradient(#f2f2f2, #d9d9d9); }
#login-form ul.unstyled { margin: 10px 0 0 18px; font-size: 14px; }
#login-form ul.unstyled li:first-child { display: none; }

/* ---------- obsah ---------- */
.page-header h2, .blog > h2, .item-page h2 { font-size: 26px; color: var(--link); margin: 0 0 16px; font-weight: normal; }
.blog > h2 .subheading-category { color: var(--link); }
.item-page, .blog { overflow-wrap: anywhere; }
.article-info { color: var(--muted); font-size: 13px; margin: 0 0 1em; }
.article-info dt { display: none; }
.article-info dd { display: inline; margin: 0 12px 0 0; }
.readmore a { font-weight: bold; }

/* blog (J3 markup items-row / span4 z overridu) */
.items-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 20px; margin-bottom: 18px; }
.items-row.cols-1 { grid-template-columns: 1fr; }
.items-row.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.items-row.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.items-row > [class^="span"] { min-width: 0; }
.blog .span4 h2, .blog .items-row .page-header h2 { font-size: 15px; margin: 0 0 8px; }
.blog .span4 h2 a { text-decoration: none; }
.blog .span4 h2 a:hover { text-decoration: underline; }
.blog .item img { border-radius: 4px; }

/* stránkovanie */
.pagination, ul.pagination { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 16px 0; padding: 0; }
.pagination .page-link, .pagination a, .pagination span { display: inline-block; padding: 2px 8px; border: 1px solid #b4bac0; background: #ecedee; color: #333; text-decoration: none; border-radius: 3px; }
.pagination .active .page-link, .pagination a:hover { background: #4692bf; border-color: #4692bf; color: #fff; }

/* tabuľky z editora */
.tabulka td, .tabulka th { font-size: 14px; padding: 2px 4px; text-align: left; }
.tabulka th { background: #e0e0e0; }
.tabulka tr.sidlovec { background: #ddfeb8; }

/* galérie SIGE */
ul.sige { display: block; margin: 12px 0; padding: 0; }
ul.sige::after { content: ""; display: table; clear: both; }
ul.sige li { max-width: 100%; }
ul.sige .sige_thumb { float: left; }
.col--left ul.sige li, .col--right ul.sige li { float: none; width: auto !important; height: auto !important; margin: 0; }
.col--left .sige_thumb, .col--right .sige_thumb { float: none; margin: 0; text-align: center; }
.col--left .sige_thumb img, .col--right .sige_thumb img { max-width: 100%; height: auto; margin: 0; }

.advert { text-align: center; margin-top: 12px; }

/* ---------- pätička ---------- */
.footer-modules {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	padding: 18px 20px 20px;
	background: var(--dark);
	color: #fff;
}
.footer-modules h3 { color: #fff; }
.footer-modules a { color: #fff; }
.footer {
	padding: 10px 20px;
	background: #fafafa;
	border-top: 1px solid #e6e6e6;
	color: #999;
	font-size: 12px;
	text-align: center;
}

/* =====================================================================
   tablet: bez pravého stĺpca vedľa obsahu (Aktuality pod obsahom)
   ===================================================================== */
@media (max-width: 1023px) {
	:root { --side: 200px; --gap: 36px; }
	.layout--both .layout  { grid-template-columns: var(--side) minmax(0, 1fr); grid-template-areas: "left main" "left right"; }
	.layout--right .layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "right"; }
	.header { height: 120px; }
	.header__logo { flex-basis: 162px; }
	.header__logo img { width: 162px; height: 120px; }
}

/* =====================================================================
   mobil: jeden stĺpec, menu pod tlačidlom ☰, moduly pod obsahom
   ===================================================================== */
@media (max-width: 767px) {
	body { font-size: 16px; }
	.page { margin: 0; border-radius: 0; box-shadow: none; }
	.header { height: 96px; }
	.header__logo { flex-basis: 130px; }
	.header__logo img { width: 130px; height: 96px; }
	.bar__toggle { display: inline-flex; }
	.hornav { display: none; }
	.nav-open .hornav { display: block; }

	.layout, .layout--both .layout, .layout--left .layout, .layout--right .layout {
		display: flex;
		flex-direction: column;
		gap: 0;
		padding: 16px;
	}
	.col--left, .col--right { display: contents; }

	/* hlavné menu je prvé, ale skryté, kým sa neotvorí tlačidlom */
	.col--left > .moduletable_menu { order: 1; display: none; margin: -16px -16px 16px; border-radius: 0; border-bottom: 1px solid #d5d5d5; background: #f7f7f7; }
	.nav-open .col--left > .moduletable_menu { display: block; }
	.col--left > .moduletable_menu > h3 { display: none; }
	.col--left > .moduletable_menu ul.menu { padding: 6px 0; }
	.col--left > .moduletable_menu ul.menu li a { padding: 11px 20px; font-size: 17px; border-radius: 0; border-bottom: 1px solid #ececec; }
	.col--left > .moduletable_menu ul.menu ul li a { padding-left: 36px; font-size: 16px; }

	.col--main { order: 2; margin-bottom: 20px; }
	.col--right > * { order: 3; }
	.col--left > :not(.moduletable_menu) { order: 4; }

	.page-header h2, .blog > h2, .item-page h2 { font-size: 23px; }
	h1 { font-size: 24px; }

	/* široké tabuľky z editora sa dajú posúvať do strany */
	.item-page table, .com-content-article__body table { display: block; max-width: 100%; height: auto !important; overflow-x: auto; -webkit-overflow-scrolling: touch; }
	.item-page img { height: auto !important; }

	.items-row, .items-row.cols-3, .items-row.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }

	ul.sige { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
	ul.sige li { float: none !important; width: auto !important; height: auto !important; margin: 0 !important; flex: 0 1 calc(50% - 4px); }
	ul.sige .sige_thumb { float: none; margin: 0; }
	ul.sige .sige_thumb img { margin: 0; width: 100%; height: auto; }

	.footer-modules { grid-template-columns: 1fr; gap: 8px; }
	#login-form input.input-small { max-width: none; }
}

@media (max-width: 340px) {
	.items-row, .items-row.cols-2, .items-row.cols-3, .items-row.cols-4 { grid-template-columns: 1fr; }
}

@media print {
	body { background: #fff; }
	.bar, .col--left, .col--right, .footer-modules { display: none; }
	.page { box-shadow: none; max-width: none; }
	.layout { display: block; }
}
