/* General settings
========================================================================== */
*, 
::after, 
::before {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, 
body {
    overflow-x: hidden;
}

body {
    -webkit-font-smoothing: antialiased;
    background-color: var(--wp--preset--color--base);
}

section[id],
div[id] {
    scroll-margin-top: var(--total-header-height);
}

html.is-locked {
    overflow: hidden;
}

.reset-button {
    appearance: none;
    background: none;
    border: none;
    cursor: pointer;
}

select, 
input {
    font-family: var(--wp--preset--font-family--body);
}

/* Radio, checkbox */
input[type="checkbox"],
input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    background-color: #ffffff;
    margin: 0;
    width: 20px;
    height: 20px;
    border: 1px solid var(--wp--preset--color--tertiary)!important;
    border-radius: 0;
    cursor: pointer;
    display: grid;
    place-content: center;
    border-radius: 0;
    
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
    background-color: #000000;
}

input[type="checkbox"]::before,
input[type="radio"]::before {
    content: "";
    width: 12px;
    height: 12px;
    transform: scale(0);
    box-shadow: inset 1em 1em #ffffff;
    transform-origin: bottom left;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
    border-radius: 0;
}

input[type="checkbox"]:checked::before,
input[type="radio"]:checked::before {
    transform: scale(1);
}

/* ==========================================================================
Typography
========================================================================== */

/* Headings
========================================================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    margin-bottom: 1rem;
}

.wp-block-heading:only-child {
    margin-bottom: 0;
}

.wp-block-heading:only-type {
    margin-bottom: 0;
}

/* Paragraphs
========================================================================== */
p {
    margin-bottom: 1em;
}

p:only-of-type {
    margin-bottom: 0;
}

p:last-child {
    margin-bottom: 0;
}

/* Typography spacing
========================================================================== */
p ~ h2 {
    margin-top: var(--wp--preset--spacing--25);
}

p ~ h3, 
h2 ~ h3 {
    margin-top: var(--wp--preset--spacing--20);
}

p ~ h4 {
    margin-top: var(--wp--preset--spacing--20);
}

p ~ :is(figure, iframe, video) {
    margin-top: var(--wp--preset--spacing--25);
}

p ~ .wp-block-buttons:not(:last-of-type) {
    margin-bottom: var(--wp--preset--spacing--25);
}

.wp-block-heading ~ :is(figure, iframe, video):not(:last-of-type) {
    margin-bottom: var(--wp--preset--spacing--25);
}

.wp-block-image ~ h3 {
    margin-top: var(--wp--preset--spacing--15);
}

h3 ~ .wp-block-image {
    margin-bottom: 40px;
}

:is(.wp-block-image, .wp-block-embed) ~ h2 {
    margin-top: var(--wp--preset--spacing--25);
}

.wp-block-embed:not(:last-of-type) {
    margin-bottom: var(--wp--preset--spacing--15);
}

p ~ :is(.wp-block-table) {
    margin-top: var(--wp--preset--spacing--20);
}

:is(figure, iframe, video) + p {
    margin-top: var(--wp--preset--spacing--25);
}

h3 ~ h2 {
    margin-top: var(--wp--preset--spacing--20);
}

h4 ~ h3 {
    margin-top: var(--wp--preset--spacing--20);
}

/* Links
========================================================================== */
a {
    text-decoration: none;
    color: inherit;
}

/* Lists
========================================================================== */
ul:last-of-type {
    margin-bottom: 0;
}

/* ==========================================================================
Paddings and margins
========================================================================== */
.qt-section {
    padding: 0 var(--wp--preset--spacing--20) var(--wp--preset--spacing--60);
}

.qt-section.has-background,
.qt-section__inner.has-background {
    padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--20);
}

.qt-container.has-background {
    padding: var(--wp--preset--spacing--20);
}

.qt-section .qt-section {
    padding: 0 !important;
}

.qt-section.container-fullwidth {
    margin: 0 0 var(--wp--preset--spacing--60);
}

.qt-section.container-fullwidth:last-child > .qt-section__inner {
    padding: 0;
}

.qt-section.is-style-align-left {
    margin-left: 0;
}

.qt-section.is-style-align-right {
    margin-right: 0;
} 

.qt-section.is-style-no-padding-bottom {
    padding-bottom: 0;
}

.qt-section.is-style-no-padding-top {
    padding-top: 0;
}

@media screen and (max-width: 768px) {
    .qt-section {
        padding: 0 var(--wp--preset--spacing--15) var(--wp--preset--spacing--40);
    }

    .qt-section.has-background,
    .qt-section__inner.has-background {
        padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--15);
    }
	
	.qt-section.container-fullwidth {
		margin: 0 0 var(--wp--preset--spacing--40);
	}
}

/* ==========================================================================
Max-widths
========================================================================== */
.qt-section {
    max-width: unset !important;
}

.qt-section :is(.container-xs, .container-s, .container-m, .container-default, .container-l, .container-xl) {
    margin: 0 auto;
    width: 100%;
}

.qt-section__inner {
    margin: 0 auto;
    max-width: var(--wp--style--global--content-size);
    z-index: 2 !important;
}

.container-default,
.container-default > .qt-section__inner {
    max-width: var(--wp--style--global--content-size);
}

.container-xs,
.container-xs > .qt-section__inner {
    max-width: calc((4 / 12) * var(--wp--style--global--content-size));
}

.container-s,
.container-s > .qt-section__inner {
    max-width: calc((6 / 12) * var(--wp--style--global--content-size));
}

.container-m,
.container-m > .qt-section__inner {
    max-width: calc((8 / 12) * var(--wp--style--global--content-size));
}

.container-l,
.container-l > .qt-section__inner {
    max-width: calc((10 / 12) * var(--wp--style--global--content-size));
}

.container-xl,
.container-xl > .qt-section__inner {
    max-width: calc((12 / 12) * var(--wp--style--global--content-size));
}

.container-fullwidth,
.container-fullwidth > .qt-section__inner {
    max-width: none;
}

/* Grids
========================================================================== */
@media screen and (max-width: 1200px) {
    .grid-col-5,
    .grid-col-6 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media screen and (max-width: 980px) {
    .grid-col-4,
    .grid-col-5,
    .grid-col-6 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .grid-col-3,
    .grid-col-4,
    .grid-col-5,
    .grid-col-6 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 670px) {
    .grid-col-2 {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 510px) {
    .grid-col-3,
    .grid-col-4,
    .grid-col-5,
    .grid-col-6 {
        grid-template-columns: 1fr;
    }
}

/* Custom block editor alignments
========================================================================== */
[class*='is-horizontally-aligned'] {
    display: flex;
    align-items: center;
}

.is-horizontally-aligned-left {
    justify-content: flex-start;
}

.is-horizontally-aligned-center {
    justify-content: center;
}

.is-horizontally-aligned-right {
    justify-content: flex-end;
}

.is-horizontally-stretched {
    grid-column: 1 / -1;
}

/* Images
========================================================================== */
.wp-block-image img {
    box-sizing: border-box;
    height: auto;
    max-width: 100%;
    vertical-align: bottom;
    object-fit: cover;
}

/* Buttons
========================================================================== */
.wp-block-buttons {
    display: flex;
    flex-wrap: wrap;
}

.wp-block-button__link {
    display: inline-block;
}