.cpf-wrapper {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    color: #111827 !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    position: relative !important;
}

.cpf-wrapper * {
    box-sizing: border-box !important;
}

.cpf-main-title {
    font-size: 26px !important;
    font-weight: 700 !important;
    margin-bottom: 24px !important;
    color: #000000 !important;
    line-height: 1.3 !important;
    border: none !important;
    padding: 0 !important;
}

/* Filter Box */
.cpf-filter-box {
    background-color: #F1F3F5 !important;
    border-radius: 12px !important;
    padding: 40px 60px !important;
    margin-bottom: 40px !important;
    border: none !important;
}

.cpf-filters-row {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) 130px !important;
    gap: 12px !important;
    align-items: start !important;
}

.cpf-select-wrapper {
    width: 100% !important;
    min-width: 0 !important; /* <--- ეს კრძალავს ველის გაწელვას და აიძულებს სქროლის ამუშავებას */
}

/* ====== Select2 Single Selection Styling ====== */
.select2-container {
    width: 100% !important;
    max-width: 100% !important;
}

.select2-container--default .select2-selection--single {
    background-color: #D6E0F0 !important;
    border: 1px solid transparent !important;
    border-radius: 6px !important;
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    transition: all 0.2s ease !important;
    outline: none !important;
}

.select2-container--default .select2-selection--single:hover {
    background-color: #C2D0E6 !important;
}

.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--single {
    background-color: #FFFFFF !important;
    border-color: #4A8DF8 !important;
    box-shadow: 0 0 0 2px rgba(74, 141, 248, 0.2) !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #4B5563 !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    padding-left: 16px !important;
    padding-right: 32px !important;
    line-height: normal !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 48px !important;
    right: 12px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #7D8BA3 transparent transparent transparent !important;
    border-width: 5px 5px 0 5px !important;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #7D8BA3 transparent !important;
    border-width: 0 5px 5px 5px !important;
}

/* ====== Select2 Multiple Selection Styling (წლების მულტისელექტი) ====== */
.select2-container--default .select2-selection--multiple {
    background-color: #D6E0F0 !important;
    border: 1px solid transparent !important;
    border-radius: 6px !important;
    height: 48px !important; /* ფიქსირებული სიმაღლე */
    max-height: 48px !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important; 
    padding: 0 32px 0 0 !important; 
    outline: none !important;
    overflow: hidden !important; 
    transition: all 0.2s ease !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%237D8BA3'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    background-size: 14px !important;
    position: relative !important;
}

.select2-container--default .select2-selection--multiple:hover {
    background-color: #C2D0E6 !important;
}

