/* ElementX frontend styles */

/* ---- Theme conflict resets ----
   Themes like Astra, GeneratePress, Kadence apply text-decoration,
   border-bottom, or box-shadow underlines directly on <a> elements.
   Reset all three on our links so widget controls have a clean slate.
   The .elementor-widget prefix keeps specificity above theme defaults. */
.elementor-widget .elementx-post-card a,
.elementor-widget .elementx-post-title a,
.elementor-widget .elementx-headline a,
.elementor-widget .elementx-read-more {
	text-decoration: none;
	border-bottom: 0;
	box-shadow: none;
}

.elementor-widget .elementx-post-card a:hover,
.elementor-widget .elementx-post-title a:hover {
	text-decoration: none;
	border-bottom: 0;
	box-shadow: none;
}

/* ---- Posts Grid ---- */
.elementx-posts-grid {
	display: grid;
	gap: 30px;
}

.elementx-post-card {
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
	display: flex;
	flex-direction: column;
}

.elementx-post-thumb {
	display: block;
	line-height: 0;
}

.elementx-post-thumb img {
	width: 100%;
	height: 220px;
	object-fit: cover;
	display: block;
}

.elementx-post-body {
	padding: 20px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.elementx-post-title {
	margin: 0 0 8px;
	font-size: 1.15rem;
	line-height: 1.35;
}

.elementx-post-title a {
	color: inherit;
	transition: color 0.2s ease;
}

.elementx-post-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	font-size: 0.82rem;
	opacity: 0.65;
	margin-bottom: 10px;
}

.elementx-post-excerpt {
	font-size: 0.92rem;
	line-height: 1.6;
	margin-bottom: 14px;
}

.elementx-post-excerpt p {
	margin: 0;
}

/* Read more sits at the bottom of the card regardless of content height */
.elementx-read-more {
	display: inline-block;
	align-self: flex-start;
	margin-top: auto;
	padding: 8px 18px;
	font-size: 0.85rem;
	font-weight: 600;
	background: #f0f0f1;
	color: inherit;
	border-radius: 4px;
	transition: background-color 0.2s ease, color 0.2s ease;
}

/* Center / right alignment support for the button */
.elementx-post-body[style*="text-align: center"] .elementx-read-more,
.elementx-post-body.elementx-align-center .elementx-read-more {
	align-self: center;
}

/* ---- Animated Headline ---- */
.elementx-headline-dynamic {
	display: inline-block;
	min-width: 1ch;
}

.elementx-headline[data-animation="typing"] .elementx-headline-dynamic::after {
	content: "";
	display: inline-block;
	width: 2px;
	height: 1em;
	background: currentColor;
	margin-left: 2px;
	vertical-align: -0.1em;
	animation: elementx-blink 0.8s step-end infinite;
}

@keyframes elementx-blink {
	50% { opacity: 0; }
}

.elementx-headline[data-animation="fade"] .elementx-headline-dynamic {
	transition: opacity 0.4s ease;
}

.elementx-headline[data-animation="fade"] .elementx-headline-dynamic.is-out {
	opacity: 0;
}

/* ---- Comparison Table ---- */
.elementx-ctable-wrap {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.elementx-ctable {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	margin: 0;
	border: 0;
}

.elementx-ctable th,
.elementx-ctable td {
	border: 0; /* reset theme table borders (Astra etc.) */
}

.elementx-ctable thead th {
	background: #2d6a4f;
	color: #fff;
	font-weight: 600;
	font-size: 0.9rem;
	padding: 14px 18px;
	text-align: center;
	white-space: nowrap;
}

.elementx-ctable thead th:first-child {
	text-align: left;
	border-radius: 8px 0 0 8px;
}

.elementx-ctable thead th:last-child {
	border-radius: 0 8px 8px 0;
}

.elementx-ctable tbody td {
	padding: 16px 18px;
	border-bottom: 1px solid #e5e5e5;
	text-align: center;
	background: transparent;
}

.elementx-ctable tbody td:first-child {
	text-align: left;
	font-weight: 500;
}

.elementx-ctable-check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #2d6a4f;
}

.elementx-ctable-check svg {
	width: 16px;
	height: 16px;
}

/* Sticky first column on small screens so feature names stay visible
   while the user scrolls the plan columns horizontally. */
