/* ==========================================================================
   Updates / Changelog Page – v1.0
   Shared styles (hero, card, pagination) come from blog.css
   ========================================================================== */

:root {
    --updates-content-width: 1120px;
    --updates-sidebar-width: 323px;
    --updates-gap: 60px;
}

/* ==========================================================================
   Main Layout
   ========================================================================== */

.updates-main {
    background-color: #ffffff;
    padding: 100px 0;
}

.updates-main__inner {
    max-width: var(--updates-content-width);
    margin: 0 auto;
    display: flex;
    gap: var(--updates-gap);
    align-items: flex-start;
    padding: 0 16px;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.updates-sidebar {
    width: var(--updates-sidebar-width);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 68px;
}

.updates-sidebar__title {
    font-weight: 900;
    font-size: 32px;
    line-height: normal;
    color: #303030;
    margin: 0;
}

/* Search */
.updates-sidebar__search {
    position: relative;
    width: 100%;
}

.updates-sidebar__search-input {
    width: 100%;
    background: #ffffff;
    border: 1px solid #8a8a8a;
    border-radius: 12px;
    padding: 10px 44px 10px 16px;
    font-family: inherit;
    font-size: 16px;
    line-height: 26px;
    color: #303030;
    outline: none;
    box-sizing: border-box;
}

.updates-sidebar__search-input::placeholder {
    color: #616161;
}

.updates-sidebar__search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #616161;
    transition: color 0.2s;
}

.updates-sidebar__search-btn:hover {
    color: #303030;
}

.updates-sidebar__search-icon {
    width: 20px;
    height: 20px;
}

/* Filter groups */
.updates-sidebar__group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.updates-sidebar__label {
    font-weight: 500;
    font-size: 16px;
    line-height: 26px;
    color: #b5b5b5;
    margin: 0 0 8px;
}

.updates-sidebar__items {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.updates-sidebar__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    color: #616161;
    transition: background-color 0.2s, color 0.2s;
}

.updates-sidebar__item svg path{
    color: #616161;
}


.updates-sidebar__item:hover,
.updates-sidebar__item--active {
    background-color: #f1f1f1;
    color: #070a1d;
}

.updates-sidebar__item:hover svg path,
.updates-sidebar__item--active svg path{
    color: #070a1d;
}

/* Product icons (img) */
.updates-sidebar__item-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    object-fit: contain;
}

/* Type icons (inline SVG) */
.updates-sidebar__item-svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.updates-sidebar__item-text {
    font-weight: 500;
    font-size: 16px;
    line-height: 26px;
    color: inherit;
}

/* ==========================================================================
   Content Area
   ========================================================================== */

.updates-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--updates-gap);
    align-items: center;
}

.updates-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 30px;
    row-gap: 60px;
    width: 100%;
}

.updates-content .blog-pagination {
    align-self: flex-start;
}

/* No Results */
.updates-empty {
    text-align: center;
    padding: 60px 0;
    color: #616161;
    font-size: 16px;
    grid-column: 1 / -1;
}

/* ==========================================================================
   Responsive – Tablet (992px)
   ========================================================================== */

@media (max-width: 992px) {
    .updates-main {
        padding: 60px 0;
    }

    .updates-main__inner {
        flex-direction: column;
        gap: 40px;
    }

    .updates-sidebar {
        width: 100%;
        position: static;
    }

    .updates-sidebar__title {
        font-size: 28px;
    }

    .updates-sidebar__items {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .updates-sidebar__group.group-by-type .updates-sidebar__items,
    .updates-sidebar__group.group-by-product .updates-sidebar__items{
        flex-wrap: nowrap;
        overflow: auto;
        scrollbar-width: none;
    }

    .updates-sidebar__group.group-by-type .updates-sidebar__item-text,
    .updates-sidebar__group.group-by-product .updates-sidebar__item-text{
        white-space: nowrap;
    }

    .updates-sidebar__item {
        width: auto;
        padding: 10px 14px;
    }
}

/* ==========================================================================
   Responsive – Mobile (768px)
   ========================================================================== */

@media (max-width: 768px) {
    .updates-main {
        padding: 40px 0 60px;
    }

    .updates-grid {
        grid-template-columns: 1fr;
        row-gap: 40px;
    }

    .updates-sidebar__title {
        font-size: 24px;
    }
}

/* ==========================================================================
   Responsive – Small Mobile (490px)
   ========================================================================== */

@media (max-width: 490px) {
    .updates-main {
        padding: 30px 0 40px;
    }

    .updates-main__inner {
        gap: 30px;
    }

    .updates-sidebar__title{
        display: none;
    }

    .updates-sidebar__item {
        padding: 8px 12px;
        font-size: 14px;
    }

    .updates-sidebar__item-icon {
        width: 18px;
        height: 18px;
    }

    .updates-sidebar__item-svg {
        width: 18px;
        height: 18px;
    }
}
