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);
}

.main_inner {
  max-width: 60%;
  margin: auto;
  padding: 0 20px 0 20px;
}

/* Default styles */
.works_info {
  position: relative;
  padding: 250px 0;
  z-index: 1;
  overflow: hidden;
  margin-bottom: 50px;
}

.works_info::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("../images/worksInfo.png");
  background-size: cover;
  background-position: center;
  opacity: 0.3;
  z-index: -1;
}

.works_author {
  font-weight: 600;
  font-size: 60px;
  color: #fff;
  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;
  animation: fadeInUp 0.8s ease-out;
}

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

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

.works_skills {
  font-weight: 400;
  font-size: 20px;
  color: #fff;
}

/* Responsive styles */
@media (max-width: 1024px) {
  .works_info {
    padding: 180px 0;
  }

  .works_author {
    font-size: 50px;
  }

  .works_skills {
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  .works_info {
    padding: 150px 0;
  }

  .works_author {
    font-size: 40px;
  }

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

@media (max-width: 480px) {
  .works_info {
    padding: 120px 0;
  }

  .works_author {
    font-size: 30px;
  }

  .works_skills {
    font-size: 14px;
    text-align: center;
  }
}

/* Default styles */
.category_list {
  color: #fff;
  display: flex;
  width: 33%;
  justify-content: space-between;
  align-items: center;
}

.category_list li {
  position: relative;
  z-index: 1;
}

.category_item {
  display: flex;
  align-items: center;
  border: 2px solid #1a56db;
  border-radius: 20px;
  padding: 5px 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  min-width: fit-content;
  flex-shrink: 0;
}

.category_item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(26, 86, 219, 0.3), transparent);
  transition: left 0.5s ease;
  pointer-events: none;
  border-radius: 20px;
  z-index: 0;
}

.category_item:hover::before {
  left: 100%;
}

.category_item:hover {
  background: linear-gradient(135deg, rgba(26, 86, 219, 0.9) 0%, rgba(26, 86, 219, 1) 100%);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(26, 86, 219, 0.4);
  border-color: rgba(26, 86, 219, 0.8);
}

.category_item * {
  position: relative;
  z-index: 1;
}

/* Responsive styles */
/* Tablet: до 1024px */
@media (max-width: 1024px) {
  .category_list {
    width: 80%;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 0 auto;
  }

  .category_item {
    padding: 8px 18px;
    font-size: 16px;
    white-space: nowrap;
    min-width: fit-content;
  }

  .cards_list {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/* Mobile: до 768px */
@media (max-width: 768px) {
  .category_list {
    width: 90%;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
  }

  .category_item {
    padding: 8px 14px;
    font-size: 14px;
    white-space: nowrap;
    min-width: fit-content;
  }

  .cards_list {
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
  }
}

/* Small phones: до 480px */
@media (max-width: 480px) {
  .category_list {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    padding: 10px;
  }

  .category_item {
    padding: 6px 12px;
    font-size: 13px;
    white-space: nowrap;
    min-width: fit-content;
  }

  .cards_list {
    grid-template-columns: 1fr;
    padding: 30px 0;
    gap: 15px;
  }
}

.cards_list {
  padding: 50px 0;
  color: #fff;
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 columns by default */
  gap: 30px;
  justify-items: center;
  width: 100%;
}

/* Main Container - Applied to cards-wrapper */
.cards-wrapper {
  width: 100%;
  padding: 50px 0;
  color: #fff;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  justify-items: center;
}

/* Card Styles */
.card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  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:nth-child(7) { animation-delay: 0.7s; }
.card:nth-child(8) { animation-delay: 0.8s; }
.card:nth-child(9) { animation-delay: 0.9s; }

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

.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: 400px;
  height: 421px;
  object-fit: cover;
  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;
}

.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;
  line-height: 1.3;
}

.card_description {
  display: inline-block;
  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;
  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);
}

/* Enhanced Media Queries */
@media (max-width: 1200px) {
  .cards-wrapper {
    gap: 25px;
  }
  .card img {
    height: 380px;
  }
}

@media (max-width: 1024px) {
  .cards-wrapper {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }
  .card img {
    height: 350px;
  }
}

@media (max-width: 768px) {
  .cards-wrapper {
    grid-template-columns: 1fr;
    padding: 30px 20px;
    gap: 25px;
  }
  .card img {
    height: 400px;
  }
  .card_title {
    font-size: 20px;
  }
  .card_description {
    font-size: 13px;
  }
}

@media (max-width: 600px) {
  .card img {
    height: 350px;
  }
}

@media (max-width: 480px) {
  .cards-wrapper {
    padding: 25px 15px;
  }
  .card img {
    height: 300px;
  }
  .card_title {
    font-size: 18px;
  }
  .card_description {
    font-size: 12px;
    padding: 4px 8px;
  }
}

@media (max-width: 360px) {
  .card img {
    height: 250px;
  }
}

.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin: 40px 0;
  gap: 10px;
  padding: 0 10px;
}

.pagination-btn {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(26, 86, 219, 0.3);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 16px;
  color: #fff;
  font-weight: 500;
}

.pagination-btn:hover {
  background: rgba(26, 86, 219, 0.2);
  border-color: rgba(26, 86, 219, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 86, 219, 0.3);
}

.pagination-btn.active {
  background: linear-gradient(135deg, rgba(26, 86, 219, 0.9) 0%, rgba(26, 86, 219, 1) 100%);
  color: white;
  border-color: rgba(26, 86, 219, 1);
  box-shadow: 0 4px 15px rgba(26, 86, 219, 0.4);
  transform: translateY(-2px);
}

/* Media Queries for Responsiveness */

/* Medium screens (tablets, large phones) */
@media (max-width: 1024px) {
  .pagination-btn {
    padding: 6px 12px; /* smaller padding */
    font-size: 14px; /* smaller font size */
  }
}

/* Small screens (phones) */
@media (max-width: 768px) {
  .pagination-btn {
    padding: 5px 10px; /* further reduce padding */
    font-size: 12px; /* smaller font size */
  }
}

/* Extra small screens (very small phones) */
@media (max-width: 480px) {
  .pagination {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 10px;
    -webkit-overflow-scrolling: touch; /* smooth scrolling on iOS */
  }

  .pagination::-webkit-scrollbar {
    display: none; /* hide scrollbar */
  }

  .pagination-btn {
    padding: 4px 8px; /* smallest padding */
    font-size: 10px; /* smallest font size */
  }
}

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;
}
