* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #f9f9f9;
  color: #333;
  transition: background-color 0.3s, color 0.3s;
}

body.dark {
  background-color: #1e1e1e;
  color: #f0f0f0;
}

header {
  text-align: center;
  padding: 2rem 1rem;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

header button {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border: none;
  background: #007BFF;
  color: white;
  border-radius: 5px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 2rem;
  max-width: 1200px;
  margin: auto;
}

.card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  min-height: 460px;
}

.card:hover {
  transform: scale(1.02);
}

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

.card-info {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}


.card-info h3 {
  margin-bottom: 0.3rem;
}

.card-info p {
  font-size: 0.9rem;
  color: #666;
}

.card-info span {
  display: block;
  margin: 0.5rem 0;
  font-size: 0.85rem;
  color: #999;
}

.view-btn {
  padding: 0.4rem 0.8rem;
  background: #28a745;
  border: none;
  color: white;
  border-radius: 5px;
  cursor: pointer;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 10px;
}

#closeModal {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  color: white;
  cursor: pointer;
}

#scrollToTopBtn {
  position: fixed;
  bottom: 20px;
  right: 25px;
  background-color: #007BFF;
  color: white;
  padding: 10px 14px;
  border: none;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: none;
  z-index: 999;
}

body.dark .card {
  background-color: #2c2c2c;
  color: #f0f0f0;
}

.animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate.visible {
  opacity: 1;
  transform: translateY(0);
}


body.dark header {
  background-color: #2c2c2c;
  color: #f0f0f0;
}

body.dark header button {
  background-color: #444;
  color: #fff;
}
