/* Home page: two-row SQL comparison posts carousel */
.sql-home-posts {
    box-sizing: border-box;
    width: min(1400px, calc(100vw - 48px));
    max-width: none;
    margin: 26px auto 0;
    overflow: hidden;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

#sql-home-posts {
    scroll-margin-top: 100px;
}

.sql-home-posts__slider {
    position: relative;
}

.sql-home-posts__nav {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin: 0 0 14px;
}

.sql-home-posts__nav-button {
    display: inline-grid;
    width: 40px;
    height: 40px;
    padding: 0;
    place-items: center;
    color: #31558d;
    background: #ffffff;
    border: 1px solid #e2e9f5;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(24, 54, 96, 0.07);
    cursor: pointer;
    transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.sql-home-posts__nav-button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.sql-home-posts__nav-button:hover:not(:disabled) {
    color: #1266d6;
    background: #f5f8ff;
    border-color: rgba(18, 102, 214, 0.28);
    box-shadow: 0 10px 20px rgba(24, 54, 96, 0.12);
    transform: translateY(-2px);
}

.sql-home-posts__nav-button:focus-visible {
    outline: 3px solid rgba(18, 102, 214, 0.28);
    outline-offset: 3px;
}

.sql-home-posts__nav-button:disabled {
    color: #aab6c8;
    background: #f8fafc;
    border-color: #edf1f6;
    box-shadow: none;
    cursor: not-allowed;
}

.sql-home-posts__viewport {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1px 1px 20px;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none;
}

.sql-home-posts__viewport::-webkit-scrollbar {
    display: none;
}

.sql-home-posts__grid {
    box-sizing: border-box;
    display: grid;
    grid-auto-columns: calc((100% - 96px) / 5);
    grid-auto-flow: column;
    grid-template-rows: repeat(2, minmax(200px, max-content));
    gap: 24px;
    width: 100%;
    min-width: 100%;
}

.sql-post-card {
    box-sizing: border-box;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 18px;
    color: #071225;
    background: #ffffff;
    border: 1px solid #edf0f7;
    border-radius: 16px;
    box-shadow: 0 10px 20px rgba(24, 54, 96, 0.06);
    text-decoration: none;
    scroll-snap-align: start;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.sql-post-card:hover {
    color: #071225;
    border-color: rgba(18, 102, 214, 0.18);
    box-shadow: 0 18px 38px rgba(24, 54, 96, 0.12);
    text-decoration: none;
    transform: translateY(-4px);
}

.sql-post-card__icon {
    width: 60px;
    height: 60px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    overflow: hidden;
    color: #4f73b8;
    background: #edf3ff;
    border: 1px solid rgba(18, 102, 214, 0.08);
    border-radius: 10px;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
}

.sql-post-card__icon-image {
    display: block;
    max-width: 55px;
    max-height: 55px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.sql-post-card__title {
    min-width: 0;
    color: #071225;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.sql-post-card__desc {
    min-width: 0;
    margin-top: 8px;
    color: #6d7a8f;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.sql-post-card__db-icons {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 22px;
    margin-top: auto;
    padding-top: 18px;
}

.sql-post-card__db-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #edf0f7;
    border-radius: 50%;
}

.sql-post-card__db-icon-image {
    display: block;
    max-width: 18px;
    max-height: 18px;
    width: auto;
    height: auto;
    object-fit: contain;
}

@media (max-width: 1199.98px) {
    .sql-home-posts__grid {
        grid-auto-columns: calc((100% - 72px) / 4);
    }
}

@media (max-width: 1023.98px) {
    .sql-home-posts__grid {
        grid-auto-columns: calc((100% - 48px) / 3);
    }
}

@media (max-width: 767.98px) {
    .sql-home-posts__grid {
        grid-auto-columns: calc((100% - 24px) / 2);
    }
}

@media (max-width: 575.98px) {
    .sql-home-posts {
        width: calc(100vw - 24px);
        margin-top: 34px;
    }

    .sql-home-posts__nav {
        margin-bottom: 10px;
    }

    .sql-home-posts__nav-button {
        width: 38px;
        height: 38px;
    }

    .sql-home-posts__grid {
        grid-auto-columns: minmax(160px, calc((100% - 14px) / 2));
        gap: 14px;
    }
}
