/* ==========================================================================
   MAHL Blocksy – hlavička a pätička podľa reference/Header.dc.html a Footer.dc.html.
   Rozloženie je v Blocksy header/footer builderi (docs/krok4-hlavicka.php),
   tu len vzhľad. Selektory začínajú #header / #offcanvas, aby prekryli dynamické
   CSS Blocksy (uploads/blocksy/css/global.css). Len var(--mahl-*).
   ========================================================================== */

/* ---------- Hlavička – celok ---------- */
#header {
	border-bottom: 1px solid var(--mahl-line);
}
/* rovnaká hrana ako obsah stránok (MAHL Stats, bloky, blog): šírka --mahl-wrap vrátane odsadenia --mahl-gutter */
#header .ct-container,
#footer .ct-container {
	width: 100%;
	max-width: var(--mahl-wrap);
	padding-inline: var(--mahl-gutter);
	box-sizing: border-box;
}

/* ---------- Horný pás (navy) ---------- */
#header [data-row*="top"] {
	background-color: var(--mahl-navy);
}
#header [data-id="text"] {
	--theme-text-color: var(--mahl-white);
	flex: 1 1 auto;
	font-family: var(--mahl-font-meta);
	font-style: italic;
	font-weight: var(--mahl-fw-meta);
	font-size: 16px;
	line-height: 1.2;
	text-transform: uppercase;
	letter-spacing: .02em;
}
#header [data-row*="top"] > .ct-container {
	display: flex;
	align-items: center;
}
#header [data-row*="top"] [data-column="start"] {
	flex: 1 1 auto;
}
#header [data-row*="top"] [data-column="start"] > [data-items] {
	width: 100%;
}
#header [data-id="text"] .entry-content > * {
	margin: 0;
}
/* pás sa nezalamuje: v náhradnom písme (pred načítaním Barlow) by sa zalomil na 2 riadky a po načítaní písma
   by sa celá stránka posunula hore (CLS). Pri šírke od 1000 px sa v Barlow zmestí; inak sa skráti text sezóny. */
#header [data-id="text"] .entry-content {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px 24px;
	min-width: 0;
	overflow: hidden;
	color: var(--mahl-white);
}
#header .mahl-topbar__info {
	min-width: 0;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}
#header .mahl-topbar__links {
	display: flex;
	flex: none;
	align-items: center;
	gap: 18px;
	white-space: nowrap;
}
#header .mahl-topbar__links a {
	color: var(--mahl-white);
	text-decoration: none;
}
#header .mahl-topbar__links a:hover {
	color: var(--mahl-red-light);
}
#header .mahl-topbar__links a.mahl-topbar__portal {
	padding: 3px 12px;
	background: var(--mahl-red);
	color: var(--mahl-white);
}
#header .mahl-topbar__links a.mahl-topbar__portal:hover {
	background: var(--mahl-red-dark);
}
#header [data-id="socials"] [data-color="custom"] {
	--theme-icon-color: var(--mahl-white);
	--theme-icon-hover-color: var(--mahl-red-light);
}
#header [data-row*="top"] [data-column="end"] {
	flex: none; /* ikony sa nestláčajú ani nezalamujú (v náhradnom písme by pás zvýšili – CLS) */
	padding-inline-start: 18px;
}
#header [data-row*="top"] [data-id="socials"] .ct-social-box {
	flex-wrap: nowrap;
}

/* ---------- Hlavný riadok (biely): logo · menu · divízie ---------- */
#header [data-row*="middle"] {
	background-color: var(--mahl-white);
}

/* Hlavné menu */
#header [data-id="menu"] {
	--menu-items-spacing: 4px;
}
#header [data-id="menu"] > ul > li > a {
	--theme-font-family: var(--mahl-font-display);
	--theme-font-style: italic;
	--theme-font-weight: var(--mahl-fw-strong);
	--theme-font-size: clamp(17px, 1.45vw, 21px);
	--theme-line-height: 1;
	--theme-text-transform: uppercase;
	--theme-link-initial-color: var(--mahl-navy);
	--theme-link-hover-color: var(--mahl-navy);
	--theme-link-active-color: var(--mahl-navy);
	height: 48px;
	padding-inline: 10px;
	box-shadow: inset 0 -4px 0 transparent;
	transition: box-shadow .15s ease;
}
#header [data-id="menu"] > ul > li > a:hover,
#header [data-id="menu"] > ul > li:is(.current-menu-item, .current-menu-ancestor, .current_page_parent) > a {
	box-shadow: inset 0 -4px 0 var(--mahl-red);
}

