/*
 * Top-bar + masthead + nav — styled to match Morrison Hotel live.
 *
 * Markup is the byte-for-byte Morrison structure (see inc/header.php +
 * inc/header-bar.php). These rules replicate the visual outcome of the
 * legacy `morrison-hotel/style.css` for the header area, narrowed down so
 * they don't interfere with the Elementor-rendered page content below.
 */

/* ---------- top-bar ---------- */

#top-header {
	background-color: #323536;
	color: #999;
	font-size: 0.688rem;
	padding: 0;
	text-align: center;
	text-transform: uppercase;
}

#top-header .wrap {
	max-width: 1340px;
	margin: 0 auto;
	padding: 0 20px;
}

/* clearfix for the floated children inside .wrap */
#top-header .wrap::after {
	content: "";
	display: table;
	clear: both;
}

#top-header a {
	color: #fff;
	text-decoration: none;
}

#top-header a:hover {
	color: var(--teledom-color-primary, #12894a);
}

/* Computed styles taken from live `#top-header .site-info`. Defaults from
 * GeneratePress `.entry-content p` and similar give the paragraph an
 * unwanted background / border on dark, so they are explicitly reset. */
#top-header .site-info {
	margin: 0;
	padding: 0;
	color: #999999;
	background: transparent !important;
	border: 0;
	box-shadow: none;
	outline: 0;
	font-family: "Raleway", serif;
	font-weight: 400;
	font-size: 0.688rem;
	line-height: 46px;
	text-align: left;
	text-transform: uppercase;
	float: left;
	width: 49%;
}

#top-header #header-actions {
	float: right;
	width: 49%;
	text-align: right;
	line-height: 46px;
}

#top-header .site-follow ul {
	margin: 0;
	padding: 0;
	list-style: none;
	display: inline-flex;
	gap: 4px;
}

#top-header .site-follow ul li {
	font-size: 0.9375rem;
	display: inline-block;
}

#top-header .site-follow ul li a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.467em;
}

@media (max-width: 600px) {
	#top-header .wrap {
		flex-direction: column;
		gap: 6px;
	}
}

/* ---------- masthead ---------- */

/* Masthead and the navigation below are visually one dark block. We keep
 * any box-shadow off the masthead itself — only the nav (which sits
 * directly under it) carries the drop-shadow that separates the dark
 * header area from the page content below. */
#masthead.site-header {
	background-color: #292b2c;
	color: #fff;
	padding: 30px 0 0;
	margin-bottom: 0;
	text-align: center;
}

#masthead.site-header,
#masthead.site-header a {
	color: #fff;
	text-decoration: none;
}

#masthead .wrap {
	max-width: 1340px;
	margin: 0 auto;
	padding: 0 20px;
}

/* ---------- branding / logo ---------- */

#masthead .site-branding {
	display: block;
	margin: 0 auto 10px;
	text-align: center;
}

/* `<h1 class="site-title semantic">` is for SEO — keep it readable for
 * screen readers but visually hidden, just like Morrison did. */
#masthead .site-title.semantic {
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	position: absolute !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
	white-space: nowrap;
}

#masthead .site-logo {
	display: inline-block;
	line-height: 0;
}

#masthead .site-logo img {
	max-width: 100%;
	height: auto;
}

/* Two `<img>` tags ship for desktop + retina; show the latter only on hi-dpi
 * screens to avoid double-rendering. */
#masthead #retina-logo {
	display: none;
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
	#masthead #desktop-logo { display: none; }
	#masthead #retina-logo  { display: inline-block; }
}

/* ---------- primary navigation ---------- */

/* `<nav>` is rendered as a sibling of `<header>` (see inc/header.php's
 * `teledom_render_nav` on `generate_after_header`). That puts its
 * containing block at `<body>` level, so `position: sticky` keeps it
 * pinned across the entire scroll without any JS. */
#site-navigation.main-navigation {
	display: block;
	background-color: #292b2c;
	padding: 12px 0 12px;
	margin: 0;
	position: sticky;
	top: 0;
	z-index: 100;
}

