/* Shared public page frames: 1344px outer, 1280px text alignment. */
:root {
    --lbfd-page-outer: 1344px;
    --lbfd-page-inner: 1280px;
    --lbfd-page-gutter: 38px;
}

/* The footer background remains full width. Its content uses the same 32px
   inset as the 1344px page sections, putting its first column on the hero line. */
body .elementor-location-footer .elementor-element.elementor-element-92bfa4 {
    --content-width: var(--lbfd-page-outer);
    --padding-left: 32px;
    --padding-right: 32px;
}
body .elementor-location-footer .elementor-element-92bfa4 > .e-con-inner {
    width: 100%;
    /* Elementor retains a 10px inset inside this container. */
    max-width: 1300px;
}

/* Contact intro stays readable; the two choices fill the shared content line. */
body.lbfd-media-page--contact .lbfd-contact-gate > .lbfd-contact-routing-intro {
    box-sizing: border-box;
    width: min(1000px, calc(100% - 2 * var(--lbfd-page-gutter)));
    max-width: none;
    margin-left: max(var(--lbfd-page-gutter), calc((100% - var(--lbfd-page-inner)) / 2));
    margin-right: 0;
}
body.lbfd-media-page--contact .lbfd-contact-gate > .lbfd-contact-choices {
    box-sizing: border-box;
    width: calc(100% - 2 * var(--lbfd-page-gutter));
    max-width: var(--lbfd-page-inner);
    margin-left: max(var(--lbfd-page-gutter), calc((100% - var(--lbfd-page-inner)) / 2));
    margin-right: 0;
}

/* Roadmap sections share the hero frame; their internal layout stays intact. */
body.lbfd-media-page--roadmap .lb-public-roadmap > :not(.lbfd-media-hero) {
    box-sizing: border-box;
    width: calc(100% - 2 * var(--lbfd-page-gutter));
    max-width: var(--lbfd-page-inner);
    margin-left: auto;
    margin-right: auto;
}

/* News and Videos controls and cards sit on the shared 1280px content line. */
body.lbfd-media-page--news .elementor-24165 .elementor-element.elementor-element-56cbc14,
body.lbfd-media-page--videos .elementor-17777 .elementor-element.elementor-element-2a65bfa {
    --content-width: var(--lbfd-page-inner);
    --padding-left: 0px;
    --padding-right: 0px;
}
body.lbfd-media-page--news .elementor-element-56cbc14 > .e-con-inner,
body.lbfd-media-page--videos .elementor-element-2a65bfa > .e-con-inner {
    width: calc(100% - 2 * var(--lbfd-page-gutter));
    max-width: var(--lbfd-page-inner);
    margin-inline: auto;
}
body.lbfd-media-page--news .lb-news-tabs {
    box-sizing: border-box;
    width: calc(100% - 2 * var(--lbfd-page-gutter));
    max-width: var(--lbfd-page-inner);
    margin-left: auto;
    margin-right: auto;
}

/* App and search use the common frame while preserving their own grids. */
body .lbfd-native-app {
    width: min(var(--lbfd-page-outer), calc(100% - 2 * var(--lbfd-page-gutter)));
    margin-left: auto;
    margin-right: auto;
    transform: none;
}
body:has(.lbfd-native-app) { overflow-x: clip; }
body .lbfd-native-app > .lbfd-native-app__hero--compact {
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    border-left: 0;
    border-right: 0;
    border-radius: 0;
}
body .lbfd-native-app .lbfd-native-app__hero--compact { padding-left: 32px; padding-right: 32px; }
body .lbfd-native-app > .lbfd-native-app__download-strip { width: 100%; max-width: none; margin-left: 0; margin-right: 0; padding-left: 32px; padding-right: 32px; }
body .lbfd-native-app > .lbfd-native-app__section { width: 100%; max-width: none; margin-left: 0; margin-right: 0; padding-left: 32px; padding-right: 32px; }
body .lbfd-native-app > .lbfd-native-app__club-callout { margin-left: 32px; margin-right: 32px; }
body .lbfd-native-app > .lbfd-native-app__final { margin-left: 32px; margin-right: 32px; }
body .lbgs-results-page { padding-left: var(--lbfd-page-gutter); padding-right: var(--lbfd-page-gutter); }
body .lbgs-results-inner { max-width: var(--lbfd-page-inner); }

/* The six Bowls guides use the hero's 1280px frame for tabs, panels and grids.
   Full-width hero photography and the footer background remain full bleed. */
body .lbfd-learning > :not(.lbfd-learning-hero),
body .lbfd-info-page--what-is-bowls > :not(.lbfd-info-hero--intro),
body .lbfd-info-page--formats > :not(.lbfd-info-hero),
body.lbfd-media-page--glossary .lbfd-info-page--glossary > :not(.lbfd-media-hero) {
    max-width: var(--lbfd-page-inner);
}
body .lbfd-learning .lbfd-learning-section:not(.lbfd-learning-section--tint),
body .lbfd-info-page .lbfd-info-section:not(.lbfd-info-section--tint):not(.lbfd-info-section--compact) {
    padding-left: 0;
    padding-right: 0;
}

@media (min-width: 701px) {
    body .lbfd-native-app .lbfd-native-app__hero.lbfd-native-app__hero--compact {
        padding-left: max(16px, calc((100vw - var(--lbfd-page-inner)) / 2));
        padding-right: max(16px, calc((100vw - var(--lbfd-page-inner)) / 2));
    }
}

@media (max-width: 700px) {
    :root { --lbfd-page-gutter: 16px; }
    body .elementor-location-footer .elementor-element.elementor-element-92bfa4 {
        --padding-left: 16px;
        --padding-right: 16px;
    }
    body.lbfd-media-page--contact .lbfd-contact-gate > .lbfd-contact-routing-intro,
    body.lbfd-media-page--contact .lbfd-contact-gate > .lbfd-contact-choices {
        width: calc(100% - 32px);
        margin-left: 16px;
    }
    body.lbfd-media-page .lbfd-media-hero,
    body .lbfd-info-page--what-is-bowls .lbfd-info-hero--intro.lbfd-compact-guide-hero,
    body .lbfd-about-page .lbfd-about-hero.lbfd-compact-guide-hero {
        padding-left: 16px;
        padding-right: 16px;
    }
    body .lbfd-native-app { width: calc(100% - 32px); }
    body .lbfd-native-app .lbfd-native-app__hero--compact {
        padding-left: max(16px, calc((100vw - 100%) / 2));
        padding-right: max(16px, calc((100vw - 100%) / 2));
    }
    body .lbfd-native-app > .lbfd-native-app__download-strip,
    body .lbfd-native-app > .lbfd-native-app__section { padding-left: 16px; padding-right: 16px; }
    body .lbfd-native-app > .lbfd-native-app__club-callout,
    body .lbfd-native-app > .lbfd-native-app__final { margin-left: 16px; margin-right: 16px; }
    body .lbgs-results-page { padding-left: 16px; padding-right: 16px; }
    body .elementor-location-footer .elementor-element-92bfa4 > .e-con-inner > .elementor-element-4833ff4b {
        padding-left: 0;
        padding-right: 0;
    }
}
