/**
 * Zinc Posts — layout only. Colours and typography are inherited from the
 * theme; override the custom properties below to fine-tune.
 */

.zp-wrap {
	--zp-gap: 1.5rem;
	--zp-row-gap: 30px;
	--zp-thumb: 330px;
	--zp-radius: 999px;
	--zp-accent: #ff585f;
	--zp-accent-contrast: #fff;
	--zp-border: #ff585f;
}

/* Filters ---------------------------------------------------------------- */

.zp-filters {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	margin-bottom: var(--zp-row-gap);
}

.zp-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.zp-select.is-active {
    background-color: #ff595f;
    color: white;
}

.zp-select:hover:not(:disabled),
.zp-select:focus-visible {
	border-color: var(--zp-accent);
}

.zp-select:disabled {
	opacity: 0.5;
	cursor: default;
}

/* List ------------------------------------------------------------------- */

.zp-results {
	transition: opacity 0.15s ease;
}

.zp-wrap.is-loading .zp-results {
	opacity: 0.45;
	pointer-events: none;
}

.zp-list {
	display: flex;
	flex-direction: column;
	gap: var(--zp-row-gap);
}

.zp-item {
    cursor: pointer;
	display: grid;
	grid-template-columns: var(--zp-thumb) 1fr;
	gap: var(--zp-gap);
	align-items: center;
	background: hsl(0deg 0% 100% / 85%);
    padding: 2rem;
    backdrop-filter: blur(8px);
    transition: .2s ease-in-out;
}

.zp-item:hover {
	transform: translateY(-2px);
}

.zp-item--no-thumb {
	grid-template-columns: 1fr;
}

.zp-thumb {
	display: block;
}

.zp-title {
    font-family: var(--e-global-typography-primary-font-family), sans-serif;
}

.zp-title a,
.zp-cat {
	text-decoration: none !important;
}

.zp-title a{
	color: var(--zp-accent);
}

.zp-thumb img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 3px;
}

.zp-body > * {
	margin-top: 0;
	margin-bottom: 12px;
}

.zp-body > *:last-child {
	margin-bottom: 0;
}

.zp-meta {
    font-size: 16px;
    opacity: 0.8;
    pointer-events: none;
    font-weight: 400;
    color: var(--e-global-color-a0cd2b7);
    font-family: var(--e-global-typography-accent-font-family);
}

.zp-excerpt {
	margin-bottom: 0.85rem;
	color: var(--e-global-color-a0cd2b7);
}

.zp-more {
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0 25px;
    color: var(--zp-accent-contrast) !important;
    text-decoration: none !important;
    background: var(--zp-accent);
    border-radius: var(--zp-radius);
    height: 48px;
    font-family: var(--e-global-typography-primary-font-family);
    letter-spacing: .5px;
}

.zp-more .zp-more-icon {
    font-size: 14px;
	transform: translateY(1px);
    transition: .2s ease-in-out;
}

.zp-item:hover .zp-more-icon {
    padding-left: 4px;
}

.zp-empty {
	margin: 0;
}

/* Pagination ------------------------------------------------------------- */

.zp-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    justify-content: center;

    margin-top: var(--zp-row-gap);
}


/* ČÍSLA STRÁN */
.zp-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 42px;
    height: 42px;
    padding: 0 12px;

    font-family: var(--e-global-typography-secondary-font-family);
    font-size: 16px;
    font-weight: 500;
    line-height: 1;

    color: #333333;
    background: transparent;

    border: 1px solid transparent;
    border-radius: 0;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.zp-page i {
    font-size: 12px;
}


/* HOVER + FOCUS */
.zp-page:hover:not(:disabled):not(.is-active),
.zp-page:focus-visible:not(:disabled):not(.is-active) {
    color: var(--zp-accent);
    background: #ffffff;
    border-color: var(--zp-accent);
}


/* AKTÍVNA STRANA */
.zp-page.is-active, .zp-page:focus {
    color: #ffffff;
    background: var(--zp-accent);
    border-color: var(--zp-accent);

    font-weight: 600;
}


/* ŠÍPKY */
.zp-page--prev,
.zp-page--next {
    min-width: 42px;
    width: 42px;
    height: 42px;
    padding: 0;

    font-size: 22px;
    font-weight: 400;

    color: #333333;
    background: transparent;
}


/* HOVER ŠÍPKY */
.zp-page--prev:hover:not(:disabled),
.zp-page--next:hover:not(:disabled) {
    color: #ffffff;
    background: var(--zp-accent);
    border-color: var(--zp-accent);
}


