

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

:root {
	/* Цвета */
	--primary-blue: #006dbb;
	--accent-blue: rgb(114, 212, 250);
	--accent-blue-light: rgba(114, 212, 250, 0.1);
	--accent-blue-medium: rgba(114, 212, 250, 0.3);
	--dark-text: #1D1D1F;
	--gray-text: #515154;
	--light-gray: #F5F5F7;
	--white: #FFFFFF;
	--shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
	--shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
	--shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
	--shadow-hover: 0 12px 24px rgba(0, 0, 0, 0.15);

	/* Типографика - базовые размеры */
	--text-xs: 0.75rem;    /* 12px */
	--text-sm: 0.875rem;   /* 14px */
	--text-base: 1rem;     /* 16px */
	--text-lg: 1.125rem;   /* 18px */
	--text-xl: 1.25rem;    /* 20px */
	--text-2xl: 1.5rem;    /* 24px */
	--text-3xl: 1.875rem;  /* 30px */
	--text-4xl: 2.25rem;   /* 36px */
	--text-5xl: 3rem;      /* 48px */
	--text-6xl: 3.75rem;   /* 60px */

	/* Межстрочные интервалы */
	--leading-tight: 1.25;
	--leading-snug: 1.375;
	--leading-normal: 1.5;
	--leading-relaxed: 1.625;
	--leading-loose: 1.75;

	/* Межбуквенные интервалы */
	--tracking-tight: -0.025em;
	--tracking-normal: 0;
	--tracking-wide: 0.025em;
	--tracking-wider: 0.05em;
	--tracking-widest: 0.1em;

	/* Отступы */
	--space-xs: 0.5rem;   /* 8px */
	--space-sm: 0.75rem;  /* 12px */
	--space-md: 1rem;     /* 16px */
	--space-lg: 1.5rem;   /* 24px */
	--space-xl: 2rem;     /* 32px */
	--space-2xl: 2.5rem;  /* 40px */
	--space-3xl: 3rem;    /* 48px */
	--space-4xl: 4rem;    /* 64px */
}

body {
	font-family: 'Segoe UI', sans-serif;
	font-weight: 400;
	color: var(--dark-text);
	line-height: var(--leading-normal);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	font-size: var(--text-base);
}

/* Breadcrumbs */
.breadcrumbs {
	padding: var(--space-lg) var(--space-lg);
	background: var(--white);
}

.breadcrumbs-container {
	max-width: 1200px;
	margin: 0 auto;
}

.breadcrumbs-list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-xs);
	list-style: none;
	font-size: var(--text-sm);
	font-weight: 400;
	letter-spacing: var(--tracking-normal);
}

.breadcrumb-item {
	display: flex;
	align-items: center;
	gap: var(--space-xs);
}

.breadcrumb-link {
	color: var(--primary-blue);
	text-decoration: none;
	transition: all 0.2s ease;
}

.breadcrumb-link:hover {
	color: var(--primary-blue);
	text-decoration: underline;
}

.breadcrumb-separator {
	color: var(--gray-text);
	opacity: 0.5;
}

.breadcrumb-current {
	color: var(--dark-text);
	font-weight: 500;
}

/* Main Container */
.main-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: var(--space-lg);
}

/* Page Header */
.page-header {
	background: var(--white);
	border-radius: 16px;
	padding: var(--space-2xl) var(--space-xl);
	margin-bottom: var(--space-xl);
	box-shadow: var(--shadow-sm);
	background: linear-gradient(135deg, var(--accent-blue-light) 0%, rgba(114, 212, 250, 0.05) 100%);
	border: 1px solid rgba(114, 212, 250, 0.2);
}

.page-title {
	font-family: 'Segoe UI', sans-serif;
	font-size: var(--text-5xl);
	font-weight: 700;
	line-height: var(--leading-tight);
	color: var(--dark-text);
	margin-bottom: var(--space-sm);
	letter-spacing: var(--tracking-tight);
}

.page-description {
	font-size: var(--text-lg);
	font-weight: 300;
	color: var(--gray-text);
	line-height: var(--leading-relaxed);
	max-width: 700px;
	letter-spacing: var(--tracking-normal);
}

/* Articles List - Compact Style */
.articles-list {
	background: var(--white);
	border-radius: 16px;
	box-shadow: var(--shadow-sm);
	overflow: hidden;
	margin-bottom: var(--space-xl);
}

.article-item {
	display: block;
	padding: var(--space-lg) var(--space-xl);
	border-bottom: 1px solid #f0f0f0;
	text-decoration: none;
	transition: all 0.2s ease;
	position: relative;
}

.article-item:last-child {
	border-bottom: none;
}

.article-item:hover {
	background: var(--accent-blue-light);
	padding-left: calc(var(--space-xl) + 8px);
}

.article-item:hover .article-title {
	color: var(--primary-blue);
}

