/* Caring Hearts site layer: responsive behaviour the design prototype computed in JS,
   plus the native Elementor form styled to the design's form card. */

/* Elementor canvas resets */
body.ch-site { margin: 0; background: #fff; }
body.ch-site .elementor-section-wrap, body.ch-site .e-con, body.ch-site .e-con-inner { --padding-top:0; --padding-bottom:0; --padding-left:0; --padding-right:0; --gap: 0; }
body.ch-site .elementor-widget-html { margin: 0 !important; }
body.ch-site .elementor-widget:not(:last-child) { margin-block-end: 0 !important; }
body.ch-site .e-con { --container-max-width: none; --content-width: 100%; }
body.ch-site .ch-src-form { display: none; }

/* ---- header: desktop at >=1180px, compact + drawer below -------------------- */
[data-ch-mob] { display: none !important; }
[data-ch-drawer] { display: none; }
@media (max-width: 1179.98px) {
  [data-ch-desk] { display: none !important; }
  [data-ch-mob] { display: contents !important; }
  [data-ch-drawer].is-open { display: block !important; }
}
[data-ch-burger].is-open [data-ch-icon-closed] { display: none !important; }
[data-ch-burger].is-open [data-ch-icon-open] { display: contents !important; }

/* ---- sticky asides and sidebar layout: stack below 900px ---------------------- */
@media (max-width: 899.98px) {
  [data-ch-sticky] { position: static !important; }
  [data-ch-sidebar] { grid-template-columns: minmax(0, 1fr) !important; }
  [data-ch-sideorder] { order: 2 !important; }
}
@media (min-width: 900px) {
  [data-ch-sidebar] { grid-template-columns: 400px minmax(0, 1fr) !important; }
  [data-ch-sideorder] { order: 0 !important; }
}

/* ---- gallery: 4 cols desktop, 2 tablet, 1 phone (exact design placements) --- */
[data-ch-gallery] { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
[data-ch-gallery] > [data-ch-gimg]:nth-child(1) { grid-area: 1 / 1 / 3 / 3 !important; }
[data-ch-gallery] > [data-ch-gimg]:nth-child(2) { grid-area: 1 / 3 / 3 / 4 !important; }
[data-ch-gallery] > [data-ch-gimg]:nth-child(3) { grid-area: 3 / 3 / 4 / 5 !important; }
[data-ch-gallery] > [data-ch-gimg]:nth-child(4) { grid-area: 1 / 4 / 3 / 5 !important; }
[data-ch-gallery] > [data-ch-gimg]:nth-child(5) { grid-area: 3 / 1 / 5 / 2 !important; }
[data-ch-gallery] > [data-ch-gimg]:nth-child(6) { grid-area: 3 / 2 / 5 / 3 !important; }
[data-ch-gallery] > [data-ch-gimg]:nth-child(7) { grid-area: 4 / 3 / 5 / 5 !important; }
@media (max-width: 899.98px) {
  [data-ch-gallery] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  [data-ch-gallery] > [data-ch-gimg]:nth-child(1) { grid-area: 1 / 1 / 2 / 3 !important; }
  [data-ch-gallery] > [data-ch-gimg]:nth-child(2) { grid-area: 2 / 1 / 4 / 2 !important; }
  [data-ch-gallery] > [data-ch-gimg]:nth-child(3) { grid-area: 6 / 1 / 7 / 3 !important; }
  [data-ch-gallery] > [data-ch-gimg]:nth-child(4) { grid-area: 2 / 2 / 4 / 3 !important; }
  [data-ch-gallery] > [data-ch-gimg]:nth-child(5) { grid-area: 4 / 1 / 6 / 2 !important; }
  [data-ch-gallery] > [data-ch-gimg]:nth-child(6) { grid-area: 4 / 2 / 6 / 3 !important; }
  [data-ch-gallery] > [data-ch-gimg]:nth-child(7) { grid-area: 7 / 1 / 8 / 3 !important; }
}
@media (max-width: 559.98px) {
  [data-ch-gallery] { grid-template-columns: 1fr !important; }
  [data-ch-gallery] > [data-ch-gimg] { grid-area: auto !important; }
}

/* ---- FAQ accordion ----------------------------------------------------------- */
[data-ch-faq-item] [data-ch-faq-a] { display: none; }
[data-ch-faq-item].is-open [data-ch-faq-a] { display: block; }
[data-ch-faq-item] { border-color: #eceef1 !important; }
[data-ch-faq-item].is-open { border-color: #b2552a !important; }
[data-ch-faq-item] [data-ch-faq-q] > span:last-child { transform: rotate(0deg) !important; }
[data-ch-faq-item].is-open [data-ch-faq-q] > span:last-child { transform: rotate(45deg) !important; }

/* ---- native Elementor form, matched to the design's form fields ------------- */
[data-ch-form-mount] .elementor-widget-form { width: 100%; }
[data-ch-form-mount] .elementor-form-fields-wrapper { margin: 0 !important; display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
[data-ch-formcard].ch-compact [data-ch-form-mount] .elementor-form-fields-wrapper { gap: 12px; }
[data-ch-form-mount] .elementor-field-group { width: 100% !important; max-width: none !important; padding: 0 !important; margin: 0 !important; grid-column: 1 / -1; display: flex !important; flex-direction: column !important; flex-wrap: nowrap !important; align-items: stretch !important; gap: 6px; min-width: 0; }
[data-ch-form-mount] .elementor-field-group:has(> .ch-half) { grid-column: auto; }
[data-ch-formcard].ch-compact [data-ch-form-mount] .elementor-field-group:has(> .ch-third) { grid-column: 1 / -1; }
@media (max-width: 479.98px) { [data-ch-form-mount] .elementor-field-group:has(> .ch-half) { grid-column: 1 / -1; } }
[data-ch-form-mount] .elementor-field-group > .elementor-field, [data-ch-form-mount] .elementor-field-group > .elementor-select-wrapper { flex: 0 0 auto !important; width: 100% !important; max-width: 100% !important; margin: 0 !important; }
[data-ch-form-mount] .elementor-field-group > label { flex: 0 0 auto !important; width: auto !important; }
[data-ch-form-mount] .elementor-field-label { font-family: 'Nunito Sans', system-ui, sans-serif !important; font-weight: 600 !important; font-size: 14px !important; line-height: 1.4; color: #141414 !important; padding: 0 !important; margin: 0 !important; }
[data-ch-form-mount] .elementor-mark-required .elementor-field-label:after { content: none !important; }
[data-ch-form-mount] .elementor-field-textual, [data-ch-form-mount] select.elementor-field {
  width: 100% !important; min-height: 50px; padding: 12px 16px !important; border: 1.5px solid #d9dce0 !important; border-radius: 14px !important;
  font-family: 'Nunito Sans', system-ui, sans-serif !important; font-size: 16px !important; line-height: 1.5 !important; color: #141414 !important; background: #fff !important; box-shadow: none; }
[data-ch-formcard].ch-compact [data-ch-form-mount] .elementor-field-textual, [data-ch-formcard].ch-compact [data-ch-form-mount] select.elementor-field { min-height: 48px; padding: 11px 14px !important; border-radius: 12px !important; }
[data-ch-form-mount] textarea.elementor-field-textual { resize: vertical; min-height: 0; }
[data-ch-form-mount] .elementor-field-textual::placeholder { color: #757575; opacity: 1; }
[data-ch-form-mount] .elementor-field-textual:focus, [data-ch-form-mount] select.elementor-field:focus { outline: none; border-color: #b2552a !important; box-shadow: 0 0 0 4px #f6e8df !important; }
[data-ch-form-mount] .elementor-select-wrapper { width: 100%; }
[data-ch-form-mount] .elementor-select-wrapper .select-caret-down-wrapper { inset-inline-end: 14px; color: #141414; }
[data-ch-form-mount] .elementor-field-type-submit { margin-top: 2px !important; }
[data-ch-form-mount] .elementor-button {
  width: 100%; display: inline-flex !important; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 14px 28px !important; border-radius: 999px !important;
  background: #b2552a !important; color: #fff !important; font-family: 'Nunito Sans', system-ui, sans-serif !important; font-weight: 700 !important; font-size: 17px !important; line-height: 1.2 !important; border: 0 !important; cursor: pointer; transition: background .2s; }
[data-ch-formcard].ch-compact [data-ch-form-mount] .elementor-button { min-height: 52px; padding: 13px 26px !important; font-size: 16px !important; }
[data-ch-form-mount] .elementor-button:hover { background: #9a4722 !important; }
[data-ch-form-mount] .elementor-button:focus-visible { outline: 3px solid #b2552a; outline-offset: 3px; }
[data-ch-form-mount] .elementor-message { font-family: 'Nunito Sans', system-ui, sans-serif; font-size: 15px; margin-top: 10px; }
[data-ch-form-mount] .elementor-message.elementor-message-success { display: none; }
[data-ch-form-mount] .elementor-message-danger, [data-ch-form-mount] .elementor-error .elementor-message { color: #b42318; }
[data-ch-form-mount] .elementor-field-group .elementor-message { margin-top: 4px; font-size: 14px; }
[data-ch-formcard].is-sent [data-ch-form-mount], [data-ch-formcard].is-sent [data-ch-form-mount] ~ a { display: none !important; }
[data-ch-formcard].is-sent [data-ch-sent] { display: block !important; }
[data-ch-sent][hidden] { display: none; }

/* ---- blog article body typography for real WordPress posts ------------------ */
.ch-post-body > p { margin: 0; font-size: 18px; line-height: 1.75; color: #2a2d31; text-wrap: pretty; }
.ch-post-body > h2 { margin: 12px 0 0; font-family: 'Lora', Georgia, serif; font-weight: 500; font-size: clamp(24px, 2.6vw, 30px); line-height: 1.25; color: #141414; }
.ch-post-body > ul { margin: 0; padding-left: 22px; font-size: 18px; line-height: 1.75; color: #2a2d31; }

/* legal pages */
.ch-legal h2 { margin: 28px 0 0; font-family: 'Lora', Georgia, serif; font-weight: 500; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.25; color: #141414; }
.ch-legal p, .ch-legal li { font-size: 17px; line-height: 1.75; color: #2a2d31; }
.ch-legal ul { padding-left: 22px; margin: 0; }
.ch-legal p { margin: 0; }

/* hero floating badge: hidden on mobile so it does not cover the photos */
@media (max-width: 767.98px) { [data-ch-hero-badge] { display: none !important; } }

/* home About block: photo below the text when the two columns stack */
@media (max-width: 831.98px) { [data-ch-about-img] { order: 2; } }
