* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: #f0f0f0;
}
.pastvsfuture {
  max-width: 600px;
  width: 100%;
  margin: 0 auto 10px;
  display: flex;
  justify-content: center;
}
.pastvsfuture nav {
  position: relative;
  height: 50px;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pastvsfuture nav::after {
  width: 100%;
  height: 1px;
  position: absolute;
  filter: blur(0.5px);
}

.pastvsfuture nav label {
  position: relative;
  display: block;
  height: 100%;
  width: 100%;
  text-align: center;
  line-height: 50px;
  cursor: pointer;
  font-size: 20px;
  font-weight: 600;
  transition: all 0.3s ease;
}

#blog:checked ~ nav label .pastprojs,
#blog:checked ~ nav label .futureprojs {
  color: #c2185b;
}

input[type="radio"] {
  display: none;
}

.pastvsfuture nav .slider {
  position: absolute;
  height: 4.5px;
  background-color: #c2185b;
  border-radius: 20px;
  width: 50%;
  z-index: 1;
  left: 0;
  bottom: 0;
  transition: all 0.3s ease;
  filter: blur(0.4px);
}

#pastprojs:checked ~ nav .slider {
  left: 50%;
}

#futureprojs:checked ~ nav .futureprojs {
  color: #c2185b;
}
#pastprojs:checked ~ nav .pastprojs {
  color: #c2185b;
}

.board-container {
  padding-top: 110px; /* pushes content below fixed header */
}

.card-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 24px;
  padding: 0 24px 80px;
  margin: 0 auto;
  max-width: 1400px;
}

.card-list .card-item {
  list-style: none;
  height: 100%;
}

.card-list .card-item .card-link {
  width: 100%;
  min-height: 460px; /* baseline height */
  height: 100%;
  display: block;
  background-color: #ffffff;
  padding: 20px;
  border-radius: 12px;
  text-decoration: none;
  overflow: hidden; /* keep inner content contained */
}

.card-list .card-link .card-image {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.card-list .card-link .card-image:hover {
  transform: scale(1.02);
}

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-image {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 48px;
  color: #fff;
  cursor: pointer;
  font-weight: 300;
  transition: color 0.2s ease;
}

.lightbox-close:hover {
  color: #ccc;
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 48px;
  color: #fff;
  cursor: pointer;
  user-select: none;
  padding: 16px;
  transition: color 0.2s ease;
  z-index: 10000;
}

.lightbox-arrow:hover {
  color: #ccc;
}

.lightbox-prev {
  left: 40px;
}

.lightbox-next {
  right: 40px;
}

.lightbox-counter {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 18px;
  font-weight: 500;
  background-color: rgba(0, 0, 0, 0.6);
  padding: 8px 16px;
  border-radius: 20px;
}

.card-list .card-link .badge {
  padding: 8px 16px;
  font-size: 0.95rem;
  font-weight: 500;
  margin: 12px 0 12px 0;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  width: fit-content;
  border-radius: 50px;
  color: #fff;
}

.badge-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.month-year {
  font-size: 0.85rem;
  color: #666;
  font-weight: 500;
  margin: 12px 0 12px 0;
  padding: 0;
  display: inline-block;
}

.card-list .card-link .badge[data-category="CS"] {
  background: #2e7d32;
}

.card-list .card-link .badge[data-category="PD"] {
  background: #1565c0;
}

.card-list .card-link .badge[data-category="Finance"] {
  background: #e65100;
}

.card-list .card-link .badge[data-category="IU"] {
  background: #6a1b9a;
}

.card-list .card-link .badge[data-category="PI"] {
  background: #003366;
}

.card-list .card-link .badge[data-category="CLS"] {
  background: #f57f17;
}

.card-list .card-link .description {
  color: #222222;
  text-align: left;
}

.card-list .card-link .description .inner-link {
  color: #c2185b;
  text-decoration: underline;
  font-weight: 600;
}

.card-list .card-link .description .inner-link:hover {
  color: #8e1144;
}

.card-list .card-link .description .desc-link {
  color: #c2185b;
  text-decoration: underline;
  font-weight: 600;
}

.card-list .card-link .description .desc-link:hover {
  color: #8e1144;
}

.card-list .card-link .card-title {
  font-size: 1.19rem;
  font-weight: 600;
  color: #222222;
  /* margin-bottom: 12px; */
}

.com-container {
  position: relative;
  max-width: 1350px;
  width: 100%;
  padding: 20px;
  margin: 0 auto 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.com-container button {
  margin: 0;
}

.container,
.com-container,
.future-container {
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* Default state: show upcoming projects */
.container {
  display: none;
}

/* Ensure footer container stays visible */
footer .container {
  display: flex !important;
}

.com-container {
  display: none;
}

.future-container {
  display: block;
}

.container[style*="display: none"],
.com-container[style*="display: none"],
.future-container[style*="display: none"] {
  opacity: 0;
  pointer-events: none;
}

.future-message {
  display: none;
  justify-content: center;
  align-items: center;
  padding: 100px 20px;
  text-align: center;
  max-width: 1400px;
  margin: 0 auto 110px;
  min-height: 400px;
}

.future-message h2 {
  font-size: 2rem;
  color: #666;
  font-weight: 500;
}

/* Future Projects Section */
.future-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 24px 80px;
}

.future-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
  justify-content: center;
  justify-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

.future-project-item {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.future-flyer {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 14px;
}

.future-btn {
  display: inline-block;
  padding: 10px 28px;
  background-color: #c2185b;
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s ease;
  text-align: center;
  cursor: pointer;
}

.future-btn:hover {
  background-color: #8e1144;
  transform: scale(1.05);
}

button {
  padding: 8px 16px;
  font-size: 0.95rem;
  font-weight: 500;
  margin: 16px 0 18px;
  width: fit-content;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #fff;
  color: #222222;
}

button[data-name="CS"].active {
  background: #2e7d32;
  color: #fff;
}

button[data-name="PD"].active {
  background: #1565c0;
  color: #fff;
}

button[data-name="Finance"].active {
  background: #e65100;
  color: #fff;
}

button[data-name="IU"].active {
  background: #6a1b9a;
  color: #fff;
}

button[data-name="PI"].active {
  background: #003366;
  color: #fff;
}

button[data-name="CLS"].active {
  background: #f57f17;
  color: #fff;
}

button[data-name="All"].active {
  background: #c2185b;
  color: #fff;
}

@media (max-width: 768px) {
  .card-list {
    grid-template-columns: 1fr;
  }

  .future-projects-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 480px) {
  .card-list {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0 12px 80px;
  }

  .com-container {
    flex-wrap: wrap;
    gap: 10px;
  }

  .com-container button {
    font-size: 0.85rem;
    padding: 8px 12px;
  }

  .future-container {
    padding: 20px 12px 80px;
  }

  .future-projects-grid {
    gap: 20px;
  }

  .future-btn {
    padding: 10px 24px;
    font-size: 0.9rem;
  }
}
