/* Розділ «Підприємства громади»: перелік підприємств і детальна сторінка.
   Палітра та ритм повторюють education.css / tourism.css. */

.enterprises-page__body {
  padding-top: 0;
  padding-bottom: 64px;
}

.enterprises__lead {
  max-width: 760px;
  margin: 0 0 8px;
  color: #53677D;
  font-size: 16px;
  line-height: 1.7;
}

/* ---------- Перелік ---------- */

.enterprises__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.enterprises__card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(37, 51, 73, 0.1);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(18, 27, 38, 0.05);
}

.enterprises__card-link {
  display: flex;
  height: 100%;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.enterprises__card-link:hover,
.enterprises__card-link:focus {
  color: inherit;
  text-decoration: none;
}

/* Висота задана явно: у колонковому flex-контейнері aspect-ratio
   згортається до власної висоти знімка. */
.enterprises__card-photo {
  display: block;
  width: 100%;
  height: 220px;
  flex: 0 0 auto;
  object-fit: cover;
}

.enterprises__card-photo_empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #E3ECF7;
  color: #9BB4D4;
  font-size: 44px;
}

.enterprises__card-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 20px 22px 22px;
}

.enterprises__card-name {
  display: block;
  margin-bottom: 10px;
  color: #10254B;
  font-family: "Work Sans", Arial, sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.enterprises__card-text {
  display: block;
  margin-bottom: 16px;
  color: #53677D;
  font-size: 15px;
  line-height: 1.6;
}

.enterprises__card-more {
  display: inline-flex;
  align-items: center;
  margin-top: auto;
  gap: 10px;
  color: #1B5FAF;
  font-size: 15px;
  font-weight: 600;
}

.enterprises__card:hover {
  border-color: rgba(27, 95, 175, 0.4);
  box-shadow: 0 12px 26px rgba(18, 27, 38, 0.1);
}

.enterprises__card:hover .enterprises__card-more i {
  transform: translateX(3px);
}

.enterprises__empty {
  margin: 0;
  padding: 26px 24px;
  border: 1px dashed rgba(37, 51, 73, 0.2);
  border-radius: 10px;
  background: #F5F8FC;
  color: #53677D;
  font-size: 15px;
}

/* ---------- Детальна сторінка ---------- */

.enterprise {
  max-width: 900px;
  color: #1C2633;
  font-family: "Work Sans", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

.enterprise__photo {
  display: block;
  width: 100%;
  height: 360px;
  margin-bottom: 26px;
  border-radius: 10px;
  object-fit: cover;
}

.enterprise__lead {
  margin: 0 0 8px;
  color: #253349;
  font-size: 18px;
  line-height: 1.7;
}

.enterprise__section {
  margin-top: 38px;
}

.enterprise__section-title {
  position: relative;
  margin: 0 0 20px;
  padding-bottom: 15px;
  color: #10254B;
  font-family: "Work Sans", Arial, sans-serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
}

.enterprise__section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 56px;
  height: 4px;
  border-radius: 2px;
  background: #F2B716;
}

/* Текст із редактора: заголовки, списки й таблиці приводимо до вигляду порталу. */
.enterprise__text p {
  margin: 0 0 14px;
  color: #253349;
  font-size: 16px;
  line-height: 1.7;
}

.enterprise__text h3,
.enterprise__text h4 {
  margin: 24px 0 10px;
  color: #10254B;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
}

.enterprise__text ul,
.enterprise__text ol {
  margin: 0 0 16px;
  padding-left: 22px;
  color: #253349;
  font-size: 16px;
  line-height: 1.7;
}

.enterprise__text li {
  margin-bottom: 6px;
}

.enterprise__text img {
  max-width: 100%;
  height: auto;
  margin: 10px 0 18px;
  border-radius: 8px;
}

.enterprise__text table {
  width: 100%;
  margin: 10px 0 20px;
  border-collapse: collapse;
  font-size: 15px;
}

.enterprise__text th,
.enterprise__text td {
  padding: 10px 14px;
  border: 1px solid rgba(37, 51, 73, 0.14);
  text-align: left;
  vertical-align: top;
}

.enterprise__text th {
  background: #EAF2FB;
  color: #10254B;
  font-weight: 600;
}

/* ---------- Потреби ---------- */

.enterprise__needs {
  margin-top: 38px;
  padding: 26px 28px 10px;
  border-left: 4px solid #F2B716;
  border-radius: 10px;
  background: #FBF6E7;
}

.enterprise__needs-title {
  margin: 0 0 16px;
  color: #10254B;
  font-family: "Work Sans", Arial, sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
}

.enterprise__needs .enterprise__text th {
  background: #F5EBCB;
}

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

.enterprise__contacts {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.enterprise__contacts li {
  display: grid;
  align-items: start;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  color: #253349;
  font-size: 15px;
  line-height: 1.5;
}

.enterprise__contacts i {
  margin-top: 3px;
  color: #1B5FAF;
  text-align: center;
}

.enterprise__contacts a {
  color: #1B5FAF;
  word-break: break-word;
}

.enterprise__back {
  display: inline-flex;
  align-items: center;
  margin-top: 38px;
  gap: 10px;
  color: #1B5FAF;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.enterprise__back:hover,
.enterprise__back:focus {
  color: #164D8F;
  text-decoration: none;
}

/* ---------- Адаптив ---------- */

@media (max-width: 991px) {
  .enterprise__photo {
    height: 280px;
  }

  .enterprise__section-title {
    font-size: 23px;
  }
}

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

  .enterprises__card-photo {
    height: 190px;
  }

  .enterprise__photo {
    height: 200px;
  }

  .enterprise__needs {
    padding: 20px 18px 6px;
  }

  .enterprise__text table {
    display: block;
    overflow-x: auto;
  }
}
