.portfolio-section {
  z-index: 1;
}

.compact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 40px;
}

.compact-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.compact-card:hover {
  transform: translateY(-10px);
  border-color: rgba(255, 204, 0, 0.4);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

/* Изображение */
.card-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.5s ease;
}

/* Скрытый оверлей с текстом "Что сделали" */
.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 8, 8, 0.85); /* Темный фон при наведении */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 25px;
  opacity: 0;
  transition: 0.4s ease;
  text-align: center;
}

.compact-card:hover .card-overlay {
  opacity: 1;
}

.compact-card:hover .card-image img {
  transform: scale(1.1);
}

/* Контент внутри оверлея */
.overlay-content p {
  color: #ddd;
  font-size: 14px;
  line-height: 1.5;
  margin: 10px 0 15px;
}

.work-num {
  color: var(--brand-color);
  font-family: monospace;
  font-weight: 900;
  font-size: 20px;
}

.mini-link {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  border: 1px solid var(--brand-color);
  padding: 5px 15px;
  border-radius: 20px;
  transition: 0.3s;
}

.mini-link:hover {
  background: var(--brand-color);
  color: #000;
}

/* Нижняя часть карточки (Заголовок) */
.card-info {
  padding: 20px;
}

.card-info h3 {
  color: #fff;
  font-size: 18px;
  margin: 0 0 5px 0;
}

.card-info .category {
  color: var(--brand-color);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}

.more-button {
  border-radius: 15px;
  background-color: var(--bg-card);
  border: 1px solid var(--brand-color);
  width: 100%;
  padding: 15px 0;
  display: flex;
  justify-content: center;
  text-decoration: none;
  color: white;
  transition: 0.6s;
  max-width: 900px;
  margin: 30px auto 0;
  font-size: 18px;
  font-weight: 700;
}

.more-button:hover {
  background-color: var(--brand-color);
  opacity: 0.9;
  color: black;
  transform: translateY(-3px);
}
