/* =====================================
   ZGK TOOLS - NEWS GRID
   v0.7.0-dev
===================================== */

.zgk-news-grid{
	display:grid;
	gap:32px;
	margin:24px 0 40px;
}

/* Keep the home news grid independent of Spectra's nested max-width wrappers. */
body.home .zgk-news-wrapper{
	position:static;
	flex:0 0 auto;
	box-sizing:border-box;
	/* 62px on each side, matching .zgk-numbers, plus the desktop scrollbar. */
	width:calc(100vw - 141px) !important;
	max-width:none !important;
	margin-inline:0;
	transform:none;
}

/* Kolumny */
.zgk-news-grid.columns-1{grid-template-columns:1fr;}
.zgk-news-grid.columns-2{grid-template-columns:repeat(2,1fr);}
.zgk-news-grid.columns-3{grid-template-columns:repeat(3,1fr);}
.zgk-news-grid.columns-4{grid-template-columns:repeat(4,1fr);}

/* =====================================
   FILTERS
===================================== */

.zgk-news-search{
	margin:0 0 20px;
}

.zgk-news-search-input{
	width:100%;
	max-width:420px;
	height:46px;
	padding:0 18px;
	border:1px solid #d9dfe8;
	border-radius:24px;
	background:#fff;
	font-size:15px;
	line-height:46px;
	color:#23395d;
	transition:all .25s ease;
}

.zgk-news-search-input::placeholder{
	color:#7c8aa5;
}

.zgk-news-search-input:focus{
	outline:none;
	border-color:#2563eb;
	box-shadow:0 0 0 3px rgba(37,99,235,.15);
}

.zgk-news-filter-row{
	display:flex;
	justify-content:space-between;
	align-items:flex-end;
	flex-wrap:wrap;
	gap:20px;
	margin:0 0 34px;
}

.zgk-news-filter-buttons{
	display:flex;
	flex-wrap:wrap;
	gap:10px;
}

.zgk-news-filter{
	padding:8px 16px;
	border:1px solid #d7dee8;
	border-radius:999px;
	background:#fff;
	color:#17375d;
	font-size:15px;
	font-weight:600;
	cursor:pointer;
	user-select:none;
	transition:all .25s ease;
}

.zgk-news-filter:hover,
.zgk-news-filter.active{
	background:#2563eb;
	color:#fff;
	border-color:#2563eb;
	transform:translateY(-2px);
}

.zgk-news-filter.active{
	box-shadow:0 8px 18px rgba(37,99,235,.20);
}

.zgk-news-filter-buttons--archive{
	flex:1 1 680px;
}

.zgk-news-filter-buttons--archive .zgk-news-filter{
	border-width:1px;
}

