.container-specialist {
    width: 100%;
    max-width: 1440px;
    padding: 0 40px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 0.7fr 1.3fr;
    gap: 30px;
    background-color: var(--soft-white);
}

.card-and-filter{
	padding-top:50px;
}

.breadcrumbs{
	padding-top:150px;
}

.overlay{
	display:none;
}
.span-for-profile {
    letter-spacing: 2px;
}
.specialists-info {
    background: white;
    height: fit-content;
    padding: 15px 15px 30px 15px;
    border-radius: 10px;
    box-shadow: 0 2px 5px var(--shadow);
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.specialists-info img {
    border-radius: 20px;
	width:400px;
}

.name {
    margin-bottom: 0;
}

.description {
    margin-bottom: 0px;
}

.card__name {
    font-family: Gilroy;
font-weight: 600;
font-size: 32px;
line-height: 130%;
letter-spacing: 0%;
vertical-align: middle;
color: var(--soft-blue);
}


.review_descr {
    font-weight: 400;
    color: var(--dark-blue);
}


.specialist__text-card {
    font-size: 16px;
    line-height: 1.2;
    color: var(--dark-blue);
    overflow: hidden;
    max-height: 60px;
    transition: max-height 0.3s ease;
    position: relative; 
}

/* Градиент для текста, чтобы показать, что есть продолжение */
.specialist__text-card:not(.expanded)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to bottom, transparent, white);
}

.specialist__text-card.expanded {
    max-height: none;
}

.specialist__text-card.expanded::after {
    display: none;
}

/* Для динамического изменения текста кнопки */
.specialist-card__btn-about {
    color: var(--dark-blue);
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
    cursor: pointer;
    font-weight: 500;
}

.specialist-card__btn-about:hover {
    text-decoration: underline;
}


/* Общие стили для всех сворачиваемых текстов */
/* Стили для сворачиваемого текста "Как проходит сессия" */
.session-text {
    font-size: 16px;
    line-height: 1.2;
    color: var(--dark-blue);
    overflow: hidden;
    max-height: 60px;
    transition: max-height 0.3s ease;
    position: relative;
    margin-bottom: 5px;
}

/* Градиент для нераскрытого текста */
.session-text:not(.expanded)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to bottom, transparent, white);
    pointer-events: none;
	display: var(--hide-gradient, block);
}

/* Раскрытое состояние */
.session-text.expanded {
    max-height: 700px;
}

/* Убираем градиент при раскрытии */
.session-text.expanded::after {
    display: none;
}

/* Стили для кнопки */
.specialist-card__btn-about {
    color: var(--dark-blue);
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
    cursor: pointer;
    font-weight: 500;
}

.specialist-card__btn-about:hover {
    text-decoration: underline;
}

.p-span-methods{
	width:37vw;
}

.specialist__small-title {
font-weight: 600;
font-size: 18px;
line-height: 130%;
letter-spacing: 0%;
vertical-align: middle;

}


.specialist-photo-link {
    width: 100%;
    height: 100%;
    max-height: 450px;
    object-fit: cover;
    object-position: top;
}

.specialist-photo-link img {
    display: block;

}

#info-section-profile {
	width: 865px;
	border-radius: 16px;
    background-color: #fff;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#rating-profile{
	position: static;
	width:250px;
}

#rating-profile span {
    padding-right: 5px;
}

#button-profile{
	align-self:unset;
}

.specialist-card__content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.directions {
    margin-bottom: 0px;
}

.direction {
    font-size: 16px;
    padding: 12px 15px;
	background: #f0f0f0;
    border-radius: 20px;
    color: var(--soft-blue);
}

.direction-prof {
	margin:10px;
	width:fit-content;
    font-size: 16px;
    padding: 12px 15px;
	background: #f0f0f0;
    border-radius: 20px;
    color: var(--soft-blue);
}

.specialist__text{
/* 	display:flex;
	gap:10px; */
}

