/* --- Search Box --- */
#linkSearch {
  width: 100%;
  padding: 10px 14px;
  margin: 16px 0;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  box-sizing: border-box;
}

/* --- Collapsible Sections --- */
.collapsible {
  background-color: #4a4a4a;
  color: white;
  cursor: pointer;
  padding: 12px;
  width: 100%;
  border: none;
  border-radius: 6px;
  text-align: left;
  outline: none;
  font-size: 1.1rem;
  margin: 8px 0;
  transition: background 0.3s;
  position: relative;
}
.collapsible:hover {
  background-color: #5b2bcf;
}
.collapsible::after {
  content: "▼";
  position: absolute;
  right: 16px;
  transition: transform 0.3s;
}
.collapsible.active::after {
  transform: rotate(-180deg);
}

.content {
  max-height: 1000px;
  overflow: hidden;
  padding: 0 0 12px 0;
  transition: max-height 0.35s ease, opacity 0.35s ease;
  opacity: 1;
}
.content.hidden {
  max-height: 0;
  opacity: 0;
  padding: 0;
}

/* --- Link Cards --- */
ul.content {
  list-style: none;
  margin: 0;
  padding: 0;
}

.link-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f4f4f4;
  border-radius: 8px;
  padding: 16px;
  margin: 10px 0;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none; /* so <a> wrapper doesn’t look like a link */
  color: inherit;
}

.link-card:hover {
  transform: scale(1.01);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}


.card-info {
  flex: 1;
  margin-right: 16px;
}
.card-info h3 {
  margin: 0;
  font-size: 1.2rem;
  color: #333;
}
.card-info p {
  margin: 6px 0 0;
  font-size: 0.95rem;
  color: #666;
}

.card-btn {
  text-decoration: none;
  background: #7c3aed;
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  transition: background 0.3s;
  white-space: nowrap;
}
.card-btn:hover {
  background: #5b2bcf;
}

/* --- Dark Mode Support --- */
body.dark-mode .link-card {
  background: #282828;
  box-shadow: 0 4px 8px rgba(255,255,255,0.05);
}
body.dark-mode .card-info h3 {
  color: #eee;
}
body.dark-mode .card-info p {
  color: #aaa;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .link-card {
    flex-direction: column;
    align-items: center; /* center content */
    text-align: center;  /* center text */
  }

  .card-info {
    margin-right: 0;
  }

  .card-btn {
    display: none; /* button hidden on mobile */
  }
}