/* Kill any margin between the masthead and the nav so they read as one
 * continuous dark block. Both elements get a 0 margin-block, and we close
 * the masthead's last child margin too (`.site-branding` had `margin-bottom`
 * before, which created a transparent gap if the masthead's height was
 * shorter than its content). */
#masthead.site-header,
#site-navigation.main-navigation {
	margin: 0;
}

#masthead .site-branding {
	margin-bottom: 0;
}

#site-navigation.main-navigation > .wrap {
	max-width: 1340px;
	margin: 0 auto;
	padding: 0 20px;
}

/* respect WP admin bar height */
.admin-bar #site-navigation.main-navigation {
	top: 32px;
}

@media screen and (max-width: 782px) {
	.admin-bar #site-navigation.main-navigation {
		top: 46px;
	}
}

#site-navigation #primary-menu-container {
	display: block;
}

#site-navigation #primary-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px 24px;
}

#site-navigation #primary-menu > li {
	position: relative;
}

/* Computed styles taken from live `#primary-menu li > a`:
 *   color: #fff; font-family: Raleway; font-size: 0.75rem; line-height: 2.5;
 *   text-transform: uppercase; letter-spacing: 1px; font-weight: 400;
 *   text-decoration: none; background-color: transparent; display: block;
 *   transition: 0.2s color, background-color, border-color cubic-bezier(0.4, 0, 0.2, 1) */
#site-navigation #primary-menu > li > a {
	display: block;
	padding: 8px 16px;
	color: #fff;
	font-family: "Raleway", sans-serif;
	font-size: 0.75rem;
	font-weight: 400;
	line-height: 2.5;
	letter-spacing: 1px;
	text-transform: uppercase;
	background-color: transparent;
	text-decoration: none;
	border-bottom: none;
	transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
	            background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
	            border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#site-navigation #primary-menu > li > a:hover,
#site-navigation #primary-menu > li > a:focus,
#site-navigation #primary-menu > li.current-menu-item > a,
#site-navigation #primary-menu > li.current_page_item > a {
	color: var(--teledom-color-primary, #12894a);
}

/* Underline indicator under active/hover items — Morrison live shows a
 * thin green bar under the current menu item. Implemented as ::after so
 * it does not change the link's box model. */
#site-navigation #primary-menu > li > a {
	position: relative;
}

#site-navigation #primary-menu > li > a::after {
	content: "";
	position: absolute;
	left: 16px;
	right: 16px;
	bottom: 0;
	height: 2px;
	background-color: var(--teledom-color-primary, #12894a);
	transform: scaleX(0);
	transform-origin: center;
	transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#site-navigation #primary-menu > li > a:hover::after,
#site-navigation #primary-menu > li > a:focus::after,
#site-navigation #primary-menu > li.current-menu-item > a::after,
#site-navigation #primary-menu > li.current_page_item > a::after {
	transform: scaleX(1);
}

/* ---------- dropdown sub-menus ---------- */

#site-navigation #primary-menu .sub-menu {
	list-style: none;
	margin: 0;
	padding: 8px 0;
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	/* size to widest item so long labels like "Svadby – priestory v srdci
	 * mesta" stay on a single line */
	width: max-content;
	min-width: 220px;
	max-width: 360px;
	background: #292b2c;
	border: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.15s ease, visibility 0.15s ease;
	z-index: 1000;
	text-align: left;
}

#site-navigation #primary-menu > li:hover > .sub-menu,
#site-navigation #primary-menu > li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
}

/* Computed styles taken from live `.sub-menu li > a`:
 *   color: #999; font-family: "Raleway", sans-serif; font-weight: 400;
 *   font-size: 0.6875rem; line-height: 3.8; text-transform: uppercase;
 *   letter-spacing: 0; text-align: left; padding: 0 1.455em;
 *   transition: 0.2s color, background-color, border-color cubic-bezier(0.4, 0, 0.2, 1) */
#site-navigation #primary-menu .sub-menu li a {
	display: block;
	padding: 0 1.455em;
	color: #dbdbdb;
	font-family: "Raleway", sans-serif;
	font-weight: 400;
	font-size: 0.6875rem;
	line-height: 3.8;
	letter-spacing: 0;
	text-transform: uppercase;
	text-align: left;
	white-space: nowrap;
	background-color: transparent;
	transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
	            background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
	            border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#site-navigation #primary-menu .sub-menu li a:hover,
