
/* Terra Computer — відновлене оформлення новин */

.terra-news-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 10px 22px;
}

.terra-news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.terra-news-card {
  position: relative;
  min-width: 0;
  background: #fff;
  border-radius: 13px;
  border: 1px solid #eee;
  padding: 14px;
  overflow: hidden;
  overflow-wrap: anywhere;
  box-sizing: border-box;
}

.terra-news-all .terra-news-card {
  min-height: 380px;
  height: 380px;
  cursor: pointer;
  overflow: auto;
}

.terra-news-all .terra-news-card:hover,
.terra-news-side .terra-news-card:hover {
  border-color: #239d43;
}

.terra-news-date {
  color: #666;
  font-size: 11px;
  margin: 0 0 7px;
  text-align: left;
}

.terra-news-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #ccc;
}

.terra-news-image {
  display: block;
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
  margin: 12px auto;
}

.terra-news-content {
  font-size: 11px;
  line-height: 1.45;
  border-top: 1px solid #ddd;
  padding-top: 9px;
  overflow-wrap: anywhere;
}

.terra-news-content img {
  max-width: 100%;
  height: auto;
}

.terra-news-content p {
  margin: 5px 0;
}

.terra-news-plain {
  white-space: pre-line;
}

.terra-news-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 15px;
}

.terra-news-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid #249e44;
  border-radius: 50%;
  background: #ddd;
  color: #168638;
  cursor: pointer;
  font-size: 12px;
  padding: 0;
}

.terra-news-button:hover {
  background: #bdeac8;
}

.terra-news-active {
  background: #239d43;
  color: #fff;
}

.terra-news-button:disabled {
  color: #aaa;
  border-color: #ddd;
  opacity: .6;
  cursor: default;
}

.terra-news-selected-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.terra-news-large {
  min-height: 650px;
  padding: 35px 22px 20px;
  border: 0;
  cursor: default;
}

.terra-news-large .terra-news-date {
  font-size: 13px;
}

.terra-news-large .terra-news-title {
  font-size: 20px;
  line-height: 1.35;
  padding-bottom: 18px;
  margin-bottom: 20px;
}

.terra-news-large .terra-news-image {
  max-height: 450px;
  margin: 20px auto;
}

.terra-news-large .terra-news-content {
  font-size: 14px;
  line-height: 1.55;
  padding: 14px 0;
}

.terra-news-back {
  position: absolute;
  left: 0;
  top: 0;
  border: 0;
  background: #249d43;
  color: #fff;
  padding: 6px 17px;
  border-radius: 0 0 22px 0;
  font-size: 12px;
  cursor: pointer;
}

.terra-news-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.terra-news-side .terra-news-card {
  flex: 1 1 0;
  min-height: 0;
  max-height: 318px;
  overflow: auto;
  cursor: pointer;
}

.terra-news-side .terra-news-title {
  font-size: 11px;
}

.terra-news-side .terra-news-content {
  font-size: 10px;
}

.terra-news-side .terra-news-image {
  max-height: 140px;
}

.terra-news-status {
  padding: 40px;
  text-align: center;
}

@media(max-width: 800px) {
  .terra-news-selected-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .terra-news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .terra-news-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media(max-width: 550px) {
  .terra-news-grid,
  .terra-news-side {
    grid-template-columns: minmax(0, 1fr);
  }

  .terra-news-all .terra-news-card {
    height: auto;
    min-height: 250px;
  }

  .terra-news-large {
    padding: 35px 14px 20px;
  }
}
