/*
Theme Name: keySquare Master
Theme URI: 
Author: keySquare
Author URI: 
Description: The Master Theme for all keySquare Press Rooms
Requires at least: 6.9
Tested up to: 6.9
Requires PHP: 7.2
Version: 1.7
Text Domain: keysquare-master
Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready, wide-blocks, block-styles, style-variations, accessibility-ready, blog, portfolio, news

/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */
a {
	text-decoration-thickness: 1px !important;
	text-underline-offset: .1em;
}

/* Focus styles */
:where(.wp-site-blocks *:focus) {
	outline-width: 2px;
	outline-style: solid;
}

/* Increase the bottom margin on submenus, so that the outline is visible. */
.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation-item:not(:last-child) {
	margin-bottom: 3px;
}

/* Increase the outline offset on the parent menu items, so that the outline does not touch the text. */
.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content {
	outline-offset: 4px;
}

/* Remove outline offset from the submenus, otherwise the outline is visible outside the submenu container. */
.wp-block-navigation .wp-block-navigation-item ul.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	outline-offset: 0;
}

/*
 * Progressive enhancement to reduce widows and orphans
 * https://github.com/WordPress/gutenberg/issues/55190
 */
h1, h2, h3, h4, h5, h6, blockquote, caption, figcaption, p {
	text-wrap: pretty;
}

/*
 * Change the position of the more block on the front, by making it a block level element.
 * https://github.com/WordPress/gutenberg/issues/65934
*/
.more-link {
	display: block;
}

/*
 * Prevents unnecessary scrollbars while handling long lines of preformatted text.
 * https://core.trac.wordpress.org/ticket/63875
 */
:where(pre) {
	overflow-x: auto;
}

/*
 * Style search result filters
 */

.search-filters__fields {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.search-filters__field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.search-filters__field label {
    font-size: 0.85rem;
    font-weight: 600;
}

.search-filters__field select,
.search-filters__field button {
    padding: 0.4rem 0.75rem;
    border: 1px solid currentColor;
    border-radius: 4px;
    font-size: 0.9rem;
}


/* Style Search results */
.search-results .wp-block-post-featured-image img {
    aspect-ratio: 16 / 9;
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}


/*Spalten im Footer brechen um auf Mobile*/
@media (max-width: 981px) {
    .footer-columns {
        flex-direction: column !important;
        flex-wrap: wrap !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
    }
}



/* Complianz-Platzhalter fixen */
:has(.cmplz-blocked-content-container) .wp-embed-responsive .wp-embed-aspect-16-9 .wp-block-embed__wrapper:before {
    padding-top: unset;
}

/* Beitragsbilder in Listen in der Größe vereinheitlichen */
.wp-block-post-featured-image img {
    aspect-ratio: 16 / 9 !important;
    object-fit: cover;
    width: 100%;
    height: auto;
    display: block;
}


/* Beiträge in Listen gleich groß machen */
/* Spalten gleich hoch (Default, sicherheitshalber explizit) */
.wp-block-columns:has(.msi-card-hover) {
  align-items: stretch;
}

/* Höhe bis zur Karte durchreichen */
.wp-block-column:has(.msi-card-hover),
.wp-block-query:has(.msi-card-hover),
.msi-card-hover,
.msi-card-hover > .wp-block-post {
  display: flex;
  flex-direction: column;
}
.wp-block-query:has(.msi-card-hover),
.msi-card-hover,
.msi-card-hover > .wp-block-post {
  flex: 1 0 auto;
}

/* Datum an den unteren Rand */
.msi-card-hover .wp-block-post-date {
  margin-top: auto;
}