/* =====================================================================
   APTEKI — Archive pages (city, voivodeship, directory, brand...)
   Tło: białe. Czcionka: dziedziczona z motywu.
   Odstępy boczne: 30px.
   ===================================================================== */

.apd-archive {
	background: #fff;
	color: #1a1a1a;
	font-family: inherit;
	font-size: 14px;
	padding-top: 24px;
	padding-bottom: 64px;
}

.apd-archive__shell {
	margin: 0 auto;
	padding-left: 30px;
	padding-right: 30px;
}

/* ── Breadcrumbs ───────────────────────────────────────────────────── */
.apd-archive .apd-breadcrumbs {
	color: #666;
	font-size: 13px;
	margin-bottom: 16px;
}

.apd-archive .apd-breadcrumbs span,
.apd-archive .apd-breadcrumbs a {
	color: #666;
	text-decoration: none;
}

.apd-archive .apd-breadcrumbs a:hover {
	color: #1a1a1a;
	text-decoration: underline;
}

/* ── Hero ──────────────────────────────────────────────────────────── */
.apd-archive-hero {
	border-bottom: 1px solid #e0e8e4;
	margin-bottom: 24px;
	padding-bottom: 20px;
}

.apd-archive-hero--with-stats {
	align-items: flex-start;
	display: flex;
	gap: 32px;
	justify-content: space-between;
}

.apd-archive-hero--with-stats .apd-archive-title {
	margin-bottom: 0;
}

.apd-archive-title {
	font-size: 36px;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.1;
	margin: 0 0 8px;
}

.apd-archive-lead {
	color: #555;
	font-size: 15px;
	line-height: 1.6;
	margin: 0;
	max-width: 60ch;
}

/* ── Stats ─────────────────────────────────────────────────────────── */
.apd-archive-stats {
	display: flex;
	gap: 32px;
	margin-bottom: 28px;
}

.apd-archive-stats--inline {
	flex: 0 0 auto;
	margin-bottom: 0;
}

.apd-stat strong {
	display: block;
	font-size: 28px;
	font-weight: 700;
	line-height: 1;
	margin-bottom: 4px;
}

.apd-stat span {
	color: #666;
	font-size: 13px;
}

.apd-visually-hidden {
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	height: 1px;
	overflow: hidden;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

/* ── Richtext ──────────────────────────────────────────────────────── */
.apd-richtext {
	color: #444;
	font-size: 14px;
	line-height: 1.7;
	margin-bottom: 32px;
}

/* ── Layout: main + sidebar 30% ─────────────────────────────────────── */
.apd-archive-layout {
	display: grid;
	gap: 40px;
	grid-template-columns: 1fr 30%;
	align-items: start;
}

.apd-archive-layout__main    { min-width: 0; }
.apd-archive-layout__sidebar { min-width: 0; }

.apd-archive-layout--full {
	grid-template-columns: minmax(0, 1fr);
}

.apd-sidebar-cities {
	border-top: 2px solid #1a1a1a;
	margin-bottom: 32px;
}

.apd-sidebar-cities__header {
	align-items: baseline;
	border-bottom: 1px solid #e0e8e4;
	display: flex;
	justify-content: space-between;
	padding: 12px 0;
}

.apd-sidebar-cities__header h2 {
	font-size: 18px;
	font-weight: 700;
	margin: 0;
}

.apd-sidebar-city-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.apd-sidebar-city-list li {
	border-bottom: 1px solid #e0e8e4;
	margin: 0;
}

.apd-sidebar-city-list a {
	align-items: center;
	color: #1a1a1a;
	display: block;
	padding: 10px 0;
	text-decoration: none;
}

.apd-sidebar-city-list a:hover {
	color: #2e7d5e;
}

.apd-sidebar-city-list__name {
	font-size: 13px;
	font-weight: 600;
	min-width: 0;
}

/* ── Sekcja generyczna (voivodeship) ────────────────────────────────── */
.apd-archive .apd-section {
	margin-bottom: 36px;
}

.apd-archive .apd-section__header {
	align-items: baseline;
	border-bottom: 1px solid #e0e8e4;
	display: flex;
	justify-content: space-between;
	margin-bottom: 0;
	padding-bottom: 10px;
}

.apd-archive .apd-section__header h2 {
	font-size: 22px;
	font-weight: 700;
	margin: 0;
}

.apd-archive .apd-section__header-note {
	color: #888;
	font-size: 12px;
}

.apd-section__header-with-herb {
	align-items: center;
	display: flex;
	gap: 10px;
	margin: 0;
}

.apd-section__herb {
	display: block;
	flex-shrink: 0;
	height: 24px;
	object-fit: contain;
	width: 24px;
}

/* ── Siatka marek (brand hub) ───────────────────────────────────────── */
.apd-brand-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0;
	margin-top: 0;
}

