body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
}

.wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-section {
  padding: 58px 0;
  flex: 1;
}

.timeline {
  text-align: center;
  margin-bottom: 35px;
}

.timeline-link {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-color);
  text-decoration: none;
  margin: 0 10px;
  transition: var(--transition);
}

.timeline-link:hover {
  color: var(--primary-color);
}

.timeline-link.active {
  color: var(--primary-color);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.news-block {
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  padding: 18px;
  background-color: var(--light-color);
  cursor: pointer;
  transition: var(--transition);
}

.news-block:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow);
}

.news-block .news-date {
  font-size: 14px;
  color: #888;
  margin-bottom: 8px;
}

.news-block .news-title {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-color);
  margin-bottom: 7px;
}

.news-block .news-short-text {
  font-size: 14px;
  color: #666;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  overflow-y: auto;
}

.modal-content {
  background-color: var(--light-color);
  width: 90%;
  max-width: 1200px;
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  position: relative;

}

.modal.open {
  display: flex;
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 28px;
  cursor: pointer;
  color: var(--text-color);
  transition: var(--transition);
}

.close-btn:hover {
  color: var(--primary-color);
}

.news-title {
  font-size: 24px;
  color: var(--dark-color);
  margin-bottom: 10px;
}

.news-date {
  font-size: 16px;
  color: #888;
  margin-bottom: 20px;
}

.news-full-text {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
}

/* Footer */
.footer {
  flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .news-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .news-grid {
    grid-template-columns: 1fr;
  }

  .news-block .news-title {
    font-size: 16px;
  }

  .news-block .news-short-text {
    font-size: 13px;
  }

  .modal-content {
    width: 95%;
    height: 95vh;
    padding: 20px;
  }

  .news-title {
    font-size: 20px;
  }

  .news-date {
    font-size: 14px;
  }

  .news-full-text {
    font-size: 14px;
  }
}

.news-full-text {
    line-height: 1.8;
    font-size: 16px;
    padding: 0 20px;
    max-height: 80vh;
    overflow-y: auto;
    font-family: 'Roboto', sans-serif;
}

.news-full-text h3 {
    font-size: 28px;
    margin: 30px 0 18px;
    color: var(--dark-color);
    font-weight: 700;
}

.news-full-text h4 {
    font-size: 22px;
    margin: 25px 0 14px;
    color: var(--primary-color);
    font-weight: 600;
}

.news-full-text ul, .news-full-text ol {
    margin: 18px 0;
    padding-left: 25px;
}

.news-full-text li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.news-full-text table {
    margin: 28px 0;
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.news-full-text table th,
.news-full-text table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.news-full-text table th {
    background: #f8f8f8;
    font-weight: 600;
}

.news-full-text blockquote {
    margin: 30px 0;
    padding: 20px 25px;
    background: #f8f8f8;
    border-left: 5px solid var(--primary-color);
    font-style: italic;
    color: #555;
    border-radius: 0 8px 8px 0;
}