/* font smoothing */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    /* mobile */
    @media (max-width: 768px) {
        overflow-x: hidden;
    }
}

/* the main content area and footer should appear without any gaps */
main,
footer {
    margin-top: 0;
    margin-bottom: 0;
}

/* link styles */
main a {
    color: inherit;
    border-bottom: 2px solid var(--wp--preset--color--red-200);
    text-decoration: none;
    transition: all 0.3s ease;

    &:hover {
        color: var(--wp--preset--color--red-200);
        text-decoration: none;
    }
}

main {

    /* if its a link to an image, remove the border */
    a:has(> img) {
        border-bottom: none;
    }

    /* if color is white, change the border color on links */
    .has-white-color a {
        border-color: white;

        &:hover {
            color: white;
        }
    }
}

header {

    position: relative;
    /* Ensure the header is positioned for pseudo-elements */
    z-index: 1;

    &:before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07);
        z-index: -1;
        /* Lower z-index so content above it, like dropdowns, is not obscured */
    }

    .first-row {
        padding-right: 0;

        .request-quote {
            a {
                text-decoration: none;
                border-bottom: 1px solid transparent;
                transition: all 0.3s ease;

                &:hover {
                    border-bottom: 1px solid white;
                }
            }
        }
    }

    @media (max-width: 990px) {
        .first-row {
            padding: var(--wp--preset--spacing--40);
        }
    }
}

/* breadcrumbs styles */
.breadcrumbs {
    display: flex;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;

    ul {
        display: flex;
        align-items: center;
        list-style: none;
        padding: 0;
        margin: 0;
    }

    li {
        color: initial;
        display: inline-flex;
        align-items: center;
        font-size: 14px;
        font-weight: 500;
        color: var(--wp--preset--color--black-100);

        a {
            color: var(--wp--preset--color--black-100);
            text-decoration: none;
            border-bottom: none;
            font-size: 14px;
            font-weight: 500;
            padding: 0;
            margin: 0;

            &:hover {
                color: var(--wp--preset--color--blue-300);
                border-bottom: none;
            }
        }

        &:last-child a {
            pointer-events: none;
            color: var(--wp--preset--color--blue-300);
        }

        &+li::before {
            height: 18px;
            content: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgcGxheU1vZGU9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTkuODc5IDkuMDAwMDVMNi4xNjY1IDUuMjg3NTVMNy4yMjcgNC4yMjcwNUwxMiA5LjAwMDRMNy4yMjcgMTMuNzczMUw2LjE2NjUgMTIuNzEyNkM5Ljg3OSAwIDkuMDAwMDVaIiBmaWxsPSIjNkM2QzZDIi8+PC9zdmc+');
            margin: 0 10px;
        }
    }

    /* mobile */
    @media (max-width: 768px) {
        display: none;
    }
}

.hero-contain .wp-block-cover__image-background {
    object-fit: contain;
}

@media (max-width: 768px) {
	.hero-contain .wp-block-cover__image-background { 
		object-fit: contain;
	}
	
	.mobile-hero-contain,
	figure.mobile-hero-contain.wp-block-post-featured-image img {
		min-height: 200px !important;
		object-fit: contain !important;
	}
}

.wp-block-separator {
    border-top: 1px solid var(--wp--preset--color--black-50);
}

footer {
    a {
        text-decoration: none;
        border-bottom: 1px solid transparent;

        &:hover {
            color: var(--wp--preset--color--blue-300);

            svg {
                fill: var(--wp--preset--color--blue-100) !important;
            }
        }
    }

    .wp-block-polylang-language-switcher {
        select {
            background-color: transparent;
            font-size: 16px;
            cursor: pointer;
            border-radius: 12px;
            border-color: var(--wp--preset--color--black-50);
        }
    }

    .wp-social-link {
        border-radius: 50%;
        padding: 8px 0px !important;
    }

    /* mobile */
    @media (max-width: 768px) {
        >div:nth-child(2) {
            text-align: center;
        }

        .wp-block-social-links {
            display: flex;
            width: 100%;
            justify-content: center !important;

            .wp-social-link {
                a {
                    padding: 0px 8px !important;
                }
            }
        }
    }
}

