:root{
  --red:#FF0000;
  --black:#050505;
  --white:#FFFFFF;
  --transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  cursor:crosshair;
}

/* БАЗА + СКРОЛЛ (важно: без height:100% чтобы не ломать страницу) */
html, body{
  margin:0;
  padding:0;
  width:100%;
  min-height:100%;
  height:auto;
  overflow-y:auto;
  overflow-x:hidden;
  -webkit-overflow-scrolling:touch;
  background: var(--black);            /* фон при overscroll */
  overscroll-behavior-y:none;          /* без "резинки" */
  position:relative;
}

body{
  font-family:'Inter', sans-serif;
  background: var(--white);
  color: var(--black);
  line-height:0.9;
  word-break:normal;
  overflow-wrap:break-word;
  hyphens:none;
}

/* Контент перекрывает черный фон */
body > *{ background:var(--white); }

p{
 line-height: normal;
}

/* ===== ЯЗЫКОВАЯ ПАНЕЛЬ ===== */
.lang-sidebar{
  position:fixed;
  left:20px;
  top:50%;
  transform:translateY(-50%);
  z-index:2000;
  display:flex;
  flex-direction:column;
  gap:15px;
  background:rgba(255,255,255,0.8);
  padding:15px 10px;
  backdrop-filter:blur(10px);
  border:1px solid var(--black);
}

.lang-btn{
  background:none;
  border:none;
  font-size:24px;
  filter:grayscale(1);
  transition:var(--transition);
  opacity:0.4;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:5px;
}
.lang-btn span{
  font-size:10px;
  font-weight:900;
  color:var(--black);
}
.lang-btn:hover,
.lang-btn.active{
  filter:grayscale(0);
  opacity:1;
  transform:scale(1.2);
}

/* ===== HERO HEADER ===== */
header{
  height:100vh;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  padding:40px;
  border-bottom:20px solid var(--black);
  position:relative;
  overflow:hidden;

  background-image:
    linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.8) 100%),
    url("../img/hero.webp");
  background-size:cover;
  background-position:center;
  background-attachment:fixed;
}

header::before{
  position:absolute;
  top:40px;
  right:40px;
  font-weight:900;
  font-size:clamp(2rem, 10vw, 8rem);
  color:var(--red);
}

h1{
  font-size:clamp(4rem, 18vw, 25rem);
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:-0.06em;
}

/* ===== GRID ===== */

.art-card:hover{
  background:var(--black);
  color:var(--white);
}

.art-card img{
  width:100%;
  height:100%;
  object-fit:cover;
  filter:contrast(1.1) grayscale(1);
  transition:var(--transition);
}
.art-card:hover img{
  filter:grayscale(0);
  transform:scale(1.05);
}
.art-meta{
  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
  margin-bottom:15px;
  display:flex;
  justify-content:space-between;
}
.art-title{
  font-size:clamp(2rem, 5vw, 4rem);
  font-weight:900;
  text-transform:uppercase;
  margin-bottom:20px;
}
.art-details{
  border-top:1px solid currentColor;
  padding-top:20px;
  font-size:16px;
  display:grid;
  grid-template-columns:1fr 1fr;
}

.btn-red{
  display:inline-block;
  background:var(--red);
  color:var(--white);
  padding:20px 40px;
  font-weight:900;
  text-transform:uppercase;
  text-decoration:none;
  margin-top:30px;
  align-self:flex-start;
}

/* ===== PAGINATION ===== */
.pagination-2030{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:60px 40px;
  border-top:5px solid var(--black);
  background:var(--white);
}
.pag-btn{
  font-size:40px;
  font-weight:900;
  text-decoration:none;
  color:var(--black);
  border:3px solid var(--black);
  padding:10px 30px;
  transition:all 0.3s steps(4);
}
.pag-btn:hover:not(.disabled){
  background:var(--red);
  color:var(--white);
  border-color:var(--red);
  transform:skewX(-10deg);
}
.pag-btn.disabled{
  opacity:0.2;
  cursor:not-allowed;
}
.page-indicator{
  font-size:80px;
  font-weight:900;
  letter-spacing:-5px;
}
.page-indicator .current{ color:var(--red); }

.fade-out{
  opacity:0;
  transform:translateY(20px) scale(0.95);
}

/* ===== LEARNING LAB ===== */
.learning-lab-v2{
  background:var(--white);
  padding:45px 0;
  position:relative;
  overflow:hidden;
  border-top:10px solid var(--black);
}

