/* Modern Resources Page Styling */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-image: url("../../images/bg/classroomclass.webp");
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  position: relative;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  color: #ffffff;
  overflow-y: auto;
}

/* Dark overlay */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.65);
  z-index: -1;
}

main {
  padding: 80px 20px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Header Section */
.resources-header {
  text-align: center;
  margin-bottom: 50px;
  animation: fadeIn 1s ease;
}

.resources-header h1 {
  font-size: 3.8rem;
  margin-bottom: 20px;
  color: #ffffff;
  background: linear-gradient(135deg, #ffffff, #ff85c5, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 20px rgba(255, 105, 180, 0.5);
  letter-spacing: 1.5px;
  font-weight: 800;
}

.resources-tagline {
  font-size: 1.35rem;
  max-width: 850px;
  margin: 0 auto;
  color: #f0f0f0;
  line-height: 1.8;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Category Section */
.resources-category {
  margin-bottom: 60px;
  animation: fadeIn 1s ease;
}

.category-header {
  margin-bottom: 30px;
  position: relative;
}

.category-header h2 {
  font-size: 2.2rem;
  color: #ffffff;
  text-shadow: 0 0 8px rgba(255, 105, 180, 0.5);
  margin-bottom: 15px;
  text-align: center;
}

.category-line {
  height: 3px;
  width: 100px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0),
    rgba(255, 105, 180, 0.7),
    rgba(255, 255, 255, 0)
  );
  margin: 0 auto;
}

/* Resources Boxes Grid */
.resources-boxes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

/* Resource Box Styling */
.resource-box {
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 
    0 10px 35px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  text-decoration: none;
  color: white;
  display: block;
  height: 100%;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.resource-box::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.resource-box:hover::after {
  opacity: 1;
}

.resource-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(106, 13, 173, 0.9),
    rgba(75, 0, 130, 0.9)
  );
  z-index: 1;
  opacity: 0.9;
  transition: opacity 0.5s ease;
}

/* Different gradient colors for different categories */
.resource-box:nth-child(3n + 2)::before {
  background: linear-gradient(
    135deg,
    rgba(233, 30, 99, 0.9),
    rgba(156, 39, 176, 0.9)
  );
}

.resource-box:nth-child(3n + 3)::before {
  background: linear-gradient(
    135deg,
    rgba(0, 150, 136, 0.9),
    rgba(38, 166, 154, 0.9)
  );
}

.resource-box:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 
    0 18px 45px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.resource-box:hover::before {
  opacity: 1;
}

.resource-content {
  position: relative;
  padding: 35px 28px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Icon Container */
.icon-container {
  width: 90px;
  height: 90px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 auto 25px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 
    0 6px 20px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backdrop-filter: blur(10px);
}

.resource-box:hover .icon-container {
  transform: scale(1.15) rotate(10deg);
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.4);
}

.resource-icon {
  width: 55px;
  height: 55px;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.resource-box:hover .resource-icon {
  transform: scale(1.1);
}

/* Text Elements */
.resource-box h3 {
  font-size: 1.65rem;
  margin-bottom: 18px;
  color: #ffffff;
  text-align: center;
  text-shadow: 
    0 3px 8px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(255, 255, 255, 0.3);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.resource-box p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #f5f5f5;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Footer Section */
.resources-footer {
  background: rgba(30, 30, 45, 0.85);
  border-radius: 15px;
  padding: 40px;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  text-align: center;
  margin-top: 60px;
}

.resources-footer h2 {
  font-size: 2.2rem;
  margin-bottom: 15px;
  color: #ffffff;
  text-shadow: 0 0 5px rgba(255, 105, 180, 0.4);
}

.resources-footer p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #e0e0e0;
  max-width: 600px;
  margin: 0 auto 25px;
}

.discord-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #7289da, #5865f2);
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.discord-button:hover {
  transform: translateY(-3px);
  background: linear-gradient(135deg, #7289da, #4752c4);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.discord-button svg {
  transition: transform 0.3s ease;
}

.discord-button:hover svg {
  transform: translateX(5px);
}

/* Replace contribute-button styles with Discord button styles */
.contribute-button {
  display: none; /* Hide the old button style */
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Styles */
@media (max-width: 768px) {
  .resources-header h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
  }

  .resources-tagline {
    font-size: 1rem;
    margin-bottom: 15px;
    padding: 0 10px;
  }

  .category-header h2 {
    font-size: 1.6rem;
    margin-bottom: 10px;
  }

  .resources-boxes {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .resource-content {
    padding: 20px 15px;
  }

  .icon-container {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
  }

  .resource-icon {
    width: 35px;
    height: 35px;
  }

  .resource-box h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
  }

  .resource-box p {
    font-size: 0.95rem;
  }

  .resources-footer {
    padding: 30px 20px;
    margin-top: 40px;
  }

  .resources-footer h2 {
    font-size: 1.8rem;
  }

  .resources-footer p {
    font-size: 0.95rem;
    margin-bottom: 20px;
  }

  .discord-button {
    padding: 12px 20px;
    font-size: 0.95rem;
    width: 100%;
  }
}

/* Medium screens */
@media (min-width: 769px) and (max-width: 1024px) {
  .resources-boxes {
    grid-template-columns: repeat(2, 1fr);
  }

  .category-header h2 {
    font-size: 2rem;
  }
}

/* Large screens */
@media (min-width: 2560px) {
  main {
    max-width: 1800px;
  }

  .resources-header h1 {
    font-size: 4.5rem;
  }

  .resources-tagline {
    font-size: 1.6rem;
    max-width: 1000px;
  }

  .category-header h2 {
    font-size: 2.8rem;
  }

  .resources-boxes {
    grid-template-columns: repeat(4, 1fr);
  }

  .resource-box h3 {
    font-size: 1.8rem;
  }

  .resource-box p {
    font-size: 1.2rem;
  }

  .resources-footer h2 {
    font-size: 2.8rem;
  }

  .resources-footer p {
    font-size: 1.4rem;
  }
}
