/* fhb-pages.css: page sections and carousels for the Forever Home Buyers static copy.
   Page ids: home 10, about 13, privacy 15, faq 18, get-an-offer 20, terms 134, testimonials 278.
   Desktop (>1100px) only changes: legal-page line length, carousel blank gaps (fhb-pages.js). */

/* ================= All widths ================= */

/* Testimonial carousels: fhb-pages.js sizes .slick-list to the visible cards.
   Multi-card carousels get a CSS height transition (single-card ones use slick's own animation). */
.ult-carousel-wrapper.fhb-adapt .slick-list { transition: height .35s ease; }

/* Legal pages: comfortable line length */
.page-id-134 .wpb_text_column.privacy-text {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}
.page-id-15 #content .wpb-content-wrapper {
  max-width: 830px;
  margin-left: auto;
  margin-right: auto;
}
/* Terms: section headings rhythm */
.page-id-134 .privacy-text h3.entry-title { margin-bottom: 12px; }
.page-id-134 .privacy-text h4 { margin: 28px 0 10px; }
/* Privacy: bold-only paragraphs are section titles (tagged by fhb-pages.js) */
.page-id-15 p.fhb-legal-title {
  font-size: 18px;
  line-height: 1.35;
  margin: 28px 0 10px;
  color: #1c244b;
}

/* FAQ: "?" badge sat ~40px above the question */
.page-id-18 .faq-card h4 { margin-bottom: 8px; }
.page-id-18 .faq-card h5 { margin-top: 0 !important; }

/* Equal-height helpers (min-height set by fhb-pages.js) */
.fhb-eq { box-sizing: border-box; }

/* ================= Tablet landscape 1024-1100 ================= */
@media (min-width: 1024px) and (max-width: 1100px) {
  /* Green circle arrows hung off-screen (-35px / 1017px): pull them inside */
  .ult-carousel-wrapper .slick-prev.circle-bg { left: 6px !important; z-index: 5; }
  .ult-carousel-wrapper .slick-next.circle-bg { right: 6px !important; z-index: 5; }
}

/* ================= <=1100 ================= */
@media (max-width: 1100px) {
  /* Get An Offer comparison cards: fixed 500px + -43px margin overflowed the column */
  .page-id-20 .vc_row.vc_inner.ttttttt {
    width: auto !important;
    max-width: 100%;
    margin-right: 0 !important;
    box-sizing: border-box;
  }
}

/* ================= 1000-1100: hero + about ================= */
@media (min-width: 1000px) and (max-width: 1100px) {
  /* Get An Offer hero: form card left edge sat 15px left of the headline */
  .page-id-20 .zzzzzzzzz .aaaaaaaaaaa { margin-left: 15px; }
  /* About: cards row ran to the screen edges */
  .page-id-13 .vc_row.vc_column-gap-20:has(.card-text-design-in-row) {
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* ================= Touch widths <=1023 ================= */
@media (max-width: 1023px) {
  .ult-carousel-wrapper .slick-arrow.circle-bg { display: none !important; }

  /* Home "Why Choose Us?" heading: stack full width, centered */
  .page-id-10 .vc_row:has(> .wpb_column .rts-stra) > .wpb_column {
    width: 100%;
    float: none;
  }
  .page-id-10 .rts-stra,
  .page-id-10 .rts-stra * { text-align: center !important; }
  .page-id-10 .rts-stra { margin-bottom: 18px; }

  /* "We Close Fast & Pay Top Dollar" (home): darken the photo, lift the text */
  /* overlay is masked by the section's own photo (fhb-pages.js) so the transparent wave stays clear */
  .page-id-10 .vc_row:has(.qqqqqqqq) > .upb_row_bg.fhb-mask::after {
    content: "";
    position: absolute;
    inset: 0;
    -webkit-mask: var(--fhb-mask) var(--fhb-mask-pos) / var(--fhb-mask-size) no-repeat;
    mask: var(--fhb-mask) var(--fhb-mask-pos) / var(--fhb-mask-size) no-repeat;
    background: linear-gradient(180deg, rgba(10, 22, 52, .62) 0%, rgba(10, 22, 52, .5) 60%, rgba(10, 22, 52, .35) 100%);
    pointer-events: none;
  }
  .page-id-10 .vc_row:has(.qqqqqqqq) .text-to-white,
  .page-id-10 .vc_row:has(.qqqqqqqq) .qqqqqqqq {
    text-shadow: 0 1px 3px rgba(0, 0, 0, .55);
  }
  .page-id-10 .vc_row:has(.qqqqqqqq) .qqqqqqqq .aio-icon-title,
  .page-id-10 .vc_row:has(.qqqqqqqq) .qqqqqqqq .aio-icon-description {
    line-height: 1.5 !important;
  }
}

/* ================= <=900 ================= */
@media (max-width: 900px) {
  /* CTA buttons ("GET YOUR CASH OFFER", "GET AN OFFER") centered */
  .ubtn-ctn-right { text-align: center !important; }
  .ubtn-ctn-right .ubtn-link { float: none !important; display: inline-block; }
  .ubtn-ctn-right .ubtn { float: none !important; margin-left: auto; margin-right: auto; }

  /* Stats band (home + testimonials): stack and center */
  .vc_inner:has(> .wpb_column .ubtn-ctn-right):has(> .wpb_column .aio-icon-top) > .wpb_column {
    width: 100% !important;
    float: none;
  }
  .vc_inner:has(> .wpb_column .ubtn-ctn-right):has(> .wpb_column .aio-icon-top) h4,
  .vc_inner:has(> .wpb_column .ubtn-ctn-right):has(> .wpb_column .aio-icon-top) p,
  .vc_inner:has(> .wpb_column .ubtn-ctn-right):has(> .wpb_column .aio-icon-top) .aio-icon-top { text-align: center !important; }
}

/* ================= Testimonials page: 2 columns at 768-900 ================= */
@media (min-width: 768px) and (max-width: 900px) {
  .page-id-278 #content .wpb-content-wrapper {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 24px;
  }
  .page-id-278 #content .wpb-content-wrapper::before,
  .page-id-278 #content .wpb-content-wrapper::after { display: none; }
  .page-id-278 #content .wpb-content-wrapper > * { grid-column: 1 / -1; }
  .page-id-278 #content .wpb-content-wrapper > .vc_row:has(.testimonial-card) { display: contents; }
  .page-id-278 #content .wpb-content-wrapper > .vc_row:has(.testimonial-card)::before,
  .page-id-278 #content .wpb-content-wrapper > .vc_row:has(.testimonial-card)::after { display: none; }
  .page-id-278 #content .wpb-content-wrapper > .vc_row:has(.testimonial-card) > .wpb_column {
    grid-column: auto;
    width: auto !important;
    min-width: 0;
    float: none;
  }
  .page-id-278 #content .wpb-content-wrapper > .vc_row:has(.testimonial-card) > .wpb_column > .vc_column-inner {
    padding-left: 0;
    padding-right: 0;
  }
  .page-id-278 .testimonial-card { margin-bottom: 24px !important; }
}