.lab-bg-text{
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%, -50%) rotate(-10deg);
  font-size:20vw;
  font-weight:900;
  color:rgba(0,0,0,0.03);
  white-space:nowrap;
  pointer-events:none;
  z-index:0;
}

.lab-container{
  max-width:1400px;
  margin:0 auto;
  padding:0 40px;
  position:relative;
  z-index:2;
}

.lab-main-content{
  display:grid;
  grid-template-columns:1fr 1.2fr;
  gap:100px;
  align-items:center;
  margin-bottom:120px;
}

.lab-visual{ position:relative; }
.photo-wrapper{ position:relative; z-index:2; }

.main-lab-img{
  width:100%;
  border-radius:20px;
  border:2px solid var(--black);
  box-shadow:20px 20px 0 var(--red);
  transition:var(--transition);
}

.experience-badge{
  position:absolute;
  bottom:-30px;
  right:-30px;
  background:#05050575;
  backdrop-filter:blur(3px);
  color:var(--white);
  padding:20px;
  font-weight:900;
  font-size:24px;
  text-align:center;
  line-height:1;
  border:4px solid var(--red);
  transform:rotate(5deg);
}
.experience-badge span{
  font-size:10px;
  color:var(--red);
}

.blob-decor{
  position:absolute;
  top:-50px;
  left:-50px;
  width:300px;
  height:300px;
  background:var(--red);
  filter:blur(80px);
  opacity:0.15;
  z-index:1;
  animation:blob-move 10s infinite alternate;
}

.lab-tag{
  background:var(--red);
  color:var(--white);
  display:inline-block;
  padding:5px 15px;
  font-weight:900;
  font-size:14px;
  margin-bottom:20px;
}

.lab-massive-title{
  font-size:clamp(3rem, 7vw, 6rem);
  font-weight:900;
  line-height:0.9;
  text-transform:uppercase;
  color:var(--black);
  margin-bottom:30px;
}
.outline-text{
  -webkit-text-stroke:2px var(--black);
  color:transparent;
}
.modern-p{
  font-size:1.2rem;
  line-height:1.6;
  color:#444;
  max-width:600px;
}

.lab-stats{
  display:flex;
  gap:40px;
  margin-top:40px;
}
.stat-num{
  display:block;
  font-size:48px;
  font-weight:900;
  color:var(--red);
}
.stat-label{
  font-size:12px;
  font-weight:900;
  letter-spacing:2px;
}

/* slider */
.workshop-slider-wrapper{ margin:0 -40px; }
.workshop-track{
  display:flex;
  gap:30px;
  overflow-x:auto;
  padding:40px;
  scrollbar-width:none;
}
.workshop-track::-webkit-scrollbar{ display:none; }

.workshop-card{
  flex:0 0 350px;
  height:450px;
  perspective:1000px;
}
.card-inner{
  position:relative;
  width:100%;
  height:100%;
  border:2px solid var(--black);
  border-radius:15px;
  overflow:hidden;
  transition:var(--transition);
}
.card-inner img{
  width: auto;
  height:100%;
  object-fit:cover;
  transition:0.8s;
}
.card-overlay{
  position:absolute;
  inset:0;
  background:rgba(255, 0, 0, 0.8);
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:0;
  transition:0.4s;
}
.zoom-icon{
  font-size:60px;
  color:var(--white);
  font-weight:100;
}
.workshop-card:hover .card-inner{
  transform:translateY(-10px) rotateX(5deg);
  box-shadow:0 20px 40px rgba(0,0,0,0.2);
}
.workshop-card:hover .card-overlay{ opacity:1; }
.workshop-card:hover img{ transform:scale(1.1); }

@keyframes blob-move{
  from{ transform:translate(0,0) scale(1); }
  to{ transform:translate(50px,100px) scale(1.2); }
}

/* ===== LIGHTBOX ===== */
.lightbox{
  display:none;
  position:fixed;
  z-index:9999;
  inset:0;
  background:#0000009e;
  justify-content:center;
  align-items:center;
}
#lightbox-img{
  max-width:90%;
  max-height:90%;
  border:5px solid var(--red);
  border-radius:7px;
}
.close-lightbox{
  position:absolute;
  top:40px;
  right:40px;
  font-size:60px;
  color:var(--red);
  font-weight:900;
  cursor:pointer;
}

#lab-desc{ margin-top:2rem; line-height:normal; }

/* ===== BIO ===== */
.bio-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:60px;
  padding:100px 40px;
}

