/* ===================================
   ARTICLES LIST PAGE — ДЕКОР + ФИКСЫ ЛЕГАСИ-ЦВЕТОВ
   Тематика: книга / карандаш / лампочка-идея —
   собственный набор мотивов для страницы статей,
   тот же язык, что и на остальных страницах (stroke-only, 3 фирменных цвета).
   Зависит от --doodle-dots-w, --doodle-star, --doodle-zigzag (объявлены в article.css,
   который уже подключён на этой странице).
   =================================== */

:root {
    --doodle-book: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='50' height='38' viewBox='0 0 50 38'%3E%3Cpath d='M25 8C19 4 9 5 4 9V31C10 27 19 27 25 31C31 27 40 27 46 31V9C41 5 31 4 25 8Z' fill='none' stroke='%2325A9B8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M25 8V31' stroke='%2325A9B8' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
    --doodle-pencil: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34' height='34' viewBox='0 0 34 34'%3E%3Cpath d='M5 29L21 13' stroke='%23EE7A5D' stroke-width='2.2' stroke-linecap='round'/%3E%3Cpath d='M21 13L27 7L31 11L25 17Z' fill='none' stroke='%23EE7A5D' stroke-width='1.8' stroke-linejoin='round'/%3E%3Cpath d='M4 33L7 30L5 29L3 31Z' fill='%23EE7A5D' fill-opacity='0.7'/%3E%3C/svg%3E");
    --doodle-bulb: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='38' viewBox='0 0 28 38'%3E%3Ccircle cx='14' cy='14' r='10' fill='none' stroke='%2352CC9A' stroke-width='1.8'/%3E%3Cpath d='M10 22L10 27M18 22L18 27M11 30L17 30' stroke='%2352CC9A' stroke-width='1.8' stroke-linecap='round'/%3E%3Cpath d='M11 13L13 17M17 13L15 17' stroke='%2352CC9A' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
}

@keyframes articlesDoodleFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}

/* ===================================
   1. ФОН СЕКЦИИ СО СПИСКОМ СТАТЕЙ
   (была совершенно голой белой секцией)
   =================================== */
.articles-list-section {
    position: relative;
    overflow: hidden;
}

.articles-list-section::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(37, 169, 184, .12) 1.4px, transparent 1.6px);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(ellipse 65% 55% at 50% 25%, black 0%, transparent 75%);
    mask-image: radial-gradient(ellipse 65% 55% at 50% 25%, black 0%, transparent 75%);
    opacity: .5;
}

.articles-list-section::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: var(--doodle-book), var(--doodle-pencil), var(--doodle-bulb), var(--doodle-zigzag);
    background-repeat: no-repeat;
    background-position: 3% 4%, 95% 8%, 4% 90%, 93% 86%;
    background-size: 58px 44px, 38px 38px, 30px 42px, 54px 18px;
    opacity: .32;
    animation: articlesDoodleFloat 9s ease-in-out infinite;
}

.articles-list-section > .container {
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .articles-list-section::after { opacity: .18; }
}

@media (max-width: 480px) {
    .articles-list-section::after { display: none; }
}

/* ===================================
   2. ФИЛЬТРЫ — лёгкий "стикерный" наклон
   (тот же приём, что у method-chip / article-hero__meta-item)
   =================================== */
.articles-filter:nth-child(odd)  { transform: rotate(-1deg); }
.articles-filter:nth-child(even) { transform: rotate(1deg); }

.articles-filter:hover,
.articles-filter.is-active {
    transform: translateY(-2px) rotate(0deg);
}

/* тактильная глубина тулбара — было совсем плоско */
.articles-filter,
.articles-sort__select,
.articles-view {
    box-shadow: var(--shadow-sm);
}

/* ===================================
   3. ВОДЯНОЙ ЗНАК НА КАРТОЧКЕ СТАТЬИ
   (тот же приём, что у .reason-item / .article-step в article.css)
   =================================== */
.article-card__body {
    background-image: var(--doodle-dots-w);
    background-repeat: no-repeat;
    background-position: 94% 8%;
    background-size: 40px 16px;
}

/* ===================================
   4. EMPTY-STATE — карандашный ореол + стикер
   =================================== */
.articles-empty {
    position: relative;
}

.articles-empty::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    width: 88px;
    height: 88px;
    transform: translateX(-50%);
    border: 2px dashed rgba(238, 122, 93, .3);
    border-radius: 45% 55% 50% 50% / 55% 45% 55% 45%;
    z-index: 0;
    pointer-events: none;
}

.articles-empty::after {
    content: '';
    position: absolute;
    top: 4px;
    left: calc(50% + 44px);
    width: 26px;
    height: 26px;
    background: var(--doodle-pencil) no-repeat center / contain;
    opacity: .75;
    transform: rotate(12deg);
    pointer-events: none;
}

.articles-empty svg {
    position: relative;
    z-index: 1;
}

/* ===================================
   ACCESSIBILITY / PRINT
   =================================== */
@media (prefers-reduced-motion: reduce) {
    .articles-list-section::after { animation: none; }
}

@media print {
    .articles-list-section::before,
    .articles-list-section::after,
    .articles-empty::before,
    .articles-empty::after {
        display: none !important;
    }
}