@import url('https://fonts.googleapis.com/css2?family=Mozilla+Text:wght@200..700&display=swap');

/* Variables CSS para facilitar la personalización */
:root {
  --primary-color: #007bff;
  --text-color: #333;
  --light-text-color: #666;
  --bg-color: #f8f9fa;
  --card-bg: #fff;
  --border-color: #ddd;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --font-family: "Mozilla Text", sans-serif;
  --heading-font-family: "Mozilla Text", sans-serif;
}

/* body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  margin: 0;
  padding: 20px;
} */

/* --- List Section --- */
.list {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 0;
  margin: 0 30px
}

.list__head {
  text-align: center;
  margin-bottom: 40px;
}

.list__head h1 {
  font-family: var(--heading-font-family);
  font-size: 2.8em;
  color: var(--text-color);
  margin-bottom: 10px;
  line-height: 1.2;
}

.list__meta {
  font-size: 1.1em;
  color: var(--light-text-color);
}

/* --- Grid of Cards --- */
.list__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* --- Card Styling --- */
.card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px var(--shadow-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px var(--shadow-color);
}

.card__link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%; /* Ensure link fills the card */
}

.card__cover {
  width: 100%;
  height: 200px; /* Fixed height for covers */
  object-fit: cover; /* Ensures image covers the area, cropping if necessary */
  border-bottom: 1px solid var(--border-color);
}

.card__title {
  font-family: var(--heading-font-family);
  font-size: 1.6em;
  color: var(--primary-color);
  margin: 15px 15px 5px;
  flex-grow: 1; /* Allows title to take available space */
}

.card__date {
  display: block;
  font-size: 0.9em;
  color: var(--light-text-color);
  margin: 0 15px 10px;
}

.card__excerpt {
  font-size: 1em;
  color: var(--text-color);
  margin: 0 15px 15px;
}

/* --- Pagination --- */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 50px;
  gap: 10px;
}

.pagination__item {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--primary-color);
  border-radius: 5px;
  text-decoration: none;
  color: var(--primary-color);
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.pagination__item:hover:not(.is-active) {
  background-color: var(--primary-color);
  color: var(--card-bg);
}

.pagination__item.is-active {
  background-color: var(--primary-color);
  color: var(--card-bg);
  cursor: default;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
  .list__head h1 {
    font-size: 2.2em;
  }

  .list__grid {
    grid-template-columns: 1fr; /* Stack cards on smaller screens */
  }

  .card__cover {
    height: 180px;
  }
}

@media (max-width: 480px) {

  .list__head h1 {
    font-size: 1.8em;
  }

  .card__title {
    font-size: 1.4em;
    margin: 10px 10px 5px;
  }

  .card__date,
  .card__excerpt {
    margin-left: 10px;
    margin-right: 10px;
  }
}