:root {
    --bg: #0f1115;
    --card: #151924;
    --ink: #e8ecf1;
    --muted: #9aa3b2;
    --acc: #7b5cff;
    --acc-2: #00d1b2;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background: radial-gradient(1200px 800px at 80% -10%, rgba(123, 92, 255, .08), transparent 60%),
                radial-gradient(800px 600px at -10% 20%, rgba(0, 209, 178, .10), transparent 55%),
                var(--bg);
    color: var(--ink);
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}
img { display: block; max-width: 100%; height: auto; }


.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 calc(var(--grid) * 2);
}

/* Animation Keyframes (сохраняем для декоративных эффектов) */
@keyframes spinGradient { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes floatBg {
    0% { background-position: 0 0; }
    50% { background-position: 20px -10px; }
    100% { background-position: 0 0; }
}

/* Отключаем reveal-анимацию: элементы сразу видимы */
.reveal-up,
.reveal-right,
.reveal-in {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

/* Motion accessibility */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* Hero */
.hero { padding: 56px 0 24px; }

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
}

.card {
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    padding: 24px;
}

.kicker {
    color: var(--acc-2);
    font-weight: 700;
    letter-spacing: .18em;
    font-size: 12px;
    text-transform: uppercase;
}

.title {
    font-family: "Playfair Display", serif;
    font-size: 44px;
    line-height: 1.1;
    margin: 10px 0 16px;
    background: linear-gradient(180deg, #fff, #cdd6e3);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.subtitle {
    color: var(--muted);
    font-size: 16px;
}

.chipset {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.chip {
    padding: 8px 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 999px;
    color: #d8deea;
    font-size: 12px;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.28);
    border-color: rgba(255,255,255,0.14);
}

.chip:active { transform: translateY(-1px) scale(0.98); }
.chip:focus-visible { outline: 2px solid rgba(123,92,255,0.6); outline-offset: 2px; }

.hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}

/* Photo card */
.photo-card {
    position: relative;
    display: grid;
    place-items: end;
    min-height: 420px;
}

.photo-card .bg {
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background:
        radial-gradient(500px 300px at 30% 10%, rgba(123,92,255,0.25), transparent 60%),
        radial-gradient(400px 260px at 80% 80%, rgba(0,209,178,0.2), transparent 55%);
    filter: saturate(120%);
}

.photo-wrap {
    position: relative;
    width: 86%;
    margin: 0 auto 14px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.photo {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    background: #222;
}

.badge {
    position: absolute;
    left: 14px;
    top: 14px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.12);
    font-size: 12px;
}

.float {
    position: absolute;
    right: -8px;
    bottom: 18px;
    padding: 10px 14px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--acc);
}

/* Highlights / Sections */
.section { padding: 24px 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.work { display: flex; flex-direction: column; gap: 12px; }
.work .thumb {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
}
.work h3 { margin: 0; font-size: 14px; font-weight: 400; }
.work p { margin: 0; color: var(--muted); font-size: 13px; }


.tags { 
    display: flex; 
    gap: 8px; 
    flex-wrap: wrap; 
    margin-top: 15px;}

.tag {
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    color: #cfd5e2;
}

.back-btn {
    font-size: 16px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #cfd5e2;
    margin-bottom: 18px;
    cursor: pointer; /* Добавлено */
}


/* Tiles */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.tile {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    min-height: 150px;
    display: flex;
    align-items: flex-end;
    padding: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    transition: transform .25s ease, box-shadow .25s ease;
}

.tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}

.tile::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(500px 220px at 80% -10%, rgba(123,92,255,0.18), transparent 60%);
}

/* About / Education / Contacts */
.cols-2 { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 18px; }

