/* =========================================================
   Pisz Mazury — strona główna (mobile first)
   ========================================================= */

.pm-content { padding-top: 0; padding-bottom: 0; }

/* ---------------------------------------------------------
   Uniwersalny kadr zdjęcia
   Niezależnie od tego, czy oryginał jest pionowy czy poziomy,
   obrazek wypełnia kafelek i jest przycinany do środka.
   --------------------------------------------------------- */
.pm-media {
	position: relative;
	display: block;
	overflow: hidden;
	background: #e9edf1;
	border-radius: var(--pm-radius);
}
.pm-media img,
.pm-media__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition: transform .4s ease;
}
.pm-media__fallback {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	background: linear-gradient(135deg, #17486f, #1f7a8c);
	color: rgba(255, 255, 255, .55);
	font-size: 44px;
	font-weight: 700;
}

/* Etykieta kategorii */
.pm-tag {
	display: inline-block;
	padding: 3px 9px;
	background: var(--pm-reed);
	color: #fff;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .01em;
	border-radius: 3px;
	text-decoration: none;
}
.pm-tag--light {
	background: #e7f1ec;
	color: #1d6a43;
}
a.pm-tag--light:hover { background: var(--pm-reed); color: #fff; }

/* Nagłówek sekcji */
.pm-section { padding-top: 32px; }
.pm-sechead {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 18px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--pm-navy);
}
.pm-sechead__title {
	margin: 0;
	font-size: 22px;
	font-weight: 800;
	color: var(--pm-navy);
	letter-spacing: -.01em;
}
.pm-sechead__more {
	flex: none;
	font-size: 14px;
	font-weight: 600;
	color: var(--pm-lake);
	text-decoration: none;
}
.pm-sechead__more:hover { text-decoration: underline; }

/* ---------------------------------------------------------
   Pasek „Gorący temat”
   --------------------------------------------------------- */
.pm-ticker {
	background: var(--pm-alert);
	color: #fff;
	overflow: hidden;
}
.pm-ticker__inner {
	display: flex;
	align-items: center;
	gap: 0;
	min-height: 44px;
}
.pm-ticker__label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex: none;
	padding-right: 14px;
	margin-right: 14px;
	font-size: 13px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .03em;
	border-right: 1px solid rgba(255, 255, 255, .35);
	white-space: nowrap;
}
.pm-ticker__dot {
	width: 8px; height: 8px;
	border-radius: 50%;
	background: #fff;
	animation: pm-pulse 1.6s infinite;
}
@keyframes pm-pulse {
	0%, 100% { opacity: 1; }
	50%      { opacity: .25; }
}

.pm-ticker__viewport {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 24px), transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 24px), transparent 100%);
}
.pm-ticker__track {
	display: flex;
	align-items: center;
	gap: 40px;
	width: max-content;
	will-change: transform;
}
.pm-ticker__item {
	color: #fff;
	font-size: 14.5px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	padding: 12px 0;
}
.pm-ticker__item:hover { text-decoration: underline; }
.pm-ticker__item + .pm-ticker__item::before {
	content: "•";
	margin-right: 40px;
	opacity: .5;
}

.pm-ticker__pause {
	flex: none;
	width: 30px; height: 30px;
	margin-left: 8px;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .18);
	cursor: pointer;
}
.pm-ticker__pause-icon {
	width: 10px; height: 11px;
	border-left: 3px solid #fff;
	border-right: 3px solid #fff;
}
.pm-ticker.is-paused .pm-ticker__pause-icon {
	width: 0; height: 0;
	border: 6px solid transparent;
	border-left: 10px solid #fff;
	margin-left: 4px;
}

/* ---------------------------------------------------------
   Temat dnia
   --------------------------------------------------------- */
.pm-hero {
	display: grid;
	gap: 12px;
	padding-top: 20px;
}
.pm-hero__link {
	position: relative;
	display: block;
	border-radius: var(--pm-radius);
	overflow: hidden;
	text-decoration: none;
	color: #fff;
}
.pm-hero__media { border-radius: 0; }
.pm-hero__item--lead .pm-hero__media { aspect-ratio: 16 / 10; }
.pm-hero__item--side .pm-hero__media { aspect-ratio: 16 / 9; }

/* Przyciemnienie od dołu — tytuł czytelny na każdym zdjęciu */
.pm-hero__link::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(6, 20, 34, .92) 0%, rgba(6, 20, 34, .62) 34%, rgba(6, 20, 34, .05) 68%);
}
.pm-hero__overlay {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	padding: 16px;
}
.pm-hero__title {
	font-size: 19px;
	font-weight: 800;
	line-height: 1.25;
	text-wrap: balance;
	text-shadow: 0 1px 12px rgba(0, 0, 0, .45);
}
.pm-hero__item--lead .pm-hero__title { font-size: 23px; }
.pm-hero__date { font-size: 12.5px; opacity: .8; }
.pm-hero__link:hover .pm-media__img { transform: scale(1.04); }

