/* ==================================================
   BIECO GLOBAL
   ================================================== */

:root {
    --bieco-red: #c92026;
    --bieco-black: #171717;
    --bieco-text: #5f5f5f;
    --bieco-border: rgba(23, 23, 23, 0.10);
    --bieco-beige: #f4f3ef;
    --bieco-white: #ffffff;

    --bieco-container: 1280px;
    --bieco-page-padding: 32px;
}


/* ==================================================
   BASIC RESET
   ================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;

    background: var(--bieco-white);
    color: var(--bieco-black);

    overflow-x: hidden;
}


/* ==================================================
   TYPOGRAPHY
   ================================================== */

body,
button,
input,
select,
textarea {
    font-family: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
    margin-top: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}


/* ==================================================
   WORDPRESS / ELEMENTOR WIDTH RESET
   ================================================== */

body .wp-site-blocks,
body main,
body .wp-block-post-content,
body .entry-content,
body .site-main,
body .elementor {
    width: 100% !important;
    max-width: none !important;

    margin-left: 0 !important;
    margin-right: 0 !important;

    padding-left: 0 !important;
    padding-right: 0 !important;
}


/* WordPress constrained layout release */

body .wp-block-post-content
> :where(
    :not(.alignleft),
    :not(.alignright),
    :not(.alignfull)
) {
    width: 100% !important;
    max-width: none !important;

    margin-left: 0 !important;
    margin-right: 0 !important;
}


/* Elementor top-level containers */

body .elementor > .elementor-element.e-con-parent,
body .elementor > .e-con {
    width: 100% !important;
    max-width: none !important;

    margin-left: 0 !important;
    margin-right: 0 !important;
}


/* ==================================================
   GLOBAL CONTAINER
   ================================================== */

.bieco-container {
    width: min(
        var(--bieco-container),
        calc(100% - (var(--bieco-page-padding) * 2))
    );

    margin-left: auto;
    margin-right: auto;
}


/* ==================================================
   GLOBAL SECTION
   ================================================== */

.bieco-section {
    width: 100%;
}


/* ==================================================
   ACCESSIBILITY
   ================================================== */

button,
a,
input,
select,
textarea {
    outline-offset: 3px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--bieco-red);
}

/* ==================================================
   REMOVE THEME GAPS AROUND HEADER / FOOTER
   ================================================== */

/* Remove default block gap between template parts/content */

body .wp-site-blocks {
    gap: 0 !important;
}

body .wp-site-blocks > * {
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;
}


/* Header should touch page content */

body .wp-block-template-part:has(.bifa-header) {
    margin-bottom: 0 !important;
}


/* First content element after header */

body .wp-block-template-part:has(.bifa-header) + * {
    margin-top: 0 !important;
}


/* Footer should touch previous section */

body footer,
body .wp-block-template-part:has(.bieco-footer),
body .wp-block-template-part:has(.bifa-footer) {
    margin-top: 0 !important;
}


/* Last content element before footer */

body main,
body .wp-block-post-content,
body .entry-content,
body .site-main {
    margin-bottom: 0 !important;
}

/* WordPress block theme default vertical spacing reset */

body .wp-site-blocks > .wp-block-template-part,
body .wp-site-blocks > main,
body .wp-site-blocks > footer {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}