.bio-image-frame{
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:visible;
  position:relative;
  padding:20px;
}
.bio-image-frame img{
  width:100%;
  display:block;
  filter:saturate(1.2) contrast(1.1);
  border:8px solid var(--red);
  outline:2px solid var(--red);
  outline-offset:15px;
  border-radius:60% 40% 30% 70% / 60% 30% 70% 40%;
  animation:liquid-pulse 6s ease-in-out infinite;
  transition:all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}
.bio-image-frame:hover img{
  border-radius:20px;
  outline-offset:5px;
  filter:saturate(1.5);
  animation-play-state:paused;
  box-shadow:0 0 50px rgba(255,0,0,0.4);
}

@keyframes liquid-pulse{
  0%{
    border-radius:60% 40% 30% 70% / 60% 30% 70% 40%;
    box-shadow:0 0 0 0 rgba(255,0,0,0.7);
  }
  50%{
    border-radius:30% 60% 70% 40% / 50% 60% 30% 60%;
    box-shadow:0 0 0 30px rgba(255,0,0,0);
    transform:scale(1.03);
  }
  100%{
    border-radius:60% 40% 30% 70% / 60% 30% 70% 40%;
    box-shadow:0 0 0 0 rgba(255,0,0,0);
  }
}

.bio-image-frame::after{
  content:"";
  position:absolute;
  width:110%;
  height:110%;
  border:1px solid rgba(255,0,0,0.2);
  border-radius:50%;
  z-index:-1;
  animation:rotate-slow 15s linear infinite;
}
@keyframes rotate-slow{
  from{ transform:rotate(0); }
  to{ transform:rotate(360deg); }
}

.massive-title{
  font-size:8vw;
  font-weight:900;
  line-height:0.8;
  text-transform:uppercase;
  margin-bottom:40px;
  color:var(--red);
}
.bio-text{ font-size:1.5rem; line-height:1.4; }

.columns-2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:80px;
  padding:100px 40px;
}

.side-img{
  width:100%;
  object-fit:cover;
  margin-bottom:30px;
}
.red-text{
  color:var(--red);
  font-size:2.5rem;
  font-weight:900;
  text-transform:uppercase;
  margin-bottom:20px;
  text-align:center;
}

.series-section{
  padding:100px 40px;
  border-top:10px solid var(--black);
}
.series-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  margin-bottom:60px;
}
.header-img{
  width:40%;
  height:200px;
  object-fit:cover;
}
.series-grid-info{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:40px;
  border-top:2px solid var(--black);
  padding-top:40px;
}
.series-item span{
  font-size:3rem;
  font-weight:900;
  color:var(--red);
  display:block;
}
.series-item h4{
  font-size:2rem;
  font-weight:900;
  text-transform:uppercase;
  margin:15px 0;
}

/* ===== FOOTER ===== */
.footer-2030{
  background:var(--red);
  color:var(--white);
  padding:100px 40px 40px;
}
.footer-main{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  margin-bottom:80px;
}
.footer-logo{
  font-size:clamp(4rem, 15vw, 12rem);
  font-weight:900;
  line-height:0.8;
  margin-bottom:20px;
}
.footer-email{
  font-size:24px;
  font-weight:700;
  letter-spacing:2px;
}
.social-links{
  display:flex;
  gap:30px;
}
.social-icon svg{
  width:40px;
  height:40px;
  color:var(--white);
  transition:var(--transition);
}
.social-icon:hover svg{
  transform:scale(1.2) rotate(-5deg);
  filter:drop-shadow(0 0 10px rgba(255,255,255,0.5));
}
.footer-bottom{
  display:flex;
  justify-content:space-between;
  padding-top:40px;
  border-top:1px solid rgba(255,255,255,0.3);
  font-size:12px;
  font-weight:700;
  letter-spacing:1px;
  text-transform:uppercase;
}
.footer-bottom a{
  color:var(--white);
  text-decoration:none;
  border-bottom:1px solid var(--white);
  transition:0.3s;
}
.footer-bottom a:hover{
  background:var(--white);
  color:var(--red);
}

/* ===== MENU ===== */
.menu-toggle{
  position:fixed;
  top:25px;
  left:25px;
  z-index:3000;
  width:45px;
  height:45px;
  background:var(--red);
  border:none;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:5px;
  cursor:pointer;
  box-shadow:6px 6px 0 var(--black);
  transition:var(--transition);
}
.menu-toggle:hover{
  box-shadow:0 0 0 var(--black);
  transform:translate(3px,3px);
}
.burger-line{
  width:25px;
  height:3px;
  background:var(--white);
  transition:all 0.4s cubic-bezier(0.68, -0.6, 0.32, 1.6);
}
.menu-toggle.active .burger-line:nth-child(1){ transform:translateY(8px) rotate(45deg); }
.menu-toggle.active .burger-line:nth-child(2){ opacity:0; transform:translateX(-20px); }
.menu-toggle.active .burger-line:nth-child(3){ transform:translateY(-8px) rotate(-45deg); }

