.entry-content:has(.projects-grid),
.wp-block-acf-projekty,
.wp-block-acf-projekty.alignfull {
    overflow: visible;
}

.entry-content .wp-block-acf-projekty {
    clear: both;
    float: none;
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box;
}

.projects-grid {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    box-sizing: border-box;
}

.projects-grid.container-full {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    left: auto !important;
    position: relative;
}

.projects-grid .projects-grid__row,
.projects-grid .row {
    display: grid;
    grid-template-columns: repeat(100, minmax(0, 1fr));
    gap: 8px;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    --projects-row-height: calc((100vw - 24px) / 4 * 510 / 380);
    grid-auto-rows: var(--projects-row-height);
}

@supports (width: 100cqw) {
    .projects-grid {
        container-type: inline-size;
    }

    .projects-grid .row {
        --projects-row-height: calc((100cqw - 24px) / 4 * 510 / 380);
    }
}

.projects-grid .row .col {
    grid-column: span var(--item-width, 25);
    position: relative;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.projects-grid a {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
	opacity: 1;
	overflow: hidden;
}

.projects-grid a img {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.projects-grid a .item__media {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	will-change: transform;
}

.projects-grid a.item--zoom .item__media img {
	transition: transform 0.4s ease;
}

.projects-grid a.item--zoom:hover .item__media img {
	transform: scale(1.04);
}

@media (prefers-reduced-motion: reduce) {
	.projects-grid a.item--zoom .item__media img {
		transition: none;
		transform: none;
	}
}

.projects-grid a .txt {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 25px;
    color: #ffffff;
	opacity: 0;
	visibility: hidden;
    background-color: rgb(18 43 79 / 90%);
	transition: all .3s;
    z-index: 5;
}

.projects-grid a .txt strong {
	font-size: 22px;
	font-weight: 500;
	text-transform: uppercase;
	margin: 0;
}

.projects-grid a .txt p {
	margin: 0;
}

.projects-grid a .txt p:nth-of-type(3) {
	margin-top: 10px;
}

.projects-grid a .txt em {
    font-style: normal;
    margin: 0;
}

.projects-grid a:hover .txt {
	opacity: 1;
	visibility: visible;
	background-color: rgb(25 37 71 / 0.9);
}

@media only screen and (max-width: 800px) {
	.projects-grid {
		container-type: normal;
		overflow-x: hidden;
	}

	.projects-grid .row {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
		grid-auto-rows: unset;
		grid-template-columns: unset;
		align-items: stretch;
	}

	.projects-grid .row .col {
		grid-column: unset;
		flex: 0 0 calc(50% - 2px);
		width: calc(50% - 2px);
		max-width: calc(50% - 2px);
		aspect-ratio: var(--item-aspect-ratio, 380 / 510);
		height: auto;
	}

	.projects-grid .row .col.col--mobile-100 {
		flex: 0 0 100%;
		width: 100%;
		max-width: 100%;
	}

    .projects-grid a .txt {
        padding: 10px;
    }
    .projects-grid a .txt p{
        font-size: 14px;
    }
    .projects-grid a .txt strong {
        font-size: 16px;
    }
    .projects-grid a .txt em {
        font-size: 14px;
    }
    .projects-grid a .txt a{
        font-size: 14px;
    }
}
