/* Global Colors */
:root {
  --background-color: #ffffff;
  --background-color-rgb: 255, 255, 255;
  --default-color: #212529;
  --default-color-rgb: 33, 37, 41;
  --accent-color: #e84545;
  --accent-color-rgb: 232, 69, 69;
  --heading-color: #32353a;
  --heading-color-rgb: 50, 53, 58;
  --contrast-color: #ffffff;
  --contrast-color-rgb: 255, 255, 255;
}


/*--------------------------------------------------------------
# Preloader
--------------------------------------------------------------*/
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: hidden;
  background-color: var(--background-color);
  transition: all 0.6s ease-out;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preloader-dots {
  display: flex;
  gap: 10px; /* расстояние между точками */
}

#preloader .preloader-dots div {
  width: 13px;
  height: 13px;
  background-color: var(--color-violete);
  border-radius: 50%;
  animation: dot-grow-shrink 1.2s ease-in-out infinite both;
}

#preloader .preloader-dots div:nth-child(1) {
  animation-delay: 0s;
}

#preloader .preloader-dots div:nth-child(2) {
  animation-delay: 0.2s;
}

#preloader .preloader-dots div:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dot-grow-shrink {
  0% {
    transform: scale(0.8);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(0.8);
    opacity: 0.7;
  }
}

/*--------------------------------------------------------------
# Disable aos animation delay on mobile devices
--------------------------------------------------------------*/
@media screen and (max-width: 768px) {
  [data-aos-delay] {
    transition-delay: 0 !important;
  }
}


/*--------------------------------------------------------------
# Section Title
--------------------------------------------------------------*/
.header__title-container{
	position: relative;
	z-index: 0;
	padding-bottom: 50px;
}


/*--------------------------------------------------------------
# Home Page
--------------------------------------------------------------*/
/* Categories
------------------------------*/

.categories__container{
	position: relative;
	padding-bottom: 46px;
}
.categories__wrapper{
	display: flex;
	flex-wrap: wrap;
	background-color: #ffffff;
	padding: 12px 23px;
}
.categories__wrapper span{
	margin-bottom: 10px;
}

.categories__wrapper span:not(:last-child){
	margin-right: 19px;
}
.categories__wrapper span a{
	color: var(--color-light-black);
}

.categories__wrapper span {
    position: relative; /* Базовое позиционирование для псевдоэлементов */
}

.categories__wrapper span a {
    color: var(--color-light-black);
}

.categories__wrapper span:hover {
    /* Убираем стандартное underline, чтобы избежать конфликта */
    text-decoration: none;
}

/* Общий стиль для полосы: применяется на hover для всех span и всегда для active */
.categories__wrapper span:hover::after,
.__activeCategory::after {
    content: '';
    position: absolute;
    bottom: -5px; /* Отступ от текста */
    left: 0;
    right: 0;
    height: 1px; /* Толщина полосы */
    background-color: var(--color-light-black); /* Цвет полосы */
}

/* Жирный шрифт только для активной категории */
.__activeCategory a {
    font-weight: 700;
}

@media screen and (max-width: 610px) {
	.categories__wrapper span {
		margin-right: 15px;
	}
	.categories__wrapper span:last-child {
		margin-right: 0px;
	}
}

/* Посты
------------------------------*/
.posts__container {
    display: flex;
    flex-wrap: wrap;
    gap: 19px;
		margin-bottom: 49px;
}
.posts__item {
}
.post__item--50 {
    flex: 0 0 calc(50% - 9.5px);
    min-width: calc(50% - 9.5px);
}
.post__item--33 {
    flex: 0 0 calc(33.333% - 12.666px); /* 19px ? 2 ? 3 = 12.666px */
    min-width: calc(33.333% - 12.666px);
}
.post__item-wrapper{
	padding: 19px 30px 57px 30px;
	background-color: #ffffff;
	height: 100%;
}
.posts__item-img{
	 width: 100%;
  /* Полифил для aspect-ratio */
  height: 0;
  padding-top: 56.25%; /* 9/16 = 0.5625 (56.25%) для 16:9 */
  position: relative;
  overflow: hidden;
  /* Современный способ */
  aspect-ratio: 16 / 9;
	margin-bottom: 9px;
}
.posts__item-img img {
	position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.posts__info{
    display: flex;
    font-family: Inter,var(--replacement-fonts);
    margin-bottom: 17px;
    align-items: flex-start;
    gap: 12px;
}
.posts__info-category--text,
.posts__info-category--text a{
  color: var(--color-light-black);
  font-size: 14px;
  font-weight: 400;
}
.diamond-separator {
    width: 6px;
    height: 6px;
    background-color: var(--color-violete);
    transform: rotate(45deg);
		flex-shrink: 0;
		margin-top: 0.4em;
}
.posts__item-title{
	font-family: Inter,var(--replacement-fonts);
	color: var(--color-light-black);
	font-size: 23px;
	font-weight: 700;
	line-height: 150%;
}
.posts__btn{
	display: flex;
	justify-content: center;
	margin-bottom: 53px;
}
/* Fade animation classes */
.posts-item--fade-initial {
  opacity: 0;
  transform: translateY(20px);
}

.posts-item--fade-active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Slide animation classes */
.posts-item--slide-initial {
  opacity: 0;
  transform: translateY(30px);
  max-height: 0;
  overflow: hidden;
}

.posts-item--slide-active {
  opacity: 1;
  transform: translateY(0);
  max-height: 500px;
  transition: opacity 0.4s ease, transform 0.4s ease, max-height 0.4s ease;
}

@media screen and (max-width: 1600px) {
	.posts__item-title {
		font-size: 19px;
	}
	.post__item-wrapper{
		padding: 19px 25px 57px 25px;
	}
}
@media screen and (max-width: 1375px) {
	.posts__item-title {
		font-size: 18px;
	}
	.post__item-wrapper{
		padding: 17px 20px 57px 20px;
	}
}
@media screen and (max-width: 950px) {
	.post__item--33 {
		flex: 0 0 calc(50% - 9.5px); /* 19px ? 2 ? 3 = 12.666px */
		min-width: calc(50% - 9.5px);
	}
}
@media screen and (max-width: 620px) {
	.post__item--33,
	.post__item--50	{
		flex: 0 0 100%;
		min-width: 100%;
	}
}

/*--our-help--*/
.our-help__body {
	position: relative;
	padding-top: 85px;
	padding-bottom: 104px;
}

.our-help__container {
	position: relative;
}

.our-help__fb {
	background-color: var(--color-violete);
}

.our-help__pattern-left {
	position: absolute;
	z-index: 0;
	top: 10%;
	left: 0;
	width: 309px;
}

.our-help__pattern-right {
	position: absolute;
	z-index: 0;
	top: 40%;
	right: 0;
	width: 294px;
}

.our-help__pattern-bottom {
	position: absolute;
	z-index: 0;
	bottom: 0px;
	left: 7%;
	width: 85px;
}

.our-help__pattern-right-mob {
	display: none;
}

@media screen and (max-width: 1880px) {
	.our-help__pattern-bottom {
		left: -1%;
	}
}

@media screen and (max-width: 980px) {

	.our-help__pattern-bottom,
	.our-help__pattern-right,
	.our-help__pattern-left {
		display: none;
	}

	.our-help__pattern-right-mob {
		display: block;
		position: absolute;
		z-index: 1;
		top: 1%;
		right: 7%;
		width: 107px;
	}
}

@media screen and (max-width: 1000px) {
	.our-help__body {
		padding-top: 0px;
	}
}

@media screen and (max-width: 825px) {
	.our-help__body {
		padding-top: 55px;
	}
}