/* Layoutrix Header Footer & Theme Builder — front-end styles. Kept minimal so theme and Elementor styles lead. */

/* ---------- Locations ---------- */
.layoutrix-location {
	display: block;
}

.layoutrix-location-content {
	width: 100%;
}

.layoutrix .screen-reader-text,
.layoutrix-location .screen-reader-text,
.skip-link.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link.screen-reader-text:focus {
	clip: auto;
	width: auto;
	height: auto;
	top: 8px;
	left: 8px;
	z-index: 100000;
	padding: 12px 16px;
	background: #fff;
	color: #1d2327;
	font-weight: 600;
	text-decoration: none;
	box-shadow: 0 0 0 2px #1d2327;
}

.layoutrix-notice {
	padding: 12px 14px;
	border: 1px dashed #c3c4c7;
	border-radius: 4px;
	background: #f6f7f7;
	color: #50575e;
	font-size: 13px;
	line-height: 1.5;
}

/* ---------- Site Logo ---------- */
.layoutrix-site-logo img {
	display: inline-block;
	max-width: 100%;
	height: auto;
	vertical-align: middle;
}

.layoutrix-site-logo a {
	display: inline-block;
	text-decoration: none;
}

.layoutrix-site-logo__text {
	font-size: 1.4em;
	font-weight: 700;
}

/* ---------- Site Title ---------- */
.layoutrix-site-title__name {
	margin: 0;
}

.layoutrix-site-title__name a {
	color: inherit;
	text-decoration: none;
}

.layoutrix-site-title__tagline {
	margin: 4px 0 0;
	opacity: 0.8;
}

/* ---------- Nav Menu ---------- */
.layoutrix-nav {
	--layoutrix-nav-color: inherit;
	--layoutrix-nav-hover: inherit;
	--layoutrix-nav-active: inherit;
	--layoutrix-nav-gap: 0px;
	--layoutrix-nav-justify: flex-start;
	--layoutrix-nav-dropdown-bg: #fff;
	--layoutrix-nav-dropdown-color: #1d2327;
	--layoutrix-nav-dropdown-hover-bg: rgba(0, 0, 0, 0.05);
	--layoutrix-nav-dropdown-width: 220px;
	--layoutrix-nav-toggle-size: 24px;
	--layoutrix-nav-toggle-justify: flex-end;
	position: relative;
}

.layoutrix-nav__list,
.layoutrix-nav__list .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.layoutrix-nav__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: var(--layoutrix-nav-justify);
	gap: var(--layoutrix-nav-gap);
}

.layoutrix-nav__list li {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	margin: 0;
}

.layoutrix-nav__list a {
	display: block;
	padding: 10px 15px;
	color: var(--layoutrix-nav-color);
	text-decoration: none;
	transition: color 0.2s, background-color 0.2s;
}

.layoutrix-nav__list > li > a:hover,
.layoutrix-nav__list > li > a:focus {
	color: var(--layoutrix-nav-hover);
}

.layoutrix-nav__list > .current-menu-item > a,
.layoutrix-nav__list > .current-menu-ancestor > a {
	color: var(--layoutrix-nav-active);
}

.layoutrix-nav--indicator .menu-item-has-children > a::after {
	content: "";
	display: inline-block;
	width: 0.4em;
	height: 0.4em;
	margin-left: 0.5em;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-0.2em) rotate(45deg);
}

/* Sub menus: dropdowns on desktop. */
.layoutrix-nav__list .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 999;
	min-width: var(--layoutrix-nav-dropdown-width);
	background: var(--layoutrix-nav-dropdown-bg);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

.layoutrix-nav__list .sub-menu li {
	width: 100%;
}

.layoutrix-nav__list .sub-menu a {
	flex: 1;
	color: var(--layoutrix-nav-dropdown-color);
}

.layoutrix-nav__list .sub-menu a:hover,
.layoutrix-nav__list .sub-menu a:focus {
	background: var(--layoutrix-nav-dropdown-hover-bg);
}

.layoutrix-nav__list .sub-menu .sub-menu {
	top: 0;
	left: 100%;
}