.small-title__card {
font-weight: 600;
font-size: 24px;
line-height: 130%;
letter-spacing: 0%;
vertical-align: middle;
color: var(--soft-blue);
}

.specialist-card__btn-about {
font-size: 16px;
line-height: 120%;
letter-spacing: 0%;
vertical-align: middle;
text-decoration: underline;
color:var(--soft-blue);
}

.specialist__text_list {
    padding: 0px 0 0 20px;
}

.specialist__text > .specialist__text_list {
    margin: 0;
    padding: 10px 0 0 20px;
}

.staj{
    display: flex;
	justify-content:center;
    gap: 10px;
    background-color: #EAECEC;
    width: 160px;
    padding: 10px;
    color: #476D8B;
    border-radius: 20px;
    border: 1px solid #476D8B33;
}

.specialist__photo-list {
  margin: 0;
  padding: 10px 0 0 0;
  list-style: none;
}

.specialist__photo-list-direction {
	display:flex;
	flex-wrap:wrap;
  margin: 0;
  padding: 10px 0 0 0;
  list-style: none;
}

.specialist__photo-item {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.specialist__photo-img {
  width: 70px;
  height: 48px;
  border-radius: 5px;
  opacity: 1;
  object-fit: cover;
  transform: rotate(0deg);
  flex-shrink: 0;
}

.specialist__photo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.specialist__diploma-title,
.specialist__diploma-year {
  vertical-align: middle;
}

.specialist__diploma-year {
  color: #666;
  margin-top: 2px;
}


.specialist__text > .directions {
    padding-top: 10px;
}

.specialist-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.specialist-popup.active {
  opacity: 1;
  pointer-events: all;
}

.specialist-popup__content {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 0 30px rgba(0,0,0,0.16);
  max-width: 80vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: popupSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.specialist-popup.active .specialist-popup__content {
  animation: popupSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.specialist-popup:not(.active) .specialist-popup__content {
  animation: popupSlideOut 0.3s ease forwards;
}

@keyframes popupSlideIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes popupSlideOut {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
}

.specialist-popup__img {
  max-width: 640px;
  max-height: 70vh;
  border-radius: 7px;
  display: block;
  object-fit: contain;
  animation: imgFadeIn 0.5s ease;
}

@keyframes imgFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.specialist-popup__close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 28px;
  color: var(--dark-blue);
  cursor: pointer;
  font-weight: bold;
  z-index: 10000;
  padding: 8px;
  line-height: 1;
  transition: color 0.2s, transform 0.2s;
}

.specialist-popup__close:hover {
  color: var(--soft-blue);
  transform: rotate(90deg);
}

.specialist-popup__close:active {
  transform: rotate(90deg) scale(0.9);
}


.article-small__slider {
  width: 100%;
}


.specialists-info-mob {
  display: none;
      background: white;
    height: fit-content;
    padding: 15px 15px 30px 15px;
    border-radius: 10px;
    box-shadow: 0 2px 5px var(--shadow);
    justify-content: center;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.additional-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.additional-info-cost {
font-weight: 600;
font-size: 18px;
line-height: 130%;
vertical-align: middle;

color: var(--soft-blue);
}

.additional-info-number {
  font-size: 24px;
  font-weight: 600;
  color: var(--soft-blue);
}

.additional-info-time {
font-size: 14px;
line-height: 130%;
letter-spacing: 0%;
vertical-align: middle;

color: var(--soft-blue);
}

.specialist-card {
	display: flex;
    background: var(--soft-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    max-width: 1069px;
    width: 100%;
    margin-bottom: 20px;
}

@media(max-width: 1440px){
	#specialist-prof{
		width:56vw;
	}
	#info-section-profile{
		width:56vw;
	}
	.specialists-info img{
		width:28vw;
	}
	.specialists-info{
		width:30vw;
	}
}

@media(max-width: 1024px) {
	.specialist-card__content{
		gap:unset;
	}
	.directions{
		margin-top:10px;
	}
	#info-section-profile{
		width:90vw;
	}
	#specialist-prof{
		width:90vw;
	}
	.main-content{
    	display: grid;
	}	
  .container-specialist {
    grid-template-columns:unset;
	  justify-content:center;
  }
    .specialists-info {
      display: none;
    }
  .specialists-info-mob {
    display: flex;
	  width:90vw;
	  align-items:unset;
	  gap:unset;
    
  }
	#suit-btn-pg-prof{
		width:100%;
	}
	.where-start__button-block{
		display:flex;
	}

	#button-profile{
		display:flex;
		justify-content:unset;
	}
    .article {
        padding: 100px 0;
    }

    .article__container {
        gap: 40px;
    }

    .article__container .about__button-block {
        margin-top: 20px;
    }

    .article__header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }

    .article__image {
        height: 180px;
    }

    .article__content {
        padding: 20px;
    }

        .review__header .h2 {
    margin: 0;
}
    .review {
        padding: 100px 0;
    }

    .review__container {
        gap: 40px;
    }

    .review__header {
        flex-direction: row;
        align-items: center;
        text-align: center;
        gap: 20px;
    }

    .review__description {
        font-size: 16px;
    }

    .review__card {
        min-height: 220px;
        padding: 20px;
    }

    .review__arrows {
        align-self: flex-end;
    }