.side-panel{
  position:fixed;
  inset:0 auto 0 0;
  width:400px;
  max-width:100vw;
  height:100vh;
  background:#ff000078;
  backdrop-filter:blur(11px);
  z-index:2500;
  transform:translateX(-105%);
  transition:transform 0.6s cubic-bezier(0.85, 0, 0.15, 1);
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:80px 40px;
  box-shadow:20px 0 50px rgba(0,0,0,0.5);
}
.side-panel.active{ transform:translateX(0); }

.side-nav{
  display:flex;
  flex-direction:column;
  gap:15px;
}
.nav-link{
  color:var(--white);
  font-size:40px;
  font-weight:900;
  text-decoration:none;
  transition:0.3s;
  line-height:1;
}
.nav-link:hover{
  color:var(--red);
  transform:skewX(-10deg);
}
.divider-line{
  width:60px;
  height:10px;
  background:var(--red);
  margin:40px 0;
}

.side-lang{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin-top:20px;
}
.lang-item{
  background:rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.1);
  color:var(--white);
  padding:12px 15px;
  font-size:14px;
  font-weight:900;
  text-transform:uppercase;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  cursor:pointer;
  transition:all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  position:relative;
  overflow:hidden;
  filter:grayscale(0.5);
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.lang-item span{
  letter-spacing:2px;
  font-size:12px;
  opacity:0.7;
}
.lang-item:hover{
  background:rgb(255 255 255 / 36%);
  border-color:#fff;
  transform:translateY(-2px);
  box-shadow:1px -1px 8px rgb(255 255 255);
  filter:grayscale(0);
}
.lang-item:hover span{ opacity:1; }
.lang-item.active{
  background:var(--red);
  border-color:var(--red);
  color:var(--white);
  box-shadow:0 0 4px 3px rgb(255 255 255);
  filter:grayscale(0);
}
.lang-item.active span{
  opacity:1;
  color:var(--white);
}
.lang-item.active::after{
  content:"";
  position:absolute;
  left:0;
  bottom:0;
  width:100%;
  height:3px;
  background:var(--white);
}

/* ===== RESPONSIVE ===== */
@media (max-width:1024px){
  .lab-main-content{ grid-template-columns:1fr; gap:23px; margin-bottom: 54px;}
  .lab-visual{ order:2; }
  .lab-info{ order:1; }
  .lab-massive-title{ font-size:12vw; }
  .workshop-card{ flex:0 0 280px; height:380px; }
}

@media (max-width:900px){
  .grid{ grid-template-columns:1fr; }
  .art-card{ padding:30px; }

  .lang-sidebar{
    bottom:20px;
    top:auto;
    left:50%;
    transform:translateX(-50%);
    flex-direction:row;
  }

  .pag-btn{ font-size:30px; padding:10px 16px; }
  .page-indicator{ font-size:45px; letter-spacing:0; }
  .pagination-2030{ padding:56px 23px; }

  header{
    background-attachment:scroll; /* мобилки не любят fixed */
  }

  .footer-main{
    flex-direction:column;
    align-items:flex-start;
    gap:40px;
  }
  .footer-bottom{
    flex-direction:column;
    gap:20px;
  }
  .bio-grid, .columns-2, .series-grid-info{ grid-template-columns:1fr; }
  .header-img{ width:100%; }
  .series-header{ flex-direction:column; align-items:center; }
}

@media (max-width:768px){
  .lab-header{ flex-direction:column; }
  .workshop-item{ flex:0 0 80vw; height:400px; }
}

@media (max-width:600px){
  .side-panel{ width:100%; }
}



/* На мобилках делаем 1 колонку */
@media (max-width: 900px) {
  .grid {
    column-count: 1;
  }
}
.img-container {
  width: 100%;
  height: auto;      /* Высота подстраивается под фото */
  margin-bottom: 25px;
  background: none;  /* Убираем серый фон, так как фото теперь без полей */
  overflow: hidden;
}