.layoutrix-nav__list li:hover > .sub-menu,
.layoutrix-nav__list li:focus-within > .sub-menu,
.layoutrix-nav__list li.is-open > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: none;
}

/* Sub menu toggles are for touch and keyboard; on desktop dropdowns open on hover/focus. */
.layoutrix-nav__sub-toggle {
	display: none;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.layoutrix-nav__sub-toggle::before {
	content: "";
	display: inline-block;
	width: 0.45em;
	height: 0.45em;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.2s;
}

.is-open > .layoutrix-nav__sub-toggle::before {
	transform: rotate(-135deg);
}

/* Vertical layout: sub menus expand in place. */
.layoutrix-nav--vertical .layoutrix-nav__list {
	flex-direction: column;
	align-items: stretch;
}

.layoutrix-nav--vertical .layoutrix-nav__list li > a {
	flex: 1;
}

.layoutrix-nav--vertical .layoutrix-nav--indicator .menu-item-has-children > a::after,
.layoutrix-nav--vertical.layoutrix-nav--indicator .menu-item-has-children > a::after {
	display: none;
}

.layoutrix-nav--vertical .layoutrix-nav__sub-toggle {
	display: inline-block;
}

.layoutrix-nav--vertical .sub-menu {
	position: static;
	display: none;
	width: 100%;
	min-width: 0;
	padding-left: 1em;
	box-shadow: none;
	background: transparent;
	opacity: 1;
	visibility: visible;
	transform: none;
}

.layoutrix-nav--vertical li.is-open > .sub-menu {
	display: block;
}

/* Theme and Elementor Site Settings style every <button>; the menu toggles must stay plain icons. */
.layoutrix-nav .layoutrix-nav__toggle,
.layoutrix-nav .layoutrix-nav__toggle:hover,
.layoutrix-nav .layoutrix-nav__toggle:focus,
.layoutrix-nav .layoutrix-nav__sub-toggle,
.layoutrix-nav .layoutrix-nav__sub-toggle:hover,
.layoutrix-nav .layoutrix-nav__sub-toggle:focus {
	min-width: 0;
	min-height: 0;
	padding: 0;
	border: 0;
	box-shadow: none;
	background-color: transparent;
	color: inherit;
	line-height: 1;
	text-transform: none;
}

.layoutrix-nav .layoutrix-nav__toggle:focus-visible,
.layoutrix-nav .layoutrix-nav__sub-toggle:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Menu button. */
.layoutrix-nav__toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: calc(var(--layoutrix-nav-toggle-size) + 16px);
	height: calc(var(--layoutrix-nav-toggle-size) + 16px);
	margin-left: auto;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.layoutrix-nav__toggle-icon,
.layoutrix-nav__toggle-icon::before,
.layoutrix-nav__toggle-icon::after {
	display: block;
	width: var(--layoutrix-nav-toggle-size);
	height: 2px;
	background: currentColor;
	transition: transform 0.2s, background-color 0.2s;
}

.layoutrix-nav__toggle-icon {
	position: relative;
}

.layoutrix-nav__toggle-icon::before,
.layoutrix-nav__toggle-icon::after {
	content: "";
	position: absolute;
	left: 0;
}

.layoutrix-nav__toggle-icon::before {
	top: calc(var(--layoutrix-nav-toggle-size) * -0.3);
}

.layoutrix-nav__toggle-icon::after {
	top: calc(var(--layoutrix-nav-toggle-size) * 0.3);
}

.layoutrix-nav.is-open .layoutrix-nav__toggle-icon {
	background: transparent;
}

.layoutrix-nav.is-open .layoutrix-nav__toggle-icon::before {
	top: 0;
	transform: rotate(45deg);
}

.layoutrix-nav.is-open .layoutrix-nav__toggle-icon::after {
	top: 0;
	transform: rotate(-45deg);
}

/* Mobile menu, shown below the chosen breakpoint. The two blocks are identical apart from the width. */
@media (max-width: 1024px) {
	.layoutrix-nav--bp-tablet {
		display: flex;
		flex-direction: column;
		align-items: var(--layoutrix-nav-toggle-justify);
	}

	.layoutrix-nav--bp-tablet .layoutrix-nav__toggle {
		display: inline-flex;
		margin-left: 0;
	}

	.layoutrix-nav--bp-tablet .layoutrix-nav__list {
		display: none;
		position: absolute;
		top: 100%;
		left: var(--layoutrix-nav-dropdown-left, auto);
		right: var(--layoutrix-nav-dropdown-right, 0);
		transform: translateX(var(--layoutrix-nav-dropdown-shift, 0));
		z-index: 999;
		min-width: 240px;
		max-width: calc(100vw - 32px);
		flex-direction: column;
		align-items: stretch;
		background: var(--layoutrix-nav-dropdown-bg);
		box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	}

	.layoutrix-nav--bp-tablet.is-open .layoutrix-nav__list {
		display: flex;
	}

	.layoutrix-nav--bp-tablet .layoutrix-nav__list a {
		flex: 1;
		color: var(--layoutrix-nav-dropdown-color);
	}

	.layoutrix-nav--bp-tablet .layoutrix-nav__sub-toggle {
		display: inline-block;
		color: var(--layoutrix-nav-dropdown-color);
	}

	.layoutrix-nav--bp-tablet.layoutrix-nav--indicator .menu-item-has-children > a::after {
		display: none;
	}

	.layoutrix-nav--bp-tablet .sub-menu {
		position: static;
		display: none;
		width: 100%;
		min-width: 0;
		padding-left: 1em;
		box-shadow: none;
		background: transparent;
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	.layoutrix-nav--bp-tablet li.is-open > .sub-menu {
		display: block;
	}
}

@media (max-width: 767px) {
	.layoutrix-nav--bp-mobile {
		display: flex;
		flex-direction: column;
		align-items: var(--layoutrix-nav-toggle-justify);
	}

	.layoutrix-nav--bp-mobile .layoutrix-nav__toggle {
		display: inline-flex;
		margin-left: 0;
	}

	.layoutrix-nav--bp-mobile .layoutrix-nav__list {
		display: none;
		position: absolute;
		top: 100%;
		left: var(--layoutrix-nav-dropdown-left, auto);
		right: var(--layoutrix-nav-dropdown-right, 0);
		transform: translateX(var(--layoutrix-nav-dropdown-shift, 0));
		z-index: 999;
		min-width: 240px;
		max-width: calc(100vw - 32px);
		flex-direction: column;
		align-items: stretch;
		background: var(--layoutrix-nav-dropdown-bg);
		box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	}

	.layoutrix-nav--bp-mobile.is-open .layoutrix-nav__list {
		display: flex;
	}

	.layoutrix-nav--bp-mobile .layoutrix-nav__list a {
		flex: 1;
		color: var(--layoutrix-nav-dropdown-color);
	}

	.layoutrix-nav--bp-mobile .layoutrix-nav__sub-toggle {
		display: inline-block;
		color: var(--layoutrix-nav-dropdown-color);
	}

	.layoutrix-nav--bp-mobile.layoutrix-nav--indicator .menu-item-has-children > a::after {
		display: none;
	}

	.layoutrix-nav--bp-mobile .sub-menu {
		position: static;
		display: none;
		width: 100%;
		min-width: 0;
		padding-left: 1em;
		box-shadow: none;
		background: transparent;
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	.layoutrix-nav--bp-mobile li.is-open > .sub-menu {
		display: block;
	}
}

/* ---------- Search Form ---------- */
.layoutrix-search {
	display: flex;
	align-items: stretch;
	min-height: 44px;
	overflow: hidden;
	border: 1px solid #d0d3d6;
	border-radius: 4px;
	background: #fff;
}

.layoutrix-search__input {
	flex: 1;
	min-width: 0;
	margin: 0;
	padding: 0 14px;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	color: inherit;
	font: inherit;
}

.layoutrix-search__input:focus {
	outline: none;
}

.layoutrix-search:focus-within {
	box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.35);
}

.layoutrix-search__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0 16px;
	border: 0;
	border-radius: 0;
	background: #1d2327;
	color: #fff;
	cursor: pointer;
	font: inherit;
}

/* ---------- Post widgets ---------- */
.layoutrix-post-title,
.layoutrix-archive-title__heading {
	margin: 0;
}

.layoutrix-post-title a {
	color: inherit;
	text-decoration: none;
}

.layoutrix-featured-image {
	margin: 0;
}

.layoutrix-featured-image img {
	max-width: 100%;
	height: auto;
	vertical-align: middle;
}

.layoutrix-featured-image figcaption {
	margin-top: 8px;
	font-size: 0.875em;
	opacity: 0.8;
}

.layoutrix-post-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.layoutrix-post-meta__item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
}

