:root {
    --section-margin: 82px;
}

@media (max-width: 1024px) {
    :root {
    }
}

@media (max-width: 768px) {
    :root {
        --section-margin: 52px;
    }
}

.projects section {
    margin-top: var(--section-margin);
}

/* Стили для Swiper */
.projects__carousel-container {
    position: relative;
    width: 100%;
}

.projects__carousel {
    position: relative;
    width: 100%;
    height: 100%;
    max-height: 600px;
}

.projects__carousel-item {
    width: 100%;
    height: 100%;
}

.projects__carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Стили для навигации */
.button-next,
.button-prev {
    position: absolute;
    right: 8px;
    transform: translateY(-50%);
    top: 50%;
    color: #fff;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    cursor: pointer;
}

.button-next {
    margin-top: 46px;
}

.button-prev {
    margin-top: -46px;
}

.button-next:hover,
.button-prev:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Стили для пагинации */
.swiper-pagination {
    position: relative;
    margin-bottom: -26px;
    text-align: center;
}

.swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    border: 1px solid #000;
    margin: 0 4px;
}

.swiper-pagination-bullet-active {
    background: #000;
}

/* actions */
.projects__actions-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.projects__actions-search {
    order: 1;
    width: 100%;
    max-width: 350px;
}

.default-input {
    position: relative;
    width: 100%;
}

.default-input svg {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.default-input__clean {
    color: rgba(0, 0, 0, 0.75);
}

.default-input__clean:hover {
    color: rgba(0, 0, 0, 1);
}

.projects__actions-search .default-input input,
.projects__actions-search .default-input label {
    padding-left: 26px;
    line-height: 1;
}

/* Стили для фильтров проектов */
.projects__actions-filters {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    order: 0;
    padding: 13px 0;
}

.custom-select {
    display: flex;
    align-items: center;
    position: relative;
    font-family: inherit;
}

.custom-select__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    gap: 4px;
    line-height: 1;
}

.custom-select__placeholder {
    color: #000;
    font-size: 16px;
    line-height: 1;
}

.custom-select__arrow {
    transition: transform 0.3s ease;
    color: #000;
}

.custom-select__header.active .custom-select__arrow {
    transform: rotate(180deg);
}

.custom-select__dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.3);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    max-height: 300px;
    overflow-y: auto;
    min-width: 200px;
}

.custom-select__dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-select__options {
    padding: 8px 0;
}

.default-checkbox {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.default-checkbox:hover {
    background-color: #f8f9fa;
}

.custom-select__divider {
    height: 1px;
    background-color: #e0e0e0;
    margin: 4px 8px;
}

.custom-select__option--select-all .custom-select__option-text {
    color: #101010;
}

.default-checkbox + .default-checkbox {
    margin-top: 4px !important;
}

.projects__actions-filter-clear {
    display: none;
    align-items: center;
    gap: 4px;
    font-size: 16px;
    line-height: 1;
    color: #000;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.3s ease;
}

.projects__actions-filter-clear:hover {
    opacity: 0.7;
}

@media (max-width: 1240px) {
    .projects__actions-wrapper {
        display: flex;
        flex-direction: column;
        gap: 32px;
    }
    .projects__actions-search {
        max-width: 100%;
        order: 0;
    }

    .projects__actions-filters {
        order: 1;
        width: 100%;
    }

    .projects__actions-filter-clear {
        margin-left: auto;
    }
}

@media (max-width: 768px) {
    .projects__actions-wrapper {
        flex-direction: column;
        gap: 8px;
    }
    .projects__actions-filters {
        flex-direction: column;
        gap: 12px;
    }

    .custom-select {
        min-width: 100%;
    }

    .projects__actions-filter-clear {
        margin-left: 0;
    }
}

.projects__list {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 110px 16px;
    margin-top: 16px !important;
}

.bx-filter.bx-filter-horizontal {
    margin-top: 32px;
}

@media (max-width: 1024px) {
    .projects__list {
        gap: 32px 8px;
    }
}

@media (max-width: 768px) {
    .projects__list {
        gap: 24px 8px;
    }
}

.card-project {
    display: flex;
    flex-direction: column;
    gap: 16px;
    grid-column: span 6;
}

.card-project__image {
    position: relative;
}

.card-project--big {
    grid-column: 5 / span 8;
}

@media (max-width: 768px) {
    .card-project--big,
    .card-project {
        grid-column: 1 / -1;
        gap: 8px;
    }
}

.card-project__content {
    display: flex;
    flex-direction: row;
    gap: 16px;
}

@media (max-width: 768px) {
    .card-project__content {
        flex-direction: column;
        gap: 8px;
    }
}

.card-project__info {
    width: 60%;
    max-width: 350px;
}

@media (max-width: 768px) {
    .card-project__info {
        width: 100%;
        max-width: 100%;
    }

    .card-project__title h3 {
        margin: 0 0 8px 0 !important;
        font-size: 18px;
    }
}

.card-project__title h3 {
    font-size: 20px;
    line-height: 1;
    font-weight: 700;
    margin: 0;
}

.card-project__description {
    font-size: 15px;
    line-height: 16px;
    margin-top: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-project__author {
    font-size: 15px;
    line-height: 1;
    color: rgba(0, 0, 0, 0.3);
}

.card-project__tag {
    position: absolute;
    top: 8px;
    right: 8px;
    border-radius: 24px;
    border: 1px solid #000;
    padding: 14px 20px;
    font-size: 15px;
    line-height: 1;
    color: #000;
    background: rgba(255, 255, 255, 0.6);
}

.card-project__arrow {
    opacity: 0;
    right: 16px;
    position: absolute;
    bottom: 8px;
    transition: all 0.5s ease;
}

.card-project:hover .card-project__arrow {
    opacity: 1;
    right: 8px;
}

/* Стили для текстового блока */
.projects__text-block {
    grid-column: 1 / -1;
    margin: 40px 0;
    padding: 40px;
    background: #f8f8f8;
    border-radius: 12px;
    text-align: center;
}

.projects__text-content h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: #000;
}

.projects__text-content p {
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .projects__text-block {
        margin: 24px 0;
        padding: 24px;
    }

    .projects__text-content h3 {
        font-size: 20px;
    }

    .projects__text-content p {
        font-size: 14px;
    }
}

.card-project--text {
    align-items: flex-end;
}

.card-project--text .card-project__info {
    width: 100%;
    max-width: 350px;
}

@media (max-width: 768px) {
    .card-project--text .card-project__info {
        max-width: 100%;
    }
}

.card-project--text .card-project__title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 32px;
}