@media (max-width: 767px) {
	.elementx-ctable-sticky .elementx-ctable th:first-child,
	.elementx-ctable-sticky .elementx-ctable td:first-child {
		position: sticky;
		left: 0;
		z-index: 2;
		background: #fff;
		min-width: 160px;
		box-shadow: 4px 0 8px -4px rgba(0, 0, 0, 0.12);
	}

	.elementx-ctable-sticky .elementx-ctable thead th:first-child {
		background: inherit;
		z-index: 3;
	}

	.elementx-ctable thead th,
	.elementx-ctable tbody td {
		padding: 12px 14px;
	}

	.elementx-ctable tbody td:not(:first-child) {
		min-width: 90px;
	}
}

/* ---- Breadcrumbs ---- */
.elementx-breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: 0.88rem;
}

.elementor-widget .elementx-breadcrumbs a {
	text-decoration: none;
	border-bottom: 0;
	box-shadow: none;
	transition: color 0.2s ease;
}

.elementx-crumb-sep {
	opacity: 0.5;
}

.elementx-crumb-current {
	opacity: 0.7;
}

/* ---- Classic Editor ---- */
.elementx-classic-editor > *:first-child {
	margin-top: 0;
}

.elementx-classic-editor > *:last-child {
	margin-bottom: 0;
}

.elementx-drop-cap > p:first-of-type::first-letter {
	float: left;
	font-size: 3.2em;
	line-height: 0.9;
	font-weight: 700;
	padding-right: 0.12em;
}

/* ---- Sidebar Posts ---- */
.elementx-sidebar-heading {
	margin: 0 0 14px;
}

.elementx-sidebar-posts {
	display: flex;
	flex-direction: column;
	row-gap: 16px;
}

.elementx-sidebar-item {
	display: flex;
	align-items: center;
	gap: 12px;
}

.elementx-sidebar-num {
	font-size: 1.3rem;
	font-weight: 700;
	opacity: 0.35;
	min-width: 1.8ch;
	line-height: 1;
}

.elementx-sidebar-thumb {
	flex-shrink: 0;
	line-height: 0;
	border-radius: 6px;
	overflow: hidden;
}

.elementx-sidebar-thumb img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	display: block;
}

.elementx-sidebar-title {
	font-size: 0.92rem;
	font-weight: 600;
	line-height: 1.4;
}

.elementor-widget .elementx-sidebar-title a {
	color: inherit;
	text-decoration: none;
	border-bottom: 0;
	box-shadow: none;
	transition: color 0.2s ease;
}

.elementx-sidebar-date {
	display: block;
	font-size: 0.78rem;
	opacity: 0.6;
	margin-top: 3px;
}

/* ---- Related Posts ---- */
.elementx-related-heading {
	margin: 0 0 18px;
}

.elementx-related-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.elementx-related-thumb {
	display: block;
	line-height: 0;
	border-radius: 8px;
	overflow: hidden;
	margin-bottom: 12px;
}

.elementx-related-thumb img {
	width: 100%;
	height: 160px;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.elementx-related-card:hover .elementx-related-thumb img {
	transform: scale(1.04);
}

.elementx-related-title {
	font-weight: 600;
	line-height: 1.4;
}

.elementor-widget .elementx-related-title a {
	color: inherit;
	text-decoration: none;
	border-bottom: 0;
	box-shadow: none;
	transition: color 0.2s ease;
}

.elementx-related-date {
	display: block;
	font-size: 0.8rem;
	opacity: 0.6;
	margin-top: 4px;
}

/* ---- Nav Menu ---- */
.elementx-nav {
	position: relative;
}

.elementx-nav-list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.elementx-nav-list li {
	position: relative;
	margin: 0;
	list-style: none;
}

.elementor-widget .elementx-nav-list a {
	display: block;
	text-decoration: none;
	border-bottom: 0;
	box-shadow: none;
	color: #222;
	transition: color 0.2s ease;
}

/* Dropdown submenu */
.elementx-nav-list .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 200px;
	background: #fff;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	border-radius: 6px;
	padding: 8px 0;
	margin: 0;
	list-style: none;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
	z-index: 99;
}

.elementx-nav-list li:hover > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.elementx-nav-list .sub-menu a {
	padding: 8px 18px;
}

/* Hamburger toggle — hidden by default, shown when collapsible */
.elementx-nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 26px;
	height: 26px;
	padding: 0;
	background: none;
	border: 0;
	cursor: pointer;
}

.elementx-nav-toggle span {
	display: block;
	width: 100%;
	height: 3px;
	background: #222;
	border-radius: 2px;
	transition: transform 0.25s ease, opacity 0.2s ease;
}

/* Collapsible state (set by JS under the chosen breakpoint) */
.elementx-nav-collapsible .elementx-nav-toggle {
	display: flex;
	margin-left: auto;
}

