@import url('https://fonts.googleapis.com/css2?family=Didact+Gothic&family=Host+Grotesk:ital,wght@0,300..800;1,300..800&family=Livvic:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,900&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Raleway:ital,wght@0,100..900;1,100..900&family=Roboto+Condensed:ital,wght@0,100..900;1,100..900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    --gap: 8px;
    --border-radius: 30px;
    --primary: #2563eb;
    --secondary: #EEF2FF;
    --black: #000000;
    --white: #FFFFFF;
    --gray: #666666;
    --background: #F1F1F1;
    --bgdarkshadow: #999999;
    --bglight: #f8f8f8;
    --bglightless: #f0f0f0;
    --bgshadow: #e9e9e9;
    --transparent-white: rgba(255, 255, 255, 0.95);
    --transparent-dark: rgba(0, 0, 0, 0.7);
    --box-shadow: 0px 10px 20px 0px rgba(169.99999999999997, 169.99999999999997, 169.99999999999997, 0.27);
    --transition: 0.4s;
}

.visibility-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


button {
    cursor: pointer;
}

.button--clear {
    background: none;
    border: none;
    margin: 0;
    color: var(--primary);
    font-weight: 700;

}


.button--clear:hover {
    color: var(--black);
}


.button--success {
    background: var(--primary);
    padding: 0.33rem 0.8rem;
    border-radius: var(--border-radius);
    color: var(--white);
    display: inline-flex;
    align-self: flex-start;
}

.btn {
    text-decoration: none;

}

.btn:hover {
    background: var(--black);
}

body {
    background: #fcfcfd
}

body,
button,
input,
select,
optgroup,
textarea {
    font-family: 'Poppins';
}

table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 10px;
}

th,
td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: left;
}

th {
    cursor: pointer;
    background: #f0f0f0;
}

input[type=search] {
    padding: 5px;
    width: 200px;
}

button {
    padding: 5px 10px;
    margin-left: 5px;
}




.projects__flag {
    display: inline-flex;
    cursor: help;
    outline: none;
    position: relative;
    margin-bottom: 1rem;

}

.projects__flag:focus-visible {
    outline: 2px solid #005fcc;
    outline-offset: 2px;
}

.projects__flag::after {
    content: attr(aria-label);
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    min-width: 160px;
    max-width: min(90vw, 320px);
    background: #1a1a1a;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.75rem;

    white-space: normal;
    word-wrap: break-word;
    text-align: center;

    pointer-events: none;
    z-index: 10;
}

.projects__flag::after {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.projects__flag:hover::after,
.projects__flag:focus-visible::after {
    opacity: 1;
}






.projects__status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

/* kropka */
.projects__status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}




.projects__status--w-trakcie {
    color: #2563eb;
}

.projects__status--zakonczony {
    color: #16a34a;
}

.projects__status--nieokreslony {
    color: #dc2626;
}

.projects__status--zaplanowany {
    color: #ca8a04;
}



.projects__keywords {
    display: flex;
    gap: 0.3rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
    overflow: hidden;
    max-width: 300px;
    cursor: help;
    outline: none;

}


.projects__keywords:focus-visible {
    outline: 2px solid #005fcc;
    outline-offset: 2px;
}


.projects__keywords::after {
    content: attr(aria-label);
    position: absolute;
    right: 0;
    transform: translateX(-50%);
    min-width: 200px;
    max-width: min(90vw, 360px);
    background: #1a1a1a;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: normal;
    opacity: 0;
    pointer-events: none;
    z-index: 10;
}


.projects__keywords:hover::after,
.projects__keywords:focus-visible::after {
    opacity:1;
}
.projects__keywords li {
    background: #eee;
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 0.625rem;
    color: #555;
    white-space: nowrap;
}

.projects__keywords__more {
    background: #ccc;
    font-weight: bold;
}



.projects__person {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    position: relative;
    cursor: help;
}

/* tooltip */
.projects__person::after {
    content: attr(aria-label);
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    max-width: min(90vw, 360px);
    background: #1a1a1a;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: normal;
    opacity: 0;
    pointer-events: none;
    z-index: 10;
}

.projects__person:hover::after,
.projects__person:focus-visible::after {
    opacity: 1;
}

.projects__person:focus-visible {
    outline: 2px solid #005fcc;
    outline-offset: 2px;
}



#activeFilters {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.filters__title {
    font-size: 0.675rem;
    font-weight: 700;
    color: var(--bgdarkshadow);
    text-transform: uppercase;

}

.filters__group {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid var(--bglightless);
    padding-bottom: 1rem;

}

.filters__group:last-child {
    padding-bottom: none;
    border-bottom: 0px;
}