.art-card img {
  width: 100%;
  height: auto;      /* Картинка сохраняет свои пропорции */
  display: block;    /* Убираем лишние зазоры снизу */
  object-fit: contain; /* Теперь фото всегда целое */
  filter: contrast(1.1) grayscale(1);
  transition: var(--transition);
}

.art-title {
  font-size: clamp(1.5rem, 3vw, 2.5rem); /* Уменьшили размер заголовка */
  line-height: 1.1;
  margin-bottom: 15px;
}

.art-details {
  display: flex; /* Вместо грида используем флекс */
  flex-direction: row; /* Текст в столбик, если мало места */
  gap: 10px;
  font-size: 14px; /* Чуть меньше шрифт */
  justify-content: space-between;
}


.art-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Состояние после появления */
.art-card.visible {
    opacity: 1;
    transform: translateY(0);
}
#artwork-grid {
    display: block;
    column-count: 2; /* Две колонки */
    column-gap: 0;   /* Границы встык */
    padding: 0;
}

.art-card {
    display: inline-block; /* Чтобы карточки не ломались между колонками */
    width: 100%;
    break-inside: avoid;
    border: 1px solid var(--black); /* Тонкая рамка вокруг каждой работы */
    padding: 30px; /* Уменьшили внутренний отступ */
}

.img-container {
    height: auto; /* Высота теперь зависит от картинки */
    aspect-ratio: auto; /* Убираем жесткие пропорции */
    margin-bottom: 20px;
}

.art-card img {
    width: 100%;
    height: auto;
    object-fit: contain; /* Картинка видна целиком */
}

/* ===== ГАЛЕРЕЯ (ПЛИТКА И АНИМАЦИЯ) ===== */


.art-card {
  display: inline-block;
  width: 100%;
  break-inside: avoid;
  padding: 30px;
  background: var(--white);
  border-right: 1px solid var(--black);
  border-bottom: 1px solid var(--black);
  position: relative;
  
  /* Эффект для анимации появления */
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease, background 0.4s ease;
}

/* Этот класс добавит JS при скролле */
.art-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.art-card:hover {
  background: var(--black);
  color: var(--white);
}

.img-container {
  width: 100%;
  height: auto;
  margin-bottom: 20px;
  overflow: hidden;
}

.art-card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  filter: contrast(1.1) grayscale(1);
  transition: var(--transition);
}

.art-card:hover img {
  filter: grayscale(0);
  transform: scale(1.05);
}

.art-title {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 15px;
}

/* Исправляем флаги для Windows */
.lang-item, .lang-btn {
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif !important;
}

/* Адаптация сетки под мобильные */
@media (max-width: 900px) {
  .grid, #artwork-grid {
    column-count: 1;
  }
}


/* ===== ОБНОВЛЕННАЯ УМНАЯ СЕТКА ===== */
.grid, #artwork-grid {
  display: block;
  /* Автоматически выбирает количество колонок: */
  column-count: 2; 
  column-gap: 0;
  background: var(--black);
  max-width: 1800px; /* Чтобы на сверхшироких мониторах не растягивалось в бесконечность */
  margin: 0 auto;
}

.art-card {
  display: inline-block;
  width: 100%;
  break-inside: avoid;
  padding: 25px; /* Чуть меньше отступы, чтобы блок был компактнее */
  background: var(--white);
  border: 0.5px solid var(--black);
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease, background 0.4s ease;
}

.img-container {
  width: 100%;
  /* Ограничиваем высоту картинки, чтобы она гарантированно влезала в экран */
  max-height: 65vh; 
  overflow: hidden;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.art-card img {
  width: 100%;
  height: auto;
  max-height: 65vh; /* Фото не будет выше 65% высоты окна */
  object-fit: contain; /* Картинка не обрежется */
  display: block;
}

.art-title {
  font-size: 1.2rem; /* Уменьшили размер, чтобы текст не распирал блок */
  line-height: 1.2;
}

/* --- Адаптивность колонок --- */

/* Планшеты (2 колонки) */
@media (max-width: 1200px) {
  .grid, #artwork-grid {
    column-count: 2;
  }
}

/* Мобильные (1 колонка) */
@media (max-width: 768px) {
  .grid, #artwork-grid {
    column-count: 1;
  }
  .img-container, .art-card img {
    max-height: none; /* На мобилках пусть скроллится как обычно */
  }
  .card-inner img{width: 100%;}
}

a.footer-email {
  text-decoration: none; /* Убираем подчеркивание */
  color: var(--white);   /* Оставляем белый цвет */
  transition: var(--transition);
  display: inline-block;
}