/* Контейнер для тегов справа */
/*.article-tags {
	position: absolute;
	top: var(--space-lg);
	right: var(--space-xl);
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	max-width: 200px;
	justify-content: flex-end;
}*/

.articles-list .article-tags{
  position: static !important;
  top: auto !important;
  right: auto !important;
  max-width: none !important;
}

/* Карточка как flex-контейнер с переносом */
.articles-list .article-item{
  display: flex;
  flex-wrap: wrap;                 /* <-- позволит переносить теги */
  align-items: flex-start;
  column-gap: var(--space-md);
  row-gap: var(--space-xs);
}

/* Заголовок идёт первым и занимает всё доступное место */
.articles-list .article-title{
  order: 1;                        /* т.к. в DOM теги раньше заголовка */
  flex: 1 1 auto;
  margin: 0;
  padding-right: 0 !important;     /* убираем старый отступ под absolute-теги */
}

/* Теги — сразу после заголовка, справа.
   Если не помещаются, переносятся НА СЛЕД. СТРОКУ и выравниваются вправо */
.articles-list .article-tags{
  order: 2;
  flex: 0 0 auto;                  /* ширина по содержимому */
  margin-left: auto;               /* при наличии места — прижим вправо */
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;       /* на своей строке — к правому краю */
}

/* Анонс всегда на новой строке на всю ширину */
.articles-list .article-excerpt{
  order: 3;
  flex-basis: 100%;
}

.article-tag {
	padding: 4px 10px;
	border-radius: 6px;
	font-size: var(--text-xs);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: var(--tracking-wider);
}

.article-tag.tag-new {
	background: #10b981;
	color: white;
}

.article-tag.tag-popular {
	background: var(--primary-blue);
	color: white;
}

/* Важная статья - с желтой полоской слева */
.article-item.is-important {
	border-left: 4px solid #f59e0b;
	padding-left: calc(var(--space-xl) - 4px);
	background: #fffbeb;
}

.article-item.is-important:hover {
	background: #fef3c7;
	padding-left: calc(var(--space-xl) + 4px);
}

.article-title {
	font-family: 'Segoe UI', sans-serif;
	font-size: var(--text-xl);
	font-weight: 500;
	color: var(--dark-text);
	margin-bottom: var(--space-xs);
	line-height: var(--leading-snug);
	letter-spacing: var(--tracking-tight);
	transition: color 0.2s ease;
	padding-right: 220px; /* Отступ для тегов */
}

.article-excerpt {
	font-size: var(--text-base);
	font-weight: 300;
	color: var(--gray-text);
	line-height: var(--leading-relaxed);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	letter-spacing: var(--tracking-normal);
}

/* Featured Section */
.featured-section {
	margin-bottom: var(--space-xl);
}

.featured-article {
	background: var(--white);
	border-radius: 16px;
	padding: var(--space-2xl);
	box-shadow: var(--shadow-md);
	background: linear-gradient(135deg, var(--accent-blue-light) 0%, rgba(114, 212, 250, 0.05) 100%);
	border: 1px solid rgba(114, 212, 250, 0.2);
	text-decoration: none;
	display: block;
	transition: all 0.3s ease;
}

.featured-article:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-lg);
}

.featured-badge {
	display: inline-block;
	background: var(--accent-blue);
	color: var(--dark-text);
	padding: 6px 12px;
	border-radius: 8px;
	font-size: var(--text-xs);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: var(--tracking-widest);
	margin-bottom: var(--space-md);
}

.featured-article .article-title {
	font-size: var(--text-3xl);
	font-weight: 700;
	margin-bottom: var(--space-sm);
	letter-spacing: var(--tracking-tight);
}

.featured-article .article-excerpt {
	font-size: var(--text-lg);
	-webkit-line-clamp: 3;
	margin-bottom: var(--space-md);
	font-weight: 300;
	line-height: var(--leading-relaxed);
}

.read-more {
	color: var(--primary-blue);
	font-weight: 500;
	font-size: var(--text-base);
	display: inline-flex;
	align-items: center;
	gap: 4px;
	letter-spacing: var(--tracking-normal);
}

/* Pagination */
.pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: var(--space-xs);
	margin-top: var(--space-2xl);
}

.pagination-item {
	min-width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--white);
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	color: var(--gray-text);
	text-decoration: none;
	font-size: var(--text-sm);
	font-weight: 500;
	transition: all 0.2s ease;
}

.pagination-item:hover {
	background: var(--accent-blue-light);
	border-color: var(--accent-blue);
	color: var(--primary-blue);
}

.pagination-item.active {
	background: var(--primary-blue);
	border-color: var(--primary-blue);
	color: var(--white);
}

.pagination-item.disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Desktop Sidebar */
.desktop-sidebar {
	display: none;
}

