/* Настройки шрифтов */
body {
  font-family: "Manrope", sans-serif;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: all 0.3s ease;
}

/* Для английской версии */
html[lang="en"] body {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 400;
  letter-spacing: normal;
}

body[lang="ru"],
body[lang="kz"] {
  font-family: "Manrope", sans-serif;
  font-weight: 500;
  letter-spacing: -0.01em;
}

header {
  background-color: #000;
  border-bottom: 1px solid rgba(26, 86, 219, 0.2);
}

.nav {
  max-width: 60%;
  height: 80px;
  color: #fff;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px 0 20px;
}

.nav_logo a {
  color: #fff;
  font-weight: 500;
  font-size: 24px;
}

.navbar_list {
  display: flex;
  justify-content: space-around;
}

.navbar_list a {
  position: relative;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 300;
  font-size: 16px;
  text-decoration: none;
  transition: color 0.5s ease;
}

.navbar_list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  /* чуть ниже текста */
  width: 0%;
  height: 2px;
  background-color: rgba(26, 86, 219, 1);
  transition: width 0.3s ease;
}

.navbar_list a:hover {
  color: rgba(26, 86, 219, 1);
}

.navbar_list a:hover::after {
  width: 100%;
}

.navbar_item:not(:last-child) {
  margin-right: 50px;
}

/* Обёртка для language-selector — добавляем underline при ховере */
.language_select_wrapper {
  position: relative;
  display: inline-block;
}

.language_select_wrapper::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  height: 2px;
  width: 0%;
  background-color: rgba(26, 86, 219, 1);
  transition: width 0.3s ease;
}

.language_select_wrapper:hover::after {
  width: 50%;
}

.lang-switcher select {
  padding: 5px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.lang-switcher select:focus {
  outline: none;
  border-color: #1a56db;
}

/* Стили для самого select */
#language-selector {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 300;
  font-size: 16px;
  cursor: pointer;
  outline: none;
  appearance: none;
  padding-right: 20px;
}

/* Стили для выпадающих опций */
#language-selector option {
  color: #000;
  background-color: #fff;
}

/* При наведении на сам select (цвет текста меняется) */
#language-selector:hover {
  color: rgba(26, 86, 219, 1);
}

/* Hamburger button */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.hamburger span {
  height: 2px;
  width: 25px;
  background-color: #fff;
  border-radius: 1px;
  transition: 0.3s ease;
}

/* Sidebar */
.mobile_sidebar {
  position: fixed;
  top: 0;
  right: -100%;
  width: 250px;
  height: 100vh;
  background-color: #000;
  color: white;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 30px;
  transition: right 0.3s ease;
  z-index: 1000;
}

.mobile_sidebar.active {
  right: 0;
}

.mobile_nav_list {
  list-style: none;
  padding: 0;
}

.mobile_nav_list li {
  margin-bottom: 20px;
}

.mobile_nav_list a,
#language-selector-mobile {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 18px;
  background: transparent;
  border: none;
  font-weight: 300;
}

.mobile_sidebar {
  position: fixed;
  top: 0;
  right: -100%;
  width: 250px;
  height: 150vh;
  background-color: #000;
  color: #fff;
  padding: 20px;
  transition: right 0.3s ease;
  z-index: 1000;
  overflow-y: auto;
}

.mobile_sidebar.active {
  right: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .nav {
    max-width: 100%;
    padding: 0 16px;
    height: 60px;
  }

  .nav_logo a {
    font-size: 20px;
  }

  .hamburger {
    display: flex;
  }

  .hamburger-menu {
    font-size: 24px;
    cursor: pointer;
    color: #fff;
    padding: 10px;
    /* даём немного пространства */
  }

  .nav_navbar {
    display: none;
  }
}

main {
  background-color: #000;
  border-bottom: 1px solid rgba(26, 86, 219, 0.2);
  /* background: rgb(26,86,219);
background: radial-gradient(circle, rgba(26,86,219,1) 0%, rgba(12,38,98,1) 0%, rgba(0,0,0,1) 73%); */
}

.main {
  max-width: 60%;
  color: #fff;
  align-items: center;
  text-align: center;
  margin: auto;
  padding: 100px 20px 100px 20px;
}

