/* ============================
   Homepage Cards (Dark Modern)
============================ */
.cards-title {
text-align: center;
font-weight: bold;
margin-top: 20px;
font-size: 20px;
}

.homepage-cards {
  --max-width: 100%;
}

.cards-container {
  max-width: var(--max-width);
  margin: 20px auto 0 auto;
  display: grid;

  /* 👇 fixed width cards */
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  justify-content: center; /* centers rows nicely */
}
@media (max-width: 600px) {
  .cards-container {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

/* Card */
.home-card {
  overflow: hidden;
  text-decoration: none;
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  border: 2px solid var(--border-color);
  border-radius: 10px;
}
.home-card:hover {
text-decoration: none;
border: 2px solid var(--border-color-highlight);

}

/* ============================
   Image Area (Improved)
============================ */

.home-card-image-wrapper {
  position: relative;
  aspect-ratio: 4 / 3; /* less tall than 16:9 */
  overflow: hidden;
}

/* Image */
.home-card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center var(--img-offset, 0px);
  display: block;
}

/* ============================
   Content
============================ */

.home-card-content {
  padding: 10px;
  text-align: center;
}

.home-card-title {
  font-weight: bold;
}

/* ============================
   Toggle
============================ */

.toggle {
  margin: 3rem 0;
  background: #111;
  border: 1px solid #222;
  border-radius: 12px;
  overflow: hidden; /* important */
}

/* Make summary full clickable block */
.toggle summary {
  cursor: pointer;
  padding: 1.2rem 1.4rem;   /* moved padding here */
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
}

/* Remove default arrow */
.toggle summary::-webkit-details-marker {
  display: none;
}

/* Hover effect across whole area */
.toggle summary:hover {
  background: #1a1a1a;
}

/* Arrow */
.arrow {
  transition: transform 0.2s ease;
}

.toggle[open] .arrow {
  transform: rotate(90deg);
}

/* Content area */
.toggle-content {
  padding: 1.5rem;
  border-top: 1px solid #222;
}
