/* --- Resources Section Wrapper --- */
.resources-section {
  width: 100%;
  background-color: #FFFFFF;
  padding: 80px 0;
  box-sizing: border-box;
}

.resources-container {
  max-width: 1374px; /* Matches layout alignment bounds */
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* --- Resources Grid Layout --- */
resources-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  width: 100%;
  max-width: 1334px;
  box-sizing: border-box;
}

/* --- Resource Card Component Wrapper --- */
resource-card {
  display: block;
  height: 100%;
  box-sizing: border-box;
}

.resource-card-container {
  position: relative;
  height: 380px; /* Consistent with certification cards height */
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 24px 24px 0; /* Left and right padding kept, bottom padding set to 0 */
  cursor: pointer;
  box-sizing: border-box;
  text-decoration: none;
}

/* Gray gradient background for no-image cards */
.resource-card-container.no-image {
  background: linear-gradient(180deg, #FFFFFF 0%, #D8E2EF 100%);
}

/* Background image handling with smooth hover scale */
.resource-card-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 1;
}

.resource-card-container:hover .resource-card-bg {
  transform: scale(1.05);
}

/* Card gradient shade */
.resource-card-shade {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.1) 0%, rgba(15, 23, 42, 0.45) 100%);
  z-index: 2;
}

/* Bottom-docked blue box overlay touching bottom but floating on sides */
.resource-card-overlay {
  position: relative;
  width: 100%;
  background-color: #0052ED; /* USAII Accent Blue */
  padding: 24px 20px;
  text-align: center;
  z-index: 3;
  box-sizing: border-box;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.resource-card-container:hover .resource-card-overlay {
  transform: translateY(-4px); /* Lift up on hover */
  background-color: #0652C0; /* Darker blue color transition on hover */
}

/* Category Tag Badge */
.resource-card-tag {
  background-color: rgba(15, 23, 42, 0.4); /* Dark translucent navy background */
  color: #FFFFFF;
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 2px;
  margin-bottom: 12px;
  display: inline-block;
  box-sizing: border-box;
}

/* Description text */
.resource-card-desc {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.4;
  margin: 0;
}

/* --- Responsive Media Queries --- */
@media (max-width: 1024px) {
  .resources-section {
    padding: 60px 0;
  }
  
  resources-grid {
    grid-template-columns: repeat(3, 1fr); /* Symmetric 3-columns for tablet */
    gap: 20px;
  }
  
  .resource-card-container {
    height: 350px; /* Scaled down height for tablet proportions */
    padding: 20px 20px 0;
  }
  
  .resource-card-desc {
    font-size: 13.5px;
  }
  
  .resource-card-tag {
    font-size: 10px;
    margin-bottom: 8px;
  }
}

@media (max-width: 768px) {
  .resources-section {
    padding: 50px 0;
  }
  
  resources-grid {
    grid-template-columns: 1fr; /* 1-column stack on mobile */
    gap: 20px;
    justify-items: center;
  }
  
  resource-card {
    width: 100%;
    max-width: 380px;
  }
  
  .resource-card-container {
    height: 340px; /* Tighter height for mobile viewports */
    padding: 20px 20px 0;
  }
  
  .resource-card-overlay {
    padding: 20px 16px;
  }
  
  .resource-card-tag {
    font-size: 10px;
    margin-bottom: 8px;
    padding: 3px 10px;
  }
  
  .resource-card-desc {
    font-size: 13px;
  }
}