/* Tablet Styles */
@media (min-width: 768px) {
	:root {
		--text-base: 1.0625rem; /* 17px на планшетах */
	}

	.breadcrumbs {
		padding: var(--space-xl) var(--space-2xl);
	}

	.main-container {
		padding: var(--space-xl) var(--space-2xl);
	}

	.page-header {
		padding: var(--space-3xl) var(--space-2xl);
	}

	.page-title {
		font-size: var(--text-5xl);
	}

	.article-item {
		padding: var(--space-xl) var(--space-2xl);
	}

	.article-item:hover {
		padding-left: calc(var(--space-2xl) + 8px);
	}

	.article-title {
		font-size: var(--text-2xl);
	}

	.article-excerpt {
		font-size: var(--text-base);
	}
}

/* Desktop Styles */
@media (min-width: 1024px) {
	:root {
		--text-base: 1.125rem; /* 18px на десктопе */
	}

	body {
	}

	.breadcrumbs {
		background: transparent;
		padding: var(--space-2xl) var(--space-lg) var(--space-md);
	}

	.breadcrumbs-container {
		display: grid;
		grid-template-columns: 280px 1fr;
		gap: var(--space-lg);
		align-items: start;
	}

	.breadcrumbs-list {
		grid-column: 2;
		padding-left: var(--space-3xl);
	}

	.main-container {
		padding: var(--space-lg);
		padding-top: 0;
	}

	/* Desktop Layout with Grid */
	.content-wrapper {
		display: grid;
		grid-template-columns: 280px 1fr;
		gap: var(--space-lg);
		align-items: start;
	}

	/* Desktop Sidebar */
	.desktop-sidebar {
		display: block;
		position: sticky;
		top: 20px;
	}



	.sidebar-title {
		font-size: var(--text-xs);
		font-weight: 500;
		color: var(--primary-blue);
		text-transform: uppercase;
		letter-spacing: var(--tracking-widest);
		margin-bottom: var(--space-lg);
		padding-left: 4px;
	}

	.sidebar-banner {
		margin-bottom: var(--space-lg);
	}

	.sidebar-banner img {
		width: 100%;
		height: auto;
		border-radius: 8px;
	}

	.desktop-nav-list {
		list-style: none;
	}

	.desktop-nav-item {
		margin-bottom: 2px;
	}

	.desktop-nav-link {
		display: block;
		padding: var(--space-sm) var(--space-md);
		color: var(--gray-text);
		text-decoration: none;
		font-size: var(--text-sm);
		font-weight: 400;
		border-radius: 8px;
		transition: all 0.2s ease;
		border-left: 3px solid transparent;
		line-height: var(--leading-snug);
		letter-spacing: var(--tracking-normal);
	}

	.desktop-nav-link:hover {
		background: rgba(114, 212, 250, 0.1);
		color: var(--primary-blue);
		border-left-color: var(--accent-blue);
		transform: translateX(3px);
	}

	.desktop-nav-link.active {
		background: rgba(114, 212, 250, 0.15);
		color: var(--primary-blue);
		font-weight: 500;
		border-left-color: var(--primary-blue);
	}

	.desktop-nav-link.cta {
		background: var(--accent-blue);
		color: var(--dark-text);
		font-weight: 500;
		margin-top: var(--space-md);
		text-align: center;
		border-left: none;
		box-shadow: 0 2px 8px rgba(114, 212, 250, 0.3);
	}

	.desktop-nav-link.cta:hover {
		background: rgb(104, 202, 240);
		transform: translateY(-2px);
		box-shadow: 0 4px 16px rgba(114, 212, 250, 0.4);
	}

	/* Main Content Area */
	.main-content {
		background: transparent;
	}

	.page-header {
		padding: var(--space-3xl) var(--space-4xl);
		margin-bottom: var(--space-2xl);
		box-shadow: var(--shadow-md);
	}

	.page-title {
		font-size: var(--text-5xl);
	}

	.page-description {
		font-size: var(--text-xl);
	}

	.featured-article {
		padding: var(--space-3xl);
	}

	.featured-article .article-title {
		font-size: var(--text-4xl);
	}

	.article-item {
		padding: var(--space-xl) var(--space-2xl);
	}

	.article-item:hover {
		padding-left: calc(var(--space-2xl) + 12px);
	}

	.article-title {
		font-size: calc(var(--text-2xl) + 2px);
	}

	.article-excerpt {
		font-size: var(--text-base);
	}

	/* Single Column List for Articles */
	.articles-grid {
		display: block;
	}
}

/* Large Desktop */
@media (min-width: 1440px) {
	/* Остается одна колонка */
}


body:has(.fullscreen-menu.active) header {
	z-index: 10000;
}

body:has(.fullscreen-menu.active) header .logo {
	opacity: 0;
	pointer-events: none;
}

body:has(.fullscreen-menu.active) header .desktop-menu {
	opacity: 0;
	pointer-events: none;
}


@media (max-width: 500px){
	.page-title {
		font-size: var(--text-3xl);
		word-break: break-word;
	}
	
	.featured-article .article-title {
		font-size: var(--text-2xl);
		word-break: break-word;
		padding-right: 0px;
	}
}