.card-project--text .card-project__title h3 {
    font-weight: 700;
    font-size: 32px;
    line-height: 1;
    margin: 0;
}

.card-project--text .card-project__title a {
    display: flex;
    align-items: center;
    font-size: 15px;
    line-height: 1;
    color: #000;
    text-decoration: none;
    border: 1px solid #000;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.card-project--text .card-project__title a svg {
    transition: all 0.3s ease;
}

.card-project--text .card-project__title a:hover svg {
    transform: translateX(6px);
}

@media (max-width: 768px) {
    .card-project--text .card-project__title {
        gap: 0;
    }
    .card-project--text {
        align-items: flex-start;
    }

    .card-project--text .card-project__title h3 {
        margin-bottom: 18px !important;
        font-size: 18px;
        line-height: 1;
    }
}
.projects__list-banner {
    position: relative;
    width: 100%;
    grid-column: span 12;
    max-height: 400px;
}

.projects__list-banner:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 100%);
    z-index: 5;
}

.projects__list-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.projects__list-banner h3 {
    position: absolute;
    bottom: 32px;
    left: 24px;
    font-weight: 700;
    font-size: 64px;
    line-height: 1;
    vertical-align: bottom;
    margin: 0 !important;
    color: #fff;
    z-index: 10;
}
@media (max-width: 1024px) {
    .projects__list-banner h3 {
        font-size: 38px;
        bottom: 18px;
        left: 8px;
    }
}
@media (max-width: 768px) {
    .projects__list-banner h3 {
        font-size: 24px;
        bottom: 12px;
        left: 8px;
    }
}

.catalog__bottom {
    margin-top: 48px;
    padding: 0 8px;
}

.projects h1 {
    font-weight: 700;
    font-size: 64px;
    line-height: 64px;
    margin-top: 64px;
    padding-bottom: 4px;
    border-bottom: 1px solid #000;
}

@media (max-width: 768px) {
    .projects h1 {
        font-size: 22px;
        line-height: 22px;
    }
    .projects h1 {
        margin-top: 32px;
    }
}

.card-project:nth-child(4) .card-project__image {
    max-height: 450px;
}
.card-project:nth-child(10) .card-project__image {
    max-height: 450px;
}

.card-project__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    aspect-ratio: 1 / 1;
}

.card-project--big .card-project__info {
    max-width: 360px;
}

.card-project--big .card-project__image img {
    aspect-ratio: auto;
}

.card-project--big:hover .card-project__image img,
.card-project:hover {
    text-decoration: none;
    color: #333;
}

.card-project--big:hover .card-project__arrow,
.card-project:hover .card-project__arrow {
    color: #fff;
}

.projects__actions-filter-clear__input {
    background-color: transparent;
}
