/* LP Builder Frontend CSS
 * Intentionally minimal — Impreza theme handles all styling via WPBakery shortcodes.
 */

.dynamic-icon svg {
    fill: currentColor !important;
    transition: fill 0.3s ease;
}

/* Video block — responsive 16:9 wrapper for oEmbed iframes (YouTube/Vimeo).
   The intrinsic padding-bottom trick keeps the aspect ratio while letting the
   container fill its parent's width, so the video respects the page's content
   max-width and Impreza section padding automatically. */
.lpb-video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}
.lpb-video-wrapper iframe,
.lpb-video-wrapper embed,
.lpb-video-wrapper object,
.lpb-video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
}

/* Compact spacing toggle — overrides Impreza's height_small / height_medium /
   height_auto vertical padding on a per-block opt-in basis. The class is
   injected by LPB_Renderer::maybe_force_compact_height(). */
.l-section.lpb-compact-spacing {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* FAQ block — force white on the accordion's headers, sections, and content
   areas so the whole accordion stands out against the section's secondary-color
   background. Impreza ships these elements with `background: transparent`, so
   without the override the section's secondary color bleeds through. */
.lpb-faq-section .w-tabs-section,
.lpb-faq-section .w-tabs-section-header,
.lpb-faq-section .w-tabs-section-content {
    background: #ffffff !important;
}

/* Hero Split — subtitle styling. Set here (not via Impreza's `css=` JSON on
   the shortcode) because Impreza whitelists the properties it accepts there;
   passing `line-height` caused Impreza to drop the entire rule, losing the
   `animation-name: aft` that drives the fade-in, leaving the element stuck
   at opacity 0. Padding is symmetric top/bottom so the subtitle sits with
   equal breathing room between the h1 above and the CTA below. */
.lpb-hero-split-subtitle {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}
.lpb-hero-split-subtitle .w-post-elm-value,
.lpb-hero-split-subtitle.w-post-elm {
    line-height: 26px;
    color: var(--color-content-text, #4d525b) !important;
}

/* Hero Split — image position differs between desktop and mobile.
   Desktop: image lives in the right column (2nd .wpb_column) next to the text.
   Mobile: a duplicate image is rendered inside the text column between the
   h1 and h5, and the right column is hidden — `order` alone can't interleave
   the image between siblings of a different column.

   Specificity note: Impreza's `.w-image.has_ratio` rule (0,2,0) beats a single
   `.lpb-hero-image-mobile` selector, so we chain `.w-image` to match. */
.w-image.lpb-hero-image-mobile {
    display: none;
}

/* Testimonials carousel — using dots-only mode. Impreza shows arrows by
   default on desktop, so we hide them here. (If switching to arrows mode,
   remove this rule — see the disabled arrow block inside the mobile media
   query below.) */
.lpb-testimonials-section .owl-nav {
    display: none !important;
}

@media (max-width: 600px) {
    .lpb-hero-split-row .g-cols > .wpb_column:nth-child(2) {
        display: none;
    }
    .w-image.lpb-hero-image-mobile {
        display: block;
        margin-top: 1.25rem;
        margin-bottom: 1rem;
    }

    /* Image-and-text block — row 1 has [text, image] in source order, but on
       mobile we want the image first. The text column carries
       .lpb-worth-card-bg; its sibling in the same grid is the image, which we
       lift via `order: -1`. Row 2 is already [image, text] so it stacks
       correctly without override. (Anchoring on the column class because
       Impreza drops el_class on [vc_row_inner].) */
    .g-cols > .lpb-worth-card-bg ~ .wpb_column {
        order: -1;
    }

    /* Testimonials carousel — force the .owl-dots pagination visible on
       mobile. Impreza's Owl responsive config disables dots at this
       breakpoint, which adds class `disabled` (Owl's default CSS then sets
       `display: none` on .owl-dots.disabled). We override both the base and
       the disabled state. */
    .lpb-testimonials-section .owl-dots,
    .lpb-testimonials-section .owl-dots.disabled {
        display: block !important;
    }

    /* Testimonials carousel arrows — DISABLED. Currently using dots="1" on
       the shortcode instead (see templates/blocks/testimonials.php). To
       re-enable arrows: switch the shortcode back to arrows="1", remove the
       `.lpb-testimonials-section .owl-nav { display: none }` rule outside
       this media query, and uncomment the block below.

       What this block does: Impreza hides the Owl nav arrows on mobile by
       default. The rules force them visible and absolute-position each arrow
       outside the slide area (negative offsets relative to .owl-carousel) so
       they sit in the section's horizontal padding instead of overlapping the
       testimonial text. Without it, Impreza's mobile CSS leaves the arrows
       static, stacking them in the corner.

    .lpb-testimonials-section .owl-nav {
        display: block !important;
        position: static !important;
        margin: 0 !important;
    }
    .lpb-testimonials-section .owl-prev,
    .lpb-testimonials-section .owl-next {
        display: block !important;
        position: absolute !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        margin: 0 !important;
        z-index: 5;
    }
    .lpb-testimonials-section .owl-prev {
        right: -20px !important;
        left: auto !important;
    }
    .lpb-testimonials-section .owl-next {
        left: -20px !important;
        right: auto !important;
    }
    */
}

/* Legal footer (accessibility statement + privacy policy). Landing pages hide the
   site footer, so this is the only place those links appear. */
.lpb-legal-footer {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 20px 16px;
    font-size: 15px;
    color: var(--color-content-text);
    background: var(--lpb-secondary-color, var(--color-content-bg-alt));
}
.lpb-legal-footer a {
    color: inherit;
    text-decoration: underline;
}
