@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap");

:root {
  --primary-color: #2d3748;
  --secondary-color: #2932fd;
  --items-color: #4bfbb0;
}

html {
  scroll-behavior: smooth;
}

* {
  font-family: "Roboto", sans-serif;
  margin: 0;
  padding: 0;
}

a {
  text-decoration: none;
}

.fade-in-section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease-out, transform 1s ease-out;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.wrapper {
  max-width: 87.5rem;
  margin: 0 auto;
  padding: 0 8.75rem;
}

.header {
    background-color: #f5f5f5;
    z-index: 10;
    position: relative;
}

.header_content {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-top: 4.1875rem;
    padding-bottom: 1.6875rem;
}

.header_list {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

.header_item {
    padding: 0;
}

.header_link {
    font-size: 1.25rem;
    color: var(--primary-color);
    text-decoration: none;
    padding: 10px 15px;
    position: relative;
    display: inline-block;
}

.header_link::after {
    content: '';
    position: absolute;
    left: 0%;
    bottom: 5px;
    width: 100%;
    height: 1px;
    background-color: var(--secondary-color);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease-out;
}

.header_link:hover {
    color: var(--secondary-color);
}

.header_link:hover::after {
    transform: scaleX(1);
}

.header_link.is-active {
    color: var(--secondary-color);
}

.header_link.is-active::after {
    content: '';
    position: absolute;
    left: 0%;
    bottom: 5px;
    width: 100%;
    height: 1px;
    background-color: var(--secondary-color);
    transform: scaleX(1);
}

.contact_us_item {
    background-color: var(--items-color);
    border-radius: 10px;
    text-align: center;
    margin-left: 1.5rem;
    font-weight: 700;
}

.contact_us_link {
    padding: 10px 25px;
    display: block;
    color: var(--primary-color);
}

.contact_us_item:hover {
    background-color: var(--secondary-color);
    transition: all 0.3s ease;
}

.contact_us_item:hover .contact_us_link {
    color: white;
}

.contact_us_link::after {
    display: none;
}

.burger_menu {
    display: none;
    cursor: pointer;
    z-index: 10;
}

.burger_menu span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 5px 0;
    transition: all 0.3s ease;
    z-index: 5;
}

.header_head {
    display: flex;
    align-items: center;
    gap: 3.4375rem;
    margin-bottom: 3.375rem;
}

.header_text {
    display: flex;
    flex-direction: column;
}
.header_text_p {
    font-size: 1.375rem;
    font-weight: 100;
}
.header_text_h1 {
    font-size: 4.5rem;
    font-weight: 700;
}
.header_text_p2 {
    font-size: 1.25rem;
    font-weight: 300;
}

.header_line_container {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.header_line_scroller {
    display: flex;
    width: 200%;
    animation: scroll-left 30s linear infinite;
}

.header_line_scroller img {
    width: 50%;
    display: block;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* burger */
.burger_menu {
  display: none;
  cursor: pointer;
  z-index: 10;
}

.burger_menu span {
  display: none;
  width: 25px;
  height: 3px;
  background-color: var(--primary-color);
  margin: 5px 0;
  transition: all 0.3s ease;
  z-index: 5;
}

.burger_menu.is-active span:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  z-index: 6;
}

.burger_menu.is-active span:nth-child(2) {
  opacity: 0;
  z-index: 6;
}

.burger_menu.is-active span:nth-child(3) {
  top: 50%;
  transform: translateY(-50%) rotate(-45deg);
  z-index: 6;
}

body.menu-open {
  overflow: hidden; 
}

@media (max-width: 1024px) {
  .wrapper {
    padding: 0 1.5rem;
  }

  .header_content {
    padding-top: 0;
    padding-bottom: 0;
    min-height: 1px; 
  }

  .burger_menu {
    display: block;
    position: fixed; 
    top: 4.5rem;
    right: 1.5rem;
  }

  .burger_menu span {
    display: block;
  }

  .header_list {
    position: fixed;
    top: 0;
    right: -100%;

    width: 100%;
    height: 100vh;
    background-color: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);

    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0;
    text-align: center;

    transition: right 0.4s ease-in-out;
    z-index: 5;
  }

  .header_list.is-open {
    right: 0;
  }

  .header_item.contact_us_item {
    background-color: transparent;
    margin-left: 0;
    border-radius: 0;
  }
  .contact_us_item:hover {
    background-color: transparent;
  }
  .contact_us_link {
    color: var(--primary-color);
  }
  .contact_us_item:hover .contact_us_link {
    color: var(--secondary-color);
  }

  .header_head {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }

  .header_text_h1 {
    font-size: 3rem;
  }

  .header_logo {
    margin-top: 6rem;
  }
}

