/* #region - Default styling */

.case-card {
  display: flex;
  align-items: center;
  width: 100%;
  border-radius: var(--border-radius-l);
  background-color: var(--card-background);
  box-shadow: 0px 0px 10px 3px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  transition: background-color 0.5s ease;
}

.case-thumbnail {
  padding: var(--space-l);
  align-self: stretch;
  flex-shrink: 0;
  max-width: 400px;
  height: auto;
  opacity: 1;
  transition: all 0.01s ease;
  overflow: hidden;
}

.case-thumbnail img {
  border-radius: var(--border-radius-m);
  height: 100%;
  max-height: 400px;
  object-fit: cover;
  transition: all 0.01s ease;
}

.case-content {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding: var(--space-ml) var(--space-ml) var(--space-ml) var(--space-m);
}

.case-information {
  display: flex;
  flex-direction: column;
  gap: 1em;
  color: var(--text-color);
}

.tags-and-button {
  display: flex;
  gap: 0.5em;
  justify-content: space-between;
  align-items: center;
  color: var(--card-tags);
}

.tag-container {
  display: flex;
  font-size: 0.875rem;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.5em;
}

.case-card-text {
  line-height: 1.8;
}

.case-card-text,
.tag-container {
  max-width: 100%;
  opacity: 1;
  transition: all 0.01s ease;
  overflow: hidden;
}

.tag-container p:nth-child(2)::before,
.tag-container p:nth-child(3)::before {
  content: "\2022";
  margin-right: 0.5em;
}

.view-default .ghost-card {
  display: none;
}

@container (max-width: 736px) {
  .case-card {
    flex-direction: column;
  }

  .case-thumbnail {
    max-width: 100%;
  }

  .case-thumbnail img {
    object-fit: cover;
    width: 100%;
  }

  .case-content {
    padding: var(--space-l);
    width: 100%;
  }

}

/* #endregion - Default styling */

/* #region - Small cards*/

.card-container.view-small {
  flex-direction: row;
  flex-wrap: wrap;
}

.view-small .case-card {
  flex-direction: row;
  flex: 1 1 calc(50% - 20px);
  flex-grow: 1;
  min-width: 304px;
  border-radius: var(--border-radius-m);
}

.view-small .case-card-text,
.view-small .tag-container {
  max-height: 0;
  max-width: 0;
  opacity: 0;
}

.view-small .case-thumbnail {
  padding: 0rem;
  max-width: 50%;
}

.view-small .case-thumbnail img {
  height: 100%;
  border-radius: 0;
}

.view-small .case-card h1 {
  font-size: 1.25rem;
  line-height: 1.5;
  padding: 0px;
}

.view-small .case-content {
  padding: var(--space-l);
  flex: 1;
}

.view-small .tags-and-button {
  justify-content: flex-end;
}

@container (max-width: 687px) {
  .view-small .case-card {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .ghost-card {
    display: none;
  }
}

/* #endregion - Small cards */

/* #region - Ghost card */

.case-card.ghost-card {
  visibility: hidden;
  height: 0;
  padding: 0;
  margin: 0;
  border: none;
}

/* #endregion - Ghost card */

/* #region - Row cards*/

.card-container.view-row {
  flex-direction: column;
  gap: 0rem;
  border-radius: var(--border-radius-s);
  overflow: hidden;
  box-shadow: 0px 0px 10px 3px rgba(0, 0, 0, 0.25);
}

.view-row .case-card:not(:first-child):not(:last-child) {
  border-top: 1px solid var(--grayscale-20);
  border-bottom: 1px solid var(--grayscale-20);
}

.view-row .case-card {
  box-shadow: none;
  border-radius: 0rem;
}

.view-row .case-card-text,
.view-row .tag-container,
.view-row .case-thumbnail {
  opacity: 0;
  max-height: 0;
  max-width: 0;
  overflow: hidden;
  padding: 0;
}

.view-row .case-card-text {
  display: none;
}

.view-row .case-content {
  flex-direction: row;
  flex-grow: 1;
  justify-content: space-between;
  padding: 1.025em 1.778em;
}

.view-row .case-content h1 {
  font-size: 1.125rem;
  font-weight: normal;
}

.view-row .case-information {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0rem;
  flex-shrink: 1;
  min-width: 10px;
}

.view-row .tags-and-button {
  flex-shrink: 0;
}

/* #endregion - Row cards */