.about p { margin: 0 0 10px; color: #dfe6f2; }

.list { display: grid; gap: 10px; }

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

.ico {
    width: 28px; height: 28px;
    border-radius: 8px;
    display: grid; place-items: center;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
}

.edu { display: grid; gap: 14px; }

.edu-item {
    position: relative;
    display: grid;
    gap: 6px;
    padding: 14px 14px 14px 18px;
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
}

.edu-item .when { color: var(--muted); font-size: 12px; }

.contact-card .links { display: grid; gap: 10px; }

.contact-card a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
}


/* Project Gallery */
.project { margin-bottom: 48px; }
.project-header { margin-bottom: 24px; }
.project-title {
    font-family: "Playfair Display", serif;
    font-size: 32px;
    line-height: 1.2;
    margin: 0 0 12px;
    color: var(--ink);
}
.project-desc { color: var(--muted); font-size: 14px !important; margin: 0 0 16px; }

.project-meta { display: flex; gap: 12px; flex-wrap: wrap; }
.meta-item { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.meta-item .ico { width: 20px; height: 20px; font-size: 12px; }

.gallery {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 18px;
    margin-top: 24px;
}
.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    transition: transform .25s ease, box-shadow .25s ease;
}
.gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}
.gallery-item img { width: 100%; height: auto; object-fit: cover; }
.gallery-item.main { grid-row: span 2; }

.gallery.enel { grid-template-columns: 1.8fr 1fr 1fr; align-items: start; }

.project-about {
    padding: 12px;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.04);
    margin-bottom: 15px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;

}

.project-about h4 { margin: 0 0 8px; font-size: 14px !important; font-weight: 400 !important; }
.project-about p { font-size: 14px !important; }
.project-about { font-size: 14px !important; }

.project-features {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.project-features .chip { padding: 6px 10px; font-size: 12px; }

/* Enel Layout */
.enel-layout {
    display: grid;
    grid-template-columns: 1.3fr 0.9fr;
    gap: 18px;
    align-items: stretch;
    min-height: 640px;
}
.enel-layout.swap { grid-template-columns: 0.9fr 1.3fr; min-height: auto; }

.enel-main {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0.02));
}
.enel-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    background: transparent;
}
.enel-thumbs-one {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1 1 0;
    min-height: 0;
}

.enel-thumbs {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1 1 0;
    min-height: 0;
}



.enel-thumbs .thumb, .enel-thumbs-one .thumb {
    flex: 0 0 auto;
    min-height: 0;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(0,0,0,0.04);
}
.enel-thumbs img,  .enel-thumbs-ont img{ width: 100%; height: auto; object-fit: contain; display: block; }



/* ====== FarmThatAll Layout ====== */
.farmthatall-layout {
  display: grid;
  grid-template-columns: minmax(0, 490px) minmax(0, 700px);
  gap: 24px;
  margin-bottom: 24px;
  justify-content: center;
  max-width: 100%;
  align-items: stretch; /* Блоки растягиваются на одинаковую высоту */
  overflow: visible; /* Чтобы стрелки не обрезались */
  position: relative; /* Для позиционирования */
}

.farmthatall-left {
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Контент прижимается к верху, не центрируется */
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.farmthatall-right {
  display: flex;
  flex-direction: column;
  position: relative; /* Для позиционирования стрелок */
  height: 100%; /* Выравниваем высоту с левым блоком */
}

/* ====== Слайдеры ====== */
.slider-container {
  position: relative;
  width: 100%;
  border-radius: 12px;
}

.slider-image-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Для главного слайдера overflow управляется отдельно */
.main-slider .slider-image-container {
  overflow: hidden;
  border-radius: 12px;
  width: 100%;
  height: 100%; /* Занимает всю высоту слайдера */
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-slider .slider-image-container img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Сохраняем пропорции, вписываем в контейнер */
  display: block;
  border-radius: 10px;
}

.icons-wrapper {
  display: flex;
  gap: 24px; /* Увеличили расстояние между иконками */
  transition: transform 0.4s ease;
  width: max-content;
  height: 100%;
  /* Дублируем иконки для бесконечной прокрутки */
}

.icon-item {
  flex: 0 0 auto;
  width: 120px;
  height: auto; /* Автоматическая высота по содержимому */
  min-width: 120px;
  min-height: 120px;
  border-radius: 12px;
  overflow: visible; /* Не обрезаем содержимое */
  border: none; /* Убираем границы */
  background: transparent; /* Убираем фон */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Размер иконок устанавливается динамически через JS для точного заполнения */

.icon-item img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Сохраняем пропорции, не обрезаем */
  display: block;
  max-width: 100%;
  max-height: 100%;
}

.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5); /* Полупрозрачный темный фон для видимости */
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.slider-nav:hover {
  background: rgba(0, 0, 0, 0.7);
  opacity: 1;
}