/* main */

.titles {
  font-weight: 600;
  font-size: 2.625rem;
  text-transform: uppercase;
  color: var(--primary-color);
}

.highlited {
    position: relative;
    display: inline-block;
    isolation: isolate; 
}

.highlited::after {
    content: "";
    position: absolute;
    bottom: 5px;
    left: 5px;
    width: 100%;
    height: 10px;
    background-color: var(--items-color);
    z-index: -1;
    transform: scaleX(0); 
    transform-origin: left; 
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
}

.highlited.is-visible::after {
    transform: scaleX(1);
}

.advantages {
  display: flex;
  gap: 4.6875rem;
  justify-content: space-between;
  align-items: center;
  margin-top: 5.125rem;
  margin-bottom: 4.6875rem;
}
.advantages_list {
  display: flex;
  flex-direction: column;
  gap: 3.4375rem;
}
.advantages_items {
  width: 600px;
  list-style: none;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  background: linear-gradient(
    0.75turn,
    rgba(75, 251, 176, 0.1),
    rgba(75, 251, 176, 0.03)
  );
  border-radius: 3.125rem;
}
.advantage_text {
  display: flex;
  align-items: center;
  color: var(--primary-color);
  font-size: 1.25rem;
  margin-bottom: 0.625rem;
}
.b900 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-left: 0.3125rem;
}
.advantage_text img {
  width: 42px;
  margin-right: 10px;
}

@media (max-width: 1600px) {
  .advantages_image img {
    width: 500px;
  }
  .advantages_items {
    width: auto;
  }
}

@media (max-width: 1335px) {
  .advantages {
    flex-direction: column-reverse;
    align-items: center;
    justify-content: center;
  }
  .titles {
    text-align: center;
  }
}
@media (max-width: 575px) {
  .advantages_image img {
    width: 300px;
  }
}


.us {
  background-color: #f5f5f5;
}

.us_content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12.5rem;
  padding: 32px 0;
}

.us_image {
  margin-left: -12.5rem; 
}

.us_image img {
  margin-left: 0; 
}

.what-we-do .us_image {
  margin-left: -2.5rem;
}

.what-we-do .us_image img {
  margin-left: 0;
}

.us_p_text {
  float: right;
  font-size: 1.25rem;
  margin-top: 4.3125rem;
}

@media (max-width: 1335px) {
  .us_content {
    gap: 0.625rem;
    flex-direction: column;
    justify-content: center;
  }
  .us_p_text {
    text-align: center;
    margin: 0;
    align-items: center;
    float: none;
    margin-top: 0.625rem;
  }
  .us_image {
    margin-left: 0; /* Убираем отрицательную маржу для мобильных */
  }
  .us_image img {
    width: 600px;
  }
}

@media (max-width: 575px) {
  .us_image img {
    width: 300px;
  }
}

@media (max-width: 320px) {
  .us_image img {
    width: 15.625rem;
  }
}

.background {
  margin-top: 6.25rem;
  margin-bottom: 6.25rem;
}
.background_content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12.5rem;
  padding: 32px 0;
}
.background_text {
  display: flex;
  flex-direction: column;
}
.background_p_text {
  margin-top: 4.0625rem;
  margin-left: 4.75rem;
  font-size: 1.25rem;
}

.background_image {
    margin-right: -10.625rem; 
    width: 50.625rem; 
}

.background_image img {
    margin-right: 0; 
    width: 100%; 
}

@media (max-width: 1440px) {
  .background_image {
    width: 37.5rem;
    margin-right: -3.125rem;
  }
  .background_p_text {
    margin-left: 0.625rem;
  }
}

@media (max-width: 1335px) {
  .background_content {
    flex-direction: column-reverse;
    gap: 0.625rem;
  }
  .background_image {
    margin-right: 0; /* Убираем отрицательную маржу для мобильных */
    width: auto;
  }
  .background_image img {
    width: 600px;
  }
}

@media (max-width: 1024px) {
  .background_content {
    gap: 1.25rem;
  }
  .background_p_text {
    margin-top: 0.625rem;
    text-align: center;
    margin-left: 0;
  }
}