.elementx-nav-collapsible .elementx-nav-list {
	position: absolute;
	top: 100%;
	right: 0;
	left: 0;
	flex-direction: column;
	gap: 0;
	background: #fff;
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
	border-radius: 8px;
	padding: 10px 0;
	margin-top: 10px;
	display: none;
	z-index: 99;
}

.elementx-nav-collapsible.is-open .elementx-nav-list {
	display: flex;
}

.elementx-nav-collapsible .elementx-nav-list a {
	padding: 12px 20px;
}

.elementx-nav-collapsible .elementx-nav-list .sub-menu {
	position: static;
	opacity: 1;
	visibility: visible;
	transform: none;
	box-shadow: none;
	padding-left: 16px;
}

/* Hamburger -> X when open */
.elementx-nav-collapsible.is-open .elementx-nav-toggle span:nth-child(1) {
	transform: translateY(8px) rotate(45deg);
}
.elementx-nav-collapsible.is-open .elementx-nav-toggle span:nth-child(2) {
	opacity: 0;
}
.elementx-nav-collapsible.is-open .elementx-nav-toggle span:nth-child(3) {
	transform: translateY(-8px) rotate(-45deg);
}

/* ---- Site Logo ---- */
.elementx-site-logo a {
	display: inline-block;
	line-height: 0;
	border-bottom: 0;
	box-shadow: none;
}

.elementx-site-logo img {
	width: 150px;
	height: auto;
	display: block;
}

.elementx-site-logo-text {
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.2;
}

/* ---- Header/Footer template wrappers ---- */
.elementx-hf {
	width: 100%;
}

.elementx-canvas .elementx-canvas-inner {
	width: 100%;
}

/* ---- Gallery ---- */
.elementx-gallery-wrap {
	width: 100%;
}

.elementx-gallery-item {
	position: relative;
	overflow: hidden;
	margin: 0;
	line-height: 0;
}

.elementx-gallery-item img {
	width: 100%;
	height: auto;
	display: block;
	opacity: 0;
	transform: scale(1.02);
	transition: opacity 0.5s ease, transform 0.5s ease;
}

.elementx-gallery-item img.is-loaded {
	opacity: 1;
	transform: scale(1);
}

.elementx-gallery-item.elementx-hidden {
	display: none;
}

/* Grid */
.elementx-gallery-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
}

/* Masonry (CSS columns) */
.elementx-gallery-masonry {
	column-count: 3;
	column-gap: 12px;
}

.elementx-gallery-masonry .elementx-gallery-item {
	break-inside: avoid;
	margin-bottom: 12px;
	display: inline-block;
	width: 100%;
}

