/* ==========================================================================
   Elementor compatibility for the Family Care design system.

   Pages are native Elementor containers + widgets that carry the concept's
   class names (section, wrap, grid, card ...). These rules switch off
   Elementor's own box model so those classes alone decide the layout, and
   restyle the widgets we use to match the concept. Loaded after styles.css.
   ========================================================================== */

/* --- WordPress / Astra glue ---------------------------------------------- */
.fc-page .site-content,
.fc-page #primary,
.fc-page .ast-container { margin: 0; padding: 0; max-width: none; width: auto; display: block; }
.fc-page .entry-content,
.fc-page article.page { margin: 0; padding: 0; }
.fc-managed-chrome .site-header,
.fc-managed-chrome .site-footer,
.fc-page header.entry-header,
.fc-page .entry-title { display: none !important; }

/* Astra's own skip link duplicates the theme's (.skip); WordPress core
   screen-reader-text needs its usual visually-hidden rule. */
.skip-link.screen-reader-text { display: none; }
.screen-reader-text {
  border: 0; clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden;
  padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important;
}

/* --- Containers ------------------------------------------------------------
   Elementor drives every container property through custom properties; reset
   them to plain-block values. Concept rules (.grid, .wrap, .section, ...) set
   real properties at the same specificity in styles.css, which loads after
   Elementor's CSS, so they win wherever they apply. */
.elementor .e-con.e-con.e-con {
  --display: block;
  --padding-top: 0; --padding-right: 0; --padding-bottom: 0; --padding-left: 0;
  --container-default-padding-top: 0; --container-default-padding-right: 0;
  --container-default-padding-bottom: 0; --container-default-padding-left: 0;
  --margin-top: 0; --margin-right: 0; --margin-bottom: 0; --margin-left: 0;
  --gap: normal; --row-gap: normal; --column-gap: normal;
  --flex-direction: row; --flex-wrap: nowrap; --justify-content: normal;
  --align-items: normal; --align-content: normal;
  --flex-grow: 0; --flex-shrink: 1; --flex-basis: auto;
  --text-align: inherit;
  --width: 100%;
  --container-widget-width: auto;
  --widgets-spacing: 0px; --widgets-spacing-row: 0px; --widgets-spacing-column: 0px;
  --kit-widget-spacing: 0px;
  transition: none;
}
/* A container that is a link (card) keeps the concept's link styling. */
a.e-con { color: inherit; }

/* Elementor removes the underline from every link (.elementor a); the concept
   relies on the browser default for plain text links. Classed links (buttons,
   cards) keep their own design-system styling. */
.elementor :where(p, li, td, dd, h4) > a:where(:not([class])) { text-decoration: underline; }

/* --- Widgets ---------------------------------------------------------------
   On the live site, widget wrappers step out of the layout (display:contents)
   so their content sits in grids/flex rows exactly like the concept markup.
   Inside the Elementor editor they stay boxes so they can be selected. */
.elementor-widget { --kit-widget-spacing: 0px; margin: 0; }
body:not(.elementor-editor-active) .elementor-widget-text-editor,
body:not(.elementor-editor-active) .elementor-widget-shortcode,
body:not(.elementor-editor-active) .elementor-widget-image { display: contents; }
.elementor-widget-shortcode .elementor-shortcode { display: contents; }
body .elementor-widget-image img { display: block; vertical-align: initial; }

/* The design system's stack spacing (".stack > * + *") is written for direct
   children; repeat it for content that sits inside a widget wrapper. */
.stack > .elementor-widget > * + *,
.stack > * + .elementor-widget > * { margin-top: 1.15rem; }
.stack-lg > .elementor-widget > * + *,
.stack-lg > * + .elementor-widget > * { margin-top: 2rem; }
.stack > .elementor-widget:first-child > :first-child,
.stack-lg > .elementor-widget:first-child > :first-child { margin-top: 0; }
.elementor-widget-text-editor { color: inherit; font: inherit; }

/* Google map: fill the concept's .map frame. */
.map .elementor-widget-google_maps,
.map .elementor-custom-embed { height: 100%; }
.map .elementor-widget-google_maps iframe { display: block; width: 100%; border: 0; }

/* --- FAQ accordion (Elementor "Accordion" widget) styled as the concept's .acc */
.elementor .fc-acc.fc-acc.fc-acc {
  --n-accordion-border-width: 0px;
  --n-accordion-padding: 1.15rem 1.4rem;
  --n-accordion-title-font-size: 1.01rem;
  --n-accordion-title-normal-color: var(--ink);
  --n-accordion-title-hover-color: var(--ink);
  --n-accordion-title-active-color: var(--red-600);
  --n-accordion-icon-gap: 0 1.25rem;
  --n-accordion-title-icon-order: 1;
}
.fc-acc .e-n-accordion {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.fc-acc .e-n-accordion-item + .e-n-accordion-item { border-top: 1px solid var(--line); }
.fc-acc .e-n-accordion-item-title {
  justify-content: space-between;
  align-items: flex-start;
  border-radius: 0;
  font-family: var(--font-body);
  font-weight: 500;
  transition: background .18s var(--ease);
}
.fc-acc .e-n-accordion-item-title-header { flex: 1; min-width: 0; }
.fc-acc .e-n-accordion-item-title:hover { background: var(--canvas); }
.fc-acc .e-n-accordion-item-title:focus-visible { outline: 2px solid var(--red-600); outline-offset: -2px; }
.fc-acc .e-n-accordion-item-title-text {
  font-family: var(--font-body);
  font-size: 1.01rem;
  font-weight: inherit;
  letter-spacing: 0;
  line-height: 1.1;
  color: inherit;
  margin: 0;
}
.fc-acc .e-n-accordion-item[open] > .e-n-accordion-item-title { font-weight: 600; }
/* Plus / minus, drawn like the concept's .acc__icon. */
.fc-acc .e-n-accordion-item-title::after {
  content: '';
  flex: none;
  width: 20px; height: 20px; margin-top: 3px;
  background:
    linear-gradient(currentColor, currentColor) center / 16px 1.75px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.75px 16px no-repeat;
  transition: background-size .28s var(--ease);
}
.fc-acc .e-n-accordion-item[open] > .e-n-accordion-item-title::after {
  background-size: 16px 1.75px, 1.75px 0;
}
.fc-acc .e-n-accordion-item > .e-con.fc-acc-answer {
  border: 0;
  padding: 0 1.4rem 1.35rem;
  color: var(--ink-2);
  font-size: .95rem;
  max-width: 72ch;
}
.fc-acc .fc-acc-answer ul { margin: 0 0 1em; padding-left: 1.15rem; }
.fc-acc .fc-acc-answer li { margin-bottom: .35em; }

/* --- Editor only ---------------------------------------------------------- */
/* Scroll-reveal never runs for freshly added elements in the editor. */
.elementor-editor-active .reveal { opacity: 1 !important; transform: none !important; }
/* Empty containers need something to click on while editing. */
.elementor-editor-active .e-con:empty { min-height: 40px; outline: 1px dashed #c9c2b8; }