@media (max-width: 575px) {
  .background_image img {
    width: 18.75rem;
  }
}

@media (max-width: 320px) {
  .background_image img {
    width: 15.625rem;
  }
}

.us_list {
  padding: 1.5625rem;
  background: linear-gradient(
    1turn,
    rgba(75, 251, 176, 0.1),
    rgba(75, 251, 176, 0.03)
  );
  margin-top: 5.125rem;
  border-radius: 3.125rem;
}
.us_item {
  margin-left: 2.1875rem;
  font-size: 1.25rem;
  line-height: 2.1875rem;
}

.meet_team {
  margin-top: 6.25rem;
}
.meet_team_content {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 8.125rem;
}
.meet_team_title {
  padding: 0.9375rem;
  background: linear-gradient(
    1turn,
    rgba(75, 251, 176, 0.1),
    rgba(75, 251, 176, 0.03)
  );
  color: #291946;
  font-size: 2.625rem;
  font-weight: 600;
  width: 27rem;
  text-align: center;
  border-radius: 3.125rem;
  margin: 0 auto;
}

.people {
  margin-top: 5.625rem;
}

@media (max-width: 1440px) {
  .people {
    width: 75rem;
  }
}

@media (max-width: 1024px) {
  .people {
    width: 56.25rem;
  }
}

@media (max-width: 786px) {
  .people {
    width: 40.625rem;
  }
}

/* 🚀 Добавления/Изменения для мобильной адаптации 🚀 */

@media (max-width: 425px) {
  /* Общие стили */
  .titles {
    font-size: 2rem; /* Уменьшаем заголовок */
  }

  /* Header */
  .header_logo img {
    width: 100px; /* Уменьшаем логотип */
  }
  .header_text_p, .header_text_p2 {
    font-size: 1rem; /* Уменьшаем текст хедера */
  }
  .header_text_h1 {
    font-size: 2.5rem; /* Уменьшаем главный заголовок */
  }
  .header_logo {
      margin-top: 3rem; /* Сдвигаем лого вверх */
  }

  /* Advantages section */
  .advantages {
    margin-top: 3rem;
    margin-bottom: 3rem;
  }
  .advantages_list {
    gap: 1.5rem;
  }
  .advantages_items {
    padding: 1rem;
    border-radius: 1.5rem;
  }
  .advantage_text {
    font-size: 1rem; /* Уменьшаем текст преимуществ */
  }
  .advantage_text img {
    width: 32px; /* Уменьшаем иконки преимуществ */
  }

  /* About Us and Background sections (General Content Blocks) */
  .us_content, .background_content {
    gap: 1rem;
    padding: 16px 0;
  }
  .us_p_text, .background_p_text {
    font-size: 1rem; /* Уменьшаем основной текст */
    line-height: 1.4;
    text-align: center !important;
  }

  .us_image img, .background_image img {
    width: 100%; /* Картинки занимают всю доступную ширину */
    max-width: 20rem; 
    height: auto;
  }
  .background {
    margin-top: 3rem;
    margin-bottom: 3rem;
  }

  /* What We Do section */
  .us_list {
    margin-top: 2rem;
    border-radius: 1.5rem;
    padding: 1rem;
  }
  .us_item {
    margin-left: 1rem;
    font-size: 1rem;
    line-height: 1.8rem;
  }

  /* Meet Team section */
  .people {
    width: 90vw; /* Картинка с людьми занимает почти всю ширину */
    margin-top: 3rem;
  }
  .meet_team_title {
    width: 90%;
    font-size: 1.5rem;
    border-radius: 1.5rem;
  }
  .meet_team {
    margin-top: 3rem;
    margin-bottom: 3rem !important; /* Коррекция маржи */
    display: flex; /* Снова показываем для 425px, если нужно */
  }
}

@media (max-width: 375px) {
  .header_head {
      margin-bottom: 2rem;
  }
}

@media (max-width: 320px) {
  .header_logo {
    margin-top: 5rem; 
  }
  .header_text_h1 {
    font-size: 2rem;
  }
  .header_text_p, .header_text_p2 {
    font-size: 0.9rem;
  }
  .burger_menu {
    top: 2.5rem;
    right: 1rem;
  }
  .us_image img, .background_image img {
    max-width: 18rem; 
  }
}

/* Конец Добавлений/Изменений для мобильной адаптации */