/* Стрелки главного слайдера - по бокам от картинки */
.main-slider .slider-nav.prev {
  left: 10px; /* Слева от картинки, внутри контейнера */
  z-index: 10;
}

.main-slider .slider-nav.next {
  right: 10px; /* Справа от картинки, внутри контейнера */
  z-index: 10;
}

/* Обертка для слайдера иконок со стрелками снаружи */
.icons-slider-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  position: relative;
}

/* Стрелки для слайдера иконок - снаружи контейнера */
.icons-nav {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  position: static;
  transform: none;
  background: none;
  border: none;
}

.icons-nav:hover {
  opacity: 0.7;
}

.slider-nav svg {
  width: 30px;
  height: 30px;
  fill: white;
  stroke: white;
  stroke-width: 2;
}

/* Главный слайдер */
.main-slider {
  margin-bottom: 20px;
  position: relative;
  overflow: visible; /* Стрелки должны быть видны */
  width: 100%;
  height: 100%; /* Занимает всю высоту родителя */
  display: flex;
  align-items: center;
}

.main-slider .slider-item {
  width: 100%;
  height: 100%;
  min-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Слайдер иконок */
.icons-slider {
  height: 120px;
}

.icons-slider .slider-item {
  width: 120px;
  height: 120px;
  min-width: 120px;
}

/* Полный слайдер иконок */
.icons-slider-full {
  height: auto; /* Автоматическая высота по содержимому */
  min-height: 120px; /* Минимальная высота */
  flex: 1; /* Занимает оставшееся место между стрелками */
  overflow-x: hidden; /* Обрезаем иконки только по горизонтали */
  overflow-y: visible; /* Позволяем иконкам показываться полностью по вертикали */
  border-radius: 12px;
  position: relative;
  /* Отключаем прокрутку колесиком */
  overscroll-behavior-x: contain;
}

/* Отключаем прокрутку контейнера иконок */
.icons-slider-full .icons-wrapper {
  touch-action: pan-y; /* Разрешаем только вертикальную прокрутку */
  height: auto; /* Автоматическая высота */
  align-items: flex-start; /* Выравнивание по верху */
}

.icons-slider-full .slider-item {
  width: 120px;
  height: 120px;
  min-width: 120px;
}

/* Заголовок слайдера */
.slider-title {
  font-family: "Playfair Display", serif;
  font-size: 36px;
  font-weight: 700;
  color: #f4a261;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  text-align: right;
  margin-bottom: 16px;
  line-height: 1.2;
  white-space: nowrap;
}

/* Адаптивность слайдеров */
@media (max-width: 1200px) {
  .farmthatall-layout {
    grid-template-columns: 1fr 1.4fr;
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .farmthatall-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .farmthatall-left {
    padding-right: 0; /* Убираем отступ на мобильных */
  }
  
  .farmthatall-right {
    height: auto; /* На мобильных высота определяется содержимым */
  }
  
  .main-slider {
    height: auto; /* На мобильных высота определяется содержимым */
    border-radius: 10px;
  }
  
  .main-slider .slider-image-container {
    height: auto; /* На мобильных высота определяется содержимым */
  }
  
  .main-slider .slider-image-container img {
    height: auto; /* На мобильных высота определяется содержимым */
    max-height: 100%;
  }
  
  .icons-slider,
  .icons-slider-full {
    height: auto; /* Автоматическая высота по содержимому */
    min-height: 100px; /* Минимальная высота на мобильных */
  }
  
  .icons-slider-wrapper {
    gap: 8px;
  }
  
  .icons-nav {
    width: 40px;
    height: 40px;
  }
  
  .icons-slider .slider-item,
  .icons-slider-full .slider-item {
    width: 100px;
    height: 100px;
  }
  
  .slider-nav {
    width: 35px;
    height: 35px;
  }
  
  .slider-nav svg {
    width: 16px;
    height: 16px;
  }
  
  .slider-title {
    font-size: 28px;
  }
}

@media (max-width: 640px) {
  
  .icons-slider {
    height: 80px;
  }
  
  .icons-nav {
    width: 35px;
    height: 35px;
  }
  
  .icons-slider-wrapper {
    gap: 6px;
  }
  
  .icons-slider .slider-item {
    width: 80px;
    height: 80px;
  }
  
  .slider-nav {
    width: 30px;
    height: 30px;
  }
  
  .slider-nav svg {
    width: 14px;
    height: 14px;
  }
  
  .slider-title {
    font-size: 24px;
  }
}

/* ====== Карточки товаров ====== */
.product-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
  width: 100%;
}

.product-card {
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

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

.product-image {
  width: 100%;
  overflow: hidden;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover .product-image {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.product-image img {
  width: 100%;
  height: auto;
  display: block;
}

.product-info {
  padding: 16px;
  background: rgba(26, 28, 32, 0.8);
  border: 1px solid rgba(66, 66, 66, 0.3);
  border-radius: 18px;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-top: 8px;
}

.product-info h4 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 400;
  color: #fff;
}

.product-info p {
  margin: 0 0 12px;
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
  flex-grow: 1;
}

.product-info .project-features {
  margin-top: auto;
}

/* Адаптивность карточек товаров */
@media (max-width: 1200px) {
  .product-cards-grid {
    gap: 16px;
  }
}




@media (max-width: 980px) {
  .product-cards-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (max-width: 768px) {
  .product-cards-grid {
    gap: 16px;
  }
  
  .product-info {
    min-height: 140px;
    padding: 14px;
  }
  
  .product-info h4 {
    font-size: 15px;
  }
  
  .product-info p {
    font-size: 13px;
  }
}

@media (max-width: 640px) {
  .product-info {
    min-height: 130px;
    padding: 12px;
  }
  
  .product-info h4 {
    font-size: 14px;
  }
  
  .product-info p {
    font-size: 12px;
  }
}

/* ====== Векторные иллюстрации ====== */
.vector-layout-correct {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 100%;
  margin-top: 24px;
}

.vector-images-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 20px;
  aspect-ratio: 1;
  max-width: 525px;
  width: 100%;
}

.vector-image-item {
  border-radius: 20px;
  overflow: hidden;

}

.vector-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vector-layout-correct .project-about {
  background: rgba(26, 28, 32, 0.8);
  border: 1px solid rgba(66, 66, 66, 0.3);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  height: 100%;
}



.vector-layout-correct .project-about h4 {
  font-size: 14px;
  font-weight: 400;
  color: #ffffff;
  margin: 0 0 16px 0;
  text-align: left;
}

.vector-layout-correct .project-about p {
  font-size: 14px;
  line-height: 1.6;
  color: #e0e0e0;
  margin: 0 0 20px 0;
  text-align: left;
  overflow-wrap: break-word;
  word-break: break-word;
}

.vector-layout-correct .project-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.vector-layout-correct .chip {
  background: rgba(66, 66, 66, 0.6);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  border: none;
}

/* ====== Второй подблок векторных иллюстраций ====== */
.vector-layout-second-wrapper {
  margin-top: 24px;
}

.vector-layout-second {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 100%;
  align-items: stretch;
}

.vector-images-right {
  display: flex;
  flex-direction: row;
  gap: 20px;
  align-items: flex-start;
  justify-content: flex-start;
  height: fit-content;
  width: 100%;
}

.vector-images-right img {
  width: auto;
  height: auto;
  max-width: 320px;
  max-height: 320px;
  object-fit: contain;
  flex-shrink: 0;
  flex: 1 1 auto;
}

/* На средних и маленьких экранах растягиваем изображения */
@media (max-width: 1400px) {
  .vector-images-right {
    width: 100%;
  }
  
  .vector-images-right img {
    flex: 1 1 0;
    min-width: 0;
  }
}

.vector-images-right-one {
  width: 100%;
}

.vector-images-right-one img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  flex-shrink: 0;
}

.vector-images-right-two img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
  border-radius: 12px;
}

.vector-images-right-two video {
  width: 100%;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
  border-radius: 12px;
}



/* Уменьшаем видео в первом блоке "О проекте" */
.vector-layout-second-wrapper:first-of-type .vector-images-right-two {
  align-self: start; /* Выравниваем по верхнему краю, не растягиваем */
  height: auto; /* Высота определяется содержимым */
}

.vector-layout-second-wrapper:first-of-type .vector-images-right-two video {
  max-height: 400px; /* Ограничиваем максимальную высоту видео */
  height: auto; /* Высота определяется пропорциями видео */
  width: 100%;
  max-width: 100%;
}


.vector-images-grid-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 525px;
  width: 100%;
}


