body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #f4f4f4;
}

.homeimg {
  position: relative;
  width: 100%;
  height: 60vw;
  max-height: 900px;
  min-height: 400px;
  background-image: url("images/img4.png");
  background-size: contain;
  background-position: top center;
  background-repeat: no-repeat;
}

h1 {
  color: #333;
  text-align: center;
}

.bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background-color: hsla(0, 100%, 58%, 0.106);
  box-sizing: border-box;
  overflow: auto;
  padding: 20px;
}

.page-content {
  padding: 20px;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.page-content.show {
  opacity: 1;
  transform: translateY(0);
}

.title {
  text-align: center;
  padding: 20px;
}

.slideshow-box {
  width: 300px;
  height: 200px;
  margin: 20px auto;
  overflow: hidden;
  border: 2px solid white;
  border-radius: 10px;
}

.slideshow-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.button-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.button {
  background-color: transparent;
  border: 2px solid white;
  color: #c62828;
  padding: 15px 32px;
  text-align: center;
  text-decoration: none;
  font-size: 16px;
  margin: 10px;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.button:hover {
  background-color: white;
  color: #c62828;
  transform: translateY(-2px);
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 32px 40px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: start;
}

.resource-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.resource-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 320px);
  box-sizing: border-box;
}

.resource-description {
  max-width: 420px;
  margin: 0;
  color: #333;
  line-height: 1.5;
}

.resource-image-link {
  display: block;
  width: 100%;
  max-width: 560px;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.resource-image-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.14);
}

.resource-preview {
  width: 100%;
  height: 340px;
  object-fit: contain;
  object-position: center top;
  border: 1px solid #c62828;
  border-radius: 12px;
  background: white;
  display: block;
}

.resource-preview-academy {
  object-position: center center;
}

@media (max-width: 800px) {
  .resources-grid {
    grid-template-columns: 1fr;
  }

  .resource-link,
  .resource-image-link,
  .resource-preview,
  .resource-description {
    max-width: 100%;
  }

  .resource-preview {
    height: auto;
  }
}