* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Inter, sans-serif;
}

body {
  background: #f7f9fc;
  color: #222;
}

/* контейнер */

.container {
  max-width: 1200px;
  margin: auto;
  padding: 60px 20px;
}

/* заголовки */

.title {
  font-size: 40px;
  text-align: center;
  margin-bottom: 10px;
}

.subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 50px;
}

/* сетка сертификатов */

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}

/* карточка */

.cert-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: 0.3s;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.cert-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.cert-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.cert-info {
  padding: 20px;
}

.cert-info h3 {
  font-size: 18px;
  margin-bottom: 5px;
}

.cert-info p {
  color: #888;
  font-size: 14px;
}

/* ===== МОДАЛКА ===== */

.cert-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
  z-index: 999;
}

.cert-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-image {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
}

.close-modal {
  position: absolute;
  top: 40px;
  right: 50px;
  font-size: 40px;
  color: white;
  cursor: pointer;
}

/* BACK BUTTON */

.back-btn {
  position: fixed;
  top: 30px;
  left: 30px;

  padding: 12px 20px;
  border-radius: 14px;

  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);

  color: #222;
  text-decoration: none;
  font-weight: 500;

  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);

  transition: 0.3s;
  z-index: 1000;
}

.back-btn:hover {
  transform: translateY(-2px);
  background: white;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

/* MOBILE */

@media (max-width: 768px) {
  .back-btn {
    top: 15px;
    left: 15px;
    padding: 10px 16px;
    font-size: 14px;
  }
}
