/**
 * Resources Page Template Styles
 * Custom styles for the Resources page template with improved typography and layout
 */

/* Main Layout */
.resources-page-wrapper {
  padding: 40px 20px;
  background-color: #fff;
}

.resources-container {
  max-width: 1400px;
  margin: 0 auto;
}

.resources-main-content {
  width: 100%;
}

/* Page Title and Intro */
.resources-title {
    text-align: left !important;
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 400;
    font-size: 3.4rem;
    line-height: 1.2;
    margin-bottom: 30px;
    text-transform: none;
    color: #222222 !important;
    margin-top: 0px;
    
}

.resources-intro {
  margin-bottom: 35px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #333;
}

/* Resources Grid */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr); /* 5 per row for desktop */
  gap: 20px;
  margin-top: 30px;
}

/* Individual Resource Item */
.resource-item {
  display: flex;
  flex-direction: column;
  background-color: #fff;
  border: none;
  overflow: hidden;
  box-shadow: none;
  transition: none;
  /*  height: 380px; */
  min-height: 380px;
}

.resource-item:hover {
  transform: none;
  box-shadow: none;
}

.resource-image {
  overflow: hidden;
  height: 200px; /* Increased from 180px to match insights */
}

.resource-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: none;
}

.resource-item:hover .resource-image img {
  transform: none;
}

.resource-content {
  padding: 15px 0;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Add !important to override style.css */
.resource-title {
  margin-top: 0 !important;
  margin-bottom: 8px !important;
  font-size: 0.9rem !important;
  line-height: 1.3 !important;
  color: #041640 !important;
  font-weight: 700 !important;
  max-height: 2.6em !important;
  overflow: hidden !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  font-family: "Noto Sans KR", sans-serif !important;
}

.resource-excerpt {
  margin-bottom: 16px;
  color: #333;
  font-size: 0.8rem;
  line-height: 1.4;
  flex-grow: 1;
  max-height: 4.2em;
  overflow: visible;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.resource-download-button {
  display: inline-block;
  background-color: #404a9a;
  color: #fff !important;
  padding: 0.5rem 1rem;
  text-decoration: none;
  font-family: "Noto Sans KR", sans-serif;
  font-size: 0.8rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  border-radius: 0;
  align-self: flex-start;
  border-bottom: 1px solid #0019c8;
  margin-top: auto;
}

a.resource-download-button,
button.resource-download-button {
  color: #fff !important;
}


.resource-download-button:hover {
  background: #4e5799;
  color: #fff !important;
  text-decoration: none;
}

/* No Resources Found */
.no-resources-found {
  text-align: center;
  padding: 40px;
  background-color: #fff;
}

/* Responsive Styles */
@media (max-width: 1680px) {
  /* Laptop */
  .resources-grid {
    grid-template-columns: repeat(4, 1fr); /* 4 per row for laptop */
  }
}

@media (max-width: 1200px) {
  /* Tablet */
  .resources-grid {
    grid-template-columns: repeat(3, 1fr); /* 3 per row for tablet */
  }
  
  .resources-title {
    font-size: 2.2rem !important;
  }
  
  .resources-intro {
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  /* Small tablet */
  .resources-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 per row for small tablet */
  }
  
  .resources-title {
    font-size: 2rem !important;
  }
  
  .resource-title {
    font-size: 0.85rem !important;
  }
}

@media (max-width: 480px) {
  /* Mobile */
  .resources-grid {
    grid-template-columns: 1fr; /* 1 per row for mobile */
  }
  
  .resources-page-wrapper {
    padding: 30px 15px;
  }
  
  .resources-title {
    font-size: 1.8rem !important;
  }
  
  .resource-content {
    padding: 12px 0;
  }
}


/* Responsive Fixes for Resources Page */
@media (max-width: 480px) {
  .resource-item {
    display: flex;
    flex-direction: column;
    height: auto !important;
    min-height: unset;
  }

  .resource-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
  }

  .resource-excerpt {
    max-height: none !important;
    overflow: visible;
    -webkit-line-clamp: unset;
  }

  .resource-title {
    max-height: none !important;
    -webkit-line-clamp: unset;
  }

  .resource-download-button {
    margin-top: 16px !important;
    align-self: flex-start;
  }
}