.specialists-info-mob img {
  width: 100%;
        height: 400px;
        object-fit: cover;
        object-position: 0px 0px;
        align-self: center;
}

    .specialist-card {
      width: 95%;
    }
	.specialist__photo-list-direction{
		display:block;
	}
}

/* Мобильные */
@media(max-width: 768px) {
    .article {
        padding: 80px 0;
    }

    .article__header .h2 {
        margin-bottom: 0;
    }

    .article__header {
        align-items: flex-start;
        text-align: left;
        flex-direction: row;
    }

    .article__arrow {
        width: 40px;
        height: 40px;
    }

    .article__image {
        height: 160px;
    }

    .article__title {
        font-size: 18px;
    }

    .article__description {
        font-size: 14px;
    }

    .article__arrows {
        align-self: flex-end;
    }

    .article__card {
        min-height: 300px;
    }

      .review {
        padding: 80px 0;
    }

    .review__header {
        align-items: flex-start;
        text-align: left;
    }

    .review__description {
        font-size: 15px;
    }

    .review__arrow {
        width: 40px;
        height: 40px;
    }

    .review__card-header {
        flex-direction: column;
        gap: 30px;
        margin-bottom: 80px;
    }

    .review__stars {
        order: -1;
        align-self: flex-start;
    }
.review__container .about__button-block {
    margin-top: 20px;
}
}

/* Маленькие мобильные */
@media (max-width: 480px) {
    .article {
        padding: 60px 0;
    }

    .article__image {
        height: 140px;
    }

    .article__content {
        padding: 15px;
    }

    .article__title {
        font-size: 16px;
    }

    .article__description {
        font-size: 13px;
    }

    .article__arrow {
        width: 36px;
        height: 36px;
    }
      .review {
        padding: 60px 0;
    }

    .review__description {
        font-size: 14px;
    }

    .review__client-name {
        font-size: 20px;
    }

    .review__text {
        font-size: 14px;
    }

    .review__arrow {
        width: 36px;
        height: 36px;
    }
    .where-start-svg-1{
        display: none;
        padding-top: 20px;
        padding-left: 150px;
    }

    .advantages__header-block-svg{
        display: none;
    }
}

/* Скрываем часть сертификатов */
.certificates-container {
    max-height: 100px; /* Высота, при которой виден только первый сертификат */
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.certificates-container.expanded {
    max-height: 2000px; /* Достаточно для отображения всех сертификатов */
}