/**
 * GENERAL BLOCK STYLES
 * This file is loaded in both the WordPress front- and backend.
 * Add styles here which should be present in both views.
 */



/* LAYOUT / GRID
   ==================================================================================================== */

body .is-layout-constrained > .wp-block-post-content {
    max-width: unset;
}

body .is-layout-flex {
    gap: var(--wp--custom--spacing--gap-regular);
    row-gap: var(--wp--custom--spacing--gap-small);
}

body .is-layout-grid {
    gap: var(--wp--custom--spacing--gap-regular);
}

.site-header .wp-block-buttons {
    row-gap: 1rem;
    column-gap: 2rem;
}

.site-main {
    margin-block-start: 0px;
}

:where(.wp-block-group.has-background.content-section, .wp-block-group.has-background.is-style-content-section),
:where(.is-style-content-section, .content-section) {
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;
    padding-top: var(--wp--custom--spacing--section) !important;
    padding-bottom: var(--wp--custom--spacing--section) !important;
}

:where(.is-style-content-section-small, .content-section-small) {
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;
    padding-top: calc(var(--wp--custom--spacing--section) * 0.6) !important;
    padding-bottom: calc(var(--wp--custom--spacing--section) * 0.6) !important;
}


.wp-block-social-links.is-layout-flex,
.wp-block-navigation.is-vertical {
    gap: var(--wp--custom--spacing--gap-small);
}


@media only screen and (max-width: 1000px) {
    .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
        --wp--style--global--content-size: 80vw !important;
    }
}

body .is-layout-flex:has(.wp-block-wxblock-copyright) {
    gap: 0.5rem;
}



.wp-block-heading.has-h-1-font-size {
    padding-bottom: 2rem;
}

:where(.wp-block-group.has-background) {
    padding: 1.25em;
}

.page-template-page-no-title  .site-main {
    padding-top: calc(var(--wp--custom--spacing--section) * 0.5);
}


/* SOCIAL LINKS
   ==================================================================================================== */

.wp-block-social-links .wp-social-link svg {
    height: 1.5rem;
    width: 1.5rem;
}


/* CARD
   ==================================================================================================== */

.wp-block-group.dotted-border-box {
    border: 1px dashed var(--wp--preset--color--black);
    max-width: 410px;
}


/* FOOTER 
   ==================================================================================================== */

footer {
    margin-top: 5.5rem;
}
body.page footer {
    margin-top: 9.5rem;
}

.site-footer .wp-block-columns:first-child {
    margin-bottom: var(--wp--custom--spacing--gap-regular);
}

.site-footer .are-vertically-aligned-center {
    padding-bottom: calc(0.5 * var(--wp--custom--spacing--gap-small));
}

.site-footer .are-vertically-aligned-center a {
    font-size: inherit;
    text-decoration: inherit;
}

.background-img {
    background-image: url(../images/footer-background.png);
    background-repeat: no-repeat;
    background-position: right 40px top 16px;
    background-size: clamp(220px, 538px, 90vw) auto;
    padding-top: var(--wp--custom--spacing--gap-large);    
}

@media (max-width: 781px) {
    .site-footer .are-vertically-aligned-center.is-layout-flex {
        gap: var(--wp--custom--spacing--gap-small);
    }
    .site-footer .wp-block-group .wp-block-columns .wp-block-column {
        flex-basis: fit-content !important;
    }
    .site-footer .wp-block-buttons {
        flex-basis: fit-content !important;
    }
}

@media screen and (max-width: 630px) {
    .background-img {
        background-position: center top 16px;
    }
}

@media (max-width: 370px) {
    .site-footer .are-vertically-aligned-center p {
        text-align: left !important;
    }
}


/* SUSBHEADLINE
   ==================================================================================================== */

p.shl, 
.is-style-subheading {
    font-family: var(--wp--preset--font-family--times-new-roman);
    font-size: var(--wp--preset--font-size--h-3);
    color: var(--wp--preset--color--black);
}

.site-footer :where(p.shl, .is-style-subheading) {
    font-size: 5rem;
    margin-block-start: 16px;
    line-height: var(--wp--custom--line-height--x-small);
}

.intro :where(p.shl, .is-style-subheading) {
    margin-block-start: 0px !important;
}


/* TYPOGRAPHY 
   ==================================================================================================== */

a {
    font-family: inherit;
    color: inherit;
    text-underline-offset: 0.25em;
}

a:hover {
    text-decoration: none;
}


strong {
    font-weight: 700;
}

h4 + p {
    margin-block-start: 8px !important;
}

h2.has-h-3-font-size + .wp-block-post-excerpt,
h3 + .wp-block-post-excerpt,
p + .wp-block-buttons:has(.is-style-like-a-link) {
    margin-block-start: 16px;
}

.wp-block-cover + h2 {
    margin-top: var(--wp--custom--spacing--gap-large);
}

h2 + p.has-large-font-size {
    margin-block-start: var(--wp--custom--spacing--gap-regular);
}

.wp-block-media-text__content h2 {
    margin: 0;
}

.is-vertically-aligned-bottom h3 {
    padding-bottom: 2rem;
}

.has-h-1-font-size,
.has-display-font-size {
    line-height: var(--wp--custom--line-height--x-small);
}



/* POST STORIES
    ==================================================================================================== */

.wp-block-columns.latest-story {
    padding: 0 !important;
    gap: 0;
}

