/* --- Project Card --- */
.project-card {
  background-color: rgb(247, 247, 248);  
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  max-width: 516px;
  border-radius: 1.3rem;
}

.project-card__header {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  height: 160px;
}

.project-card__icon {
  width: 160px;
  max-height: 160px;
  flex-shrink: 0;
  padding: 1.2rem 0.2rem 1.2rem 1.4rem;
}

.project-card__text-content {
  flex-grow: 1;
}

.project-card__title {
  font-size: 1.625rem;
  font-weight: 600;
  line-height: 1.8;
  padding-right: 16px;
  line-height: 1.3;
  
}

.project-card__subtitle {
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--secondary-text-color);
  padding-right: 1.125rem;
  line-height: 1.2;
  margin-top: 6px;
}

.project-card__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;  
  border-top: 1px solid hsl(210, 20%, 90%);
  max-height: 52px;
  justify-content: center;
  align-items: center;
  padding-bottom: 20px;
  padding-top: 14px;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.project-card__footer p { 
  font-size: 15px;
  font-weight: 500;
  color: var(--secondary-text-color);
}



.project-card__link {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-color);
}

.project-card__link img {
  width: 11px;
  height: auto;
}

.project-card.is-upcoming {
  filter: grayscale(90%);
  opacity: 0.7;
  pointer-events: none;
  color: var(--secondary-text-color);
}

/* --- Selected Card State --- */
.project-card.is-selected {
  background: linear-gradient(145deg, hsl(193, 80%, 97%), hsl(265, 80%, 97%));
  
  
}

/* --- Details Box Below Cards --- */
.project-details-box {
  background: linear-gradient(145deg, hsl(193, 80%, 97%), hsl(265, 80%, 97%));
  border-radius: 1.3rem;
  padding: 2.5rem;
  
  /* Span across all grid columns */
  grid-column: 1 / -1; 
  display: none; /* Hidden by default */
  animation: fadeIn 0.4s ease-out;
}

.project-details-box.is-visible {
  display: block;
}

.project-details-box__title {
  font-size: 1.625rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-color);
}

.project-details-box__subtitle {
  font-size: 1.25rem; /* Reduced font size */
  font-weight: 600;
  color: var(--text-color);
  
}

.project-details-box__text {
  font-size: 1.125rem;
  color: var(--secondary-text-color);
  line-height: 1.5;
  max-width: 90ch; /* Limit line length for readability */
  margin-top: 1rem;
}

@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(-15px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0);
  }
}

/* --- Responsive Styles --- */


@media (max-width: 820px) {
  .project-card__subtitle {
    padding-right: 20px;
  }
}

@media (max-width: 480px) {
  .project-card__header {
    gap: 0.8rem;
  }
  .project-card__icon {
    width: 130px;
    padding: 1.5rem 0.8rem 1.5rem 1.5rem;
  }
  .project-card__title {
     font-size: 24px;
     line-height: 1.2;
     margin-bottom: 6px;
  }
  .project-card__subtitle {
    font-size: 18px;
    padding-right: 16px;
  }
  
  .project-card__footer {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columns */
    gap: 1rem 1rem; /* Vertical and horizontal gap */
    justify-items: left; /* Center each link */
    max-height: none; /* Remove height constraint */
    padding: 1rem 2rem;
  }
  
  .project-card.is-upcoming .project-card__footer {
    display: flex;
    justify-content: center;  /* Centers horizontally */
    align-items: center;      /* Centers vertically */
    white-space: nowrap;
    /* Use consistent padding to match the height of other card footers */
    padding: 1.25rem 1.5rem;
  }
}



@media (max-width: 480px) {
  .project-details-box {
    padding: 1.5rem;
  }
  .project-details-box__title {
    font-size: 1.5rem;
  }
  .project-details-box__text {
    font-size: 1.125rem;
  }
}