.title {
  font-weight: 600;
  font-size: 96px;
  background: linear-gradient(135deg, #ffffff 0%, rgba(26, 86, 219, 0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: #ffffff;
  animation: fadeInUp 0.8s ease-out;
  margin-bottom: 20px;
}

@supports not (-webkit-background-clip: text) {
  .title {
    color: #ffffff;
    background: none;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.title_label {
  font-weight: 300;
  color: rgba(255, 255, 255, 0.8);
  font-size: 24px;
  margin-bottom: 25px;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.description {
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  width: 50%;
  margin: auto;
  line-height: 1.6;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

@media (max-width: 1024px) {
  .main {
    max-width: 80%;
    padding: 80px 20px;
  }

  .title {
    font-size: 64px;
  }

  .title_label {
    font-size: 20px;
  }

  .description {
    font-size: 16px;
    width: 70%;
  }
}

@media (max-width: 768px) {
  .main {
    max-width: 90%;
    padding: 60px 16px;
  }

  .title {
    font-size: 48px;
  }

  .title_label {
    font-size: 18px;
  }

  .description {
    font-size: 15px;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .title {
    font-size: 36px;
  }

  .title_label {
    font-size: 16px;
  }

  .description {
    font-size: 14px;
  }
}

.works {
  max-width: 60%;
  color: #fff;
  align-items: center;
  margin: auto;
  padding: 115px 20px 115px 20px;
}

.works_title {
  text-align: center;
  font-weight: 600;
  font-size: 48px;
  margin-bottom: 50px;
  background: linear-gradient(135deg, #ffffff 0%, rgba(26, 86, 219, 0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: #ffffff;
  animation: fadeInUp 0.6s ease-out;
}

@supports not (-webkit-background-clip: text) {
  .works_title {
    color: #ffffff;
    background: none;
  }
}

.cards_list {
  padding: 50px 0;
  color: #fff;
  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(300px, 1fr)
  ); /* Адаптивные колонки */
  gap: 30px;
  justify-items: center;
}

.card {
  width: 100%;
  max-width: 400px; /* Максимальная ширина карточки */
  box-sizing: border-box;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  animation: fadeInUp 0.6s ease-out both;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }

.card.hidden {
  display: none;
  opacity: 0;
  transform: scale(0.95);
  height: 0;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

/* Остальные стили без изменений */
.card a {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 12px;
}

.card a::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(26, 86, 219, 0.1) 0%, rgba(26, 86, 219, 0.3) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
  pointer-events: none;
  border-radius: 12px;
}

.card img {
  border-radius: 12px;
  margin-bottom: 15px;
  width: 100%;
  height: 321px; /* Фиксированная высота */
  object-fit: cover; /* Обрезаем изображение чтобы заполнить пространство */
  object-position: center; /* Центрируем изображение */
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  display: block;
}

/* Для мобильных устройств */
@media (max-width: 768px) {
  .cards_list {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
  }

  .card img {
    height: 250px;
  }
}

@media (max-width: 480px) {
  .cards_list {
    grid-template-columns: 1fr;
  }

  .card img {
    height: 300px;
  }
}

/* Остальные стили остаются без изменений */
.card_title {
  font-weight: 500;
  font-size: 24px;
  margin-bottom: 10px;
}

.card_description {
  display: inline;
  font-weight: 400;
  font-size: 14px;
  background: linear-gradient(135deg, rgba(26, 86, 219, 0.2) 0%, rgba(26, 86, 219, 0.3) 100%);
  padding: 5px 10px;
  border-radius: 100px;
  margin-top: auto; /* Прижимаем описание к низу карточки */
  border: 1px solid rgba(26, 86, 219, 0.3);
  transition: all 0.3s ease;
}

.card:hover .card_description {
  background: linear-gradient(135deg, rgba(26, 86, 219, 0.3) 0%, rgba(26, 86, 219, 0.4) 100%);
  border-color: rgba(26, 86, 219, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 86, 219, 0.2);
}

.card:hover {
  transform: translateY(-10px);
}

.card:hover img {
  transform: scale(1.05);
  box-shadow: 0 20px 40px rgba(26, 86, 219, 0.3);
}

.card:hover a::after {
  opacity: 1;
}

.card_title {
  font-weight: 500;
  font-size: 24px;
  margin-bottom: 10px;
}

.card_description {
  display: inline;
  font-weight: 400;
  font-size: 14px;
  background-color: rgba(26, 86, 219, 0.2);
  padding: 5px 10px;
  border-radius: 100px;
}

/* Новый класс для скрытых элементов */
.hidden {
  opacity: 0;
  height: 0;
  width: 0;
  margin: 0;
  padding: 0;
  pointer-events: none;
  transform: scale(0);
  transition: all 0.3s ease;
}

.quote {
  background: rgb(26, 86, 219);
  background: linear-gradient(
    40deg,
    rgba(26, 86, 219, 1) 0%,
    rgba(12, 41, 105, 1) 0%,
    rgba(5, 16, 42, 1) 0%,
    rgba(0, 0, 0, 1) 50%,
    rgba(5, 16, 42, 1) 100%,
    rgba(12, 41, 105, 1) 100%,
    rgba(26, 86, 219, 1) 100%
  );
  padding: 100px 20px 100px 20px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.quote::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(26, 86, 219, 0.1) 0%, transparent 70%);
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.quote_inner {
  max-width: 60%;
  margin: auto;
}

.quote_author {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
  font-size: 18px;
}

.quote_title {
  align-items: center;
  display: flex;
  flex-direction: column;
  font-weight: 500;
  font-size: 36px;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.8s ease-out;
}

.quote_title img {
  width: 9%;
  padding: 20px;
}

@media (max-width: 1024px) {
  .quote_inner {
    max-width: 80%;
  }

  .quote_title {
    font-size: 28px;
  }

  .quote_title img {
    width: 12%;
    padding: 16px;
  }

  .quote_author {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .quote_inner {
    max-width: 90%;
  }

  .quote_title {
    font-size: 24px;
  }

  .quote_title img {
    width: 16%;
    padding: 12px;
  }

  .quote_author {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .quote_title {
    font-size: 20px;
  }

  .quote_title img {
    width: 20%;
    padding: 10px;
  }

  .quote_author {
    font-size: 14px;
  }
}

.about {
  padding: 120px 20px 120px 20px;
  color: #fff;
}

.about_inner {
  max-width: 60%;
  margin: auto;
  display: flex;
  justify-content: space-between;
}

.about_info {
  width: 50%;
}

.about_title {
  font-weight: 600;
  font-size: 48px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #ffffff 0%, rgba(26, 86, 219, 0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: #ffffff;
  animation: fadeInUp 0.6s ease-out;
}

@supports not (-webkit-background-clip: text) {
  .about_title {
    color: #ffffff;
    background: none;
  }
}

.about_descr {
  font-weight: 400;
  font-size: 18px;
  color: #e0e0e0;
  margin-bottom: 30px;
}

.about_skills {
  color: #8b8b8b;
  font-weight: 400;
  font-size: 16px;
  display: flex;
}

.skills_first {
  width: 50%;
}

.skills_second {
  width: 50%;
}

.about_img {
  width: 40%;
  height: 80%;
}

.about_img {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
}

.about_img img {
  border-radius: 20px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.about_img:hover img {
  transform: scale(1.05);
  box-shadow: 0 20px 50px rgba(26, 86, 219, 0.4);
}

@media (max-width: 1024px) {
  .about_inner {
    max-width: 80%;
  }

  .about_title {
    font-size: 40px;
  }

  .about_descr {
    font-size: 17px;
  }

  .about_skills {
    font-size: 15px;
  }

  .about_img {
    width: 45%;
  }
}

@media (max-width: 768px) {
  .about_inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .about_info {
    width: 100%;
    margin-bottom: 40px;
  }

  .about_title {
    font-size: 36px;
  }

  .about_descr {
    font-size: 16px;
  }

  .about_skills {
    flex-direction: column;
    gap: 20px;
  }

  .skills_first,
  .skills_second {
    width: 100%;
  }

  .about_img {
    width: 100%;
  }

  .about_img img {
    width: 100%;
    height: auto;
  }
}

@media (max-width: 480px) {
  .about {
    padding: 80px 20px;
  }

  .about_title {
    font-size: 28px;
  }

  .about_descr {
    font-size: 15px;
  }

  .about_skills {
    font-size: 14px;
  }
}

footer {
  background-color: #000;
  padding: 40px 20px 40px 20px;
  width: 100%;
}

.footer {
  margin: auto;
  max-width: 60%;
  align-items: center;
}

.footer_inner {
  display: flex;
  justify-content: space-around;
  margin-bottom: 30px;
}

.footer_contacts a {
  color: #fff;
  font-size: 16px;
  transition: 0.4s ease;
}

.footer_contacts a:not(:last-child) {
  margin-bottom: 10px;
}

.footer_contacts a:hover {
  color: rgba(26, 86, 219, 1);
}

.social_media {
  width: 16%;
  margin: auto;
  justify-content: space-around;
  align-items: center;
  text-align: center;
  margin-bottom: 50px;
  display: flex;
}

.social_media a {
  background-color: #1d1a33;
  border-radius: 50%;
  width: 100%;
  height: 100%;
}

.social_media img {
  width: 100%;
  filter: invert(100%);
  padding: 26%;
}

.rights {
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  align-items: center;
}

@media (max-width: 1024px) {
  .footer {
    max-width: 80%;
  }

  .footer_inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer_contacts {
    margin-bottom: 20px;
  }

  .social_media {
    width: 50%;
    margin-bottom: 30px;
  }

  .social_media a {
    width: 50px;
    height: 50px;
  }

  .social_media img {
    padding: 25%;
  }

  .rights {
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .footer {
    max-width: 100%;
    padding: 40px 20px;
  }

  .footer_inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer_contacts a {
    font-size: 14px;
  }

  .social_media {
    width: 60%;
    margin-bottom: 40px;
  }

  .social_media a {
    width: 45px;
    height: 45px;
  }

  .social_media img {
    padding: 30%;
  }

  .rights {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .footer {
    padding: 20px 10px;
  }

  .footer_inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer_contacts a {
    font-size: 14px;
  }

  .social_media {
    width: 70%;
    margin-bottom: 20px;
  }

  .social_media a {
    width: 40px;
    height: 40px;
  }

  .social_media img {
    padding: 35%;
  }

  .rights {
    font-size: 12px;
  }
}

.language-change {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

/* Анимация смены языка */
[data-i18n],
[data-i18n-en],
.card_title,
.card_description {
  transition: opacity 0.3s ease, transform 0.3s ease;
}
