/* FAQ fold: show the first few items of an Elementor Accordion, the rest behind a "View more" button.
   Opt-in: nothing happens until the accordion widget has the CSS class  sp-faq-fold  (Advanced → CSS Classes)
   and the button widget has  sp-faq-more . Every rule is scoped under those classes.

   The hiding only applies once the page has the "sp-js" flag on <html> (set in <head> by the plugin), so
   without JavaScript every item stays visible, and never in the Elementor editor. */

/* First 5 items by default; sp-faq-visible-N on the accordion changes N (1 - 12). */
html.sp-js body:not(.elementor-editor-active) .sp-faq-fold:not([class*="sp-faq-visible-"]):not(.sp-faq-open) .e-n-accordion-item:nth-of-type(n + 6),
html.sp-js body:not(.elementor-editor-active) .sp-faq-fold.sp-faq-visible-1:not(.sp-faq-open) .e-n-accordion-item:nth-of-type(n + 2),
html.sp-js body:not(.elementor-editor-active) .sp-faq-fold.sp-faq-visible-2:not(.sp-faq-open) .e-n-accordion-item:nth-of-type(n + 3),
html.sp-js body:not(.elementor-editor-active) .sp-faq-fold.sp-faq-visible-3:not(.sp-faq-open) .e-n-accordion-item:nth-of-type(n + 4),
html.sp-js body:not(.elementor-editor-active) .sp-faq-fold.sp-faq-visible-4:not(.sp-faq-open) .e-n-accordion-item:nth-of-type(n + 5),
html.sp-js body:not(.elementor-editor-active) .sp-faq-fold.sp-faq-visible-5:not(.sp-faq-open) .e-n-accordion-item:nth-of-type(n + 6),
html.sp-js body:not(.elementor-editor-active) .sp-faq-fold.sp-faq-visible-6:not(.sp-faq-open) .e-n-accordion-item:nth-of-type(n + 7),
html.sp-js body:not(.elementor-editor-active) .sp-faq-fold.sp-faq-visible-7:not(.sp-faq-open) .e-n-accordion-item:nth-of-type(n + 8),
html.sp-js body:not(.elementor-editor-active) .sp-faq-fold.sp-faq-visible-8:not(.sp-faq-open) .e-n-accordion-item:nth-of-type(n + 9),
html.sp-js body:not(.elementor-editor-active) .sp-faq-fold.sp-faq-visible-9:not(.sp-faq-open) .e-n-accordion-item:nth-of-type(n + 10),
html.sp-js body:not(.elementor-editor-active) .sp-faq-fold.sp-faq-visible-10:not(.sp-faq-open) .e-n-accordion-item:nth-of-type(n + 11),
html.sp-js body:not(.elementor-editor-active) .sp-faq-fold.sp-faq-visible-11:not(.sp-faq-open) .e-n-accordion-item:nth-of-type(n + 12),
html.sp-js body:not(.elementor-editor-active) .sp-faq-fold.sp-faq-visible-12:not(.sp-faq-open) .e-n-accordion-item:nth-of-type(n + 13) {
	display: none;
}

/* The items that appear after "View more" fade in. */
.sp-faq-fold .e-n-accordion-item.sp-faq-in {
	animation: sp-faq-in 0.35s ease both;
}

@keyframes sp-faq-in {
	from {
		opacity: 0;
		transform: translateY(-6px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

/* The button has nothing to do when every item already fits. */
.sp-faq-more.sp-faq-more-off {
	display: none;
}

.sp-faq-more .elementor-button:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
	.sp-faq-fold .e-n-accordion-item.sp-faq-in {
		animation: none;
	}
}