.vector-layout-second .project-about {
  background: rgba(26, 28, 32, 0.8);
  border: 1px solid rgba(66, 66, 66, 0.3);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  height: 100%;
  min-height: 100%;
  max-width: 100%;
}

.vector-layout-second .project-about h4 {
  font-size: 14px;
  font-weight: 400;
  color: #ffffff;
  margin: 0 0 12px 0;
  text-align: left;
}

.vector-layout-second .project-about p {
  font-size: 14px;
  line-height: 1.5;
  color: #e0e0e0;
  margin: 0 0 16px 0;
  text-align: left;
  overflow-wrap: break-word;
  word-break: break-word;
}

.vector-layout-second .project-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vector-layout-second .chip {
  background: rgba(66, 66, 66, 0.6);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  border: none;
}

/* ====== Третий подблок векторных иллюстраций ====== */
.vector-layout-third {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
  max-width: 100%;
  align-items: stretch;
}

.vector-layout-third .project-about {
  background: rgba(26, 28, 32, 0.8);
  border: 1px solid rgba(66, 66, 66, 0.3);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  height: 100%;
  max-width: 100%;
}

.vector-layout-third .project-about h4 {
  font-size: 14px;
  font-weight: 400;
  color: #ffffff;
  margin: 0 0 16px 0;
  text-align: left;
}

