.title{
    font-size: var(--fs-xl);
    margin-bottom: var(--space-2xl);
}

.container{
    margin-top: var(--space-3xl);
    margin-bottom: var(--space-4xl); 
    align-self: stretch; /* якщо .container-all-in-page теж flex/grid */
    width: 100%;
}

#reports-list {
    list-style-type: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    width: 60%; /* фіксована ширина для списку звітів на десктопі */
}

#reports-list li{
    width: 100%;
}

.report-list-item {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-2xs);
    border-radius: var(--br-xl);
    padding: var(--space-m);
    background-image: linear-gradient(#364020bf, #684c27bf);
    width: 100%;
    overflow: hidden; /* Щоб псевдоелемент не виходив за border-radius */
    isolation: isolate; /* Щоб фон не перекривав контент */
}

.report-list-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(#364020d9, #684c27d9);
    opacity: 0;
    transition: opacity 0.5s ease; /* Плавна зміна прозорості градієнта */
    z-index: -1;
}

.report-list-item:hover::before {
    opacity: 1;
}

.link{
    color: var(--text-bodily);
    display: flex;
    flex-direction: row;
}

.report-name{
    font-size: var(--fs-l);
    font-weight: var(--fw-bold);
    color: var(--text-bodily);
    width: 100%;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.report-description{
    color: var(--text-bodily);
    font-size: var(--fs-2xs);
    width: 100%;
    display: -webkit-box;
    line-clamp: 5;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.report-text-all{
    display: flex;
    flex-direction: row;
    gap: var(--space-3xs);
    color: var(--text-bodily);
    font-size: var(--fs-xs);
}

.report-file-link{
    color: var(--text-bodily);
    font-size: var(--fs-2xs);
    display: flex;
    flex-direction: row;
    gap: var(--space-3xs);
    align-items: center;
    justify-content: center;
}

.report-file-link svg{
    width: 1.25em;
    height: 1.25em;
    flex-shrink: 0;
}

.report-date{
    font-weight: var(--fw-regular);
}

.all-files{
    display: grid;
    grid-template-columns: repeat(2, auto);
    grid-auto-flow: row;
    column-gap: var(--space-4xl);
    row-gap: var(--space-2xs);
    justify-items: start;
}

.stretched-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* внутрішні посилання підіймаємо над "розтягнутим" лінком, щоб вони лишились клікабельними */
.report-link .link,
.report-file-link {
    position: relative;
    z-index: 2;
}

.pagination{
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.page-numbers{
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.page-number{
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 var(--space-2xs);
    border-radius: var(--br-s);
    font-size: 20px;
    text-decoration: none;
    color: var(--bg-brown-button);
    margin-top: var(--space-4xl);
    transition: background-color 0.2s ease;
}

.page-number:hover{
    background-color: var(--bg-add-photo);
}

.page-number.active{
    color: var(--bg-brown-button);
    background-color: var(--text-bodily);
}

.page-number.page-hidden{
    display: none;
}

.page-ellipsis{
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    border-radius: var(--br-s);
    color: var(--bg-brown-button);
    margin-top: var(--space-4xl);
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.page-ellipsis:hover{
    background-color: var(--bg-add-photo);
}

.page-btn{
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xs) var(--space-m);
    border-radius: var(--br-s);
    font-size: 32px;
    font-weight: var(--fw-bold);
    color: var(--bg-brown-button);
    text-decoration: none;
    background-color: rgba(255, 255, 255, 0.06);
    margin-top: var(--space-4xl);
}

.page-btn.disabled{
    color: var(--bg-add-photo);
    font-weight: var(--fw-bold);
    background-color: transparent;
    cursor: not-allowed;
    pointer-events: none;
}

@media (min-width: 560px) and (max-width: 1024px){
    #reports-list {
        gap: 16px;
        width: 90%;
    }
}

/* Мобільна адаптація для звітів */
@media (max-width: 560px) {
    .title{
        margin-bottom: var(--space-m);
    }

    .container {
        margin-top: var(--space-xs)
    }

    #reports-list {
        gap: 16px;
        width: 100%;
    }

    .report-list-item {
        align-items: flex-start;
        gap: var(--space-xs);
        border-radius: var(--br-xl);
        padding: var(--space-2xs) var(--space-xs);
    }

    .report-description {
        font-size: var(--fs-xs);
        width: 100%;
        display: -webkit-box;
        line-clamp: 5;
        -webkit-line-clamp: 5;
    }

    .report-name {
        font-size: var(--fs-m);
    }

    .all-files {
        grid-template-columns: 1fr; /* На мобільних виводимо файли в одну колонку */
        row-gap: var(--space-3xs);
        
    }
}
/* Текст на всю ширину (як "по ширині" у Word) */
.report-description {
    text-align: justify;
    hyphens: auto;
    white-space: pre-line; /* зберігаємо переноси рядків з адмінки */
}