a.footer-email:hover {
  color: var(--black);   /* При наведении почта станет черной (или выбери другой цвет) */
  transform: translateY(-2px);
}


.lang-item img {
    filter: grayscale(100%); /* По умолчанию серые */
    transition: all 0.3s ease;
    margin-right: 8px; /* Отступ от текста */
}

.lang-item:hover img, 
.lang-item.active img {
    filter: grayscale(0%); /* Цветные при наведении и активе */
    transform: scale(1.1);
}

.lang-item span {
    font-size: 12px;
    font-weight: 900;
}

/* Пульсация индикатора при вводе */
.pulse-active {
    color: #ff4d4d !important;
    text-shadow: 0 0 10px rgba(255, 77, 77, 0.8);
    animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

/* Контейнер клавиатуры */
.nav-keyboard {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: flex-end;
    transition: bottom 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
}

.nav-keyboard.active {
    bottom: 0;
}

.keyboard-content {
    width: 100%;
    background: rgba(20, 20, 20, 0.9);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 77, 77, 0.5);
    border-radius: 30px 30px 0 0;
    
    /* Учет безопасной зоны iPhone (полоски снизу) */
    padding: 30px 20px calc(20px + env(safe-area-inset-bottom));
    
    box-shadow: 0 -15px 50px rgba(0, 0, 0, 0.8);
    transform: translateY(0);
    transition: transform 0.4s ease;
}
.keyboard-header {
    text-align: center;
    margin-bottom: 25px;
}

.keyboard-title {
    display: block;
    font-size: 10px;
    letter-spacing: 3px;
    color: #888;
    margin-bottom: 5px;
}
.keyboard-title {
    transition: color 0.3s ease;
    text-transform: uppercase;
    font-weight: 700;
} 
.keyboard-display {
    font-size: 42px;
    font-weight: 900;
    color: #fff;
    font-family: 'Inter', sans-serif;
}

.keyboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
}

.kb-key {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 24px;
    padding: 20px;
    border-radius: 15px;
    cursor: pointer;
    transition: 0.2s;
    font-family: 'Inter', sans-serif;
}

.kb-key:active {
    background: rgba(255, 77, 77, 0.4);
    transform: scale(0.95);
}

.kb-key.special {
    color: #ff4d4d;
}

.kb-key.submit {
    background: #ff4d4d;
    font-weight: bold;
    border: none;
}

/* Скрываем на ПК */
@media (min-width: 769px) {
    .nav-keyboard { display: none !important; }
    .page-indicator .current { cursor: default; }
}

/* Стиль инпута на ПК */
/* Стиль инпута на ПК при активации */
.pc-page-input {
    background: var(--red); /* Заливка красным */
    border: 2px dashed var(--white); /* Белый пунктирный бордер */
    color: var(--white);
    font-family: 'Inter', sans-serif;
    font-size: 0.8em; /* Немного меньше, чтобы вписаться в размер */
    font-weight: 900;
    width: 80px; /* Увеличили ширину для комфортного ввода */
    text-align: center;
    outline: none;
    padding: 5px;
    margin: 0 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
    animation: inputAppear 0.3s ease-out;
}

@keyframes inputAppear {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* Состояние ошибки на ПК */
.pc-page-input.input-error {
    background: var(--black);
    border-color: var(--red);
    color: var(--red);
    animation: shake 0.4s double;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Убираем стандартные стрелочки */
.pc-page-input::-webkit-outer-spin-button,
.pc-page-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
/* Убираем стрелочки у input number */
.pc-page-input::-webkit-outer-spin-button,
.pc-page-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Указатель, что на число можно нажать */
.page-indicator .current {
    cursor: pointer;
    transition: color 0.3s ease;
}

.page-indicator .current:hover {
    color: #ff4d4d;
}

.lab-formats-grid {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lab-mentor-status{
    margin-top: 39px;
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #ff4c4c;
    text-align: center;
    background: #ff00001c;
    border: 1px solid #ff000026;
    padding: 2px;
    border-radius: 8px;
    backdrop-filter: blur(4px);
    }

.format-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--red);
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Красная точка-маркер */
.format-dot {
    width: 6px;
    height: 6px;
    background-color: var(--red);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Эффект при наведении на блок обучения */
.format-item:hover .format-dot {
    transform: scale(1.5);
    box-shadow: 0 0 8px var(--red);
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .format-item {
        font-size: 0.85rem; /* Чуть меньше на мобильных */
        line-height: normal;
    }
    .copyright{line-height: normal;}
}