
.news-feed {
  max-height:100%; 
  margin: 0 auto;
  overflow:auto;
}

.post {
  background: #ddeeff;
  border-radius: 10px;
  padding: 15px 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.post-header {
  font-weight: bold;
  color: #2a5885;
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.post-text {
  font-size: 1rem;
  color: #222;
  margin-bottom: 12px;
  line-height: 1.5;
}

.post-media img,
.post-media video {
  width: 100%;
  border-radius: 6px;
  max-height: 400px;
  object-fit: cover;
}

.post-time {
  font-size: 13px;
  color: #777;
  margin-top: 12px;
  text-align: right;
}

.post-gallery-wrapper {
  position: relative;
  overflow: hidden;
  max-width: 100%;
}
.post-gallery {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  gap: 10px;
  padding: 10px;
}

.post-gallery img,
.post-gallery iframe {
  max-width: 280px;
  height: 200px;
  /*height: auto;*/
  /*width: auto;*/
  flex-shrink: 0; /* Не сжимать! */
  object-fit: contain; /* убрать, если не нужно вписывать */
}

.post-gallery::-webkit-scrollbar {
  display: none; /* скрытие скролла */
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background-color: rgba(0,0,0,0.5);
  color: white;
  border: none;
  font-size: 24px;
  padding: 5px 10px;
  cursor: pointer;
  user-select: none;
}

.gallery-arrow.left {
  left: 0;
}

.gallery-arrow.right {
  right: 0;
}

.gallery-counter {
  position: absolute;
  bottom: 5px;
  right: 10px;
  background: rgba(0,0,0,0.5);
  color: white;
  padding: 2px 6px;
  font-size: 14px;
  border-radius: 4px;
}

.post-text-extra {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.post-text-extra.open {
  max-height: 500px; /* Достаточно большое значение */
}

.hashtags {
  font-size: 0.8rem;
  line-height: 0.8rem;
  display: flex;
  flex-wrap: wrap; /* ключ для переноса строк */
 
}

.hashtags a {
  margin-right: 0.8rem;
}

.read-more-toggle,
.read-less-toggle {

  display: block;
  text-align: right;
  margin-top: 8px;
  cursor: pointer;
  text-decoration: underline;
  font-size: 0.8rem;
}

.full-text {
  max-height: 0;
  overflow: auto;
  transition: max-height 0.4s ease;
}

.full-text.expanded {
  max-height: 1000px; /* достаточно, чтобы вместить содержимое */
}

@media (max-width: 1000px) 
{
  .news-feed
  {
    max-height:30rem;
  }
  .post-text
  {
    font-size:0.9rem;
    line-height:0.9;
  }
}

/*****************************/


/* Затемнённый фон */
.genform-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: overlayFadeIn 0.3s ease;
}

/* Модальное окно формы */
.genform-modal {
  background: white;
  padding: 1.2rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  width: 60%;
  max-width: 800px;
  min-width: 320px;
  max-height: 80vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem; /* уменьшенный вертикальный отступ */
  animation: formFadeIn 0.3s ease;
}

/* Заголовок */
.genform-modal h2 {
  margin-bottom: 0.5rem;
  text-align: center;
}

/* Метки */
.genform-label {
  margin-bottom: 0.3rem; /* уменьшенный отступ */
  font-weight: bold;
  display: block;
}

/* Контейнер для даты и времени в одной строке */
.genform-date-time {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

/* Поля ввода */
.genform-input {
  flex: 1;
  padding: 0.4rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  min-width: 0;
  font-family: inherit;
}

/* Текстовое поле (textarea), растягивается только по высоте */
.genform-textarea {
  width: 100%;
  resize: vertical;
  min-height: 80px;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
}

/* Поля для ссылок на изображения - идут столбиком */
.genform-image-input {
  display: block;
  width: 100%;
  margin-bottom: 0.5rem;
  padding: 0.4rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
}

/* Кнопки */
.genform-button {
  padding: 0.6rem;
  border: none;
  border-radius: 4px;
  background-color: #2e3b4e;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s;
  font-size: 1rem;
  font-family: inherit;
}

.genform-button:hover {
  background-color: #1c2533;
}


.genform-image-input-wrapper {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  margin-bottom: 10px;
}

.genform-image-preview {
  width: 70px;
  height: 70px;
  overflow: hidden;
  text-align: center;
  line-height: 70px;
  border: 1px solid #ccc;
}

.genform-image-preview img {
  max-width: 100%;
  max-height: 100%;
  vertical-align: middle;
}



/* Анимации */
@keyframes formFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes overlayFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: scale(0.95);
  }
}

@keyframes overlayFadeOut {
  to {
    opacity: 0;
  }
}

/* Классы для скрытия с анимацией */
.genform-modal.fade-out {
  animation: fadeOut 0.3s forwards;
}

.genform-overlay.fade-out {
  animation: overlayFadeOut 0.3s forwards;
}


  .news-feed::-webkit-scrollbar {
    height: 8px;
    width:3px;
  }

  .news-feed::-webkit-scrollbar-track {
    /*background: #e0e0e0;*/
    border-radius: 4px;
  }

  .news-feed::-webkit-scrollbar-thumb {
    background-color: #0a8fff;
    border-radius: 4px;
  }




/**********************/