.layoutrix-post-meta__avatar {
	border-radius: 50%;
}

.layoutrix-post-meta__sep {
	opacity: 0.6;
}

.layoutrix-post-nav {
	display: flex;
	justify-content: space-between;
	gap: 24px;
}

.layoutrix-post-nav > div {
	flex: 1;
}

.layoutrix-post-nav__next {
	text-align: right;
}

.layoutrix-post-nav a {
	display: inline-flex;
	flex-direction: column;
	gap: 4px;
	text-decoration: none;
}

.layoutrix-post-nav__label {
	font-size: 0.85em;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	opacity: 0.7;
}

.layoutrix-post-nav__title {
	font-weight: 600;
}

.layoutrix-author-box {
	display: flex;
	align-items: flex-start;
	gap: 20px;
}

.layoutrix-author-box__avatar img {
	display: block;
	border-radius: 50%;
}

.layoutrix-author-box__name {
	margin: 0 0 6px;
	font-weight: 700;
}

.layoutrix-author-box__name a {
	color: inherit;
	text-decoration: none;
}

.layoutrix-author-box__bio p {
	margin: 0 0 8px;
}

/* ---------- Archive Posts ---------- */
.layoutrix-posts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 30px;
}

.layoutrix-posts__card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	margin: 0;
}

