/*
 * Bafleh WordPress visual parity layer A2 - 2026-08-29
 * Derived from the supplied bafleh.com Flatsome child-theme behavior without loading WordPress/PHP/Flatsome at runtime.
 * Loaded after the existing public and mobile styles so only deliberate parity overrides win.
 */
:root {
    --bafleh-wp-ink: #2a2218;
    --bafleh-wp-stone: #776f66;
    --bafleh-wp-white: #fff;
    --bafleh-wp-ease: cubic-bezier(.22,.61,.36,1);
}

/* Exact high-resolution brand treatment from supplied WordPress asset. */
.bafleh-live-logo img {
    width: 150px;
    max-height: 62px;
    object-fit: contain;
}

/* ===== HOMEPAGE: WordPress full-screen editorial story ===== */
.bafleh-wp-home-story {
    width: 100%;
    background: #111;
}

.bafleh-wp-home-section {
    position: relative;
    width: 100%;
    min-height: calc(100svh - var(--bafleh-header-height, 100px));
    height: calc(100svh - var(--bafleh-header-height, 100px));
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    scroll-snap-align: start;
    isolation: isolate;
}

.bafleh-wp-home-section::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to bottom, rgba(0,0,0,.02) 35%, rgba(0,0,0,.16) 70%, rgba(0,0,0,.24) 100%);
    pointer-events: none;
}

.bafleh-wp-home-content {
    position: relative;
    z-index: 2;
    width: min(860px, calc(100% - 44px));
    margin: 0 auto;
    padding: 34px 32px 52px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    background: rgba(0,0,0,var(--wp-home-overlay,.30));
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
}

.bafleh-wp-home-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 0 0 16px;
    color: rgba(255,255,255,.76);
    font-family: "Jost", Arial, sans-serif;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: .32em;
    text-transform: uppercase;
}

.bafleh-wp-home-label span {
    width: 26px;
    height: 1px;
    flex: 0 0 26px;
    background: rgba(255,255,255,.48);
}

.bafleh-wp-home-title {
    margin: 0;
    color: #fff;
    font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    font-size: clamp(42px, 4vw, 58px);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: .004em;
    text-transform: none;
}

.bafleh-wp-home-title span { display: block; }

.bafleh-wp-home-description {
    max-width: 590px;
    margin: 15px auto 0;
    color: rgba(255,255,255,.88);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.8;
}

.bafleh-wp-home-cta {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-top: 24px;
    color: #fff!important;
    font-family: "Jost", Arial, sans-serif;
    font-size: 11px;
    letter-spacing: .22em;
    text-transform: uppercase;
    text-decoration: none!important;
}

.bafleh-wp-home-cta::before,
.bafleh-wp-home-cta::after {
    content: "";
    width: 26px;
    height: 1px;
    background: currentColor;
    transition: width .28s ease;
}

.bafleh-wp-home-cta:hover::before,
.bafleh-wp-home-cta:hover::after { width: 42px; }

.wp-home-anim {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .72s var(--bafleh-wp-ease), transform .72s var(--bafleh-wp-ease);
}

.bafleh-wp-home-section.is-active .wp-home-anim {
    opacity: 1;
    transform: none;
}

.bafleh-wp-home-section.is-active .wp-home-anim:nth-child(2) { transition-delay: .08s; }
.bafleh-wp-home-section.is-active .wp-home-anim:nth-child(3) { transition-delay: .15s; }
.bafleh-wp-home-section.is-active .wp-home-anim:nth-child(4) { transition-delay: .21s; }

/* Imported WordPress media should inherit the native MVC responsive treatment. */
.live-wordpress-page-content img[src*="/wordpress-live/"],
.live-wordpress-page-content img[data-wordpress-localized="1"] {
    width: 100%;
    height: auto;
}

/* Ring-size imagery supplied with the WordPress source handoff. */
.live-wordpress-page-content .services-grid img[src*="M1-"],
.live-wordpress-page-content .service-card img[src*="M1-"] {
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

/* Keep the WordPress editorial feel without inheriting Flatsome's fixed widths. */
.live-wordpress-page-content .services-section > .container,
.live-wordpress-page-content .bfl-container,
.live-wordpress-page-content .bafleh-grid,
.live-wordpress-page-content .bfl-grid-row,
.live-wordpress-page-content .info-section {
    width: min(100%, 1300px);
}

@media (min-width: 981px) {
    html.bafleh-home-story-active {
        scroll-snap-type: y proximity;
        scroll-padding-top: var(--bafleh-header-height, 100px);
    }
}

@media (max-width: 980px) {
    .bafleh-live-logo img { width: 118px; max-height: 52px; }

    .bafleh-wp-home-section {
        min-height: calc(100svh - var(--bafleh-header-height, 82px));
        height: calc(100svh - var(--bafleh-header-height, 82px));
        background-position: center top!important;
    }

    .bafleh-wp-home-content {
        width: calc(100% - 28px);
        margin-bottom: max(20px, env(safe-area-inset-bottom));
        padding: 26px 20px 30px;
        background: rgba(0,0,0,.30);
    }

    .bafleh-wp-home-label { margin-bottom: 12px; font-size: 9px; }
    .bafleh-wp-home-title { font-size: clamp(29px, 8vw, 39px); line-height: 1.05; }
    .bafleh-wp-home-description { margin-top: 12px; font-size: 14px; line-height: 1.62; }
    .bafleh-wp-home-cta { margin-top: 18px; font-size: 10px; }
}

@media (max-width: 480px) {
    .bafleh-wp-home-section {
        min-height: calc(100svh - var(--bafleh-header-height, 82px));
    }
    .bafleh-wp-home-content { width: calc(100% - 22px); padding: 23px 17px 27px; }
    .bafleh-wp-home-label span { width: 20px; flex-basis: 20px; }
    .bafleh-wp-home-title { font-size: clamp(27px, 8.8vw, 35px); }
    .bafleh-wp-home-description { font-size: 13px; }
}

@media (max-width: 360px) {
    .bafleh-wp-home-content { width: calc(100% - 16px); padding-left: 14px; padding-right: 14px; }
    .bafleh-wp-home-title { font-size: 26px; }
    .bafleh-wp-home-description { font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
    html.bafleh-home-story-active { scroll-snap-type: none; }
    .wp-home-anim { opacity: 1!important; transform: none!important; transition: none!important; }
}