/* Podmenu (Komunita) */
#header [data-id="menu"] .sub-menu {
	--dropdown-divider: 1px solid var(--mahl-line);
	--theme-box-shadow: none;
	--theme-border-radius: 0;
	background: var(--mahl-white);
	border-top: 3px solid var(--mahl-red);
	border-bottom: 1px solid var(--mahl-line);
}
#header [data-id="menu"] .sub-menu .ct-menu-link {
	--theme-font-family: var(--mahl-font-body);
	--theme-font-style: normal;
	--theme-font-weight: var(--mahl-fw-strong);
	--theme-font-size: 15px;
	--theme-text-transform: none;
	--theme-link-initial-color: var(--mahl-navy);
	--theme-link-hover-color: var(--mahl-red);
}

/* Divízie: dva boxy, aktívna navy */
#header [data-id="menu-secondary"] {
	--menu-items-spacing: 6px;
}
#header [data-id="menu-secondary"] > ul > li > a {
	--theme-font-family: var(--mahl-font-meta);
	--theme-font-style: normal;
	--theme-font-weight: var(--mahl-fw-strong);
	--theme-font-size: 18px;
	--theme-text-transform: none;
	--theme-link-initial-color: var(--mahl-navy);
	--theme-link-hover-color: var(--mahl-white);
	height: 40px;
	padding-inline: 14px;
	background: var(--mahl-bg);
}
#header [data-id="menu-secondary"] > ul > li > a:hover {
	background: var(--mahl-navy-2);
}
#header [data-id="menu-secondary"] > ul > li.mahl-is-active > a {
	--theme-link-initial-color: var(--mahl-white);
	background: var(--mahl-navy);
}

/* Mobil: hamburger navy */
#header [data-id="trigger"] {
	--theme-icon-color: var(--mahl-navy);
	--theme-icon-hover-color: var(--mahl-red);
}

/* ---------- Mobilné menu (offcanvas, navy) ---------- */
#offcanvas .ct-panel-inner {
	background-color: var(--mahl-navy);
}
#offcanvas [data-id="mobile-menu"] {
	--theme-font-family: var(--mahl-font-display);
	--theme-font-style: italic;
	--theme-font-weight: var(--mahl-fw-strong);
	--theme-font-size: 24px;
	--theme-text-transform: uppercase;
	--theme-link-initial-color: var(--mahl-white);
	--theme-link-hover-color: var(--mahl-red-light);
	--theme-link-active-color: var(--mahl-red-light);
}
#offcanvas [data-id="mobile-menu"] .sub-menu {
	--theme-font-family: var(--mahl-font-body);
	--theme-font-style: normal;
	--theme-font-weight: var(--mahl-fw-strong);
	--theme-font-size: 17px;
	--theme-text-transform: none;
}
#offcanvas [data-id="mobile-menu"] li:is(.current-menu-item, .current-menu-ancestor) > .ct-sub-menu-parent > a,
#offcanvas [data-id="mobile-menu"] li:is(.current-menu-item, .current-menu-ancestor) > a {
	color: var(--mahl-red-light);
}
#offcanvas [data-id="mobile-menu"] li.mahl-div > a {
	--theme-font-family: var(--mahl-font-meta);
	--theme-font-style: normal;
	--theme-font-weight: var(--mahl-fw-strong);
	--theme-font-size: 19px;
	--theme-text-transform: none;
}
#offcanvas [data-id="mobile-menu"] li.mahl-div.mahl-is-active > a {
	color: var(--mahl-red-light);
}
#offcanvas [data-id="socials"] [data-color="custom"] {
	--theme-icon-color: var(--mahl-white);
	--theme-icon-hover-color: var(--mahl-red-light);
	--background-color: transparent;
	--background-hover-color: transparent;
}
#offcanvas [data-id="mobile-menu"] .ct-toggle-dropdown-mobile {
	color: var(--mahl-white);
}

/* ==========================================================================
   Pätička
   ========================================================================== */

/* ---------- Pás so sloganom (inc/footer.php) ---------- */
.mahl-footer-band {
	background: var(--mahl-bg);
	color: var(--mahl-navy);
	padding: 32px 0;
	border-top: 1px solid var(--mahl-line);
}
.mahl-footer-band__wrap {
	box-sizing: border-box;
	max-width: var(--mahl-wrap);
	margin: 0 auto;
	padding: 0 var(--mahl-gutter);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 16px;
	font-family: var(--mahl-font-display);
	font-style: italic;
	text-transform: uppercase;
	line-height: 1;
}
.mahl-footer-band__slogan {
	font-weight: var(--mahl-fw-display);
	font-size: clamp(22px, 2.4vw, 30px);
}
.mahl-footer-band__slash {
	color: var(--mahl-red);
}
.mahl-footer-band__meta {
	font-weight: var(--mahl-fw-strong);
	font-size: clamp(17px, 1.6vw, 22px);
}