.select2-container--default.select2-container--open .select2-selection--multiple,
.select2-container--default.select2-container--focus .select2-selection--multiple {
    background-color: #FFFFFF !important;
    border-color: #4A8DF8 !important;
    box-shadow: 0 0 0 2px rgba(74, 141, 248, 0.2) !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__rendered {
    display: flex !important;
    flex-wrap: nowrap !important; /* კრძალავს ელემენტების ახალ ხაზზე გადასვლას */
    align-items: center !important;
    width: 100% !important;
    height: 48px !important;
    margin: 0 !important;
    padding: 0 0 0 8px !important; /* ოდნავ შევწიეთ ტეგები მარცხნიდან */
    list-style: none !important;
    overflow-x: auto !important; /* ჩაირთო ჰორიზონტალური სქროლი */
    overflow-y: hidden !important;
    scrollbar-width: thin !important; /* Firefox-ისთვის წვრილი სქროლი */
    scrollbar-color: #A0AABF transparent !important;
    min-width: max-content !important;
}

/* წვრილი, ლამაზი სქროლის დამატება (Chrome, Safari, Edge) */
.select2-container--default .select2-selection--multiple .select2-selection__rendered::-webkit-scrollbar {
    height: 4px !important;
    display: block !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__rendered::-webkit-scrollbar-track {
    background: transparent !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__rendered::-webkit-scrollbar-thumb {
    background-color: #A0AABF !important;
    border-radius: 4px !important;
}

.select2-container--default .select2-selection--multiple .select2-search--inline {
    display: flex !important;
    align-items: center !important;
    margin-top: 0 !important;
    height: 44px !important;
    flex: 0 0 auto !important; /* არ მივცეთ უფლება გაიზარდოს */
}

/* ფლეისჰოლდერის გასწორება */
.select2-container--default .select2-selection--multiple .select2-search__field {
    margin-top: 0 !important;
    margin-left: 8px !important; 
    height: 44px !important; 
    line-height: 44px !important; 
    color: #4B5563 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-align: left !important;
    font-family: inherit !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    min-width: 60px !important;
    width: auto !important;
}

.select2-container--default .select2-selection--multiple .select2-search__field::placeholder {
    color: #4B5563 !important;
    opacity: 1 !important;
}

/* არჩეული წლების "ტეგები" */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #4A8DF8 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 4px 8px !important;
    margin-top: 0 !important; 
    margin-bottom: 0 !important;
    margin-left: 8px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important; /* კრძალავს ტექსტის შეკვეცას შიგნით */
    flex-shrink: 0 !important; /* ხელს უშლის ტეგების დაპატარავებას, რაც აჩენს სქროლს */
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #ffffff !important;
    margin-right: 6px !important;
    border: none !important;
    font-weight: bold !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #ffcccc !important;
    background: transparent !important;
}

/* ====== Select2 Dropdown List Styling (ჩამოსაშლელი ფანჯარა) ====== */
.select2-dropdown {
    border: 1px solid #E5E7EB !important;
    border-radius: 6px !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    overflow: hidden !important;
    z-index: 99999 !important;
}

.select2-container--open .select2-dropdown--below {
    margin-top: 40px !important; 
}

.select2-container--open .select2-dropdown--above {
    margin-top: -6px !important;
}

/* ოფციების განლაგება - ვამზადებთ Checkmark-სთვის */
.select2-results__option {
    padding: 12px 16px !important;
    font-size: 14px !important;
    color: #111827 !important;
    background-color: #FFFFFF !important;
    display: flex !important;
    justify-content: space-between !important; /* აშორებს ტექსტს და ტიჩკას */
    align-items: center !important;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: #4A8DF8 !important;
    color: #FFFFFF !important;
}

.select2-container--default .select2-results__option--selected {
    background-color: #F3F4F6 !important;
    color: #111827 !important;
    font-weight: 600 !important;
}

/* "ტიჩკა" (Checkmark) მონიშნულ ელემენტებზე */
.select2-container--default .select2-results__option--selected::after {
    content: '\2713' !important; /* Unicode Checkmark */
    color: #4A8DF8 !important;
    font-size: 14px !important;
    font-weight: bold !important;
}

/* Hover მდგომარეობაში ტიჩკის ფერის შეცვლა */
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable.select2-results__option--selected::after {
    color: #FFFFFF !important;
}

.select2-search--dropdown .select2-search__field {
    border: 1px solid #D1D5DB !important;
    border-radius: 4px !important;
    padding: 8px !important;
    outline: none !important;
}
.select2-search--dropdown .select2-search__field:focus {
    border-color: #4A8DF8 !important;
}

/* ========================================================= */

.cpf-action-wrapper {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    width: 100% !important;
}

.cpf-btn-filter {
    background-color: #4A8DF8 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 6px !important;
    height: 48px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    width: 100% !important;
    transition: background-color 0.2s ease !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.cpf-btn-filter:hover {
    background-color: #3B72D6 !important;
}

.cpf-clear-filters {
    font-size: 12px !important;
    color: #9CA3AF !important;
    text-decoration: none !important;
    margin-top: 8px !important;
    margin-right: 4px !important;
    background: transparent !important;
    border: none !important;
    transition: color 0.2s ease !important;
}

.cpf-clear-filters:hover {
    color: #4B5563 !important;
    text-decoration: underline !important;
}

/* Table - Fixed Layout */
.cpf-table-container {
    width: 100% !important;
    overflow-x: auto !important;
    border: none !important;
    background: transparent !important;
}

.cpf-table {
    width: 100% !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    text-align: left !important;
    border: none !important;
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
    table-layout: fixed !important;
}

.cpf-table thead {
    background: transparent !important;
}

.cpf-table th:nth-child(1),
.cpf-table td:nth-child(1) {
    width: 536px !important;
    max-width: 536px !important;
    padding-right: 40px !important;
}

.cpf-table th:nth-child(2),
.cpf-table td:nth-child(2),
.cpf-table th:nth-child(3),
.cpf-table td:nth-child(3),
.cpf-table th:nth-child(4),
.cpf-table td:nth-child(4) {
    width: 140px !important;
    max-width: 140px !important;
    padding-right: 16px !important;
}

.cpf-table th {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #000000 !important;
    padding-top: 0 !important;
    padding-bottom: 20px !important;
    padding-left: 0 !important;
    border: none !important;
    border-bottom: 1px solid #E5E7EB !important;
    background: transparent !important;
    text-align: left !important;
}

.cpf-table tr {
    background: transparent !important;
    border: none !important;
}

.cpf-table td {
    padding-top: 28px !important;
    padding-bottom: 28px !important;
    padding-left: 0 !important;
    vertical-align: top !important;
    border: none !important;
    border-bottom: 1px solid #F3F4F6 !important;
    font-size: 16px !important;
    color: #111827 !important;
    background: transparent !important;
    text-align: left !important;
}

.project-title a {
    color: #000000 !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    line-height: 1.5 !important;
    transition: color 0.2s ease !important;
    display: inline-block !important;
    box-shadow: none !important;
    word-wrap: break-word !important;
}

.project-title a:hover {
    color: #4A8DF8 !important;
    text-decoration: underline !important;
}

.project-years {
    line-height: 1.8 !important;
    color: #374151 !important;
}

/* Load More */
.cpf-load-more-wrapper {
    justify-content: flex-end !important; 
    margin-top: 40px !important;
}

/* ამატებს flex-ს მხოლოდ მაშინ, თუ ელემენტი არ არის დამალული JS-ის მიერ */
.cpf-load-more-wrapper:not([style*="display: none"]) {
    display: flex !important;
}

.cpf-btn-load-more {
    background-color: #D6E0F0 !important;
    color: #000000 !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 14px 32px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
    display: inline-block !important;
    line-height: 1 !important;
}

.cpf-btn-load-more:hover {
    background-color: #C2D0E6 !important;
}

.cpf-loader {
    text-align: center !important;
    padding: 20px !important;
    color: #6B7280 !important;
    font-size: 14px !important;
}

/* Responsive */
@media (max-width: 1024px) {
    .cpf-filter-box {
        padding: 30px !important;
    }
    .cpf-filters-row {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    .cpf-action-wrapper {
        grid-column: span 3 !important;
        align-items: flex-start !important;
    }
    .cpf-btn-filter {
        width: auto !important;
        padding: 0 40px !important;
    }
    .cpf-clear-filters {
        margin-right: 0 !important;
        margin-left: 4px !important;
    }
    .cpf-table th:nth-child(1), .cpf-table td:nth-child(1),
    .cpf-table th:nth-child(2), .cpf-table td:nth-child(2),
    .cpf-table th:nth-child(3), .cpf-table td:nth-child(3),
    .cpf-table th:nth-child(4), .cpf-table td:nth-child(4) {
        width: auto !important;
        max-width: none !important;
        min-width: 120px !important;
    }
    .cpf-table th:nth-child(1), .cpf-table td:nth-child(1) {
        min-width: 300px !important;
    }
}

@media (max-width: 640px) {
    .cpf-filter-box {
        padding: 24px !important;
    }
    .cpf-filters-row {
        grid-template-columns: 1fr !important;
    }
    .cpf-action-wrapper {
        grid-column: span 1 !important;
    }
    .cpf-btn-filter {
        width: 100% !important;
    }
    .cpf-table th, .cpf-table td {
        padding: 16px 8px 16px 0 !important;
        font-size: 14px !important;
    }
    .cpf-table th {
        font-size: 16px !important;
    }
}

.select2-selection__placeholder {
    color: #797E8F !important;
    font-size: 14px !important;
    font-weight: 300 !important;
    opacity: 1 !important;
}


/* Placeholder-ის ფერის შეცვლა კონკრეტულად "Year" ველისთვის */

.cpf-select-wrapper .select2-search__field[placeholder="Year"]::placeholder {
       color: #797E8F !important;
    font-size: 14px !important;
    font-weight: 300 !important;
    opacity: 1 !important;
}

/* Chrome, Safari, Edge */
.cpf-select-wrapper .select2-search__field[placeholder="Year"]::-webkit-input-placeholder {
    color: #797E8F !important;
    font-size: 14px !important;
    font-weight: 300 !important;
    opacity: 1 !important;
}

/* Firefox 19+ */
.cpf-select-wrapper .select2-search__field[placeholder="Year"]::-moz-placeholder {
    color: #797E8F !important;
    font-size: 14px !important;
    font-weight: 300 !important;
    opacity: 1 !important;
}

/* Internet Explorer 10-11 / ძველი Edge */
.cpf-select-wrapper .select2-search__field[placeholder="Year"]:-ms-input-placeholder {
    color: #797E8F !important;
    font-size: 14px !important;
    font-weight: 300 !important;
    opacity: 1 !important;
}