/* DISABLED */
.zp-page:disabled {
    color: #333333;
    background: transparent;
    border-color: transparent;

    opacity: 0.25;
    cursor: default;
}


/* TROJBODKA */
.zp-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 28px;
    height: 42px;

    padding: 0;

    color: #666666;
    font-size: 16px;
}

/* Accessibility helper (themes usually ship this, keep a local fallback). */

.zp-wrap .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	overflow: hidden;
	clip: rect( 1px, 1px, 1px, 1px );
	white-space: nowrap;
	border: 0;
}

/* Mobile ----------------------------------------------------------------- */

@media (max-width: 767px) {
	.zp-item {
		grid-template-columns: 1fr;
	}

	.zp-thumb img {
		max-width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.zp-select,
	.zp-results {
		transition: none;
	}
}



/**************************************************************/

/* FILTER WRAPPER */
.zp-filters {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}


/* SELECT WRAPPER */
.zp-filter {
    position: relative;
}


/* SELECT */
.zp-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    height: 48px;
    padding: 0 25px;
    background-color: #f5f5f5;
    color: #ff595f;
    border: 1px solid rgb(255 89 95 / 50%);
    border-radius: var(--zp-radius);
    font-size: 18px;
    font-weight: 400;
    font-family: var( --e-global-typography-primary-font-family ), sans-serif;
    letter-spacing: 0.5px;
    line-height: normal;
    cursor: pointer;
    outline: none;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

/* HOVER */
.zp-select:hover:not(.is-active) {
    background-color: white;
    color: #ff595f;
}


/* FOCUS */
.zp-select:focus {
    box-shadow: none;
}


/* AK JE V SELECTE VYBRANÁ REÁLNA HODNOTA */
.zp-select:has(option:checked:not([value="0"])) {
    background-color: #ff595f;
    color: #fff;
}


/* BIELA ŠÍPKA PRI AKTÍVNOM SELECTE */
.zp-filter:has(.zp-select option:checked:not([value="0"]))::after {
    border-color: #fff;
}


/* DISABLED */
.zp-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* OPTIONS V DROPDOWNE */
.zp-select option {
    background: #fff;
    color: #333;
}

.zp-group-title {
    font-family: var(--e-global-typography-primary-font-family);
    color: var(--e-global-color-a0cd2b7);
    font-size: 38px;
    margin: 0;
    flex: 0 0 auto;
}

/* Nadpis skupiny: rok / mesiac + deliaca čiara */
.zp-group-heading {
    display: flex;
    align-items: center;
    gap: 24px;
    width: 100%;
    margin: 0;
}

.zp-group-line {
    display: block;
    flex: 1 1 auto;
    height: 1px;
    background: var(--e-global-color-a0cd2b7);
    opacity: .25;
}

.zp-year-select {
    display: none;
}


@media (max-width: 767px) {

    .zp-item {
        padding: 1rem;
    }

    .zp-wrap .zp-filters {
        display: block;
        width: 100%;
        margin-bottom: var(--zp-row-gap);
    }

    .zp-wrap .zp-filter.zp-filter--year {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 10px;

        width: 100%;
        max-width: 100%;
    }

    .zp-filter--year .zp-year-option:not([data-year="0"]) {
        display: none !important;
    }

    .zp-filter--year .zp-year-option[data-year="0"] {
        display: flex;
        align-items: center;
        justify-content: center;

        width: 100% !important;
        min-width: 0 !important;
        height: 48px;
        padding: 0 20px;

        white-space: nowrap;
    }

    .zp-year-select {
        display: block;

        width: 100%;
        min-width: 0;
        height: 48px;

        padding: 0 45px 0 20px;

        appearance: none;
        -webkit-appearance: none;

        background-color: #f5f5f5;

        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23ff595f' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 20px center;
        background-size: 12px auto;

        color: var(--zp-accent);

        border: 1px solid rgb(255 89 95 / 50%);
        border-radius: var(--zp-radius);

        font-family: var(--e-global-typography-primary-font-family), sans-serif;
        font-size: 18px;
        font-weight: 400;
        letter-spacing: .5px;

        outline: none;
        cursor: pointer;

        transition:
            background-color .2s ease,
            color .2s ease,
            border-color .2s ease;
    }

    .zp-year-select.is-active {
        color: #fff;
        background-color: var(--zp-accent);
        border-color: var(--zp-accent);

        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    }

    .zp-year-select:focus {
        outline: none;
        box-shadow: none;
    }

    .zp-year-select option {
        color: #333;
        background: #fff;
    }
}