/* ==========================================================================
   Redmet — доп. стили для страниц Новости / Закупки (Laravel-сайт)
   Использует базовую типографику/цвета/паттерны из style.css, home.css, about.css
   ========================================================================== */

.page-section {
  padding: 60px 0 100px;
}

.page-section__empty {
  font-size: 18px;
  color: var(--color-text);
  padding: 40px 0;
}

/* ---------- Страница поиска ---------- */

.search-page__form {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 640px;
  margin: 0 0 40px;
  padding: 8px 8px 8px 20px;
  border: 1px solid var(--color-border-soft);
  border-radius: 8px;
}

.search-page__form input[type="search"] {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  font-family: var(--font-main);
  font-size: 16px;
  color: var(--color-text);
  background: transparent;
}

.search-page__form input[type="search"]::placeholder {
  color: var(--color-muted);
}

.search-page__form button[type="submit"] {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-blue);
  border-radius: 6px;
  color: var(--color-white);
}

.search-page__form button[type="submit"] svg {
  width: 20px;
  height: 20px;
  display: block;
}

.search-page__heading {
  font-size: 16px;
  color: var(--color-muted);
  margin-bottom: 32px;
}

.search-page__section {
  margin-bottom: 60px;
}

.search-page__section:last-child {
  margin-bottom: 0;
}

/* ---------- Пагинация ---------- */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 56px;
  list-style: none;
  padding: 0;
}

.pagination .page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 8px;
  border: none;
  border-radius: 5px;
  color: var(--color-text);
  font-size: 15px;
  background: transparent;
  transition: background-color .2s ease, color .2s ease;
}

.pagination .page-item.active .page-link,
.pagination .page-link:hover {
  background: var(--color-blue);
  color: var(--color-white);
}

.pagination .page-item.disabled .page-link {
  color: var(--color-muted);
  background: transparent;
}

/* ---------- Одиночная страница (новость / закупка) ---------- */

.entry-back {
  margin-bottom: 32px;
}


.entry__meta {
  font-size: 16px;
  color: var(--color-muted);
  margin-bottom: 24px;
}

.entry__image {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 32px;
}

.entry__image img {
  width: 100%;
  display: block;
}

.entry__image--product {
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.entry__body {
  font-size: 18px;
  line-height: 30px;
  color: var(--color-text);
}

.entry__body p,
.entry__body ul,
.entry__body ol {
  margin: 0 0 16px;
}

.entry__body p:last-child,
.entry__body ul:last-child,
.entry__body ol:last-child {
  margin-bottom: 0;
}

.entry__body ul,
.entry__body ol {
  padding-left: 24px;
}

.entry__body strong {
  font-weight: 700;
}

.entry__body a {
  color: var(--color-blue);
  text-decoration: underline;
}

.products-intro {
  margin-bottom: 16px;
}

.entry__body h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--color-navy);
}

.entry__table-wrap {
  overflow-x: auto;
  margin: 0 0 24px;
}

.entry__table-wrap:last-child {
  margin-bottom: 0;
}

.entry__body table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 15px;
}

.entry__body th,
.entry__body td {
  border: 1px solid var(--color-border-soft);
  padding: 10px 14px;
  text-align: left;
}

.entry__body th {
  background: rgba(17, 91, 186, .06);
  font-weight: 700;
  color: var(--color-navy);
  white-space: nowrap;
}

.entry__body td.entry__table-subhead {
  font-weight: 700;
  background: rgba(17, 91, 186, .03);
}

.entry__details {
  margin-top: 32px;
  border-top: 1px solid var(--color-border-soft);
  padding-top: 32px;
}

.entry__details dl {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 12px 24px;
}

.entry__details dt {
  color: var(--color-muted);
}

.entry__details dd {
  font-weight: 600;
}

@media (max-width: 900px) {
  .page-section {
    padding: 32px 0 60px;
  }

  .entry__details dl {
    grid-template-columns: 140px 1fr;
  }
}

/* ---------- Карточка вакансии: доп. мета (зарплата / город) ---------- */

.card-outline__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: -8px 0 16px;
  font-size: 15px;
  color: var(--color-muted);
}

/* ---------- Производство: чередующиеся блоки этапов ---------- */