/* ---------------------------------------------------------
   Siatka wiadomości
   --------------------------------------------------------- */
.pm-grid {
	display: grid;
	gap: 20px;
}
.pm-card {
	display: flex;
	flex-direction: column;
	background: var(--pm-white);
	border: 1px solid var(--pm-line);
	border-radius: var(--pm-radius);
	overflow: hidden;
	transition: border-color .18s, box-shadow .18s;
}
.pm-card:hover {
	border-color: #c3ccd6;
	box-shadow: 0 10px 24px rgba(18, 57, 92, .09);
}
.pm-card__media {
	border-radius: 0;
	aspect-ratio: 3 / 2;
}
.pm-card:hover .pm-media__img { transform: scale(1.04); }
.pm-card__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 9px;
	padding: 15px 16px 17px;
	flex: 1 1 auto;
}
.pm-card__title {
	margin: 0;
	font-size: 17.5px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -.005em;
}
.pm-card__title a {
	color: var(--pm-ink);
	text-decoration: none;
}
.pm-card__title a:hover { color: var(--pm-lake); }
.pm-card__excerpt {
	margin: 0;
	font-size: 14.5px;
	line-height: 1.55;
	color: var(--pm-muted);
}
.pm-card__date {
	margin-top: auto;
	padding-top: 4px;
	font-size: 12.5px;
	color: #8a949f;
}
.pm-empty { color: var(--pm-muted); }

/* Paginacja strony głównej */
.pm-pager {
	padding: 26px 0 4px;
	text-align: center;
}
.pm-pager__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.pm-pager .page-numbers {
	display: grid;
	place-items: center;
	min-width: 44px;
	height: 44px;
	padding: 0 14px;
	background: var(--pm-white);
	border: 1px solid var(--pm-line);
	border-radius: var(--pm-radius);
	color: var(--pm-navy);
	font-weight: 600;
	font-size: 14.5px;
	text-decoration: none;
	transition: border-color .15s, background .15s;
}
.pm-pager .page-numbers:hover { border-color: var(--pm-navy); }
.pm-pager .page-numbers.current {
	background: var(--pm-navy);
	border-color: var(--pm-navy);
	color: #fff;
}
.pm-pager .page-numbers.dots {
	border-color: transparent;
	background: transparent;
	min-width: 26px;
	padding: 0;
}
.pm-pager__note {
	margin: 14px 0 0;
	font-size: 14px;
	color: var(--pm-muted);
}
.pm-pager__note a { color: var(--pm-lake); }

/* Doczytywanie */
.pm-more { padding: 26px 0 4px; text-align: center; }
.pm-more__btn {
	display: inline-block;
	min-width: 240px;
	padding: 13px 26px;
	background: var(--pm-navy);
	color: #fff;
	font-weight: 700;
	font-size: 15px;
	text-decoration: none;
	border: 0;
	border-radius: var(--pm-radius);
	cursor: pointer;
	transition: background .15s;
}
.pm-more__btn:hover { background: var(--pm-navy-deep); color: #fff; }
.pm-more__btn.is-loading { opacity: .65; pointer-events: none; }
.pm-more__done {
	margin: 0;
	color: var(--pm-muted);
	font-size: 14px;
}

/* Nowo doczytane kafelki — delikatne pojawienie */
.pm-card--new { animation: pm-fade .35s ease both; }
@keyframes pm-fade {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: none; }
}

/* Paginacja na archiwach i w wynikach wyszukiwania */
.pagination { padding: 28px 0 4px; }
.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
}
.pagination .page-numbers {
	display: grid;
	place-items: center;
	min-width: 42px;
	height: 42px;
	padding: 0 12px;
	background: var(--pm-white);
	border: 1px solid var(--pm-line);
	border-radius: var(--pm-radius);
	color: var(--pm-navy);
	font-weight: 600;
	font-size: 14.5px;
	text-decoration: none;
}
.pagination .page-numbers:hover { border-color: var(--pm-navy); }
.pagination .page-numbers.current {
	background: var(--pm-navy);
	border-color: var(--pm-navy);
	color: #fff;
}
.pagination .page-numbers.dots { border-color: transparent; background: transparent; }

/* ---------------------------------------------------------
   Klepsydry
   --------------------------------------------------------- */