/* Justified (JS-driven flex rows) */
.elementx-gallery-justified {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.elementx-gallery-justified .elementx-gallery-item {
	flex-grow: 1;
}

.elementx-gallery-justified .elementx-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Caption overlay */
.elementx-gallery-caption {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-end;
	padding: 14px;
	margin: 0;
	color: #fff;
	background: rgba(0, 0, 0, 0.45);
	font-size: 0.9rem;
	line-height: 1.3;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.elementx-gallery-item:hover .elementx-gallery-caption {
	opacity: 1;
}

/* ---- Load More button (shared) ---- */
.elementx-loadmore-wrap {
	text-align: center;
	margin-top: 28px;
}

.elementx-loadmore {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: 0;
	cursor: pointer;
	padding: 12px 30px;
	font-weight: 600;
	background: #2d6a4f;
	color: #fff;
	border-radius: 6px;
	transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.elementx-loadmore.is-loading {
	opacity: 0.7;
	cursor: wait;
}

.elementx-loadmore.is-loading::after {
	content: "";
	width: 14px;
	height: 14px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: elementx-spin 0.7s linear infinite;
}

@keyframes elementx-spin {
	to { transform: rotate(360deg); }
}

/* ---- Dynamic Posts ---- */
.elementx-dp-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.elementx-dp-card {
	background: #fff;
	display: flex;
	flex-direction: column;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
	border-radius: 8px;
	overflow: hidden;
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.elementx-dp-card.elementx-filtered-out {
	display: none;
}

.elementx-dp-thumb {
	display: block;
	line-height: 0;
}

.elementx-dp-thumb img {
	width: 100%;
	height: 200px;
	object-fit: cover;
	display: block;
}

.elementx-dp-body {
	padding: 20px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.elementx-dp-terms {
	font-size: 0.78rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin-bottom: 8px;
}

.elementor-widget .elementx-dp-terms a,
.elementor-widget .elementx-dp-title a,
.elementor-widget .elementx-dp-meta a,
.elementor-widget .elementx-dp-readmore {
	text-decoration: none;
	border-bottom: 0;
	box-shadow: none;
}

.elementx-dp-title {
	margin: 0 0 8px;
	font-size: 1.15rem;
	line-height: 1.35;
}

.elementx-dp-title a {
	color: inherit;
	transition: color 0.2s ease;
}

.elementx-dp-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	font-size: 0.82rem;
	opacity: 0.7;
	margin-bottom: 10px;
}

.elementx-dp-author {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.elementx-dp-author img {
	border-radius: 50%;
}

.elementx-dp-sep {
	opacity: 0.5;
}

.elementx-dp-excerpt {
	font-size: 0.92rem;
	line-height: 1.6;
	margin-bottom: 12px;
}

.elementx-dp-cf {
	font-size: 0.85rem;
	margin-bottom: 6px;
}

.elementx-dp-readmore {
	align-self: flex-start;
	margin-top: auto;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
	font-size: 0.88rem;
	color: #2d6a4f;
	transition: color 0.2s ease, background-color 0.2s ease, gap 0.2s ease;
}

.elementx-dp-readmore .elementx-dp-rm-icon,
.elementx-dp-readmore svg,
.elementx-dp-readmore i {
	display: inline-flex;
	line-height: 0;
	transition: transform 0.2s ease;
}

.elementx-dp-readmore svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.elementx-dp-readmore:hover svg,
.elementx-dp-readmore:hover i {
	transform: translateX(2px);
}

/* Filter bar */
.elementx-dp-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
	margin-bottom: 28px;
}

.elementx-dp-filter {
	border: 0;
	cursor: pointer;
	padding: 8px 18px;
	background: #f0f0f1;
	color: #333;
	border-radius: 30px;
	font-size: 0.9rem;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.elementx-dp-filter.is-active {
	background: #2d6a4f;
	color: #fff;
}

/* ---- Gallery filter bar ---- */
.elementx-gallery-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
	margin-bottom: 24px;
}

.elementx-gallery-filter {
	border: 0;
	cursor: pointer;
	padding: 8px 18px;
	background: #f0f0f1;
	color: #333;
	border-radius: 30px;
	font-size: 0.9rem;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.elementx-gallery-filter.is-active {
	background: #2d6a4f;
	color: #fff;
}

/* ---- Contact Form ---- */
.elementx-form-fields {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

.elementx-form-field {
	width: 100%;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
}

/* When fields share a row (50/33%), account for the gap */
.elementx-form-fields > .elementx-form-field {
	flex: 0 0 auto;
}

.elementx-form-label {
	font-weight: 600;
	font-size: 0.9rem;
	margin-bottom: 6px;
}

.elementx-form-req {
	color: #d33;
}

.elementx-form-input {
	width: 100%;
	box-sizing: border-box;
	padding: 12px 14px;
	border: 1px solid #ccc;
	border-radius: 6px;
	background: #fff;
	font-size: 1rem;
	font-family: inherit;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.elementx-form-input:focus {
	border-color: #2d6a4f;
	outline: none;
}

textarea.elementx-form-input {
	resize: vertical;
	min-height: 120px;
}

.elementx-form-field.has-error .elementx-form-input {
	border-color: #d33;
}

/* Honeypot — visually and structurally hidden, but not display:none
   (some bots skip display:none fields). */
.elementx-hp-wrap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.elementx-form-actions {
	display: flex;
	margin-top: 18px;
}

.elementx-form-actions[style*="stretch"] .elementx-form-submit {
	width: 100%;
}

.elementx-form-submit {
	border: 0;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 14px 34px;
	font-weight: 600;
	font-size: 1rem;
	background: #2d6a4f;
	color: #fff;
	border-radius: 6px;
	transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.elementx-form-submit.is-loading {
	opacity: 0.7;
	cursor: wait;
}

.elementx-form-submit.is-loading::after {
	content: "";
	width: 14px;
	height: 14px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: elementx-spin 0.7s linear infinite;
}

.elementx-form-message {
	margin-top: 14px;
	font-size: 0.95rem;
}

.elementx-form-message.is-success {
	color: #2d6a4f;
	font-weight: 600;
}

.elementx-form-message.is-error {
	color: #d33;
}

/* ---- Toast notifications ---- */
.elementx-toast-container {
	position: fixed;
	top: 24px;
	right: 24px;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	gap: 12px;
	pointer-events: none;
}

.elementx-toast {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 280px;
	max-width: 400px;
	padding: 14px 16px;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
	pointer-events: auto;
	transform: translateX(120%);
	opacity: 0;
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
	border-left: 4px solid #2d6a4f;
}

.elementx-toast.is-visible {
	transform: translateX(0);
	opacity: 1;
}

.elementx-toast-success {
	border-left-color: #2d6a4f;
}

.elementx-toast-error {
	border-left-color: #d33;
}

.elementx-toast-icon {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	color: #fff;
}

.elementx-toast-success .elementx-toast-icon {
	background: #2d6a4f;
}

.elementx-toast-error .elementx-toast-icon {
	background: #d33;
}

.elementx-toast-text {
	flex-grow: 1;
	font-size: 0.92rem;
	line-height: 1.4;
	color: #222;
}

.elementx-toast-close {
	flex-shrink: 0;
	border: 0;
	background: none;
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
	color: #999;
	padding: 0 2px;
}

.elementx-toast-close:hover {
	color: #333;
}

@media (max-width: 480px) {
	.elementx-toast-container {
		left: 16px;
		right: 16px;
		top: 16px;
	}
	.elementx-toast {
		min-width: 0;
		max-width: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.elementx-toast {
		transition: opacity 0.2s ease;
		transform: none;
	}
}

/* ---- Form choice fields (radio / checkbox / select) ---- */
select.elementx-form-input {
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 38px;
	cursor: pointer;
}

select.elementx-form-input[multiple] {
	background-image: none;
	padding-right: 14px;
	min-height: 120px;
}

.elementx-form-choices {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 20px;
	padding-top: 4px;
}

.elementx-form-choice {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font-size: 0.95rem;
	line-height: 1.3;
}

.elementx-form-choice-input {
	width: 18px;
	height: 18px;
	margin: 0;
	cursor: pointer;
	accent-color: #2d6a4f;
	flex-shrink: 0;
}

.elementx-form-field-choice.has-error .elementx-form-choices {
	outline: 1px dashed #d33;
	outline-offset: 6px;
	border-radius: 4px;
}

/* ============================================================
   Accessibility — keyboard navigation
   ============================================================ */

/* Visible focus ring on every ElementX interactive element.
   :focus-visible only shows for keyboard users, not mouse clicks,
   so it never distracts pointer users. We restore an outline that
   many themes strip away. */
.elementx-nav-list a:focus-visible,
.elementx-nav-toggle:focus-visible,
.elementx-gallery-filter:focus-visible,
.elementx-dp-filter:focus-visible,
.elementx-loadmore:focus-visible,
.elementx-dp-readmore:focus-visible,
.elementx-read-more:focus-visible,
.elementx-breadcrumbs a:focus-visible,
.elementx-sidebar-title a:focus-visible,
.elementx-related-title a:focus-visible,
.elementx-post-title a:focus-visible,
.elementx-dp-title a:focus-visible,
.elementx-gallery-item a:focus-visible,
.elementx-form-input:focus-visible,
.elementx-form-choice-input:focus-visible,
.elementx-form-submit:focus-visible,
.elementx-ctable a:focus-visible {
	outline: 3px solid #2d6a4f;
	outline-offset: 2px;
	border-radius: 2px;
}

/* Gallery images get the ring on the link wrapper, tight to the image */
.elementx-gallery-item a:focus-visible {
	outline-offset: -3px;
}

/* Submenu: open on hover AND on keyboard focus within the menu item,
   so Tab users can actually reach and see dropdown links. */
.elementx-nav-list li:hover > .sub-menu,
.elementx-nav-list li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

/* In the collapsed (mobile) menu, keyboard focus shouldn't be hidden */
.elementx-nav-collapsible .elementx-nav-list a:focus-visible {
	outline-offset: -3px;
}

/* Respect users who prefer reduced motion across ElementX animations */
@media (prefers-reduced-motion: reduce) {
	.elementx-post-card,
	.elementx-dp-card,
	.elementx-related-thumb img,
	.elementx-gallery-item img,
	.elementx-nav-list .sub-menu,
	.elementx-dp-readmore svg,
	.elementx-dp-readmore i {
		transition: none !important;
	}
}

/* ---- Sticky (Motion Effects) ---- */
.elementx-sticky-enabled {
	will-change: transform;
}

.elementx-is-stuck {
	/* When fixed via JS, keep the box model predictable. */
	box-sizing: border-box;
}

.elementx-sticky-placeholder {
	pointer-events: none;
}