.filter-chip {
    background: var(--secondary);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.325rem 0.65rem;
    border-radius: var(--border-radius);
    font-size: 0.675rem;
    font-weight: 600;
    cursor: pointer;
    margin: 0;
}

.filter-chip:focus {
    outline: 2px solid #2563eb;
}


.container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: center;
    margin: 0 auto;
    /* padding: 0 1rem; */
}

.projects {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.projects__aside {
    /* box-shadow: var(--box-shadow); */
    /* border-radius: 30px; */
    /* background: var(--white); */
    align-self: flex-start;
    /* background: var(--white); */
    padding:0;
    gap: 2rem;
    display: flex;
    flex-direction: column;
}

.projects__aside__header {
    display: flex;
    justify-content: space-between;
    align-items: center;

}

.projects__filters {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 0;
}

.projects__loader {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.projects__loader[hidden] {
    display: none;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--primary);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Fade-in dla nowych projektów */
.projects__item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s forwards;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
    position: relative;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.projects__list {
    display: flex;
    flex-direction: column;
    grid-template-columns: 1fr;
    padding: 0;
    gap: 1rem;
    transition: all 0.3s ease;
}



.projects__view__toggle {
   
    gap: 0.5rem;
    justify-content: flex-end;
    align-items: center;
    display:none;
}

.projects__view__button {
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    margin: 0;
    display: flex;
    padding: 0.25rem;
}

.projects__view__button.active {
    background: var(--primary);
    color: #fff;
}

.projects__view__button.active img {
    filter: invert(1);

}



.projects__list.list-view {
    grid-template-columns: 1fr;
}




.projects__item__link {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: var(--white);
    border-radius: var(--border-radius);
    margin: 0;
    box-shadow: 0px 0px 2px 0px #e0e0e0;
    transform: translateY(0px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    color: var(--black);

}

.projects__item__link:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow);
}

.projects__item__link:hover .projects__title {
    color: var(--primary);
}

.projects__item__link:hover .projects__details__button {
    background: var(--primary);
}

.projects__title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 0;
}

.projects__details {
    display: flex;
    flex-direction: column;
    gap: 1rem;

}

.projects__details__list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.projects__details__item {
    border-bottom: 1px solid var(--bglightless);
    font-size: 0.675rem;
}

.projects__details__item:last-child {
    border-bottom: none;
}


.projects__details strong {
    font-weight: 600;

}

.projects__details__button {
    border-radius: 10px;
    background: var(--black);
    transition: 0.4s;
    align-self: flex-end;
}

.projects__details__button:hover {
    background: var(--primary);
}

.projects__number {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: flex-end;
}

.projects__select {
    border-radius: var(--border-radius);
    padding: 0.6rem 1rem;
    background: var(--white);
    border: 1px solid var(--bgshadow);
    font-weight: 600;
}


input.filters__search {
    background: var(--white);
    padding: 0.6rem 1rem;
    border-radius: var(--border-radius);
    border: none;
    width: 100%;
    background: var(--white);
    border: 1px solid var(--bgshadow);
    padding-left: 2.5rem;
}


.projects__header__items {
    display: flex;
    gap: 1rem;
    align-items: center;
    position: relative;
}

.projects__search {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}


.search__label {
    font-size: 0.875rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    display: block;
}


.projects__search__suggestions {
    position: absolute;
    z-index: 100;
    background: #fff;
    border: 1px solid #dfe3f0;
    border-radius: 8px;
    margin-top: 6px;
    padding: 4px 0;
    list-style: none;
    max-height: 260px;
    overflow-y: auto;
    width: 100%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}

.projects__search__suggestion {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 0.95rem;
}

.projects__search__suggestion:hover,
.projects__search__suggestion[aria-selected="true"] {
    background: #f4f7ff;
}

