/* Основные стили для списка статей в категории */
.articles-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.article-item {
    background: white;
    border: 1px solid var(--light-grey);
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.articles-list>.article-item:first-child {
    width: 100%;
    grid-column: span 3;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    height: fit-content;
    align-content: flex-start;
}

.articles-list>.article-item:first-child .article-image {
    height: 50%;
    width: 100%;
}

.articles-list>.article-item:first-child .article-image {
    top: 0;
    left: 0;
    min-height: 400px;
    height: 400px;
    width: 1160px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.articles-list>.article-item:first-child .article-image img {
    width: 100%;
    height: auto;
    transform: translateY(100%);
    animation: scrollUp 60s linear infinite;
}

.articles-list:hover>.article-item:first-child .article-image img {
    animation-play-state: paused;
}

@keyframes scrollUp {
    0% {
        transform: translateY(20%);
    }

    100% {
        transform: translateY(-30%);
    }
}

.articles-list>.article-item:nth-child(5) {
    width: 100%;
    grid-column: span 2;
    display: flex;
    flex-direction: row;
    align-items: center;
}

.articles-list>.article-item:nth-child(5) .article-image {
    height: 100%;
}

/* Стили для изображения статьи */
.article-image {
    height: 200px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-item:hover .article-image img {
    transform: scale(1.05);
}

/* Стили для деталей статьи */
.article-details {
    padding: 20px;
}

.attribs {
    font-size: 13px;
    color: var(--light-text);
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.article-title {
    margin: 0 0 15px 0;
    font-size: 18px;
    line-height: 1.4;
}

.article-title a {
    color: var(--h-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-title a:hover {
    color: var(--accent-color);
}

.article-intro {
    color: var(--text-color);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Стили для кнопки "Читать далее" */
.article-readmore {
    margin-top: 15px;
}

a.readmore:link,
a.readmore:visited {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    font-size: 13px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.readmore:hover {
    background-color: var(--secondary-accent);
    color: white;
}

/* Стили для пагинации */
.com-content-category__navigation {
    margin: 40px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.com-content-category__pagination nav ul {
    display: flex;
    gap: 5px;
}

.com-content-category__pagination a,
.com-content-category__pagination span {
    padding: 8px 12px;
    border: 1px solid var(--light-grey);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-color);
}

.com-content-category__pagination a:hover {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.com-content-category__pagination span.page-current {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.com-content-category__counter {
    color: var(--light-text);
    font-size: 14px;
    margin-bottom: 10px;
}


/* Стили для пустых категорий */
.com-content-category__articles .alert {
    background-color: var(--highlight-bg);
    border-left: 4px solid var(--secondary-accent);
    padding: 20px;
    margin: 40px 0;
}

.com-content-category__articles .alert .icon-info-circle {
    color: var(--secondary-accent);
    margin-right: 10px;
}

.loading-spinner {
    display: none;
}

.loading-spinner.active {
    display: block;
}

.week-navigation {
    display: flex;
    justify-content: space-between;
    margin: 0.5rem 0;
}

.week-navigation button {
    background-color: #ededed;
    border: solid 1px #5b6673;
    border-radius: 3px;
    padding: 5px 10px;
    text-transform: lowercase;
}

.date-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 5px;
    justify-content: space-between;
}

.date-button {
    padding: 8px 12px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.date-button:nth-child(7),
.date-button:nth-child(6) {
    border-color: #777777;
}

.date-button:hover:not(:disabled) {
    background-color: #e0e0e0;
}

.date-button.selected {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.date-button:disabled {
    background-color: #e0e0e0;
    color: #999;
    cursor: not-allowed;
}

.filter-group.date {
    flex: 1 100%;
}

form.filter-form .btn.btn-primary {
    width: 100%;
}

@media (max-width: 768px) {
    .articles-list {
        gap: 20px;
        display: flex;
        flex-wrap: wrap;
    }

    .article-image {
        height: 180px;
    }

    .article-details {
        padding: 15px;
    }

    .article-title {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .article-intro {
        font-size: 13px;
    }

    .com-content-category__navigation {
        margin: 20px 0;
    }

    .com-content-category__pagination {
        flex-wrap: wrap;
        justify-content: center;
    }

    .com-content-category__pagination a,
    .com-content-category__pagination span {
        padding: 6px 10px;
        font-size: 13px;
        margin: 2px;
    }

    a.readmore:link,
    a.readmore:visited {
        padding: 6px 12px;
        font-size: 12px;
    }

    .articles-list>.article-item:first-child .article-image {
        height: 150px;
    }

    .date-button {
        width: 45%;
        height: 75px;
    }

    .date-button:nth-child(1) {
        width: 100%;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .article-image {
        height: 150px;
    }

    .article-date {
        font-size: 12px;
    }

    .article-title {
        font-size: 15px;
    }

    .com-content-category__counter {
        font-size: 12px;
    }
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.filter-group {
    flex: 1 1 200px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.filter-group select,
.filter-group input[type="date"],
.filter-group input[type="number"] {
    width: 100%;
    box-sizing: border-box;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.filter-group select:focus,
.filter-group input[type="date"]:focus,
.filter-group input[type="number"]:focus {
    outline: none;
    border-color: var(--accent-color);
    ;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}


.filter-group input[type="number"] {
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

.filter-group input[type="number"]::-webkit-inner-spin-button,
.filter-group input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}


.filter-group input[type="number"]::placeholder {
    color: #6c757d;
    font-style: italic;
}


.filter-form button.btn-primary {
    align-self: flex-end;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: var(--accent-color);
    ;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.filter-form button.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.filter-form button.btn-primary:active {
    transform: translateY(0);
}

/* Адаптивность */
@media (max-width: 768px) {
    .filter-form {
        flex-direction: column;
        padding: 1rem;
    }

    .filter-group {
        flex: 1 1 100%;
    }

    .filter-form button.btn-primary {
        width: 100%;
        align-self: stretch;
    }
}

/* Поддержка тёмной темы (опционально) */
@media (prefers-color-scheme: dark) {
    .filter-form {
        background: #2c2c2c;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .filter-group label {
        color: #e0e0e0;
    }

    .filter-group select,
    .filter-group input[type="date"],
    .filter-group input[type="number"] {
        background: #3a3a3a;
        border-color: #555;
        color: #e0e0e0;
    }

    .filter-group input[type="number"]::placeholder {
        color: #aaa;
    }

    .filter-form button.btn-primary {
        background: var(--accent-color);
    }

    .filter-form button.btn-primary:hover {
        background: #1c86ee;
    }
}

/********Форма фильтр END*/