.zgk-news-filter--all{border-color:#65bf45;color:#3c9e2b;}
.zgk-news-filter--informacje-dla-mieszkancow{border-color:#65bf45;color:#3c9e2b;}
.zgk-news-filter--infrastruktura-wodociagowa{border-color:#3186e8;color:#2375d3;}
.zgk-news-filter--infrastruktura-kanalizacyjna{border-color:#8653d6;color:#7040c0;}
.zgk-news-filter--infrastruktura-komunalna{border-color:#f39a22;color:#d9810c;}
.zgk-news-filter--utrzymanie-czystosci{border-color:#21a9a8;color:#128887;}
.zgk-news-filter--utrzymanie-zieleni{border-color:#65bf45;color:#3c9e2b;}
.zgk-news-filter-buttons--archive .zgk-news-filter.active{color:#fff;border-color:transparent;}
.zgk-news-filter--all.active,.zgk-news-filter--informacje-dla-mieszkancow.active,.zgk-news-filter--utrzymanie-zieleni.active{background:#55b83a;}
.zgk-news-filter--infrastruktura-wodociagowa.active{background:#3186e8;}
.zgk-news-filter--infrastruktura-kanalizacyjna.active{background:#8653d6;}
.zgk-news-filter--infrastruktura-komunalna.active{background:#f39a22;}
.zgk-news-filter--utrzymanie-czystosci.active{background:#21a9a8;}

/* One clear active state for every archive category. */
.zgk-news-filter-buttons--archive .zgk-news-filter.active,
.zgk-news-filter-buttons--archive .zgk-news-filter.active:hover{
	background:#55b83a !important;
	border-color:#55b83a !important;
	color:#fff !important;
}

.zgk-news-year{
	min-width:240px;
	height:42px;
	padding:0 14px;
	border:1px solid #d7dee8;
	border-radius:12px;
	background:#fff;
	font-size:15px;
	color:#17375d;
}

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

.zgk-news-card{
	background:#fff;
	border-radius:18px;
	overflow:hidden;
	box-shadow:0 10px 28px rgba(0,0,0,.07);
	transition:transform .35s ease, box-shadow .35s ease;
	display:flex;
	flex-direction:column;
	height:100%;
}

.zgk-news-card:hover{
	transform:translateY(-8px);
	box-shadow:0 18px 42px rgba(0,0,0,.12);
}

.zgk-news-image{overflow:hidden;}

.zgk-news-image img{
	width:100%;
	aspect-ratio:16/9;
	object-fit:cover;
	display:block;
	background:#eef3f8;
	transition:transform .35s ease;
}

.zgk-news-card:hover .zgk-news-image img{
	transform:scale(1.04);
}

.zgk-news-content{
	padding:28px;
	display:flex;
	flex-direction:column;
	flex:1;
}

.zgk-news-date{
	color:#7d8793;
	font-size:14px;
	margin-bottom:18px;
}

.zgk-news-title{
	font-size:26px;
	line-height:1.3;
	margin:0 0 18px;
}

.zgk-news-title a{
	color:#17375d;
	text-decoration:none;
}

.zgk-news-title a:hover{color:#2563eb;}

.zgk-news-excerpt{
	color:#4b5563;
	line-height:1.8;
	flex:1;
}

.zgk-news-button{
	display:inline-flex;
	align-items:center;
	justify-content:center;
	align-self:flex-start;
	min-width:190px;
	margin-top:24px;
	padding:12px 22px;
	background:#2563eb;
	color:#fff;
	border-radius:8px;
	text-decoration:none;
	font-size:15px;
	font-weight:600;
	transition:.3s;
}

.zgk-news-button:hover{
	background:#17375d;
	color:#fff;
}

.zgk-news-empty{
	padding:40px;
	text-align:center;
	background:#f8f9fa;
	border-radius:12px;
	color:#666;
}

/* =====================================
   LOAD MORE
===================================== */

.zgk-news-load-more-wrapper{
	display:flex;
	justify-content:center;
	margin:50px 0;
}

.zgk-news-load-more{
	display:inline-flex;
	align-items:center;
	justify-content:center;
	gap:10px;
	padding:16px 34px;
	background:#2563eb;
	color:#fff;
	border:none;
	border-radius:12px;
	font-size:16px;
	font-weight:600;
	cursor:pointer;
	transition:.25s;
	box-shadow:0 8px 20px rgba(37,99,235,.25);
}

.zgk-news-load-more:hover:not(:disabled){
	background:#17375d;
	transform:translateY(-2px);
	box-shadow:0 14px 32px rgba(0,0,0,.18);
}

.zgk-news-load-more:disabled{
	background:#9ca3af;
	cursor:not-allowed;
	transform:none;
	box-shadow:none;
}

.zgk-news-load-more-spinner{display:none;}

.zgk-news-load-more-finished{
	display:none;
	max-width:420px;
	margin:0 auto;
	padding:14px 20px;
	text-align:center;
	background:#eef7ee;
	border:1px solid #b9dfbf;
	border-radius:12px;
	color:#216e39;
	font-size:15px;
	font-weight:600;
}

.zgk-news-archive-link{
	display:flex;
	justify-content:center;
	margin:42px 0 0;
}

.zgk-news-archive-link a{
	display:inline-flex;
	align-items:center;
	gap:10px;
	padding:16px 29px;
	border-radius:999px;
	background:#2563eb;
	color:#fff;
	font-size:16px;
	font-weight:700;
	text-decoration:none;
	box-shadow:0 10px 22px rgba(37,99,235,.28);
	transition:transform .2s ease,background .2s ease;
}

.zgk-news-archive-link a:hover{background:#17375d;color:#fff;transform:translateY(-2px);}

/* =====================================
   RESPONSIVE
===================================== */

@media(max-width:1024px){
	.zgk-news-grid.columns-4,
	.zgk-news-grid.columns-3{
		grid-template-columns:repeat(2,1fr);
	}
}

@media(max-width:768px){

	body.home .zgk-news-wrapper{
		width:calc(100vw - 36px) !important;
		max-width:calc(100vw - 36px) !important;
	}

	.zgk-news-search-input{
		max-width:100%;
	}

	.zgk-news-filter-row{
		flex-direction:column;
		align-items:stretch;
	}

	.zgk-news-filter-buttons{
		justify-content:center;
	}

	.zgk-news-year{
		width:100%;
		min-width:0;
	}

	.zgk-news-grid{
		grid-template-columns:1fr !important;
	}
}
/* =====================================
   NEWS PAGINATION
===================================== */

.zgk-news-pagination-wrapper{
	margin:50px 0 20px;
	display:flex;
	justify-content:center;
}

.zgk-news-pagination ul.page-numbers{

	display:flex;
	align-items:center;
	justify-content:center;
	gap:8px;

	margin:0;
	padding:0;

	list-style:none;
}

.zgk-news-pagination ul.page-numbers li{

	margin:0;
	padding:0;
	list-style:none;
}

.zgk-news-pagination .page-numbers a,
.zgk-news-pagination .page-numbers span{

	display:flex;
	align-items:center;
	justify-content:center;

	min-width:40px;
	height:40px;

	padding:0 16px;

	border-radius:8px;

	border:1px solid #e4e9f2;
	background:#fff;

	color:#16396b;

	font-size:14px;
	font-weight:600;

	text-decoration:none;

	box-shadow:0 2px 8px rgba(15,23,42,.05);

	transition:
		background .2s,
		color .2s,
		border-color .2s,
		transform .2s,
		box-shadow .2s;
}

.zgk-news-pagination a:hover{

	background:#2563eb;
	color:#fff;

	border-color:#2563eb;

	transform:translateY(-2px);

	box-shadow:0 8px 20px rgba(37,99,235,.20);
}

.zgk-news-pagination .current{

	background:#2563eb;

	color:#fff;

	border-color:#2563eb;

	box-shadow:0 8px 20px rgba(37,99,235,.20);
}

.zgk-news-pagination .prev,
.zgk-news-pagination .next{

	padding:0 18px;
}
