/*
 Theme Name:   Kunibert
 Theme URI:    https://sipinski.de
 Description:  Kunibert based on GeneratePress
 Author:       Wanja Sipinski
 Author URI:   https://sipinski.de
 Template:     generatepress
 Version:      0.1
*/

.kunibert-image-text-img-border img {
    border: 3px solid #3a3a3a;
    padding: 20px;
}

.kunibert-container-border {
    border: 3px solid #3a3a3a;
    padding: 20px;
}

.kunibert-floating-toc {
    text-indent: -0.5em;
}

.kunibert-floating-toc ul {
    font-size: 18px;
    list-style: none !important;
}

@media (max-width: 769px) {

    .inside-right-sidebar,
    .inside-left-sidebar {
        display: none;
    }
}

.inside-left-sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: 40px;
}

.kunibert-image-fixed-aspect img {
    height: 22rem;
    max-width: 100%;
}

/* 
 * HORRIBLE HORRIBLE HACK to make the sticky sidebar work with the full width background set by the child.
 * Why does CSS have no method to center absolute to body instead of parent.
 * TODO: Make sure it only loads on the gallery page and nowhere else.
*/

html,
body {
    overflow-x: clip;
}

.kunibert-container-background:has(> .kunibert-container-background-edgewater) {
    background-color: #d1e4de;
}

.kunibert-container-background:has(> .kunibert-container-background-geyser) {
    background-color: #d1dee4;
}

.kunibert-container-background:has(> .kunibert-container-background-bluehaze) {
    background-color: #d2d0e5;
}

.kunibert-container-background {
    position: relative;
    z-index: 1;
}

@media (min-width: 600px) {
    .wp-block-gallery.has-nested-images.columns-3 figure.wp-block-image:not(#individual-image) {
        width: calc(33.33333% - var(--wp--style--unstable-gallery-gap, 16px)*.667) !important;
    }
}

.kunibert-container-background::before {
    content: "";
    background-color: inherit;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    transform: translateX(-50%);
    width: 1000vw;
    z-index: -1;
}

.widget-area {
    z-index: 2;
}

/* 
 *	CARD
*/

.kunibert-card-outer {
    box-shadow: -2px 5px 0px #000;
    background-color: #fff;
    overflow: hidden;
}

.kunibert-card-inner>h4,
.kunibert-card-inner>p {
    margin-top: 10px;
    margin-left: 10px;
    margin-bottom: 10px;
}

/* 
 * Masonry
 */

.masonry-grid-container {
    box-sizing: border-box;
}

.flexmasonry-cols-2 .flexmasonry-item:nth-child(2n+1) {
    padding-right: 15px;
    padding-bottom: 20px;
}

.flexmasonry-cols-2 .flexmasonry-item:nth-child(2n) {
    padding-left: 15px;
    padding-bottom: 20px;
}

.flexmasonry-cols-1 .flexmasonry-item {
    padding: 0px 15px 25px 15px;
}


/*
 * Gallery
 */

.wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
    background-color: rgba(77, 77, 77, 0.3);
    backdrop-filter: blur(8px);
}

/*
 * Hero image attribution
 */

.page-hero {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    justify-content: center;
    min-height: 500px;
}

.inside-page-hero {
    display: flex;
    flex: 1;
    align-items: center;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    height: 100%;
}

.image-attribution {
    align-self: flex-end;
    font-size: 0.7rem;
    color: #e1e1e1;
    background-color: transparent;
    padding: 4px 4px;
    display: inline-block;
}

.image-attribution:not(:empty) {
    background-color: rgba(53, 53, 53, 0.3);
    backdrop-filter: blur(8px);
}

.hero-text {
    flex: 1;
    flex-direction: column;
    display: flex;
    align-items: center;
    text-align: center;
    justify-content: center;
}

.image-attribution a {
    color: #9b9b9b;
    font-style: italic;
}

/*
 * Blog
 */

article.post.type-post {
    box-shadow: -2px 5px 0px #000;
    background-color: #fff;
    overflow: hidden;
    border: 3px solid #3a3a3a;
}

article.post.type-post > .inside-article > p,
article.post.type-post > .inside-article > h4 {
    margin-top: 10px;
    margin-left: 10px;
    margin-bottom: 10px;
}

.post > .inside-article > header > .entry-title > a {
    color: #114d69;
}

.post > .inside-article > .post-image > a > img.wp-post-image {
    width: 100%;
    object-fit: cover;
    max-height: 500px;
}

.post > .inside-article > header.entry-header {
    background-color: #d2d0e5;
}
div.inside-article header.entry-header h2.entry-title {
    font-family: DINish;
    font-size: 36px;
    font-weight: 700;
    padding-left: 10px;
    padding-top: 10px;
}

div.inside-article header.entry-header .entry-meta, 
div.inside-article header.entry-header .entry-title {
    margin-top: 0;
}

.entry-summary,
.inside-article .entry-content {
    margin-top: 1em !important;
    margin-left: 1em;
    margin-bottom: 1em;
    margin-right: 1em;
}

div.inside-article header.entry-header div.entry-meta {
    font-family: DINish;
    font-size: 18px;
    font-weight: 400;
    padding-left: 10px;
    padding-bottom: 10px;
}

.post-image {
    font-size: 0;
}

.post-image-above-header .inside-article .featured-image, .post-image-above-header .inside-article .post-image {
    margin-bottom: 0;
}