:root{
    --Light-theme-Stroke: #E8D7DE;
    --Light-theme-Background: #F9F9F9;
    --Accent: #FF4171;
    --Light-theme-White: #FFFFFF;
    --Light-theme-Primary: #FF3E71;
    --Light-theme-Text-100: #282828;
    --Text-Dark-100: #1A1A1A;
}
.case-studies-archive{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
    gap: 20px;
}
.category-section-case-studies .category-section__pagination{
    order: 2;
}
.category-section__content.case-studies-archive__content{
    flex: 1;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
}
.category-section__content.case-studies-archive__content .category-section__post-inner{
    width: 100%;
    max-width: 100%;
}
.case-studies-archive .category-section__posts{
    width: clamp(1020px, 68.055%, 820px); /* Пропорційне збільшення */
    max-width: 100%;
}
.category-section-case-studies .category-section__sidebar{
    border-left: 0;
    flex: 0 0 335px;
    width :100%;
    max-width: 335px;
    margin-right: 85px;
}
.category-section__post{
border: none;
}
.case-studies-archive{
    margin-top: 40px;
    width: clamp(1020px, 68.055%, 820px); /* Пропорційне збільшення */

    max-width: 100%;
}
.case-studies-archive .category-section__post-link{
    padding: 0;
}
.case-studies-archive .category-section__post .category-section__post-link{
    display: flex;
    flex-direction: column;
    gap: 0;
    height :100%;
}
.category-section__posts.top-post{
    width: clamp(1020px, 68.05%, 820px);
    max-width: 100%;
}
.post-count,#total-posts{
    margin-right: auto;
    margin-left: 8px;
    background: var(--Accent, #FF4171);
    border-radius: 50%;
    font-family: "Geologica", sans-serif;
    font-weight: 300;
    font-size: 12px;
    line-height: 12px;
    letter-spacing: 0;
    color :#ffffff;
    width: 16px;
    height: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2px;
}
.category-section__posts.top-post .category-section__post-content{
flex: 1;
    max-width :100%;
    box-shadow: 0 2px 8px 0 #0000000A;
    background: var(--Light-theme-White, #FFFFFF);
padding: 32px;
    border-radius: 12px 0 0 12px;
}
.category-section__posts.top-post .category-section__post-content .category-section__post-title{
    font-family: "Geologica", sans-serif;
    font-weight: 600;
    font-size: 24px;
    line-height: 32px;
    letter-spacing: 0;
    color: var(--Light-theme-Text-100, #282828);

}
.category-section__post-content .category-section__post-title{
    font-family: "Geologica", sans-serif;
    font-weight: 400;
    font-size: 20px;
    line-height: 120%;
    letter-spacing: 0;
    color: var(--Light-theme-Text-100, #282828);

}
.category-section__posts.top-post .category-section__post-link{
    padding: 0;
    gap: 0;
}
.category-section__posts.top-post .category-section__post-image{
    background: #1A1A1A;
    width: clamp(396px, 48.29%, 448px); /* Пропорційне збільшення */
    padding: 28px 0 28px 40px;
    display: flex;
    /*justify-content: center;*/
    /*align-items: center;*/
    border-radius: 0 12px 12px 0;
    overflow: hidden;
}
.case-studies-archive .category-section__post-image{
    background: #1A1A1A;
    padding: 16px 24px 0 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    width :100%;
    max-width: 100%;
    height :100%;
    max-height :184px;
}
.case-studies-archive .category-section__post-image img{
    object-fit: cover;
    border-radius: 0;
    margin-top: auto;
}
.category-section__posts.top-post .category-section__post{
    border-radius: 12px;
    box-shadow: 0px 2px 8px 0px #0000000A;
    background: var(--Light-theme-White, #FFFFFF);

}
.category-section__post-info{
display :flex;
    flex-flow: column;
    align-items: flex-start;
padding: 12px 0 0 0;
}
.category-section__post-info .case-studies-data{
    margin-bottom: 14px;
    display: flex;
}
.category-section__post-content .case-studies-data{
    display :flex;
}
.category-section__post-info .case-studies-data .case-studies-data__item,
.category-section__post-content .case-studies-data .case-studies-data__item{
    display :flex;
    flex-wrap: wrap;
    gap: 8px;
}
.category-section__post-info .case-studies-data .case-studies-data__item .case-studies-data__item-title,
.category-section__post-content .case-studies-data .case-studies-data__item .case-studies-data__item-title{
    flex: 0 0 100%;
    width: 100%;
    color: #5F5F5F;
    font-family: "Geologica", sans-serif;
    font-weight: 300;
    font-size: 14px;
    line-height: 120%;
    letter-spacing: 0;
}
.category-section__post-info .case-studies-data .case-studies-data__item .case-studies-data__item-value,
.category-section__post-content .case-studies-data .case-studies-data__item .case-studies-data__item-value{
    font-family: "Geologica", sans-serif;
    font-weight: 500;
    font-size: 18px;
    line-height: 24px;
    letter-spacing: 0;
    color: #282828;
}
.category-section__post-info .case-studies-data .case-studies-data__item:not(:first-child),
.category-section__post-content .case-studies-data .case-studies-data__item:not(:first-child){
    border-left: 1px solid #E8D7DE;
    padding-left: 12px;
}
.category-section__post-info .case-studies-data  .data-icon,
.category-section__post-content .case-studies-data .case-studies-data__item .data-icon{
width: 20px;
    height :20px;
}
.category-section__post-info .case-studies-data .case-studies-data__item:not(:last-child),
.category-section__post-content .case-studies-data .case-studies-data__item:not(:last-child){
    padding-right: 12px;
}
.category-section__post-info{
    border: none;
}
.category-section__post-read-more{
    border-radius: 40px;
    background: var(--Light-theme-Primary, #FF3E71);
    padding: 12px 44px;
    width :max-content;
    font-family: "Geologica", sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 20px;
    letter-spacing: 0;
    text-align: center;
color: var(--Light-theme-Background, #F9F9F9);
}
.category-section__posts.top-post .category-section__post header{
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom :16px;
}
.category-section__posts.top-post .category-section__post header .case-studies-terms,
.category-section__posts.case-studies-archive .category-section__post .case-studies-terms{
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.category-section__posts.case-studies-archive .category-section__post-content{
    gap: 10px;
    border-bottom-right-radius: 12px;
    border-bottom-left-radius: 12px;
    padding: 20px;
    background: var(--Light-theme-White, #FFFFFF);
    box-shadow: 0px 2px 8px 0px #0000000A;
    height: 100%;
    max-width: 100%;
}
.category-section__posts.top-post .category-section__post header .case-studies-terms span.term-link,
.category-section__posts.case-studies-archive .category-section__post .case-studies-terms span.term-link{
    border: 1.5px solid var(--Light-theme-Stroke, #E8D7DE);
    font-family: "Geologica", sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0;
    border-radius: 30px;
    text-decoration: none;
    padding: 6px 16px;
    color: var(--Light-theme-Text-100, #282828);

}
.category-section__posts.top-post .category-section__post header .top-post-block{
    background: #1A1A1A;
    padding: 6px 16px;
    font-family: "Geologica", sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0;
    color: #FFFFFF;
    border-radius: 30px;

}
.category-section__posts.top-post .category-section__post-image .category-section__post-image-img{
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 0;
}
.filters header{
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--Light-theme-Stroke, #E8D7DE);
    margin-bottom :16px;
    padding: 10px 0;
}
#reset-filters{
    background: transparent;
    border: 0;
}
#reset-filters:hover{
    cursor: pointer;
}
.category-section.category-section-case-studies{
    padding: 40px 0 80px 0;
}
.filters h4{
    font-family: "Geologica", sans-serif;
    font-weight: 500;
    font-size: 18px;
    line-height: 24px;
    letter-spacing: 0;
    display :flex;
    justify-content: flex-start;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
}
.cat-list{
    list-style-type: none;
    padding-left: 0;
    flex: 0 0 100%;
    width :100%;
    margin-top: 8px;
}
li.parent-category{
    font-family: "Geologica", sans-serif;
    font-weight: 500;
    font-size: 18px;
    line-height: 24px;
    letter-spacing: 0;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    border-bottom: 1px solid #E8D7DE;
    padding-bottom: 16px;
}
.toggle-button {
    background: none;
    border: none;
    cursor: pointer;
    width: 24px;
    height: 24px;
    padding: 9px 6px 9px 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    border: 0;
}
.toggle-button svg{
    width: 12px;
    height: 6px;
}
.sidebar-toggle{
    display: none;
    width :100%;
    flex-flow: row;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border-radius: 40px;
    padding: 8px 32px;
margin-bottom: 32px;
    background: var(--Light-theme-Background, #F9F9F9);
    border: 2px solid #5F5F5F
}

/* Анімація повороту іконки */
.toggle-icon {
    transition: transform 0.3s ease-in-out;
}

.toggle-icon.rotated {
    transform: rotate(180deg);
}
/* Ховаємо стандартний чекбокс */
.custom-checkbox input[type="checkbox"] {
    display: none;
}

/* Базовий стиль для чекбокса */
.cat-list_item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-family: "Geologica", sans-serif;
    font-weight: 300;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0;
    padding: 8px 0;
}

/* Стиль неактивного чекбокса */
.checkbox-icon {
    width: 18px;
    height: 18px;
    border: 1px solid #E8D7DE;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cat-list_item input[type="checkbox"]{
    position: absolute;
    opacity: 0;
}
/* Активний чекбокс (включає SVG-галочку) */
.cat-list_item input[type="checkbox"]:checked + .checkbox-icon {
    background-color: #282828;
    border: none;
    position: relative;
}

/* SVG галочка */
.cat-list_item input[type="checkbox"]:checked + .checkbox-icon::after {
    content: "";
    display: block;
    width: 18px;
    height: 18px;
    background: url('data:image/svg+xml;utf8,<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="18" height="18" rx="4" fill="%23282828"/><path d="M13 6L7.5 11.5L5 9" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>') no-repeat center center;
}

.category-section__pagination .page-numbers{
    border: none;
    background: transparent;
}
.category-section__pagination .page-numbers:hover{
    cursor: pointer;
}
.category-section__pagination .page-numbers.current{
    background: #FF3E71;
color: #fff;
}
@media screen and (max-width: 1280px) {
    .category-section__posts.top-post .category-section__post-image{
        max-width: 396px;
    }

}
@media screen and (max-width: 1200px) {
    .category-section-case-studies .category-section__sidebar{
        margin-right: 55px;
    }

}
@media (min-width: 1101px) {
    .sidebar-toggle, .category-section__sidebar header.mobile-header {
        display: none !important;
    }

}
@media screen and (max-width: 1100px) {
    .case-studies-archive{
        margin-top: 32px;
    }
    .category-section-case-studies .category-section__sidebar{
        margin-right: 55px;
    }
    .category-section__content.case-studies-archive__content{
        flex: 0 0 100%;
        max-width: 100%;
    }
    .category-section__posts.top-post{
        width: 100%!important;
    }
    .category-section__posts.top-post .category-section__post-image{
    width: clamp(320px, 48.29%, 396px);
        max-width: 396px!important;
    }
    .category-section__sidebar header.mobile-header .sidebar__logo-image{
        width: 93px;
        height: 32px;
    }
    .category-section__sidebar header.mobile-header{
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px 0 12px 0;
    }
    .category-section__posts,.category-section__post-image,.category-section__post-content{
        max-width: 100%;
    }
    .sidebar-toggle{
        display: flex;
    }
    .category-section__sidebar {
        display: none;
        position: fixed;
        top: 0;
        right: -100%; /* Початкове положення за межами екрану */
        width:100vw;
        height: 100%;
        transition: transform 0.4s ease-in-out;
        transform: translateX(100%);
        z-index: 9999;
        background: white;
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
        padding: 20px;
    }
    .category-section-case-studies .category-section__sidebar{
        margin: 0;

    }
    .case-studies-archive{
        width: 100%;
        max-width: 100%;
    }
    .category-section__sidebar.active {
        display: block;
        width: 100vw;
        max-width: 100vw;
        height: 100%;
        overflow: auto;
        transform: translateX(100%); /* Поява сайдбару */
right: 100%;
    }
    .category-section__sidebar .close-sidebar {
        position: relative;
        background: none;
        border: none;
        cursor: pointer;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .category-section__sidebar .close-sidebar svg{
        width: 14px;
        height: 14px;
    }
}
@media screen and (max-width: 1024px) {

}
@media screen and (max-width: 900px) {

}
@media screen and (max-width: 768px) {

    .category-section.category-section-case-studies{
        padding-top: 20px;
    }
    .category-section__posts.top-post .category-section__post header.mobile-header{
        margin-bottom: 20px;
    }
    .category-section__posts.top-post .category-section__post-content{
        padding: 20px;
    }
    .category-section__posts.top-post .category-section__post-image{
        width: 100%;
        max-width: 100%!important;
        padding: 12px 16px 0 16px;
        border-radius: 12px 12px  0 0;
    }
    .category-section__post-read-more{
width: 100%;
    }
    .case-studies-archive .category-section__post .category-section__post-link{
        height: auto;
    }
    .case-studies-archive .category-section__post-image{
        min-height: 184px;
        max-height: 100%;
    }
    .category-section__posts.top-post  .category-section__post-link{
        flex-flow: column-reverse;
        height: auto;
    }
    .case-studies-archive{
        grid-template-columns: 1fr;
    }
    .category-section__post-content .category-section__post-title{
        margin-bottom: 2px;
    }
    .category-section__posts.top-post .category-section__post header{
        margin-bottom: 20px;
    }
    .category-section__posts.top-post .category-section__post-content .category-section__post-title{
        font-weight: 400;
        font-size: 20px;
        line-height: 120%;
        margin-bottom: 12px;
    }
    .category-section__posts.case-studies-archive .category-section__post .case-studies-terms{
        margin-bottom: 10px;
    }
    .category-section__post-title{
        font-size: 20px!important;
        margin-bottom: 12px;
    }
    .category-section__post-info{
        padding-top: 0;
    }
    .category-section__pagination{
        margin: 32px 0 30px 0;
    }
}
@media screen and (max-width: 560px) {
    .category-section__posts.top-post .category-section__post header .case-studies-terms span.term-link,
    .category-section__posts.case-studies-archive .category-section__post .case-studies-terms span.term-link{
        font-size: 12px !important;
    }
    .category-section__post-info .case-studies-data .case-studies-data__item .case-studies-data__item-value,
    .category-section__post-content .case-studies-data .case-studies-data__item .case-studies-data__item-value{
        font-size: 16px !important;
    }
}