.custom-flex {
  display: flex;
  gap: 2rem;
  padding: var(--pos-gap-section-title-content, 80px) 0;
  flex-wrap: wrap;
}

.custom-flex .column {
  flex: 1;
  gap: 2rem;
  display: flex;
  flex-direction: column;
}

.last-column-short {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.custom-flex .column:nth-child(3) {
  align-self: stretch;
}


@media (max-width: 1024px) {
  .custom-flex .column:nth-child(3) {
    display: flex;
    flex-direction: row;
    gap: 2rem;
  }

  .custom-flex .column:nth-child(3) .medium {
    width: 100%;
  }

  .custom-flex .column:nth-child(3) .last-column-short {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
  }
}

@media (max-width: 600px) {
  .custom-flex .column:nth-child(3) {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }

}



/* DOCSKIT-GRID
============================================================================ */
.docskit-grid-section {
  position: relative;
  padding-top: var(--pos-gap-section-section);
}

.grid-bg {
  background-image: url('../../../images/documentation_solution/card_grid_bg.avif');
  background-position: bottom 2px right -20px;
  background-repeat: no-repeat;
}

.docskit-grid-section>* {
  position: relative;
  z-index: 1;
}

.docskit-grid-header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: var(--pos-gap-section-elements, 40px);
  flex: 1 0 0;
  align-self: stretch;
  max-width: 1440px;
  margin: 0 auto;
  padding-top: var(--pos-gap-section-title-content, 80px);
}

.docskit-grid-header div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  align-self: stretch;
}

.docskit-grid-header div h2 {
  color: var(--pos-color-prominent, #141414);
  font-size: var(--pos-headline-1, 48px);
  font-style: normal;
  font-weight: 700;
  line-height: var(--pos-headline-1-line-height, 48px);
}

.docskit-grid-header p {
  color: var(--pos-color-normal, #374151);
  font-size: var(--pos-headline-4, 20px);
  font-style: normal;
  font-weight: 400;
  line-height: var(--pos-headline-4-line-height, 28px);
}

.docskit-cards-grid {
  display: grid;
  padding: var(--pos-gap-section-title-content, 80px) 0;
  grid-template-columns: repeat(3, minmax(300px, 1fr));
  grid-auto-rows: auto;
  gap: 2rem;
  max-width: 1440px;
  margin: 0 auto;
}

.column {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.docskit-grid-card {
  background-color: var(--pos-color-panel-background);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: fit-content;
}

.docskit-grid-card:hover {
  transform: translateY(-5px);
  box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.05);
}

.gradient-border {
  border: 1px solid transparent;
  border-radius: 4px;
  background: linear-gradient(var(--pos-color-page-background)) padding-box, linear-gradient(to bottom right, #ecf1f6, #f7f8fa) border-box;
}

.docskit-grid-card h3 {
  font-size: 1.2em;
  font-weight: bold;
  padding-top: 0.7rem;
  padding-bottom: 0.9rem;
  color: var(--pos-color-prominent);

}

.docskit-grid-card p {
  font-size: 1rem;
  color: var(--pos-color-normal);
}

.grid-card-tags {
  display: flex;
  align-items: center;
  align-content: center;
  padding-top: var(--pos-gap-n-button, 16px);
  gap: 16px var(--pos-gap-n-button, 16px);
  align-self: stretch;
  flex-wrap: wrap;
}

.grid-card-tag {
  display: flex;
  padding: 8px;
  align-items: center;
  gap: 8px;

  border-radius: 4px;
  background: var(--pos-color-panel-background, #FFF);
  box-shadow: 0px 4px 6px 0px rgba(40, 51, 65, 0.10);
}

/* Medium cards span 2 rows */
.docskit-grid-card.medium {
  grid-row: span 2;
}

/* Image container styling */
.docskit-card-image-container {
  display: flex;
  flex-direction: column;
  position: relative;
}

.docskit-grid-icon {
  position: absolute;
  bottom: 10px;
  left: 10px;
  width: 49px;
  height: 48px;
}

.docskit-card-image-container img {
  width: 100%;
  height: auto;
}

/* RESPONSIBLE DOCSKIT-GRID
============================================================================ */


@media (max-width: 1440px) {
  .docskit-cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .docskit-grid-card.medium {
    grid-row: auto;
  }
}

@media (max-width: 1150px) {

  .docskit-cards-grid>.column:nth-child(1),
  .docskit-cards-grid>.column:nth-child(2) {
    justify-content: space-between;
  }

  .docskit-cards-grid>.column:nth-child(3) {
    grid-column: span 2;
    flex-direction: row;
  }

  .docskit-cards-grid .column:nth-child(3)>div {
    width: calc((100% - 2rem) / 2);
  }
}

@media (max-width: 750px) {

  .docskit-cards-grid>.column:nth-child(1),
  .docskit-cards-grid>.column:nth-child(2) {
    justify-content: auto;
  }

  .docskit-cards-grid>.column:nth-child(3) {
    grid-column: span 1;
    flex-direction: column;
  }

  .docskit-cards-grid .column:nth-child(3)>div {
    width: auto;
  }
}


@media (max-width: 1024px) {
  .docskit-grid-card.medium {
    grid-row: auto;
  }

  .docskit-grid-section::before {
    background-image: none;
  }
}

@media (max-width: 600px) {
  .docskit-cards-grid {
    grid-template-columns: 1fr;
  }

  .docskit-grid-card.medium {
    grid-row: auto;
  }

}

@media (max-width: 500px) {

  .grid-card-tag {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
  }

  .grid-card-tag svg {
    align-self: center;
  }
}