/* ---------- Navy časť ---------- */
#footer {
	background: var(--mahl-navy);
	color: var(--mahl-on-navy);
	font-family: var(--mahl-font-body);
}
#footer [data-row] {
	background: var(--mahl-navy);
}
#footer .ct-widget {
	--theme-text-color: var(--mahl-on-navy-2);
	--theme-link-initial-color: var(--mahl-on-navy);
	--theme-link-hover-color: var(--mahl-white);
	font-size: 15px;
	line-height: 1.6;
	color: var(--mahl-on-navy-2);
}
#footer .ct-widget > * {
	margin-block: 0;
}

/* nadpis stĺpca s červenou linkou */
#footer .widget-title {
	--theme-font-family: var(--mahl-font-display);
	--theme-font-style: italic;
	--theme-font-weight: var(--mahl-fw-display);
	--theme-font-size: 20px;
	--theme-line-height: 1;
	--theme-text-transform: uppercase;
	--theme-heading-color: var(--mahl-white);
	display: inline-block;
	margin: 0 0 14px;
	padding-bottom: 8px;
	border-bottom: 3px solid var(--mahl-red);
	color: var(--mahl-white);
}

/* značka */
/* značka = nápis MAHL z originálneho loga (SVG krivka, inc/footer.php), nie písmo webu */
#footer .mahl-footer-brand {
	margin: 0 0 18px;
	line-height: 0;
	color: var(--mahl-white);
}
#footer .mahl-footer-brand a {
	display: inline-block;
	color: inherit;
}
#footer .mahl-footer-brand svg {
	display: block;
	width: 150px;
	height: auto;
}
#footer .mahl-footer-about {
	color: var(--mahl-on-navy-2);
}

/* menu stĺpcov */
#footer .widget-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}
#footer .widget-menu li {
	margin: 0;
}
#footer .widget-menu a {
	display: flex;
	align-items: center;
	min-height: 30px;
	color: var(--mahl-on-navy);
	text-decoration: none;
}
#footer .widget-menu a:hover {
	color: var(--mahl-white);
	text-decoration: underline;
	text-decoration-color: var(--mahl-red);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}
#footer .widget-menu .current-menu-item > a {
	color: var(--mahl-white);
}

/* organizátor */
#footer .mahl-footer-org,
#footer .mahl-footer-contact {
	margin: 0 0 10px;
	color: var(--mahl-on-navy);
}
#footer .mahl-footer-org strong {
	color: var(--mahl-white);
}
#footer .mahl-footer-contact a {
	color: var(--mahl-white);
	font-weight: var(--mahl-fw-strong);
	text-decoration: none;
}
#footer .mahl-footer-contact a:hover {
	text-decoration: underline;
	text-decoration-color: var(--mahl-red);
}

/* riadok partnerov (blok mahl/partneri – krok 10); prázdny sa skryje */
#footer [data-row*="middle"] {
	border-top: 1px solid var(--mahl-navy-2);
}
#footer [data-row*="middle"]:not(:has(.ct-widget)) {
	display: none;
}

/* spodný pás: copyright + právne menu */
#footer [data-row*="bottom"] {
	border-top: 1px solid var(--mahl-navy-2);
	font-size: 14px;
}
#footer [data-row*="bottom"] .ct-footer-copyright {
	color: var(--mahl-on-navy-2);
}
#footer [data-row*="bottom"] .ct-footer-copyright p {
	margin: 0;
}
#footer [data-id="menu"] {
	--menu-items-spacing: 20px;
}
#footer [data-id="menu"] a {
	--theme-font-family: var(--mahl-font-body);
	--theme-font-style: normal;
	--theme-font-weight: var(--mahl-fw-body);
	--theme-font-size: 14px;
	--theme-text-transform: none;
	--theme-link-initial-color: var(--mahl-on-navy-2);
	--theme-link-hover-color: var(--mahl-white);
}
#footer [data-row*="bottom"] [data-column]:last-child {
	--horizontal-alignment: flex-end;
}

@media (max-width: 999px) {
	#footer [data-row*="bottom"] [data-column],
	#footer [data-row*="bottom"] [data-column]:last-child {
		--horizontal-alignment: center;
		text-align: center;
	}
}

/* odsadenie riadkov pätičky (Blocksy ukladá hodnotu bez jednotky) */
#footer [data-row*="top"] > div { --container-spacing: 56px; }
#footer [data-row*="middle"] > div { --container-spacing: 28px; }
#footer [data-row*="bottom"] > div { --container-spacing: 18px; }
@media (max-width: 999px) {
	#footer [data-row*="top"] > div { --container-spacing: 40px; }
	#footer [data-row*="bottom"] > div { --columns-gap: 8px; }
}

/* partneri v pätičke = blok mahl/partneri (lišta, navy) – bez odsadenia sekcie, šírku drží pätička */
#footer .mahl-sec {
	padding: 0;
	background: transparent;
}
#footer .mahl-sec .mahl-wrap {
	max-width: none;
	padding: 0;
}
#footer .mahl-sec .mahl-bl-strip {
	padding-block: 8px;
}
