/*
 * Category Archive — Editorial Layout Styles
 *
 * მხოლოდ .editorial-archive კონტეინერს და მის შვილ ელემენტებს ეხება.
 * არ ეხება Header-ს, Footer-ს, Menu-ს, ან საიტის სხვა ნაწილებს.
 *
 * მნიშვნელოვანი: აქ განზრახ არ არის მითითებული max-width, margin ან
 * horizontal padding — გვერდის სიგანე და გასწორება მთლიანად მემკვიდრეობით
 * მოდის Blocksy-ის საკუთარი .ct-container კლასიდან (დადასტურებული
 * DevTools-ით: max-width: 1290px, margin-inline: auto), რომელშიც
 * category.php აჯგუფებს ჩვენს კონტენტს. ასე გარანტირებულია, რომ Header-ის
 * და საიტის სხვა გვერდების alignment-ს ზუსტად დაემთხვევა.
 *
 * პრინციპები (დამტკიცებული wireframe-ის მიხედვით):
 * - ფოტოს გარეშე
 * - card/grid/rounded-corner/shadow გარეშე
 * - მხოლოდ typography + whitespace + თხელი divider-ები
 */

.editorial-archive {
	padding-top: 32px;
	padding-bottom: 40px;
}

/* ---------- Header + Navigation ---------- */

.editorial-archive__header {
	margin-bottom: 0;
}

.editorial-archive__title {
	font-size: 28px;
	font-weight: 500;
	margin: 0 0 18px;
	line-height: 1.2;
}

.editorial-archive__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin-bottom: 4px;
}

.editorial-archive__tab {
	font-size: 14px;
	color: #6b6b6b;
	text-decoration: none;
	padding-bottom: 4px;
	border-bottom: 1.5px solid transparent;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.editorial-archive__tab:hover {
	color: #111111;
}

.editorial-archive__tab.is-active {
	color: #111111;
	font-weight: 500;
	border-bottom-color: #111111;
}

/* ---------- Divider ---------- */

.editorial-archive__divider {
	height: 1px;
	background: #dcdcdc;
	margin: 24px 0 0;
}

/* ---------- Posts list ---------- */

.editorial-archive__list {
	display: flex;
	flex-direction: column;
}

/*
 * CSS Grid — ერთი და იგივე ელემენტების (number, subcat, title, author,
 * excerpt, meta) გადალაგება Desktop-სა და Mobile-ს შორის მხოლოდ
 * grid-template-areas-ის შეცვლით, HTML-ის დუბლირების გარეშე.
 *
 * Desktop: number ცალკე მარცხენა სვეტში; subcat/title/author/excerpt
 * ერთ საერთო ცენტრალურ სვეტში; meta მარჯვნივ.
 */
.editorial-archive__item {
	display: grid;
	grid-template-columns: 26px 1fr 120px;
	grid-template-areas:
		"number subcat  meta"
		"number title   meta"
		"number author  meta"
		"number excerpt meta";
	column-gap: 20px;
	padding: 26px 0;
	border-bottom: 0.5px solid #e4e4e4;
}

.editorial-archive__item:last-child {
	border-bottom: none;
}

.editorial-archive__number {
	grid-area: number;
	font-size: 14px;
	font-weight: 500;
	color: #6e6e6e;
	padding-top: 2px;
}

.editorial-archive__subcat {
	grid-area: subcat;
	font-size: 11px;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: #999999;
	margin-bottom: 8px;
}

.editorial-archive__post-title {
	grid-area: title;
	font-size: 20px;
	font-weight: 500;
	line-height: 1.3;
	margin: 0 0 6px;
}

.editorial-archive__post-title a {
	color: #111111;
	text-decoration: none;
}

.editorial-archive__post-title a:hover {
	text-decoration: underline;
}

.editorial-archive__author {
	grid-area: author;
	font-size: 13px;
	font-weight: 500;
	color: #3d3d3d;
	margin-bottom: 10px;
}

.editorial-archive__author-link {
	color: inherit;
	text-decoration: none;
}

.editorial-archive__author-link:hover {
	text-decoration: underline;
	color: #111111;
}

.editorial-archive__excerpt {
	grid-area: excerpt;
	font-size: 14px;
	line-height: 1.65;
	color: #4d4d4d;
}

.editorial-archive__meta {
	grid-area: meta;
	align-self: start;
	text-align: right;
	font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
	font-size: 12px;
	font-weight: 500;
	color: #6e6e6e;
	padding-top: 3px;
}

.editorial-archive__empty {
	font-size: 15px;
	color: #6b6b6b;
	padding: 32px 0;
}

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

@media (max-width: 680px) {

	.editorial-archive {
		padding-top: 24px;
		padding-bottom: 32px;
	}

	.editorial-archive__title {
		font-size: 22px;
		margin-bottom: 12px;
	}

	.editorial-archive__tabs {
		gap: 16px;
	}

	/*
	 * Mobile-ზე "01 · subcategory" ერთ ხაზზე უნდა გამოჩნდეს — grid-template-areas
	 * გადალაგებულია ისე, რომ number და subcat ერთსა და იმავე მწკრივში ხვდებიან,
	 * დანარჩენი ელემენტები კი სრულ სიგანეზე, თითო მწკრივში.
	 */
	.editorial-archive__item {
		grid-template-columns: auto 1fr;
		grid-template-areas:
			"number  subcat"
			"title   title"
			"author  author"
			"excerpt excerpt"
			"meta    meta";
		column-gap: 8px;
		row-gap: 6px;
		padding: 22px 0;
	}

	.editorial-archive__subcat {
		margin-bottom: 0;
		align-self: center;
	}

	.editorial-archive__post-title {
		font-size: 17px;
	}

	.editorial-archive__meta {
		text-align: left;
		padding-top: 4px;
	}

}
