

/* --- Global overrides --- */

.quarto-title {
  display: none;
}

.hero {
  display: flex;
  align-items: flex-start;
  padding: 0;
  margin-bottom: 30px;
  color: #ffffff;
  border-radius: 30px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  background: linear-gradient(315deg, #633683ab, #25272ea3);
  justify-content: flex-start;
  flex-wrap: wrap;
}

.hero-content {
  flex: 0.9;
  max-width: 100%;
  margin-right: 0rem;
}

svg {
  width: 20px;
  fill: rgba(var(--category-color-rgb), 0.4);
}

/* --- Styles for Cards --- */

.cards-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  padding: 0;
  margin: 0 auto;
  max-width: 1200px;
}

.article-card {
  display: flex;
  flex-direction: column;
  color: #ffffff;
  border-radius: 15px;
  background: linear-gradient(135deg, #242424, #1c1c1c);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  min-height: 400px;
  border: 2px solid transparent;
  background-image: linear-gradient(#1c1c1c00, #1c1c1c), linear-gradient(135deg, rgba(var(--category-color-rgb), 0.4), rgba(var(--category-color-rgb), 0.2));
  background-origin: border-box;
  background-clip: content-box, border-box;
  
  align-items: center;
}

.article-card:hover {
  background-color: #333333;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  transform: translateY(-5px);
}

/* --- Image Section --- */

.article-card-img-container {
  position: relative;
  max-height: 250px;
  height: 250px;
  width: 100%;
  overflow: hidden;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.article-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.article-card:hover .article-card-img {
  transform: scale(1.1);
  filter: brightness(0.85) contrast(1.1);
}

/* --- Category Pill --- */

.article-card-category {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
}

.article-card-category span {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 6px 12px;
  background: linear-gradient(135deg, rgba(var(--category-color-rgb), 0.6), rgba(var(--category-color-rgb), 0.3));
  border: 1px solid rgba(var(--category-color-rgb), 0.8);
  color: #fff;
  border-radius: 15px;
  display: inline-block;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

/* --- Card Content Section --- */

.article-card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  flex-grow: 1;
}

.article-card-header {
  
}

.article-card-footer {
  display: flex;
  justify-content: space-between;
  padding: 5px;
  padding-top: 10px;
  margin-top: auto;
}

/* --- Title, subtitle, descr Styling --- */

.article-card-title {
  font-size: 1.05rem;
  color: #FFFFFF;
  font-weight: 500;
  margin-top: 15px;
}

.article-card-subtitle {
  font-style: italic;
  text-align: left;
  font-size: 0.9rem;
  color: rgba(var(--category-color-rgb), 0.8);
  margin-top: 15px;
}

.article-card-shortdesc,
.article-card-description {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #d0d0d08c;
  margin-bottom: 15px;
  text-align: left;
}

/* --- Reading Time --- */

.article-read-time {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  color: #d0d0d08c;
}

.article-read-time span {
  font-size: 0.8rem;
  font-weight: bold;
  color: rgba(var(--category-color-rgb), 0.8);
  padding-left: 5px;
}

.article-read-time svg {
  width: 20px;
  height: 20px;
  fill: rgba(var(--category-color-rgb), 0.6); /* Match original color */
  margin-right: 5px;
}

/* --- Read More Button --- */

.read-more-link {
  font-size: 0.85rem;
  padding: 7px 13px;
  border-radius: 20px;
  color: var(--category-color);
  text-decoration: none;
  transition: all 0.3s ease;
  background-color: rgba(var(--category-color-rgb), 0.4);
  box-shadow: 0 4px 10px rgba(var(--category-color-rgb), 0.2);
}

.read-more-link:hover {
  transform: translateY(-3px); /* Elevation effect */
  background-color: rgba(var(--category-color-rgb), 0.2); /* Stronger hover effect */
}

/* --- Large Screens --- */

@media (min-width: 1024px) {
  .cards-list {
    grid-template-columns: repeat(3, 1fr); /* 3 cards per row */
  }

  .article-card-title {
    display: none; /* Hide title on large screens */
  }

  .article-card-subtitle {
    font-size: 1rem; /* Slightly larger subtitle */
    color: rgba(var(--category-color-rgb), 0.8); /* More prominent color */
  }

  .article-card-description {
    display: block; /* Keep only the long description */
  }

  .article-card-shortdesc {
    display: none; /* Hide short description */
  }

  .article-read-time svg {
    fill: rgba(var(--category-color-rgb), 0.6); /* Restore SVG color */
  }
}

/* --- Medium Screens (Tablet) --- */

@media (min-width: 768px) and (max-width: 1024px) {
  .cards-list {
    grid-template-columns: repeat(3, 1fr); /* 3 cards per row */
    gap: 10px;
  }

  .article-card-title {
    display: block; /* Keep the title visible */
    color: var(--category-color);
  }

  .article-card-subtitle {
    display: none; /* Hide subtitle */
  }

  .article-card-description {
    display: block; /* Keep the long description */
  }

  .article-card-shortdesc {
    display: none; /* Hide short description */
  }

  .article-read-time svg {
    display: none; /* Hide SVG icon */
  }

}

/* --- Small Screens (Mobile) --- */

@media (max-width: 768px) {
  .cards-list {
    grid-template-columns: 1fr; /* Single column layout */
    gap: 0px; /* Reduce gap between cards for better mobile spacing */
    padding: 0px;
  }

  .article-card {
    display: grid;
    grid-template-columns: 175px 1fr;
    gap: 15px;
    border-radius: 12px;
    min-height: auto;
    margin-bottom: 15px;
  
  }

  .article-card-img-container {
    height: 150px; /* Make images square */
    width: 150px; /* Constrain width */
    border-bottom: none;
    margin-left: 20px;
    flex-shrink: 0; /* Prevent the image from shrinking in size */
  }

  .article-card-img {
    object-fit: cover; /* Ensures the image fills the square without distortion */
    width: 100%; /* Full width of container */
    height: 100%; /* Full height of container */
  }

  .article-card-content {
    padding: 10px 15px; /* Add some spacing around content */
    flex: 1; /* Allow content to fill remaining space */
  }

  .article-card-title {
    display: block;
    font-size: 1rem;
    margin-bottom: 5px;
    text-align: left;
  }

  .article-card-subtitle {
    display: none; /* Hide subtitle */
  }

  .article-card-description {
    display: none; /* Hide long description */
  }

  .article-card-shortdesc {
    display: block; /* Show short description */
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 10px;
  }

  .article-card-footer {
    margin-top: auto; /* Push footer to bottom of content */
    display: flex;
    justify-content: space-between; /* Align footer elements */
    border-top: none;
  }

  .article-read-time svg {
    display: none; /* Hide SVG icon */
  }

  .article-read-time span {
    display: none; /* Hide read time label */
  }

  .article-card-category span {
    font-size: 0.65rem;
    padding: 3px 8px;
    border: none;
  }
}

/* Small Screens (Mobile) */

@media (max-width: 425px) {
  .article-card {
    display: flex;
    gap: 0;
    flex-direction: column;
  }
  
  .article-card-footer {
    margin-top: auto; /* Push footer to bottom of content */
    display: flex;
    justify-content: space-around; /* Align footer elements */
    border-top: none;
    flex-direction: column;
  }
  
  .article-card-img-container {
    margin-left: 0;
    margin-top: 20px;
  }
  
  .article-card-title {
    text-align: center;
  }
  
  .article-card-shortdesc {
    text-align: center;
  }
  
  .article-read-time span {
    display: none; /* Hide read time label */
  }
}