.vector-layout-third .project-about p {
  font-size: 14px;
  line-height: 1.6;
  color: #e0e0e0;
  margin: 0 0 20px 0;
  text-align: left;
  overflow-wrap: break-word;
  word-break: break-word;
}

.vector-layout-third .project-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.vector-layout-third .chip {
  background: rgba(66, 66, 66, 0.6);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  border: none;
}

/* Адаптивность для векторных иллюстраций */
@media (max-width: 1200px) {
  .vector-layout-correct {
    grid-template-columns: 1fr;
    gap: 20px;
    justify-content: stretch;
  }
  
  .vector-images-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  
  .vector-layout-correct .project-about {
    width: 100%;
    max-width: 100% !important;
    height: auto;
    order: 1;
  }
  
  .project-about {
    max-width: 100% !important;
  }
  
  .vector-images-grid-row {
    order: 2;
  }
  
  main-slider {
    border-radius: 10px;
  }
}

@media (max-width: 1024px) {
  .vector-layout-second {
    grid-template-columns: 1fr !important;
    display: grid !important;
    gap: 24px;
  }

  .vector-layout-second .project-about {
    order: 1 !important;
    width: 100% !important;
  }

  .vector-images-right,
  .vector-images-right-two,
  .vector-images-right-one {
    order: 2 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .vector-images-right img,
  .vector-images-right-two img,
  .vector-images-right-one img {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
  }
}

@media (max-width: 980px) {
  .vector-layout-correct,
  .vector-layout-second,
  .packaging-layout {
    display: flex !important;
    flex-direction: column;
    gap: 20px;
    width: 100%;
  }
 
  .vector-layout-correct .project-about,
  .vector-layout-second .project-about,
  .packaging-left,
  .project-about {
    order: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .vector-images-grid-row,
  .vector-images-grid,
  .vector-images-right,
  .vector-images-right-two,
  .vector-images-right-one,
  .packaging-right {
    order: 2 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .vector-images-grid-row {
    order: 2 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 16px !important;
  }

  .vector-image-item {
    width: 100% !important;
  }

  .vector-image-item img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
  }

  .vector-images-right,
  .vector-images-right-two,
  .vector-images-right-one {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px;
  }

  .vector-images-right img,
  .vector-images-right-two img,
  .vector-images-right-one img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
  }
}

@media (max-width: 768px) {
  .vector-images-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, auto); /* Все 4 строки, высота по содержимому */
    gap: 16px;
    max-width: 100%;
    width: 100%;
    aspect-ratio: unset; /* Полностью убираем ограничение по соотношению сторон */
    height: auto; /* Высота определяется содержимым */
    min-height: auto;
  }
  
  .vector-image-item {
    width: 100%;
    height: auto;
    aspect-ratio: unset;
    display: block;
  }
  
  .vector-image-item img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain; /* Сохраняем пропорции, не обрезаем */
    display: block;
    /* Изображения сохраняют свои естественные пропорции */
  }
  
  /* Текст первым, картинки вторыми */
  .vector-layout-correct {
    grid-template-columns: 1fr !important;
    display: grid !important; /* Убираем inline display: flex */
  }
  
  .vector-layout-correct .project-about {
    padding: 16px;
    order: 1 !important; /* Текст первым */
    width: 100% !important;
  }
  
  .vector-images-grid-row {
    order: 2 !important; /* Картинки вторыми */
    width: 100% !important;
    max-width: 100% !important;
    grid-template-columns: 1fr !important; /* Картинки в одну колонку */
    display: grid !important;
  }
  
  .vector-images-grid {
    max-width: 100%;
    width: 100%;
  }
  
  .vector-image-item {
    width: 100%;
  }
}

