.router-section {
  padding: 4rem 5rem;
  background-color: #f5f5f5;
	position: relative;
}
.router-heading {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.router-heading::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background-color: #e63946;
  margin: 1rem auto 0;
  border-radius: 2px;
}

.router-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 2rem;
  justify-content: center;
}

.router-block {
  position: relative;
  background-size: cover;
  background-position: right center;
  height: 280px;
  border-radius: 1rem;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.router-block::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.6) 35%, rgba(0, 0, 0, 0.05) 100%);
  border-radius: 1rem;
  pointer-events: none;
  z-index: 0;
}

.router-block:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.router-content {
  width: 50%;
  position: relative;
  z-index: 1;
  color: white;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  white-space: normal;
  overflow: visible;
  word-break: keep-all; 
  overflow-wrap: normal;     
}

.router-title {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  font-weight: 600;

  /* Перенос — только целыми словами */
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;
}

.router-link {
  position: relative;
  color: #e63946;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  width: fit-content;
}

.router-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background-color: #e63946;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.router-link:hover::after {
  transform: scaleX(1);
}