.production-stages {
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.production-stage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.production-stage--reverse .production-stage__photo {
  order: 2;
}

.production-stage__photo {
  border-radius: 10px;
  overflow: hidden;
}

.production-stage__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.production-stage__body h3 {
  font-size: 24px;
  margin-bottom: 16px;
}

.production-stage__text p,
.production-stage__text ul,
.production-stage__text ol {
  font-size: 17px;
  line-height: 28px;
  color: var(--color-text);
  margin: 0 0 12px;
}

.production-stage__text p:last-child,
.production-stage__text ul:last-child,
.production-stage__text ol:last-child {
  margin-bottom: 0;
}

.production-stage__text ul,
.production-stage__text ol {
  padding-left: 22px;
}

.production-stage__text strong {
  font-weight: 700;
}

.production-stage__text a {
  color: var(--color-blue);
  text-decoration: underline;
}

@media (max-width: 900px) {
  .production-stage,
  .production-stage--reverse {
    grid-template-columns: 1fr;
  }

  .production-stage--reverse .production-stage__photo {
    order: 0;
  }

  .production-stages {
    gap: 40px;
  }
}

/* ---------- Галерея: полная сетка ---------- */

.gallery-full {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.gallery-full__item {
  display: block;
  position: relative;
  min-width: 0;
  height: 318px;
  border-radius: 10px;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: #000;
}

.gallery-full__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}

.gallery-full__item:hover img {
  transform: scale(1.05);
}

.gallery-full__item--video {
  cursor: pointer;
}

.gallery-full__item--video::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(20, 30, 45, .25);
  transition: background-color .3s ease;
}

.gallery-full__item--video:hover::after {
  background: rgba(20, 30, 45, .4);
}

.gallery-full__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--color-white);
  z-index: 1;
  transition: background-color .3s ease, transform .3s ease;
}

.gallery-full__item--video:hover .gallery-full__play {
  background: rgba(255,255,255,.2);
  transform: translate(-50%, -50%) scale(1.1);
}

.gallery-full__play::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent var(--color-white);
}

@media (max-width: 1180px) {
  .gallery-full {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .gallery-full__item {
    height: auto;
    aspect-ratio: 1 / 1;
  }
}

@media (max-width: 560px) {
  .gallery-full {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Галерея: лайтбокс с пролистыванием ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.lightbox.is-open {
  display: flex;
}

.lightbox__overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 30, 45, .9);
}

.lightbox__box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__image {
  display: block;
  max-width: 100%;
  max-height: 82vh;
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .4);
}

.lightbox__close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 32px;
  height: 32px;
}

.lightbox__close span {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-white);
}

.lightbox__close span:first-child { transform: rotate(45deg); }
.lightbox__close span:last-child { transform: rotate(-45deg); }

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color .2s ease;
}

.lightbox__nav:hover {
  background: rgba(255, 255, 255, .2);
}

.lightbox__nav--prev { left: -20px; }
.lightbox__nav--next { right: -20px; }

.lightbox__counter {
  position: absolute;
  bottom: -36px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-white);
  font-size: 14px;
  opacity: .8;
}

body.lightbox-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .lightbox__nav--prev { left: 4px; }
  .lightbox__nav--next { right: 4px; }
  .lightbox__nav { width: 40px; height: 40px; }
}

/* ---------- Лицензии ---------- */

.licenses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

.licenses-grid__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 20px 24px;
  border: 1px solid var(--color-border-soft);
  border-radius: 8px;
  background: var(--color-white);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.licenses-grid__item:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px -18px rgba(46, 98, 153, .35);
  border-color: var(--color-blue);
}

.licenses-grid__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(46, 98, 153, .08);
  color: var(--color-blue);
  margin-bottom: 16px;
}

.licenses-grid__title {
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
  color: var(--color-text);
  margin-bottom: 12px;
}

.licenses-grid__cta {
  font-size: 13px;
  color: var(--color-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 900px) {
  .licenses-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
  }
}

/* ---------- Контакты ---------- */

.contacts-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.contacts-card {
  gap: 12px;
  background: #f7f8fa;
  border: none;
  border-radius: 10px;
}

.contacts-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(17, 91, 186, .08);
  color: var(--color-blue);
  margin-bottom: 8px;
}

.contacts-card h3 {
  font-size: 18px;
  margin-bottom: 4px;
}

.contacts-card p,
.contacts-card a {
  font-size: 16px;
  line-height: 26px;
  color: var(--color-text);
  font-weight: 600;
  white-space: pre-line;
  transition: color .2s ease;
}

.contacts-card:hover p,
.contacts-card:hover a {
  color: var(--color-blue);
}

.contacts-map {
  width: 100%;
  min-height: 360px;
  border-radius: 10px;
  overflow: hidden;
}

@media (max-width: 900px) {
  .contacts-cards {
    grid-template-columns: 1fr;
  }

  .contacts-map {
    min-height: 280px;
  }
}
