

@import url("style.css");

body {
  display: flex;
  font-family: sans-serif;
  margin: 0;
}


/* Blog content */
/* Blog content inside main */
body.index {
  display: flex;
  flex-direction: column;
  /* stack header + blog vertically */
  font-family: sans-serif;
  margin: 0;
}

.title-description {
  text-align: left;
  /* Center horizontally */
  /* Space above and below */
  padding: 4% 4% 5px 5px;
  padding-left: 4%;
  /* Small padding for mobile */
}

.title-description h1 {
  font-size: 2rem;
  /* Large title font size */
  margin-bottom: 2%;
  /* Space below the title */
}

.description {
  background-color: var(--image-accentcolor);
  /* match blog cards */
  border-radius: 16px;
  padding: 3%;
  margin: 0 auto 40px auto;
  /* center and add space below */
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  max-width: 1200px;
  /* align with grid max width */
  line-height: 1.6;
  color: var(--text-colorBox);
  font-size: 1.1rem;
  transition: transform 0.3s ease;
  text-align: center;
  /* Center text */
}

/* blog posts overview */
/* Blog overview container */
.blog-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  grid-auto-rows: minmax(auto, auto);
  /* each row height grows with content */
  gap: 2rem;
  padding: 2rem;
  min-height: auto;
  /* grow to fit all rows */
}

.blog-card-link {
  text-decoration: none;
  /* remove underline */
  color: inherit;
  /* inherit text color */
  display: block;
  /* ensure block for the card */
}

/* Individual blog card */
.blog-card {
  background-color: var(--image-accentcolor);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  /* Ensure card height fits content */
  height: auto;
  max-height: none;
  /* remove restrictive max-height */
}

/* Hover effect for card */
.blog-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}

/* Blog content */
.blog-content {
  padding: 15px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Title */
.blog-content h3 {
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 10px;
  background: var(--image-darkcolor);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

/* Excerpt text */
.blog-content p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-colorBox);
  flex-grow: 1;
}

/* Meta info */
.blog-content .meta {
  font-size: 0.85rem;
  color: var(--image-lightcolor);
  margin-top: 8px;
}

/* Read more link */
.blog-content .read-more {
  text-decoration: none;
  font-weight: bold;
  color: var(--link-color);
  margin-top: 10px;
  transition: color 0.3s ease;
}

.blog-content .read-more:hover {
  color: var(--link-hover);
}