.has-gradient-and-carot {
    background: linear-gradient(270deg, #f8f8f8, #f7f7f7, hsla(0, 0%, 80%, .6));
}

/* hero images/videos */
figure.wp-block-post-featured-image,
main>figure:first-child:has(img),
main>.entry-content>figure:first-child:has(img),
main>.entry-content>.wp-block-cover {
    max-height: 430px;

    img,
    video {
        max-height: 430px;
        object-fit: cover;
    }
}

/* tables adjustments */
.wp-block-table table {
    border-collapse: unset;
}

.wp-block-table.is-style-stripes {
    border: 0;
}

.wp-block-table.is-style-stripes tbody tr:nth-child(odd):not(:first-child) {
    background-color: var(--wp--preset--color--blue-50);
}

.wp-block-table table {

    /* mobile - table should be scrollable */
    @media (max-width: 768px) {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    display: block;
    border-radius: 10px;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid var(--wp--preset--color--blue-50);

    tbody {
        display: inline-table;
        width: 100%;
    }

    tbody>tr:first-child {
        background-color: var(--wp--preset--color--blue-300) !important;
        color: white;
    }

    th {
        background-color: var(--wp--preset--color--blue-300) !important;
        color: white;

        a {
            border-bottom: 1px solid white;
            color: white;
        }
    }

    th,
    tr,
    td {
        text-align: left;
        vertical-align: top;
        padding: 16px 20px !important;
        border: 0.5px solid var(--wp--preset--color--blue-50) !important;
    }

    td.merged-identical {
        text-align: center;
        border: 1px solid var(--wp--preset--color--blue-300) !important;
    }

    ul,
    ol {
        list-style: none;
        margin: 0;
        padding: 0;

        li {
            margin: 0;
            padding: 0;
            margin-bottom: 20px;
        }
    }

    a {
        color: var(--wp--preset--color--blue-300);
        border-bottom: 1px solid var(--wp--preset--color--blue-300);
        font-weight: 600;
    }
}

/* site patterns and helper classes */
.here-to-help {

    /* box shadow */
    .box>div {
        box-shadow: 0px 38.54px 10.612px 0px rgba(0, 0, 0, 0.00), 0px 24.576px 10.054px 0px rgba(0, 0, 0, 0.01), 0px 13.964px 8.378px 0px rgba(0, 0, 0, 0.03), 0px 6.144px 6.144px 0px rgba(0, 0, 0, 0.05), 0px 1.676px 3.351px 0px rgba(0, 0, 0, 0.06);
    }

    /* mobile */
    @media (max-width: 768px) {
        .box {
            .text {
                padding: 0 !important;
                padding-left: 20px !important;

                >* {
                    margin-block: 9px;
                }

                >p {
                    font-size: 12px !important;
                }

                .wp-block-buttons {
                    .wp-block-button .wp-block-button__link {
                        padding: 8px 13px;
                    }
                }
            }

            .image {

                .wp-block-image {
                    height: 100%;
                    width: 100%;
                    margin: 0 !important;

                    >img {
                        width: 100%;
                        height: 100%;
                        object-fit: unset !important;
                    }
                }
            }
        }
    }
}

.box-style-1 {
    a {
        text-decoration: none !important;
        border-bottom: 0 !important;
    }
}

.box-style2-inner {
    figure.wp-block-image {
        width: 100%;

        img {
            width: 100%;
        }
    }
}

.line-right {
    display: flex;
    align-items: center;

    &::after {
        content: "";
        flex-grow: 1;
        height: 1px;
        background-color: var(--wp--preset--color--black-50);
        margin-left: 10px;
    }
}

.box-shadow-1 {
    box-shadow: 0px 113px 32px 0px rgba(0, 0, 0, 0.00), 0px 72px 29px 0px rgba(0, 0, 0, 0.00), 0px 41px 24px 0px rgba(0, 0, 0, 0.01), 0px 18px 18px 0px rgba(0, 0, 0, 0.02), 0px 5px 10px 0px rgba(0, 0, 0, 0.02);
}

.wc-block-grid__product-image img,
img.attachment-woocommerce_single.size-woocommerce_single {
    aspect-ratio: 16 / 9;
    border: 1px solid var(--wp--preset--color--gray-bg);
    background: var(--wp--preset--color--gray-bg);
}

/* mobile - clip long headings */
h1,
h2 {
    @media (max-width: 768px) {
        overflow-wrap: break-word;
        text-overflow: clip;
        max-width: 100%;
    }
}