.background_image img, .us_image img {
    /* Добавляем плавный переход для анимации масштабирования */
    transition: transform 0.5s ease; 
    /* Устанавливаем начальное масштабирование 100% */
    transform: scale(1);
    
    /* Сохраняем остальные стили, которые были у картинок */
    display: block; /* Важно для избежания лишнего пространства */
}

.background_image img:hover, .us_image img:hover {
    /* Масштабируем изображение при наведении */
    transform: scale(1.1); 
}


/* team */
.team {
  margin: 140px 0;
}
.wrapper {
}
.team_content {
  padding: 140px auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.team_text {
  display: flex;
  flex-direction: column;
}
.titles {
}
.team_p {
  font-size: 20px;
}
.team_image {
}

@media (max-width: 1024px) {
  .team_content{
    flex-direction: column-reverse;
    gap: 20px;
  }
}

@media (max-width: 425px) {
  .team_image img {
    width: 300px;
  }
}

.team2{
  background-color: #f5f5f5;
  padding: 140px 0;
}

.team_content2 {
  padding: 140px auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@media (max-width: 1024px) {
  .team_content2{
    flex-direction: column;
    gap: 20px;
  }
}

/* footer */

.footer {
    background-color: #f5f5f5;
    padding-top: 5rem;
}

.footer_content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3.5rem;
    padding-bottom: 4.6875rem;
}

.footer_menu_list {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 3.25rem;
}

.footer_menu_link {
    font-size: 1.25rem;
    color: var(--primary-color);
    text-decoration: none;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s ease-out;
    display: inline-block;
}

.footer_menu_link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background-color: var(--secondary-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease-out;
}

.footer_menu_link:hover {
    color: var(--secondary-color);
}

.footer_menu_link:hover::after {
    transform: scaleX(1);
}

.footer_menu_link.is-active {
    color: var(--secondary-color);
}

.footer_menu_link.is-active::after {
    transform: scaleX(1);
}

.footer_contact_us_button {
    font-size: 1.25rem;
    padding: 0.625rem 1.5625rem;
    text-align: center;
    text-decoration: none;
    background-color: var(--items-color);
    border-radius: 0.625rem;
    color: var(--primary-color);
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease, color 0.3s ease-out, box-shadow 0.3s ease-out;
}

.footer_contact_us_button:hover {
    background-color: var(--secondary-color);
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.footer_copyright {
    color: #718096;
    font-size: 0.875rem;
    margin-top: 1rem;
}

@media (max-width: 26.5625rem) {
    .footer_menu_list {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
}

/* portfolio */

.portfolio {
}
.portfolio_content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; 
}
.portfolio_text {
  padding: 0 50px;
  flex-basis: 50%;
  box-sizing: border-box;
}
.portfolio_p{
  margin-top: 10px;
}

.portfolio_slider {
  flex-basis: 50%;
  position: relative;
  aspect-ratio: 16 / 9; 
  border-radius: 8px;
  overflow: hidden;
}

.slider_slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 1;
}

.slider_slide.active {
  opacity: 1;
  z-index: 2;
}

.slider_slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slider_button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 10px 15px;
  font-size: 20px;
  cursor: pointer;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  line-height: 20px;
  text-align: center;
  z-index: 10;
  transition: background-color 0.3s ease;
  font-weight: 900;
}

.slider_button:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.slider_button_prev {
  left: 10px;
}

.slider_button_next {
  right: 10px;
}

.slider_dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.slider_dot {
  width: 12px;
  height: 12px;
  background-color: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.slider_dot.active {
  background-color: white;
}

/* Адаптация для мобильных (без изменений) */
@media (max-width: 768px) {
  .portfolio_content {
    flex-direction: column;
  }

  .portfolio_text,
  .portfolio_slider {
    flex-basis: auto; /* Сбрасываем basis */
    width: 100%;   /* Устанавливаем ширину */
  }

  .portfolio_text {
    padding: 20px;
    order: 2;
    box-sizing: border-box; /* Добавляем на всякий случай, чтобы padding не ломал ширину */
  }
  
  .portfolio_slider {
    order: 1;
    aspect-ratio: 4 / 3; /* Теперь это сработает, так как есть 'width: 100%' */
  }
}

.portfolio-reversed .portfolio_content {
  flex-direction: row-reverse;

}
.portfolio-reversed{
  background-color: #f5f5f5;
}

/* error */
.error{
  width: 100%;
  text-align: center;
  padding-top: 40px;
  padding-bottom: 40px;
  color: #718096;
}