.pm-obits__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
}
.pm-obit__link {
	display: block;
	padding: 12px;
	background: var(--pm-white);
	border: 1px solid #d7dce2;
	border-top: 3px solid #2b3440;
	border-radius: 2px;
	text-align: center;
	text-decoration: none;
	transition: box-shadow .18s;
}
.pm-obit__link:hover { box-shadow: 0 8px 20px rgba(18, 57, 92, .1); }
.pm-obit__frame {
	aspect-ratio: 4 / 5;
	border-radius: 2px;
	margin-bottom: 11px;
}
.pm-obit__frame .pm-media__img { filter: grayscale(1); }
.pm-obit__name {
	display: block;
	font-size: 15.5px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--pm-ink);
}
.pm-obit__date {
	display: block;
	margin-top: 5px;
	font-size: 12.5px;
	color: var(--pm-muted);
}

/* ---------------------------------------------------------
   Oferty pracy
   --------------------------------------------------------- */
.pm-jobs__grid {
	display: grid;
	gap: 14px;
}
.pm-job {
	padding: 16px 18px;
	background: var(--pm-white);
	border: 1px solid var(--pm-line);
	border-left: 4px solid var(--pm-reed);
	border-radius: var(--pm-radius);
}
.pm-job__title {
	margin: 0 0 7px;
	font-size: 16.5px;
	font-weight: 700;
	line-height: 1.3;
}
.pm-job__title a { color: var(--pm-ink); text-decoration: none; }
.pm-job__title a:hover { color: var(--pm-reed); }
.pm-job__excerpt {
	margin: 0 0 8px;
	font-size: 14px;
	color: var(--pm-muted);
	line-height: 1.5;
}
.pm-job__date { font-size: 12.5px; color: #8a949f; }

/* ---------------------------------------------------------
   Sloty reklamowe
   --------------------------------------------------------- */
.pm-adslot {
	margin: 28px 0 4px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}
.pm-adslot .pm-ad img { max-width: 100%; height: auto; display: block; }

.pm-adslot__invite {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	width: 100%;
	padding: 22px 18px;
	background:
		repeating-linear-gradient(45deg, #f3f5f7 0 10px, #eef1f4 10px 20px);
	border: 1px dashed #c3ccd6;
	border-radius: var(--pm-radius);
	text-align: center;
	text-decoration: none;
	transition: border-color .18s, background .18s;
}
.pm-adslot__invite:hover { border-color: var(--pm-reed); }
.pm-adslot__invite-title {
	font-size: 15.5px;
	font-weight: 700;
	color: var(--pm-navy);
}
.pm-adslot__invite-text {
	font-size: 13.5px;
	color: var(--pm-muted);
}

/* =========================================================
   Tablet
   ========================================================= */
@media (min-width: 620px) {
	.pm-grid { grid-template-columns: repeat(2, 1fr); }
	.pm-obits__grid { grid-template-columns: repeat(3, 1fr); }
	.pm-jobs__grid { grid-template-columns: repeat(2, 1fr); }
	.pm-hero__title { font-size: 21px; }
	.pm-hero__item--lead .pm-hero__title { font-size: 28px; }
	.pm-sechead__title { font-size: 25px; }
}

/* =========================================================
   Komputer
   ========================================================= */
@media (min-width: 980px) {
	.pm-section { padding-top: 44px; }

	.pm-hero {
		grid-template-columns: 2fr 1fr;
		grid-template-rows: 1fr 1fr;
		gap: 16px;
		padding-top: 26px;
	}
	.pm-hero__item--lead { grid-row: span 2; }
	.pm-hero__item--lead .pm-hero__link,
	.pm-hero__item--side .pm-hero__link { height: 100%; }
	.pm-hero__item--lead .pm-hero__media { aspect-ratio: auto; height: 100%; min-height: 420px; }
	.pm-hero__item--side .pm-hero__media { aspect-ratio: auto; height: 100%; min-height: 202px; }
	.pm-hero__overlay { padding: 22px 24px; }
	.pm-hero__item--lead .pm-hero__title { font-size: 34px; }
	.pm-hero__item--side .pm-hero__title { font-size: 18px; }

	.pm-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
	.pm-obits__grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
	.pm-jobs__grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }

	.pm-adslot { margin: 40px 0 8px; }
	.pm-adslot--rect .pm-adslot__invite { padding: 30px; }
}

@media (prefers-reduced-motion: reduce) {
	.pm-media__img, .pm-card, .pm-more__btn, .pm-ticker__dot,
	.pm-card--new, .pm-adslot__invite { transition: none; animation: none; }
}