.layoutrix-posts__image {
	display: block;
}

.layoutrix-posts__image img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
}

.layoutrix-posts__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 10px;
	padding: 16px 0;
}

.layoutrix-posts__title {
	margin: 0;
	font-size: 1.25em;
	line-height: 1.3;
}

.layoutrix-posts__title a {
	color: inherit;
	text-decoration: none;
}

.layoutrix-posts__meta {
	font-size: 0.875em;
	opacity: 0.75;
}

.layoutrix-posts__meta a {
	color: inherit;
}

.layoutrix-posts__excerpt {
	line-height: 1.6;
}

.layoutrix-posts__more {
	margin-top: auto;
	font-weight: 600;
	text-decoration: none;
}

.layoutrix-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 40px;
}

.layoutrix-pagination a,
.layoutrix-pagination span {
	display: inline-block;
	padding: 6px 12px;
	text-decoration: none;
}

.layoutrix-pagination .current {
	font-weight: 700;
}

@media (max-width: 1024px) {
	.layoutrix-posts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.layoutrix-posts {
		grid-template-columns: minmax(0, 1fr);
	}

	.layoutrix-author-box {
		flex-direction: column;
	}
}

/* ---------- WooCommerce ---------- */

/* WooCommerce floats the gallery at half width; inside the widget it should fill the column. */
.woocommerce div.product .layoutrix-product-images div.images,
.layoutrix-product-images .woocommerce-product-gallery {
	float: none;
	width: 100%;
	margin-bottom: 0;
}

/* WooCommerce reveals the gallery with JavaScript, which doesn't run in the editor. */
.elementor-editor-active .layoutrix-product-images .woocommerce-product-gallery {
	opacity: 1 !important;
}

.layoutrix-add-to-cart form.cart {
	margin-bottom: 0;
}

.layoutrix-cart-wrap {
	display: flex;
}

.layoutrix-cart {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: inherit;
	text-decoration: none;
}

.layoutrix-cart__icon svg {
	display: block;
	width: 24px;
	height: 24px;
}

.layoutrix-cart__count {
	position: absolute;
	top: -8px;
	left: 14px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 9px;
	background: #d63638;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
}

.layoutrix-cart__total {
	font-weight: 600;
}

.layoutrix-breadcrumb__sep {
	margin: 0 0.5em;
	opacity: 0.6;
}
