/* =============================================================
   JFFD article components — shared by the Elementor widgets and
   Gutenberg patterns. Specs extracted from the article redesign.
   ============================================================= */

.jffd-callout, .jffd-quote, .jffd-cta, .jffd-faq {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* --- Callout boxes (quick answer / info / warning) --- */
.jffd-callout {
  border-radius: 0 12px 12px 0;
  padding: 18px 22px;
  margin: 30px 0;
}
.jffd-callout--quick {
  background: #F4F7F9;
  border-left: 5px solid #013E4E;
  padding: 22px 26px;
  margin: 0 0 34px;
}
.jffd-callout--info {
  background: #EEF6F1;
  border-left: 5px solid #1A8A5C;
}
.jffd-callout--warning {
  background: #FDECEA;
  border-left: 5px solid #D84C3E;
}
.jffd-callout__title {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .91px;
  text-transform: uppercase;
  color: #013E4E;
  margin: 0 0 10px;
}
.jffd-callout--info .jffd-callout__title { color: #1A8A5C; }
.jffd-callout--warning .jffd-callout__title { color: #C0392B; }
.jffd-callout p, .jffd-callout li {
  font-size: 16.5px;
  line-height: 1.55;
  color: #212121;
  margin: 0 0 8px;
}
.jffd-callout p:last-child, .jffd-callout ul:last-child { margin-bottom: 0; }
.jffd-callout ul { margin: 0; padding-left: 20px; list-style: disc; }
/* Quick answer: muted round bullets, hanging indent, roomier spacing */
.jffd-callout--quick ul { list-style: none; padding-left: 0; }
.jffd-callout--quick li {
  position: relative;
  padding-left: 26px;
  margin: 0 0 12px;
  line-height: 1.6;
}
.jffd-callout--quick li::before {
  content: "\2022";
  position: absolute;
  left: 8px;
  color: #6B7A80;
}
.jffd-callout--quick li:last-child { margin-bottom: 0; }
/* Footer note ("Safety note: …") with dashed divider */
.jffd-callout__note {
  border-top: 1px dashed #CDD8DD;
  margin-top: 18px;
  padding-top: 14px;
  font-size: 16px;
  line-height: 1.6;
  color: #26424A;
}
.jffd-callout__note strong, .jffd-callout__note b { font-weight: 700; color: #1C2B30; }

/* --- Expert quote (E-E-A-T) --- */
.jffd-quote {
  background: #F4F7F9;
  border-left: 5px solid #013E4E;
  border-radius: 0 12px 12px 0;
  padding: 22px 26px;
  margin: 30px 0;
}
.jffd-quote__photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 0 12px;
}
.jffd-quote__text,
blockquote.jffd-quote__text,
.jffd-quote blockquote {
  font-size: 17px;
  line-height: 1.6;
  font-style: italic;
  color: #212121;
  margin: 0 0 12px;
  padding: 0;
  border: none;
  background: none;
}
.jffd-quote__text p { margin: 0 0 10px; font-size: 17px; line-height: 1.6; }
.jffd-quote__text p:last-child { margin-bottom: 0; }
.jffd-quote__attr {
  font-style: normal;
  font-size: 14px;
  color: #6B7A80;
  text-align: left;
}
.jffd-quote__name { font-weight: 700; color: #013E4E; }

/* --- CTA box --- */
.jffd-cta {
  display: flex;
  align-items: stretch;
  background: #013E4E;
  border-radius: 12px;
  overflow: hidden;
  margin: 34px 0;
}
.jffd-cta__body {
  flex: 1;
  min-width: 0;
  padding: 26px 28px;
}
.jffd-cta__eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .96px;
  text-transform: uppercase;
  color: #8FD3C8;
  margin: 0 0 8px;
}
.jffd-cta__headline {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.35;
  color: #FFFFFF;
  margin: 0 0 8px;
}
.jffd-cta__text {
  font-size: 15px;
  line-height: 1.55;
  color: #D7E4E7;
  margin: 0 0 16px;
}
.jffd-cta__btn,
.jffd-cta .wp-block-button__link {
  display: inline-block;
  background: #FFC658; /* Harvest */
  color: #07272D !important; /* Midnight on Harvest fills */
  font-size: 14.5px;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  border: none;
}
.jffd-cta__btn:hover,
.jffd-cta .wp-block-button__link:hover { background: #DDAD2B; /* Harvest Deep */ }
.jffd-cta__media {
  width: 200px;
  flex-shrink: 0;
}
.jffd-cta__media img,
.jffd-cta__media .wp-block-image,
.jffd-cta__media figure {
  width: 100%;
  height: 100%;
  margin: 0;
}
.jffd-cta__media img { object-fit: cover; display: block; }

/* --- FAQ accordion --- */
.jffd-faq { margin: 0 0 30px; }
.jffd-faq__item,
details.jffd-faq__item {
  border: 1px solid #E0E0E0;
  border-radius: 10px; /* demo as-built */
  background: #fff;
  margin: 0 0 10px;
  padding: 0;
}
.jffd-faq__item summary {
  font-size: 17px;
  font-weight: 700;
  color: #013E4E;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.jffd-faq__item summary::-webkit-details-marker { display: none; }
.jffd-faq__item summary::after {
  content: "+";
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  color: #6B7A80;
  flex-shrink: 0;
}
.jffd-faq__item[open] summary::after { content: "\2212"; }
.jffd-faq__answer,
.jffd-faq__item > :not(summary) {
  padding: 0 16px 16px;
}
.jffd-faq__answer p,
.jffd-faq__item > p {
  font-size: 16px;
  line-height: 1.6;
  color: #333333;
  margin: 0 0 10px;
}
.jffd-faq__answer p:last-child { margin-bottom: 0; }

/* --- Mobile --- */
@media (max-width: 640px) {
  .jffd-cta { flex-direction: column; }
  .jffd-cta__media { width: 100%; height: 170px; order: -1; }
  .jffd-callout, .jffd-callout--quick { padding: 18px; }
}

/* --- Live FAQ sections: Elementor Nested Accordion, matched to the
       demo's FAQ cards (same look as .jffd-faq).
       !important is deliberate here: Elementor emits per-widget rules
       (.elementor-element-xxxx …) that outrank any clean selector, and
       individual FAQ widgets across posts carry different settings —
       these overrides normalize every FAQ to the design system. --- */
details.e-n-accordion-item {
  border: 1px solid #E0E0E0 !important;
  border-radius: 10px !important; /* demo as-built */
  background: #fff !important;
  margin: 0 0 10px !important;
  overflow: hidden;
}
details.e-n-accordion-item > summary.e-n-accordion-item-title {
  padding: 14px 16px !important;
  background: #fff !important;
  border: none !important; /* Elementor adds a title divider — demo has none */
  list-style: none;
}
details.e-n-accordion-item > summary.e-n-accordion-item-title::-webkit-details-marker { display: none; }
.e-n-accordion-item-title-header h2,
.e-n-accordion-item-title-header h3,
.e-n-accordion-item-title-header h4,
.e-n-accordion-item-title-text {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  color: #013E4E !important;
  letter-spacing: 0 !important;
  margin: 0 !important;
}
.e-n-accordion-item-title-icon { color: #6B7A80 !important; }
.e-n-accordion-item-title-icon svg { fill: #6B7A80 !important; width: 14px; height: 14px; }
details.e-n-accordion-item > div:not(.e-n-accordion-item-title) {
  padding: 0 16px 16px !important; /* demo exact */
  border: none !important;         /* inner container border off */
  background: transparent !important;
}
details.e-n-accordion-item p {
  font-size: 16px !important;
  line-height: 1.6 !important;
  color: #333333 !important;
  margin: 0 0 10px;
}

/* --- Sources box (numbered citations) --- */
.jffd-sources {
  background: #F4F7F9;
  border-radius: 12px;
  padding: 24px 26px;
  margin: 30px 0;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.jffd-sources__title {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .91px;
  text-transform: uppercase;
  color: #013E4E;
  margin: 0 0 14px;
}
.jffd-sources ol {
  margin: 0;
  padding-left: 22px;
  list-style: decimal;
}
.jffd-sources li {
  font-size: 14.5px;
  line-height: 1.5;
  color: #333333;
  margin: 0 0 6px;
}
.jffd-sources li:last-child { margin-bottom: 0; }
.jffd-sources a { color: #3498DB; text-decoration: underline; }

/* --- Classic Elementor Accordion + Toggle widgets — same FAQ card
       treatment as the Nested Accordion. !important for the same
       reason: per-widget Elementor rules outrank clean selectors. --- */
.elementor-widget-accordion .elementor-accordion-item,
.elementor-widget-toggle .elementor-toggle-item {
  border: 1px solid #E0E0E0 !important;
  border-radius: 10px !important; /* demo as-built */
  background: #fff !important;
  margin: 0 0 10px !important;
  overflow: hidden;
}
.elementor-widget-accordion .elementor-accordion-item + .elementor-accordion-item {
  border-top: 1px solid #E0E0E0 !important; /* classic widget collapses shared borders */
}
.elementor-widget-accordion .elementor-tab-title,
.elementor-widget-toggle .elementor-tab-title {
  padding: 14px 16px !important;
  background: #fff !important;
  border: none !important;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  color: #013E4E !important;
}
.elementor-widget-accordion .elementor-tab-title a,
.elementor-widget-toggle .elementor-tab-title a {
  font-size: 17px !important;
  font-weight: 700 !important;
  color: #013E4E !important;
  text-decoration: none !important;
}
.elementor-widget-accordion .elementor-tab-title.elementor-active,
.elementor-widget-accordion .elementor-tab-title.elementor-active a,
.elementor-widget-toggle .elementor-tab-title.elementor-active,
.elementor-widget-toggle .elementor-tab-title.elementor-active a {
  color: #013E4E !important;
}
.elementor-widget-accordion .elementor-accordion-icon,
.elementor-widget-toggle .elementor-toggle-icon {
  color: #6B7A80 !important;
}
.elementor-widget-accordion .elementor-accordion-icon svg,
.elementor-widget-toggle .elementor-toggle-icon svg {
  fill: #6B7A80 !important;
  width: 14px;
  height: 14px;
}
.elementor-widget-accordion .elementor-tab-content,
.elementor-widget-toggle .elementor-tab-content {
  padding: 0 16px 16px !important; /* demo exact */
  border-top: none !important;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif !important;
  font-size: 16px !important;
  line-height: 1.6 !important;
  color: #333333 !important;
}
.elementor-widget-accordion .elementor-tab-content p,
.elementor-widget-toggle .elementor-tab-content p {
  font-size: 16px !important;
  line-height: 1.6 !important;
  color: #333333 !important;
  margin: 0 0 10px;
}

/* =============================================================
   ELEMENTOR FLEX-GAP SPACING FIX — in Elementor-built posts,
   widgets live in flex containers (row-gap 20px) where margins
   never collapse, so module margins stacked with the gap and the
   neighbor's margins produced ~2x the demo rhythm (76-98px gaps).
   These compensating margins recreate collapsed-flow spacing:
   [neighbor 0] + [20px gap] + [module compensator] = demo gap.
   Gutenberg / normal-flow usage is unaffected (scoped to widget
   wrappers, class*="jffd_" with underscore = widget names only).
   ============================================================= */
.elementor-widget-theme-post-content .elementor-widget[class*="jffd_"] :is(.jffd-callout, .jffd-quote, .jffd-sources) {
  margin-top: 10px;    /* 20 gap + 10 = 30px — demo callout rhythm */
  margin-bottom: 10px;
}
.elementor-widget-theme-post-content .elementor-widget[class*="jffd_"] .jffd-cta {
  margin-top: 14px;    /* 20 gap + 14 = 34px — demo CTA rhythm */
  margin-bottom: 14px;
}
.elementor-widget-theme-post-content .elementor-widget[class*="jffd_"] .jffd-faq {
  margin-top: 10px;
  margin-bottom: 0;
}
/* swallow the trailing margin of whatever precedes a module */
.elementor-widget-theme-post-content .elementor-widget:has(+ .elementor-widget[class*="jffd_"]) :is(p, ul, ol, h2, h3):last-child {
  margin-bottom: 0;
}
/* heading directly after a module: compensator + 20 gap + X = 44px */
.elementor-widget-theme-post-content .elementor-widget[class*="jffd_"] + .elementor-widget h2 {
  margin-top: 14px;
}
.elementor-widget-theme-post-content .elementor-widget.elementor-widget-jffd_cta + .elementor-widget h2 {
  margin-top: 10px; /* CTA mb 14 + 20 gap + 10 = 44 */
}
/* two modules back-to-back: one demo-sized gap, not two */
.elementor-widget-theme-post-content .elementor-widget[class*="jffd_"] + .elementor-widget[class*="jffd_"] :is(.jffd-callout, .jffd-quote, .jffd-sources, .jffd-cta, .jffd-faq) {
  margin-top: 0;
}