/* Адаптивность для второго подблока векторных иллюстраций */
@media (max-width: 1200px) {
  .vector-layout-second {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  /* Текст первым, картинки вторыми */
  .vector-layout-second .project-about {
    order: 1;
    width: 100%;
    height: auto;
  }
  
  .vector-images-right-two {
    order: 2;
    width: 100% !important;
  }
  
  /* Для блока кофейни: картинки первыми, текст вторым */
  .vector-layout-second:has(.vector-images-right) .vector-images-right {
    order: 1; /* Картинки первыми */
    width: 100%;
  }
  
  .vector-layout-second:has(.vector-images-right) .project-about {
    order: 2; /* Текст вторым */
  }
  
  .vector-images-right {
    order: 2;
    width: 100% !important;
    display: flex !important;
    gap: 20px;
  }
  
  .vector-images-right img {
    width: 100% !important;
    max-width: none !important;
    max-height: none !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
    object-fit: contain;
  }
  
  /* Растягиваем все блоки с картинками на всю ширину */
  .vector-images-grid {
    max-width: 100%;
    width: 100%;
  }
  
  .vector-images-grid-row {
    max-width: 100%;
    width: 100%;
  }
  
  .vector-images-right-one {
    width: 100%;
  }
  
  .vector-images-right-one img {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  /* Для всех блоков vector-layout-second: одна колонка */
  .vector-layout-second {
    grid-template-columns: 1fr !important;
    display: grid !important; /* Убираем inline display: flex */
    gap: 20px;
  }
  
  /* Текстовый блок всегда первым на мобильных */
  .vector-layout-second .project-about {
    padding: 16px;
    order: 1;
    width: 100% !important;
  }
  
  /* Картинки всегда вторыми на мобильных */
  .vector-images-right-two {
    order: 2;
    width: 100% !important; /* Убираем inline стили width: 150% */
  }
  
  /* Для блока кофейни: картинки первыми, текст вторым */
  .vector-layout-second:has(.vector-images-right) .vector-images-right {
    flex-direction: column;
    gap: 16px;
    order: 1; /* Картинки первыми */
    width: 100%;
  }
  
  .vector-layout-second:has(.vector-images-right) .project-about {
    order: 2; /* Текст вторым */
  }
  
  /* Для остальных блоков: обычный порядок */
  .vector-images-right {
    flex-direction: column;
    gap: 16px;
    order: 2;
    width: 100%;
  }
  
  .vector-images-right img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
  }
  
  .vector-images-right-two img {
    width: 100%;
    height: auto;
    max-height: none;
  }
}

/* Адаптивность для третьего подблока векторных иллюстраций */
@media (max-width: 1200px) {
  .vector-layout-third {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .vector-layout-third .project-about {
    width: 100%;
    height: auto;
  }
}

@media (max-width: 768px) {
  .vector-layout-third .project-about {
    padding: 16px;
  }
}

/* ====== Работа с композицией и формой ====== */
.composition-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 24px;
  max-width: 100%;
}

.composition-row-1 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

.composition-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.composition-layout .thumb {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1;
}

.composition-layout .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Адаптивность для композиции */
@media (max-width: 1200px) {
  .composition-row-1 {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  
  .composition-row-2 {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .composition-row-1 {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .composition-row-2 {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ====== Адаптивная верстка ====== */
@media (max-width: 1150px) {
  .container {
    padding: 0 20px;
  }
  
  .enel-layout,
  .enel-layout.swap {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 20px;
  }

  /* Сбрасываем размеры */
  .enel-main,
  .enel-right,
  .project-about,
  .enel-thumbs,
  .enel-thumbs-one {
    width: 100%;
    max-width: 100%;
  }

  /* Убираем обёртку, чтобы потомки участвовали в grid */
  .enel-layout .enel-right,
  .enel-layout.swap .enel-right {
    display: contents;
  }

  /* Общий порядок элементов */
  .enel-layout .project-about,
  .enel-layout.swap .project-about {
    grid-row: 1;
  }

  .enel-layout .enel-main,
  .enel-layout.swap .enel-main {
    grid-row: 2;
  }

  .enel-layout .enel-thumbs,
  .enel-layout.swap .enel-thumbs,
  .enel-layout .enel-thumbs-one,
  .enel-layout.swap .enel-thumbs-one {
    grid-row: 3;
    display: flex;
    gap: 10px;
    overflow-x: auto;
  }

  .enel-layout .thumb,
  .enel-layout.swap .thumb {
    flex: 0 0 auto;
    min-width: 160px;
  }
}

@media (max-width: 980px) {
  .container {
    padding: 0 16px;
  }
  
  .hero {
    padding: 40px 0 20px;
  }
  
  .section {
    padding: 20px 0;
  }
  
  .card {
    padding: 20px;
  }
  
  .title {
    font-size: 38px;
  }
  
  .subtitle {
    font-size: 15px;
  }
  
  .project-title {
    font-size: 28px;
  }
  
  .project-desc {
    font-size: 15px;
  }
  
  .gallery {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .gallery-item.main {
    grid-row: span 1;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 14px;
  }
  
  .hero {
    padding: 32px 0 16px;
  }
  
  .section {
    padding: 16px 0;
  }
  
  .card {
    padding: 18px;
  }
  
  .title {
    font-size: 32px;
    line-height: 1.15;
  }
  
  .subtitle {
    font-size: 14px;
  }
  
  .project-title {
    font-size: 24px;
  }
  
  .project-desc {
    font-size: 14px;
  }
  
  .project {
    margin-bottom: 32px;
  }
  
  .project-header {
    margin-bottom: 20px;
  }
  
  .enel-layout .thumb,
  .enel-layout.swap .thumb {
    min-width: 140px;
  }
  
  .tiles {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .tile {
    min-height: 120px;
    padding: 16px;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 12px;
  }
  
  .hero {
    padding: 28px 0 14px;
  }
  
  .section {
    padding: 14px 0;
  }
  
  .card {
    padding: 16px;
  }
  
  .title {
    font-size: 28px;
  }
  
  .subtitle {
    font-size: 13px;
  }
  
  .project-title {
    font-size: 22px;
  }
  
  .project-desc {
    font-size: 13px;
  }
  
  .project {
    margin-bottom: 28px;
  }
  
  .project-header {
    margin-bottom: 16px;
  }
  
  .project-meta {
    gap: 8px;
  }
  
  .meta-item {
    font-size: 13px;
  }
  
  .enel-layout .thumb,
  .enel-layout.swap .thumb {
    min-width: 120px;
  }
  
  .chipset {
    gap: 8px;
  }
  
  .chip {
    padding: 6px 10px;
    font-size: 11px;
  }
  
  .project-features {
    gap: 6px;
  }
  
  .project-features .chip {
    padding: 5px 8px;
    font-size: 10px;
  }
  
  .back-btn {
    font-size: 14px;
    padding: 5px 8px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 10px;
  }
  
  .hero {
    padding: 24px 0 12px;
  }
  
  .section {
    padding: 12px 0;
  }
  
  .card {
    padding: 14px;
  }
  
  .title {
    font-size: 24px;
  }
  
  .subtitle {
    font-size: 12px;
  }
  
  .project-title {
    font-size: 20px;
  }
  
  .project-desc {
    font-size: 12px;
  }
  
  .project {
    margin-bottom: 24px;
  }
  
  .project-header {
    margin-bottom: 14px;
  }
  
  .enel-layout .thumb,
  .enel-layout.swap .thumb {
    min-width: 100px;
  }
  
  .chipset {
    gap: 6px;
  }
  
  .chip {
    padding: 5px 8px;
    font-size: 10px;
  }
}

/* ====== Блок Упаковка (Packaging) ====== */
.packaging-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}

/* Левая часть: текстовый блок и картинки под ним */
.packaging-left {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Текстовый блок использует стандартный project-about */
.packaging-left .project-about {
  margin-bottom: 0;
}

/* Картинки под текстом слева */
.packaging-left-images {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.packaging-left-images img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  display: block;
}

/* Правая часть: сетка с картинками */
.packaging-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Широкая картинка вверху */
.packaging-img-wide {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.packaging-img-wide img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

/* Ряд из двух картинок */
.packaging-img-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.packaging-img-row img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

/* Адаптивность для блока Упаковка */
@media (max-width: 1200px) {
  .packaging-layout {
    grid-template-columns: 1fr 1.2fr;
    gap: 20px;
  }

    project-about {
      max-width: 100%;  
  }
}

@media (max-width: 768px) {
  .packaging-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px;
  }
  
  .packaging-left {
    order: 1 !important;
    width: 100% !important;
  }
  
  .packaging-right {
    order: 2 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .packaging-img-row {
    gap: 16px;
  }
}




