.blocks-container {
    --image-width: 15rem;
    --image-width-big: 20rem;
    --card-height: 25rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-column-gap: 1rem;
    grid-row-gap: 1em;
}

.block-container-top {
    --card-height: 25rem;
}

.block-card {
    width: 100%;
    position: relative;

}

.block-card-big {
    grid-column: 1 / span 2;

}

.block-card-content-wrapper {
    height: calc(var(--card-height) / 1.5);
    margin: -24px;
    display: flex;
    align-items: stretch;
    overflow: hidden;
}

.block-card-big .block-card-content-wrapper {
    height: var(--card-height);
    flex-direction: row;
}

.block-card-big .block-card-content-wrapper .block-card-image {
    min-width: var(--image-width-big);
    max-width: var(--image-width-big);
}

.block-card-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.block-card-header {
    margin-bottom: 1rem;
}

.block-card-content-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.block-card-content-link {
    font-size: 1rem;
    align-self: flex-end;
}

.block-card-image {
    min-width: var(--image-width);
    max-width: var(--image-width);
}

.block-card-image {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.stack {
    display: grid;
}

.stack > * {
    grid-area: 1 / 1;
}


.info-box {
    width: 50%;
    height: 40%;
    background-color: #e6007e;
    color: white;
    padding: 2rem;
    border-radius: 12px;
    -webkit-clip-path: polygon(0% 0%, 95% 0%, 100% 80%, 0% 100%);
    clip-path: polygon(0% 0%, 95% 0%, 100% 80%, 0% 100%);

}

@media screen and (max-width: 1200px) {
    .info-box {
        height: 42%;
    }
}


@media screen and (max-width: 1000px) {
    .blocks-container {
        --image-width: 12rem;
        --card-height: 25rem;
    }

    .selling-points h2 {
        font-size: clamp(0.8rem, 1vw, 1rem);
        font-weight: bold;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10rem;
        margin-top: 1rem;
    }

    .device-image {
        width: clamp(9rem, 20vw, 18rem);
        aspect-ratio: 18 / 9;
        margin-left: 0.5rem;
        margin-bottom: 1rem;
        margin-top: 3rem;
    }

    .datasheet-btn {
        margin-top: 0.5rem;
        margin-right: 1rem;
        margin-bottom: 1rem;
        float: right;
    }

    .selling-points .line {
        display: inline-block;
        width: 1rem;
        height: 1px;
        background-color: #000;
    }
}

@media screen and (max-width: 700px) {
    .blocks-container {
        --card-height: 25rem;
        --image-width: 100%;
        --image-width-big: 100%;
        display: flex;
        flex-direction: column;
        margin: 4rem;
    }

    .block-card {
        width: 100%;
    }

    .block-card-big {
        grid-column: unset;
    }

    .block-card-content-wrapper {
        height: calc(var(--card-height) / 1.5);
        margin: -24px;
        display: flex;
        align-items: stretch;
        overflow: hidden;
    }

    .block-card-big .block-card-content-wrapper {
        height: var(--card-height);
        flex-direction: column;
    }

    .block-card-big .block-card-content-wrapper .block-card-image {
        width: 100%;
    }

    .block-card-content {
        height: 100%;
    }

    .block-card-header {
        margin-bottom: 1rem;
    }

    .block-card-content-body {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        height: 100%;
    }

    .block-card-content-link {
        align-self: flex-end;
    }

    .block-card-image {
        width: 100%;
        height: 40%;
    }

    .block-card-image {
        object-fit: cover;
        width: 100%;
    }

    .info-box {
        height: 75%;
    }
}

@media screen and (max-width: 550px) {
    .blocks-container {
        margin: auto;
    }
}


.block-card-content-body {
    padding: 12px 24px 20px 0;
    grid-area: content;
    display: flex;
    font-size: 1em;
    flex-direction: column;
    justify-content: space-between;
}

.block-card-content-link {
    font-size: 1.5em;
    align-self: flex-end;
}

.block-card-image {
    object-fit: cover;
    width: 100%;
    height: 100%;
    display: block;
}

.left-section {
    flex: 1;
    width: 50%;
}

.category {
    color: #e91e63; /* Pink */
    font-size: 0.8rem;
    margin-top: 1rem;
    margin-left: 1rem;
}

.device-name {
    font-size: clamp(0.8rem, 1vw, 1.5rem);
    font-weight: bold;
    margin-left: 1rem;
}

.device-image {
    width: clamp(9rem, 20vw, 18rem);
    aspect-ratio: 18 / 9;
    margin-left: 1rem;
    margin-bottom: 1rem;
}

.right-section {
    flex: 1;
    text-align: center;
}

.company-image {
    max-width: 40%;
    width: clamp(6rem, 30vw, 12rem);
    aspect-ratio: 18 / 7;
    object-fit: contain;
    align-self: flex-end;
    margin-top: 1rem;
    margin-bottom: 1rem;
    margin-right: 1rem;
    margin-left: clamp(1rem, 11vw, 11rem);
}

.selling-points h2 {
    font-size: clamp(0.7rem, 1vw, 1rem);
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.selling-points .line {
    display: inline-block;
    width: 2rem;
    height: 1px;
    background-color: #000;
}

.selling-points ul {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
    margin-right: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.selling-points li {
    font-size: clamp(0.8rem, 0.7rem + 0.4vw, 0.95rem);
}

.datasheet-btn {
    margin-right: 1rem;
    margin-bottom: 1rem;
    float: right;
}