.latest-story .is-layout-flex {
    gap: 0.25rem;
    flex-wrap: wrap;
}

.wp-block-group.latest-story > :first-child {
    width: 50%;
}

.wp-block-columns.latest-story > :last-child,
body:not(.paged) .wp-block-post-template.columns-3 > :first-child .wp-block-group.inner {
    padding: 1.5rem 2rem;
}

.wp-block-columns.latest-story > .wp-block-column:last-child > .wp-block-group.is-vertical {
  height: 100%;
}

.wp-block-columns.latest-story .wp-block-group.has-x-small-font-size {
  margin-top: auto;
  padding-top: 16px;
}


.wp-block-post-template.columns-3 > :not(:first-child) .wp-block-group figure {
    height: 242px !important;
}


li.wp-block-post {
    display: flex;
    flex-direction: column;
    position: relative;
}

.wp-block-post  .wp-block-post-featured-image {
    overflow: hidden;
    flex-basis: auto;
}
.wp-block-post .wp-block-post-featured-image img {
    transition: transform 0.2s ease-in-out 50ms;
}
.wp-block-post .wp-block-post-featured-image a > img:hover,
.wp-block-post:has(.wp-block-post-title > a):hover img {
    transform: scale(1.05);
}

.wp-block-post .wp-block-post-title > a::before {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    cursor: pointer;
    content: "";
}

.wp-block-post a {
    text-decoration: none transparent;
    transition: text-decoration 0.2s ease-in-out;
}
.wp-block-post a:hover {
    text-decoration: underline var(--wp--preset--color--black);
}

.wp-block-post .inner {
    flex-grow: 1;
}

.wp-block-post .inner + .has-x-small-font-size {
    grid-column: 2 / 2;
    grid-row: 2 / 2;
    padding: 1.5rem 0;
}


body:not(.paged) .wp-block-post-template.columns-3 > .wp-block-post:first-child {
    grid-column: span 2;
    background-color: var(--wp--preset--color--secondary-100);
    display: grid;
    grid-template-columns: 1fr 1fr;
}

body:not(.paged) .wp-block-post-template.columns-3 > .wp-block-post:first-child figure {
    aspect-ratio: auto;
    grid-column: 1 / 1;
    grid-row: span 2;
    margin: 0;
}

body:not(.paged) .wp-block-post-template.columns-3 > .wp-block-post:first-child .inner {
    grid-column: 2 / 2;
    grid-row: 1 / 2;
}

body:not(.paged) .wp-block-post-template.columns-3 > .wp-block-post:first-child .inner + .has-x-small-font-size {
    align-self: end;
    padding: 1.5rem 2rem;
}

.wp-block-post-template.columns-3 > .wp-block-post:not(:first-child) figure {
    aspect-ratio: 16 / 9 !important;
}


@media (max-width: 1030px) {
    .wp-block-query .columns-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .wp-block-query .columns-3 {
        grid-template-columns: 1fr;
    }

    body:not(.paged) .wp-block-post-template.columns-3 > .wp-block-post:first-child {
        grid-column: span 1;
    }

    body:not(.paged) .wp-block-post-template.columns-3 > .wp-block-post:first-child {
        display: flex;
    }

    body:not(.paged) .wp-block-post-template.columns-3 > .wp-block-post:first-child .inner + .has-x-small-font-size {
        align-self: start;
    }
}


:where(.single-post, .wp-block-post) .post-date.is-layout-flex {
    gap: 0.25rem;
}

:where(.single-post, .wp-block-post) .featured-image-wrapper + .post-date {
    margin-top: var(--wp--custom--spacing--gap-large);
}

:where(.single-post, .wp-block-post) .wp-block-group.is-layout-grid .post-date {
    margin-top: auto;
    padding-top: 16px;
}



/* POST NAV
    ==================================================================================================== */

.wp-block-query-pagination-numbers .current {
    font-weight: 700;
}

.post-navigation-link-previous,
.post-navigation-link-next,
.wp-block-query-pagination-previous,
.wp-block-query-pagination-next {
    font-weight: 700;
}

.post-navigation-link-previous a,
.post-navigation-link-next a,
.wp-block-query-pagination-previous,
.wp-block-query-pagination-next {
        text-decoration: none;
}

.post-navigation-link-next a,
.wp-block-query-pagination-next {
    display: inline-block;
    padding-right: 32px;
    background: url("../images/vintagerie-logo-pfeil-rechts.png")
                no-repeat right center;
    background-size: 24px 24px;
}

.post-navigation-link-previous a,
.wp-block-query-pagination-previous {
    display: inline-block;
    padding-left: 32px;
    background: url("../images/vintagerie-logo-pfeil-links.png")
                no-repeat left center;
    background-size: 24px 24px;
}

.post-navigation-link-previous a:hover,
.post-navigation-link-next a:hover,
.wp-block-query-pagination-previous:hover,
.wp-block-query-pagination-next:hover {
        text-decoration: underline;
}

.wp-block-query-pagination {
    display: inline-flex;
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
    padding: 0.5em 1em;
    border-radius: 100px;
    background: var(--wp--preset--color--secondary-100);
    margin-block-start: 3em !important;
    gap: 1.5em !important;
    font-size: 1.125rem;
}

.wp-block-query-pagination-numbers { 
    display: inline-flex; 
    gap: 12px; 
    margin: 0;
}