/* ================= Phones <=767 ================= */
@media (max-width: 767px) {
  /* Home testimonial carousel: default arrows overlapped the card; swipe + dots remain */
  .page-id-10 .ult-carousel-wrapper .slick-arrow.default { display: none !important; }

  /* Dots close under the card */
  .ult-carousel-wrapper:has(.testimonial-card) { padding-bottom: 8px !important; }
  .ult-carousel-wrapper:has(.testimonial-card) .slick-dots { padding: 6px 0 !important; }

  /* Home "Why Choose Us" icon list: unslicked by fhb-pages.js, shown as a 2-column grid */
  .ult-carousel-wrapper.fhb-icon-grid { padding-bottom: 0 !important; margin-bottom: 8px !important; }
  .fhb-icon-grid > div:first-child {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 18px 14px;
  }
  .fhb-icon-grid > div:first-child > .ult-item-wrap { width: auto !important; min-width: 0; visibility: visible !important; opacity: 1 !important; }
  .fhb-icon-grid > div:first-child > .ult-item-wrap:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .fhb-icon-grid .aio-icon-box { display: block !important; text-align: center; }
  .fhb-icon-grid .aio-icon-left {
    display: block !important;
    width: auto !important;
    margin: 0 auto 8px;
    padding: 0 !important;
  }
  .fhb-icon-grid .aio-icon-left .img-icon { margin: 0 auto; }
  .fhb-icon-grid .aio-ibd-block { display: block !important; width: auto !important; }
  .fhb-icon-grid .aio-icon-title {
    margin: 0 !important;
    font-size: 15px !important;
    line-height: 1.3 !important;
    text-align: center !important;
  }

  /* 3 Easy Steps cards (home, get-an-offer, faq) */
  .page-id-10 .card-design,
  .page-id-20 .text-block-settings,
  .page-id-18 .card-design-popu {
    padding: 22px 24px !important;
    border-radius: 20px !important;
    margin-bottom: 20px !important;
    min-height: 0 !important;
    height: auto !important;
  }
  .page-id-10 .card-design > .wpb_wrapper > p:first-child,
  .page-id-10 .card-design > .wpb_wrapper > p:first-child strong,
  .page-id-20 .text-block-settings > .wpb_wrapper > p:first-child,
  .page-id-20 .text-block-settings > .wpb_wrapper > p:first-child strong,
  .page-id-18 .card-design-popu h4 {
    font-size: 19px !important;
    line-height: 1.3 !important;
    color: #0f2551 !important;
    margin-bottom: 10px !important;
  }

  /* Comparison cards and other stacked cards: ~20px between cards */
  .page-id-10 .vc_inner.iii { margin-bottom: 20px; }
  .page-id-20 .vc_inner.ttttttt { margin-bottom: 20px; }

  /* Testimonials page: reviews read left-aligned, upright; stars + name stay centered */
  .page-id-278 .testimonial-card { margin-bottom: 20px !important; }
  .page-id-278 .testimonial-card p:has(> em) { text-align: left !important; }
  .page-id-278 .testimonial-card p:has(> em) em { font-style: normal; }

  /* Testimonials counter band: same overlay idea as home */
  .page-id-278 .vc_row.jgaaaaaaa { position: relative; }
  .page-id-278 .vc_row.jgaaaaaaa::before {
    content: "";
    display: block;
    position: absolute;
    inset: 0;
    background: rgba(10, 22, 52, .55);
    z-index: 0;
    pointer-events: none;
  }
  .page-id-278 .vc_row.jgaaaaaaa > * { position: relative; z-index: 1; }
  .page-id-278 .vc_row.jgaaaaaaa h4,
  .page-id-278 .vc_row.jgaaaaaaa p,
  .page-id-278 .vc_row.jgaaaaaaa .stats-block { text-shadow: 0 1px 3px rgba(0, 0, 0, .5); line-height: 1.5; }

  /* Spacing rhythm: collapse oversized spacers, normalize element gaps */
  .vc_empty_space { height: 20px !important; }
  .ult-spacer { max-height: 20px !important; overflow: hidden; }
  /* low specificity on purpose: classes that zero this margin (image-remove-margin etc.) still win */
  .wpb_content_element,
  .ult-carousel-wrapper,
  .ubtn-ctn-center,
  .ubtn-ctn-right { margin-bottom: 24px; }
  /* "Avoided months of repairs!" caption was pulled up with top:-54px, leaving 54px of dead space */
  .wpb_text_column.text-blue-bg[style*="top"], .wpb_text_column.text-blue-bg { top: 0 !important; margin-top: -54px; }
  /* a plain section that follows a coloured one needs its own top breathing room */
  #main .vc_row-full-width + .vc_row:not(.vc_row-has-fill):not(.vc_inner) { padding-top: 36px; }
  #main .vc_row:not(.vc_row-has-fill):not(.vc_inner):has(+ .vc_row-has-fill) { padding-bottom: 24px; }
  #main .wpb_text_column > .wpb_wrapper > :first-child { margin-top: 0 !important; }
  /* rows that only hold a spacer add 10-45px of dead space each */
  #main .vc_row:not(.vc_row-has-fill):not(:has(.wpb_content_element, .ult-carousel-wrapper, .ubtn-ctn-center, .ubtn-ctn-right, .ubtn-ctn-left, .vc_inner, .gform_wrapper, .aio-icon-component, .vc_single_image-wrapper, img, form, .gform_confirmation_wrapper)) { display: none !important; }
  /* stacked columns in filled sections each re-added 35px of top padding */
  #main .vc_row-has-fill > .vc_column_container + .vc_column_container > .vc_column-inner { padding-top: 0 !important; }
  #main .vc_row-has-fill > .vc_column_container > .vc_column-inner { padding-top: 40px; }
  /* last block of a column should not push the next section further away */
  #main .vc_row-has-fill > .vc_column_container:last-of-type > .vc_column-inner > .wpb_wrapper > .wpb_content_element:last-child { margin-bottom: 0 !important; }

  /* Get An Offer hero: subtitle hugged the H2 */
  .page-id-20 .zzzzzzzzz .heading-to-white h2 { margin-bottom: 12px !important; }

  /* Legal pages */
  .page-id-134 .wpb_text_column.privacy-text {
    padding: 22px 18px !important;
    border-radius: 24px;
  }
  .page-id-134 .privacy-text h3.entry-title { font-size: 28px !important; line-height: 1.2 !important; }
  .page-id-134 .privacy-text h4 {
    font-size: 20px !important;
    line-height: 1.3 !important;
    margin: 24px 0 8px !important;
  }
  .page-id-134 .privacy-text ul,
  .page-id-134 .privacy-text ol,
  .page-id-15 #content ul,
  .page-id-15 #content ol { padding-left: 20px !important; margin-left: 0 !important; }
  .page-id-15 p.fhb-legal-title { margin: 24px 0 8px; }
}

@media (max-width: 480px) {
  .page-id-15 #main,
  .page-id-134 #main {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  .page-id-15 #main > .fusion-row,
  .page-id-134 #main > .fusion-row { padding-left: 0 !important; padding-right: 0 !important; }
}

/* Contact-form links inside the Privacy / Terms text read as links */
.privacy-text a[href*="/contact/"] { color: #1e73be; text-decoration: underline; }
