/* Контейнер из 3 колонок */

/* Поджимаем последнюю секцию ПЕРЕД контактами именно в панели "Наши работы" */
#panel-raboti .service-panel__body > .service-section:last-of-type {
  margin-bottom: 1px; 
}
#panel-raboti .contact-note {
  margin-top: 1px;
}

/* Лента "Наши работы" */

#panel-raboti .service-panel__body > .service-section:first-child {
  margin-top: 0px !important;
}
#panel-raboti .service-section > .works-item:last-child {
  padding-bottom: 0 !important;
}
#panel-raboti .gallery__meta-line {
  margin-bottom: 0 !important;
}
#panel-raboti .service-panel__body > .service-section {
  margin: 0 !important;
}
#panel-raboti .service-panel__body > .service-section + .service-section {
  margin-top: 0px !important;
}

.works-item {
  padding: 18px 0 22px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.works-item:last-of-type {
  border-bottom: none;
}

.works-item__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.works-item__title {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
}

.works-item__subtitle {
  margin: 0;
  opacity: .85;
  line-height: 1.4;
}

.gallery.gallery--bodyshop .gallery__meta-line {
  grid-column: 1 / -1;
  margin: 10px auto -8px; 
  font-size: 14px;
  opacity: .78;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;

  text-align: center;
  line-height: 1.4;
}

/* центральные точки-разделители */
.gallery.gallery--bodyshop .gallery__meta-line span {
  position: relative;
  white-space: nowrap; 
}

.gallery.gallery--bodyshop .gallery__meta-line span + span::before {
  content: "•";
  position: absolute;
  left: -10px;        
  top: 50%;
  transform: translateY(-50%);
  opacity: .55;
  font-weight: 600;
}

/* скрыть пустые мета-пункты */
.gallery.gallery--bodyshop .gallery__meta-line span:empty {
  display: none;
}

/* базовый стиль */
.gallery.gallery--bodyshop .gallery__meta-line span {
  position: relative;
  white-space: nowrap;
}

/* точка появляется только если есть span перед этим */
.gallery.gallery--bodyshop .gallery__meta-line span + span::before {
  content: "•";
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  opacity: .55;
  font-weight: 600;
}


/* Галерея внутри */

.works-gallery {
  margin-top: 8px;
}

.works-gallery__caption {
  margin-bottom: 10px;
}

.works-gallery__caption-title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 600;
}

.works-gallery__caption-desc {
  margin: 0;
  opacity: .9;
  line-height: 1.5;
}

/* рамка: стрелка — фото — стрелка */
.works-gallery__frame {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;

  max-width: 1000px;              
  margin: 0 auto 12px;
}

/* основное фото — всегда один формат */
.works-gallery__main {
  position: relative;
  flex: 1 1 auto;
  max-width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  box-shadow: 0 10px 24px rgba(0,0,0,.2);
}

/* фиксируем высоту через прослойку 16:9 */
.works-gallery__main::before {
  content: "";
  display: block;
  padding-bottom: 56.25%; 
}

/* картинка всегда заполняет этот прямоугольник */
.works-gallery__main img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

/* Стрелки */
.works-gallery__nav {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;

  background: rgba(255,255,255,0.95);     
  color: #DDB96F;                        
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;

  box-shadow: 0 4px 12px rgba(0,0,0,.18);  
  opacity: 1;
  pointer-events: auto;

  transition:
    background .2s ease,
    transform .2s ease,
    box-shadow .2s ease;
}

.works-gallery__nav:hover {
  background: rgba(255,255,255,1);
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
  transform: scale(1.05);
}

/* Превью */
.works-gallery__thumbs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.works-gallery__thumb {
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;

  opacity: 0.7;
  transition: transform .2s ease, opacity .2s ease, box-shadow .2s ease, border-color .2s ease;

  border: 1px solid rgba(255, 255, 255, 0.1);
}

.works-gallery__thumb img {
  width: 80px;
  height: 54px;  
  object-fit: cover;
  display: block;
  border-radius: 8px;
}

.works-gallery__thumb:hover {
  opacity: 1;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}

.works-gallery__thumb.is-active {
  opacity: 1;
  border-color: #DDB96F;
  box-shadow: 0 0 0 2px rgba(221, 185, 111, 0.5);
}