#site-navigation #primary-menu .sub-menu li a:focus {
	background: rgba(18, 137, 74, 0.15);
	color: var(--teledom-color-primary, #12894a);
}

/* WPML language switcher in the menu — keep flag inline with link text */
#site-navigation #primary-menu .wpml-ls-flag {
	display: inline-block;
	margin-right: 6px;
	vertical-align: middle;
}

/* ---------- mobile menu toggle (text label, centered) ---------- */

/* Hidden on desktop — desktop shows the inline #primary-menu directly. */
#site-navigation #menu-toggle {
	display: none;
}

/* Mobile-only "Menu" footer / contacts block — hidden on desktop. */
#site-navigation .nav-mobile-footer {
	display: none;
}

@media (max-width: 880px) {
	/* Drop sticky on mobile per request — let the nav scroll with the
	 * page, no pinned header on touch devices. */
	#site-navigation.main-navigation {
		position: static;
		padding: 14px 0;
	}

	#masthead.site-header {
		padding: 20px 0 0;
	}

	/* The toggle becomes a centered text-only button. The flex container
	 * `.wrap` already centres its single visible child when the menu list
	 * is hidden — we just align the toggle horizontally and give it a
	 * subtle outlined pill look for tap affordance. */
	#site-navigation > .wrap {
		display: flex;
		justify-content: center;
		align-items: center;
		flex-direction: column;
	}

	#site-navigation #menu-toggle {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		padding: 9px 26px;
		background: transparent;
		border: 1px solid rgba(255, 255, 255, 0.22);
		border-radius: 999px;
		cursor: pointer;
		font-family: var(--mono, ui-monospace, monospace);
		font-size: 11px;
		font-weight: 500;
		letter-spacing: 0.22em;
		text-transform: uppercase;
		color: #fff;
		transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
	}

	#site-navigation #menu-toggle::after {
		content: "";
		display: inline-block;
		width: 8px;
		height: 8px;
		border-right: 1.5px solid currentColor;
		border-bottom: 1.5px solid currentColor;
		transform: rotate(45deg);
		margin-left: 4px;
		transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
	}

	#site-navigation #menu-toggle:hover,
	#site-navigation #menu-toggle:focus {
		background: rgba(255, 255, 255, 0.08);
		border-color: rgba(255, 255, 255, 0.45);
	}

	/* When the overlay is open, the toggle floats inside the overlay's
	 * top-right corner as a "Zavrieť ✕" close button. */
	#site-navigation.toggled #menu-toggle {
		position: fixed;
		top: 18px;
		right: 18px;
		z-index: 9999;
		padding: 0;
		width: 44px;
		height: 44px;
		border-radius: 50%;
		font-size: 0;                          /* hide "Menu" text */
		color: transparent;
		background: rgba(255, 255, 255, 0.10);
		border-color: rgba(255, 255, 255, 0.28);
	}

	/* When toggled, the ::after rotates to form the second stroke of an X.
	 * A ::before is added (inline below) to form the first stroke. */
	#site-navigation.toggled #menu-toggle::after {
		width: 18px;
		height: 2px;
		border: 0;
		background: #fff;
		border-radius: 1px;
		margin: 0;
		position: absolute;
		left: 50%;
		top: 50%;
		transform: translate(-50%, -50%) rotate(45deg);
	}

	#site-navigation.toggled #menu-toggle::before {
		content: "";
		position: absolute;
		left: 50%;
		top: 50%;
		width: 18px;
		height: 2px;
		background: #fff;
		border-radius: 1px;
		transform: translate(-50%, -50%) rotate(-45deg);
	}

	/* ---------- full-screen overlay menu ---------- */

	#site-navigation #primary-menu {
		position: fixed;
		inset: 0;
		display: flex;
		flex-direction: column;
		justify-content: flex-start;       /* items aligned to TOP */
		gap: 0;
		margin: 0;
		padding: 72px 22px 130px;          /* 72 top to clear close X, 130 bottom for contacts footer */
		background: linear-gradient(180deg,
			rgba(20, 22, 23, 0.98) 0%,
			rgba(41, 43, 44, 0.99) 100%);
		-webkit-backdrop-filter: blur(20px);
		backdrop-filter: blur(20px);
		overflow-y: auto;
		opacity: 0;
		visibility: hidden;
		transform: translateY(-12px);
		transition:
			opacity 0.3s ease,
			transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
			visibility 0s linear 0.35s;
		z-index: 9000;
	}

	#site-navigation.toggled #primary-menu {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
		transition:
			opacity 0.25s ease 0.05s,
			transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
			visibility 0s linear 0s;
	}

	/* When the overlay is open, lock body scroll behind it. */
	body.menu-open {
		overflow: hidden;
	}

	#site-navigation #primary-menu > li {
		width: 100%;
		border-bottom: 1px solid rgba(255, 255, 255, 0.07);
	}

	#site-navigation #primary-menu > li:last-child {
		border-bottom: 0;
	}

	#site-navigation #primary-menu > li > a {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 18px 8px;
		font-family: var(--display, var(--serif, Georgia, serif));
		font-size: 22px;
		font-weight: 400;
		letter-spacing: 0;
		text-transform: none;
		color: #fff;
		line-height: 1.2;
	}

	#site-navigation #primary-menu > li > a::after {
		display: none;        /* desktop underline indicator — irrelevant here */
	}

	#site-navigation #primary-menu > li.current-menu-item > a,
	#site-navigation #primary-menu > li.current_page_item > a,
	#site-navigation #primary-menu > li.current-menu-ancestor > a {
		color: var(--teledom-color-primary, #12894a);
	}

	/* Parents with submenus get a chevron suffix that rotates when the
	 * submenu is open. The accordion JS toggles `.is-open` on the <li>. */
	#site-navigation #primary-menu > li.menu-item-has-children > a::before {
		content: "";
		display: inline-block;
		width: 10px;
		height: 10px;
		border-right: 1.5px solid currentColor;
		border-bottom: 1.5px solid currentColor;
		transform: rotate(45deg);
		margin-right: 4px;
		opacity: 0.7;
		order: 2;                              /* push chevron to the right */
		transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
	}

	#site-navigation #primary-menu > li.menu-item-has-children.is-open > a::before {
		transform: rotate(-135deg);
	}

	/* Submenus collapsed by default; expand when parent has `.is-open`.
	 *
	 * The GP parent theme's `.main-navigation ul ul` rule sets `float: left;
	 * position: absolute; left: -99999px; width: 200px` to hide submenus
	 * off-screen on desktop (its preferred dropdown mechanism). On mobile
	 * we MUST reset all those properties or the submenu floats off-screen
	 * and the parent never grows to contain its items — the accordion
	 * silently does nothing. */
	/* Override every property GP's `.main-navigation ul ul` desktop rule
	 * sets — float, position, opacity, visibility, transition, etc. The
	 * desktop `transition: opacity 0.15s ease, visibility 0.15s ease`
	 * is especially nasty: even though my mobile rule sets opacity:1,
	 * the transition rule animates BACK to 0 since GP's base rule says
	 * opacity: 0. Explicit `transition: none` here breaks that loop. */
	#site-navigation #primary-menu .sub-menu {
		float: none;
		position: static;
		left: auto;
		top: auto;
		width: 100%;
		max-width: none;
		min-width: 0;
		visibility: visible;
		transform: none;
		box-shadow: none;
		border: 0;
		padding: 0 0 6px;
		margin: 0;
		background: transparent;
		overflow: visible;
		transition: none;
		opacity: 1;
		display: none;
	}

	#site-navigation #primary-menu > li.menu-item-has-children.is-open > .sub-menu {
		display: block;
		height: auto;
		min-height: max-content;        /* force the UL to grow to fit its LI children */
	}

	#site-navigation #primary-menu .sub-menu li a {
		padding: 12px 8px 12px 22px;
		font-family: var(--sans, system-ui, sans-serif);
		font-size: 15px;
		font-weight: 400;
		letter-spacing: 0;
		text-transform: none;
		color: rgba(255, 255, 255, 0.72);
		display: block;
	}

	#site-navigation #primary-menu .sub-menu li a:hover,
	#site-navigation #primary-menu .sub-menu li a:focus,
	#site-navigation #primary-menu .sub-menu li.current-menu-item > a {
		color: var(--teledom-color-primary, #12894a);
	}

	/* Separator items in submenus get a clean section-header label. */
	#site-navigation #primary-menu .sub-menu li.menu-item-separator a,
	#site-navigation #primary-menu .sub-menu li.sub-sep a {
		font-family: var(--mono, ui-monospace, monospace);
		font-size: 9px;
		letter-spacing: 0.22em;
		text-transform: uppercase;
		color: rgba(255, 255, 255, 0.38);
		pointer-events: none;
		padding-top: 18px;
		padding-left: 22px;
	}

	/* ---------- mobile-menu footer (reception contacts) ---------- */

	#site-navigation .nav-mobile-footer {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		display: none;
		flex-direction: column;
		gap: 6px;
		padding: 18px 24px max(env(safe-area-inset-bottom, 18px), 18px);
		background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.45) 100%);
		z-index: 9001;
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.25s ease, visibility 0s linear 0.25s;
	}

	#site-navigation.toggled .nav-mobile-footer {
		display: flex;
		opacity: 1;
		visibility: visible;
		transition: opacity 0.25s ease 0.15s, visibility 0s linear 0s;
	}

	.nav-mobile-footer__label {
		font-family: var(--mono, ui-monospace, monospace);
		font-size: 9.5px;
		letter-spacing: 0.22em;
		text-transform: uppercase;
		color: rgba(255, 255, 255, 0.5);
		margin-bottom: 4px;
	}

	.nav-mobile-footer__links {
		display: flex;
		flex-direction: column;
		gap: 8px;
	}

	.nav-mobile-footer__link {
		display: inline-flex;
		align-items: center;
		gap: 10px;
		padding: 10px 14px;
		background: rgba(255, 255, 255, 0.06);
		border: 1px solid rgba(255, 255, 255, 0.10);
		border-radius: 10px;
		color: #fff;
		font-family: var(--sans, system-ui, sans-serif);
		font-size: 14px;
		font-weight: 500;
		text-decoration: none;
		transition: background 0.2s ease, border-color 0.2s ease;
	}

	.nav-mobile-footer__link:hover,
	.nav-mobile-footer__link:focus {
		background: rgba(18, 137, 74, 0.16);
		border-color: rgba(18, 137, 74, 0.36);
		color: #fff;
	}

	.nav-mobile-footer__link svg {
		flex: 0 0 auto;
		opacity: 0.85;
	}
}

/* ---------- top-header site-info — overflow safety on small screens ---------- */

@media (max-width: 540px) {
	#top-header .site-info {
		font-size: 0.625rem;       /* 10 px — fits "TeleDom Hotel *** & Conference Center" on iPhone SE */
		line-height: 1.6;
		letter-spacing: 0.04em;
		padding: 6px 12px 0;
		float: none;
		width: 100%;
		text-align: center;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	#top-header #header-actions {
		float: none;
		width: 100%;
		text-align: center;
		padding-bottom: 6px;
	}
}

/* ---------- page content spacing ----------
 * Vertical breathing room between the sticky menu and the page content,
 * and again before the footer. Horizontal padding stays at 0 so any
 * Elementor section that opts for full-width rendering still extends
 * edge-to-edge. The home page is excluded so its hero gallery stays
 * flush directly under the menu. */
.elementor-template-full-width.no-sidebar .site-content,
.elementor-template-full-width.no-sidebar .inside-article {
	padding-left: 0;
	padding-right: 0;
	padding-top: 50px;
	padding-bottom: 50px;
}

body.home .elementor-template-full-width.no-sidebar .site-content,
body.home .elementor-template-full-width.no-sidebar .inside-article {
	padding-top: 0;
	padding-bottom: 0;
}
