/* =========================
   CONTENTS PAGE STYLING
   ========================= */

/* Base layout */
body.page.contents {
  background: var(--light-color);
  color: var(--text-color-400);
}

.hero-contents {
  text-align: center;
  padding: 3rem 1rem 2rem;
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-color-100) 100%);
  color: var(--light-color);
}

.hero-contents h1 {
  font-family: 'Raleway', sans-serif;
  font-weight: 900;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 0.5rem;
}

.hero-contents .subtitle {
  font-family: 'Lato', sans-serif;
  font-weight: 400;
  font-size: clamp(1rem, 2vw, 1.2rem);
  opacity: 0.9;
  margin: 0;
}

.contents-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.contents-title {
  text-align: center;
  color: var(--accent-color);
  font-family: 'Raleway', sans-serif;
  font-weight: 800;
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 2rem;
}

/* Grid layout */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  justify-items: center;
}

.contents-index .card {
  padding: 0 0 .5rem;
}

/* Individual card */
.card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 340px;
  background: var(--bkgrd-color-400);
  color: var(--light-color);
  border-radius: 1rem;
  overflow: hidden;
  text-decoration: none;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

/* Number badge */
.badge {
  position: absolute;
  top: 10px;
  right: 10px;
     background: var(--accent-gradient-start);
  color: var(--light-color);
  font-weight: 700;
  font-family: 'Raleway', sans-serif;
  font-size: 0.9rem;
  padding: 0.65rem;
  border-radius: 50%;
  z-index: 2;
}

/* Thumbnail */
.card-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bkgrd-color);
  min-height: 180px;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.card:hover .card-thumb img {
  transform: scale(1.05);
}

/* Text area */
.card-body {
  padding: 1rem 1.25rem 1.25rem;
  display:flex;
  flex-direction: column;
height: 100%;
}

.card-title {
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  color: var(--light-color);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.card-author {
  font-family: 'Lato', sans-serif;
  color: var(--light-color);
  opacity: 0.8;
  font-size: 0.9rem;
  margin: 0;
  margin-top:auto;
}

/* Footer */
.site-footer {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-color);
  background: var(--bkgrd-color);
  padding: 1rem;
}

/* Responsive tweaks */
@media (max-width: 640px) {
  .hero-contents {
    padding: 2rem 1rem;
  }

  .card {
    max-width: 100%;
  }
}

/* Force 3 columns on wide screens */
@media (min-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 2 columns on medium screens */
@media (min-width: 640px) and (max-width: 1023.98px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 1 column on small screens */
@media (max-width: 639.98px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }
}

h3 span {
  font-weight:300;
}


.contents-footer {

  text-align: center;
}