.apd-brand-row {
	align-items: center;
	border-bottom: 1px solid #e0e8e4;
	color: #1a1a1a;
	display: flex;
	gap: 12px;
	padding: 12px 0;
	text-decoration: none;
	transition: color 0.15s;
}

.apd-brand-row:nth-child(even) {
	border-left: 1px solid #e0e8e4;
	padding-left: 20px;
}

.apd-brand-row:hover { color: #2e7d5e; }

.apd-brand-row__name {
	flex: 1;
	font-size: 14px;
	font-weight: 500;
}

.apd-brand-row__count {
	color: #888;
	font-size: 12px;
	white-space: nowrap;
}

.apd-brand-row__arrow {
	color: #bbb;
	font-size: 13px;
}

.apd-brand-row:hover .apd-brand-row__arrow { color: #2e7d5e; }

/* ── Siatka województw z herbami — 3 kolumny ────────────────────────── */
.apd-voiv-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
	margin-top: 16px;
}

.apd-voiv-card {
	align-items: center;
	border: 1px solid #e0e8e4;
	border-radius: 10px;
	color: #1a1a1a;
	display: flex;
	gap: 12px;
	padding: 14px 16px;
	text-decoration: none;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.apd-voiv-card:hover {
	border-color: #2e7d5e;
	box-shadow: 0 2px 8px rgba(46, 125, 94, 0.1);
}

.apd-voiv-card__herb {
	align-items: center;
	display: flex;
	flex-shrink: 0;
	height: 36px;
	justify-content: center;
	width: 36px;
}

.apd-voiv-card__herb img {
	display: block;
	height: 36px;
	object-fit: contain;
	width: 36px;
}

.apd-voiv-card__name {
	flex: 1;
	font-size: 14px;
	font-weight: 500;
	min-width: 0;
	text-transform: none;
}

.apd-voiv-card__arrow {
	color: #bbb;
	flex-shrink: 0;
	font-size: 13px;
}

.apd-voiv-card:hover .apd-voiv-card__arrow {
	color: #2e7d5e;
}

/* ── Directory A-Z ────────────────────────────────────────────────── */
.apd-city-directory {
	margin-top: 52px;
}

.apd-city-directory__alphabet {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 16px 0 24px;
}

.apd-city-directory__alphabet a {
	align-items: center;
	border: 1px solid #cfdad5;
	border-radius: 4px;
	color: #1a1a1a;
	display: inline-flex;
	font-size: 13px;
	font-weight: 700;
	height: 34px;
	justify-content: center;
	min-width: 34px;
	padding: 0 8px;
	text-decoration: none;
	transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.apd-city-directory__alphabet a:hover,
.apd-city-directory__alphabet a:focus-visible {
	background: #2e7d5e;
	border-color: #2e7d5e;
	color: #fff;
}

.apd-city-directory__groups {
	border-top: 1px solid #d9e2de;
}

.apd-city-letter {
	border-bottom: 1px solid #d9e2de;
	display: grid;
	gap: 28px;
	grid-template-columns: 64px minmax(0, 1fr);
	padding: 24px 0;
	scroll-margin-top: 24px;
}

.apd-city-letter__title {
	color: #2e7d5e;
	font-size: 44px;
	font-weight: 500;
	letter-spacing: -0.04em;
	line-height: 1;
	margin: 0;
}

.apd-city-letter__list {
	display: grid;
	gap: 8px 24px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	list-style: none;
	margin: 0;
	padding: 2px 0 0;
}

.apd-city-letter__list li {
	margin: 0;
	min-width: 0;
}

.apd-city-letter__list a {
	color: #1d664c;
	display: inline-flex;
	flex-direction: column;
	font-size: 14px;
	line-height: 1.35;
	text-decoration: none;
}

.apd-city-letter__list a:hover,
.apd-city-letter__list a:focus-visible {
	color: #174f3d;
	text-decoration: underline;
}

.apd-city-letter__list small {
	color: #7a827e;
	font-size: 10px;
	line-height: 1.3;
	text-transform: lowercase;
}

/* ── Siatka miast — 3 kolumny ───────────────────────────────────────── */
.apd-city-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	column-gap: 0;
}

/* Każda kolumna siatki oddzielona pionową linią */
.apd-city-grid .apd-city-row:nth-child(3n+2),
.apd-city-grid .apd-city-row:nth-child(3n+3) {
	border-left: 1px solid #e0e8e4;
	padding-left: 20px;
}

.apd-city-row {
	align-items: center;
	border-bottom: 1px solid #e0e8e4;
	color: #1a1a1a;
	display: flex;
	justify-content: space-between;
	padding: 12px 16px 12px 0;
	text-decoration: none;
	transition: background 0.12s, color 0.12s;
}

.apd-city-row:hover {
	color: #2e7d5e;
}

.apd-city-row__name {
	font-size: 14px;
	font-weight: 500;
}

.apd-city-row__arrow {
	color: #bbb;
	flex-shrink: 0;
	font-size: 13px;
	margin-left: 8px;
}

/* ── Results heading ───────────────────────────────────────────────── */
.apd-results__heading {
	border-bottom: 1px solid #e0e8e4;
	font-size: 20px;
	font-weight: 600;
	margin: 0 0 0;
	padding-bottom: 12px;
}

/* ── Card list ─────────────────────────────────────────────────────── */
.apd-results__list {
	display: flex;
	flex-direction: column;
}

.apd-city-summary {
	color: #4f5c56;
	font-size: 16px;
	line-height: 1.6;
	margin: 12px 0 0;
}

.apd-city-summary strong {
	color: #111;
	font-weight: 700;
}

.apd-city-summary [data-apd-city-open-text] {
	display: inline;
}

.apd-archive--city .apd-results__list--city-grid {
	column-gap: 32px;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.apd-archive--city .apd-results__list--city-grid .apd-card {
	min-width: 0;
}

.apd-card {
	border-bottom: 1px solid #e0e8e4;
	padding: 18px 0;
}

.apd-card__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.apd-card__body {
	flex: 1;
	min-width: 0;
}

.apd-card__topline {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 6px;
}

/* Pills */
.apd-pill {
	border-radius: 4px;
	display: inline-flex;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.05em;
	padding: 3px 8px;
	text-transform: uppercase;
}

.apd-pill--active {
	background: #d4f0e4;
	color: #1a6644;
}

.apd-pill--accent {
	background: #fde8c8;
	color: #8a4a10;
}

.apd-pill--soft {
	background: #e8e8e8;
	color: #444;
}

.apd-card__title {
	font-size: 17px;
	font-weight: 600;
	margin: 0 0 4px;
	line-height: 1.3;
}

.apd-card__title a {
	color: #1a1a1a;
	text-decoration: none;
}

.apd-card__title a:hover {
	text-decoration: underline;
}

.apd-card__address {
	color: #555;
	font-size: 13px;
	margin: 0 0 2px;
}

.apd-card__opening-status {
	align-items: center;
	display: flex;
	font-size: 13px;
	font-weight: 600;
	gap: 7px;
	line-height: 1.4;
	margin: 0 0 2px;
}

.apd-card__status-dot {
	background: currentColor;
	border-radius: 50%;
	flex: 0 0 7px;
	height: 7px;
	width: 7px;
}

.apd-card__opening-status.status-open {
	color: #24734f;
}

.apd-card__opening-status.status-closing-soon,
.apd-card__opening-status.status-break {
	color: #a85c00;
}

.apd-card__opening-status.status-closed,
.apd-card__opening-status.status-temporarily-closed {
	color: #8a4b45;
}

.apd-card__opening-status.status-24h {
	color: #176d75;
}

.apd-card__opening-status.status-unknown {
	color: #6f7773;
}

.apd-card__phone {
	color: #2e7d5e;
	font-size: 13px;
	margin: 0;
}

.apd-card__action {
	flex-shrink: 0;
}

.apd-card__btn {
	border: 1px solid #ccc;
	border-radius: 6px;
	color: #1a1a1a;
	display: inline-flex;
	font-size: 13px;
	font-weight: 500;
	padding: 8px 14px;
	text-decoration: none;
	white-space: nowrap;
	transition: border-color 0.15s, color 0.15s;
}

.apd-card__btn:hover {
	border-color: #2e7d5e;
	color: #2e7d5e;
}

@media (max-width: 900px) {
	.apd-archive--city .apd-results__list--city-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ── Empty state ───────────────────────────────────────────────────── */
.apd-empty {
	padding: 32px 0;
	color: #666;
}

/* ── Pagination ────────────────────────────────────────────────────── */
.apd-pagination {
	margin-top: 32px;
}

.apd-pagination .page-numbers {
	display: inline-flex;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 4px;
	flex-wrap: wrap;
}

.apd-pagination .page-numbers li a,
.apd-pagination .page-numbers li span {
	border: 1px solid #e0e8e4;
	border-radius: 6px;
	color: #1a1a1a;
	display: inline-flex;
	align-items: center;
	font-size: 13px;
	padding: 7px 12px;
	text-decoration: none;
	transition: border-color 0.15s;
}

.apd-pagination .page-numbers li a:hover {
	border-color: #2e7d5e;
	color: #2e7d5e;
}

.apd-pagination .page-numbers li span.current {
	background: #2e7d5e;
	border-color: #2e7d5e;
	color: #fff;
}

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
	.apd-archive-layout {
		grid-template-columns: 1fr;
	}

	.apd-sidebar-city-list {
		column-gap: 28px;
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.apd-city-letter__list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 720px) {
	.apd-city-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.apd-voiv-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.apd-city-letter__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.apd-archive-hero--with-stats {
		gap: 16px;
		flex-direction: column;
	}

	.apd-archive-stats--inline {
		width: 100%;
	}

	.apd-sidebar-city-list {
		grid-template-columns: 1fr;
	}

	.apd-city-grid {
		grid-template-columns: 1fr;
	}

	.apd-voiv-grid {
		grid-template-columns: 1fr;
	}

	.apd-city-directory {
		margin-top: 40px;
	}

	.apd-city-directory__alphabet a {
		flex: 1 0 34px;
	}

	.apd-city-letter {
		gap: 12px;
		grid-template-columns: 42px minmax(0, 1fr);
		padding: 20px 0;
	}

	.apd-city-letter__title {
		font-size: 34px;
	}

	.apd-city-letter__list {
		grid-template-columns: 1fr;
	}
	.apd-archive__shell {
		padding-left: 16px;
		padding-right: 16px;
	}

	.apd-archive-title {
		font-size: 26px;
	}

	.apd-archive-stats {
		gap: 20px;
	}

	.apd-card__btn {
		display: none;
	}

	.apd-card__title a {
		text-decoration: underline;
	}
}
