.is-layout-grid .wp-block-post,
.is-layout-grid .wp-query-post {
    position: relative;
}

.wp-block-post > .wp-block-group:first-child:last-child {
    transition: box-shadow 0.3s ease;
    &:hover {
        box-shadow: var(--wp--preset--shadow--subtle);
    }
}

@media (max-width: 782px) {
    .wp-block-post.job .wp-query-post {
        border-left: 0 !important;
        border-top: 5px solid var(--wp--preset--color--primary) !important;
        gap: 0;
        height: 100%;
    }
    .wp-block-post.job > .wp-block-group:first-of-type {
      height: 100%;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .wp-block-post:not(.profession) .wp-block-column:has(.wp-block-cover) {
        display: none;
    }
    .wp-block-group.is-vertical > * {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
    .wp-block-post.profession .wp-block-column:has(.wp-block-cover) {
      aspect-ratio: 300/250;
    }
    .wp-block-post.profession {
      border-top: 5px solid var(--wp--preset--color--primary) !important;
    }
    .wp-block-post.profession .wp-block-columns {
      gap: 0;
      border: 0 !important;
      position: relative;
    }

    .wp-block-post.profession .wp-block-group.is-layout-flex:has(> .wp-block-sowmedia-attribute) {
      gap: var(--wp--preset--spacing--20);
      flex-direction: row;
      white-space: nowrap;
    }

    .wp-block-post.profession .wp-block-sowmedia-labels {
      flex-direction: column;
      position: absolute;
      padding-bottom: var(--wp--preset--spacing--50);
      display: inline-flex;
      top: calc(0px - var(--wp--preset--spacing--50));
      justify-content: flex-end;
      right: 0;
      transform: translateY(-100%);
    }
    
    .wp-block-post.profession .wp-block-sowmedia-labels .sit-label {
      display: inline-flex;
      flex: 0 0 auto;
      width: max-content;
      margin-left: auto;
    }
}