.suggestion__label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion__type {
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.suggestion__type--project {
    background: #e6f0ff;
    color: #1d4ed8;
}

.suggestion__type--filter {
    background: #e8f7ee;
    color: #047857;
}

.filters__label {
    font-weight: 600;
    padding: 0;
    padding-bottom: 0.5rem;
}


.filters__fieldset {
    border: none;
    padding: 0;
}

.filters__select {
    padding: 0.5rem 1rem;
    background: transparent;
    flex-basis: 100%;
    cursor: pointer;
    width: 100%;
    border: 1px solid var(--bgshadow);
    border-radius: 5px;
}

.filters__date {
    padding: 0.5rem 1rem;
    background: transparent;
    flex-basis: 100%;
    cursor: pointer;
    border: 1px solid var(--bgshadow);
    border-radius: 5px;
    background-color: var(--white);
    border-radius: 5px;
    font-size: 0.675rem;
    font-weight: 600;
    color: var(--primary);

}



.filters__search__wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.filters__search__wrapper::before {
    content: "";
    /* lupa jako emoji */
    position: absolute;
    left: 10px;
    /* odstęp od lewej */
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    /* żeby klik w input działał normalnie */
    font-size: 16px;
    width: 24px;
    height: 24px;
    background-image: url('../img/search.svg');
    color: #666;
    filter: grayscale(1);

}

.filters__search::placeholder {}





.filters__list__checkbox {
    padding: 0;
    margin: 0;
    gap: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    flex-direction: column;
    gap: 1rem;
}



.filters__list__checkbox.filters__list__button {
    gap: 0.5rem;
    flex-direction: row;
}

.filters__list__wrapper {
    max-height: 300px;
    overflow-y: auto;
}

.filters__item__checkbox,
.filters__item__button {
    display: inline-flex;
    align-items: center;
}

.filters__label__checkbox {
    cursor: pointer;
}


.filters__label__checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    font-size: 0.675rem;
    font-weight: 600;
    color: var(--black);
    cursor: pointer;
}

/* „checkbox” */
.filters__label__checkbox::before {
    content: '';
    width: 0.825rem;
    height: 0.825rem;
    border: 2px solid var(--primary);
    border-radius: 4px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.filters__label__checkbox.active::before {
    background: var(--primary);
    border-color: var(--primary);
}


.filters__label__button {
    border: 1px solid var(--bgshadow);
    /* border-radius: var(--border-radius); */
    border-radius: 5px;
    padding: 0.375rem 0.375rem;
    background: var(--white);
    display: inline-flex;
    font-size: 0.675rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
}

.filters__label__button:hover {
    background: var(--bglightless);
}

.filters__label__button.active {
    background: var(--black);
    color: var(--white);
}

input[type="checkbox"] {
    display: none;
}



.projects__container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.projects__container__bottom {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
}

.projects__container__view {
    display: flex;
    justify-content: space-between;
}

.projects__header {
    /* display: none; */
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    gap: 1rem;
}


.projects__header__title {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 2rem;
    padding: 0;
    margin: 0;
}

.projects__header__paragraph {
    color: var(--bgdarkshadow);
}

.projects__header--active {
    display: flex;
}

.projects__header__top {
    display: flex;
    gap: 1rem;
    flex-direction: column;

}

.project__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}


.projects__total {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--bgdarkshadow);
    text-transform: uppercase;
    position: relative;
    width: 100%;
}



.projects__total__number:after {
    content: "";
    width: 80%;
    height: 1px;
    background: var(--bgshadow);
    position: absolute;
    top: 50%;
    right: 0;
}

.filters--active {
    flex: 1;
}




.projects__pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 2rem;

    flex-wrap: wrap;
}

.projects__pagination__container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.projects__pagination__button,
.pagination__number {
    background: transparent;
    padding: 0;
    margin: 0;
    font-weight: 500;
    border: 1px solid var(--bgshadow);
    padding: 0.6rem 1rem;
    border-radius: 15px;
    background: var(--white);
    color: var(--black);
    font-size: 0.675rem;
    transition: 0.4s;
}

.projects__pagination__button:hover,
.pagination__number:hover {
    opacity: 0.5;
}

.projects__pagination__button {
    font-weight: 700;
    background: var(--black);
    color: var(--white);
}



.projects__pagination__numbers {
    display: inline-flex;
    gap: 0.5rem;
    margin: 0 1rem;
}




.projects__pagination__button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}



.pagination__number.active {
    font-weight: bold;
    cursor: default;
    background: var(--primary);
    color: var(--white);
}


.projects__pagination__button:disabled,
.pagination__number:disabled {
    background: var(--bgdarkshadow);
    color: var(--white);
}


.projects__pagination__indicator {
    font-size: 0.675rem;
    font-weight: 600;
    color: var(--bgdarkshadow);
    text-transform: uppercase;
}


.projects__pagination__left,
.projects__pagination__right {
    display: none;
}


.project {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 2rem;
}

.project__container {
    padding: 2rem;
    background: var(--white);
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
}

.project__content {
    flex: 1;
}

.project__link {
    justify-self: flex-end;
}



@media screen and (min-width:668px) {
    .projects {
        display: grid;
        grid-template-columns: 1fr 3fr;

    }

    .projects__aside {
        padding: 1.5rem;

    }


    .projects__view__toggle{
        display:inline-flex;
    }
    
    .projects__header__top {
        display: grid;
        gap: 1rem;
        grid-template-columns: 1fr 3fr;
    }

    .projects__list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .projects__pagination__left,
    .projects__pagination__right {
        display: flex;
    }
}

@media screen and (min-width:1200px) {


    .projects__list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}