/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: #141414;
  color: white;
  font-size: 16px;
  line-height: 1.5;

  /* Sticky footer setup */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#header {
  text-align: center;
  padding: 20px;
  margin-bottom: 20px;
  flex-shrink: 0;
}

img {
  max-width: 100%;
}

/* Content area that pushes footer down */
main {
  flex-grow: 1;
  display: flex;
  justify-content: center;
}

section {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  width: 100%;
  margin: 0px 30px 40px 30px;
  align-items: center;
  align-content: center;
}

/* Make entire card clickable */
.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* Card styles */
.card {
  background: linear-gradient(#2b2b2b 50%, #c4c4c5 50%);
  background-size: 100% 200%;
  background-position: 0 2.5%;
  border-radius: 8px;
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: background-position 0.5s ease, box-shadow 0.3s ease;
  min-height: 250px;
  justify-content: center;
  padding: 0;
}

.card-link:hover .card {
  background-position: 0 100%;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
}

.icon-wrapper {
  width: 70px;
  height: 70px;
  margin-bottom: 20px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 50%;
  transition: background-color 0.5s ease, color 0.5s ease;
}

.card:hover .icon-wrapper {
  background-color: #c4c4c5;
  color: #141414;
}

h3 {
  font-size: 22px;
  font-weight: 600;
  color: #c4c4c5;
  margin: 0 0 15px 0;
  transition: color 0.5s ease;
}

.card p {
  color: #c4c4c5;
  font-weight: 500;
  transition: color 0.5s ease;
}

.card-link:hover .card h3,
.card-link:hover .card p {
  color: #141414;
}

/* Footer styles */
#footer {
  width: 100%;
  padding: 20px;
  text-align: center;
  color: white;
  opacity: 0.7;
  background-color: #1a1a1a;
  font-size: 14px;
  flex-shrink: 0;
  position: relative;
}

#footer p {
  margin-bottom: 10px;
  color: white;
}

/* Responsive */
@media (max-width: 768px) {
  section {
    grid-template-columns: 1fr;
    padding: 0 15px;
  }

  .card {
    margin: 0;
    padding: 20px;
    min-height: 0;
  }

  .icon-wrapper {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
  }

  h3 {
    font-size: 20px;
    margin-bottom: 12px;
  }

  .card p {
    font-size: 15px;
  }
}
