/* ==========================================================================
   Weedu — архивы каталогов
   ========================================================================== */

/* --- Intro-блок --- */
.weedu-archive {
    padding: 32px 0 64px;
}
.weedu-archive__layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}
.weedu-archive__sidebar {
    position: sticky;
    top: 96px;
}

.weedu-intro {
    margin-bottom: 24px;
}
.weedu-intro__title {
    font-size: 44px;
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 12px;
    color: var(--color-text-primary);
}
.weedu-intro__subtitle {
    font-size: 17px;
    color: var(--color-text-secondary);
    margin: 0 0 16px;
    max-width: 720px;
    line-height: 1.55;
}
.weedu-intro__counter {
    display: inline-block;
    padding: 6px 14px;
    background: var(--color-accent-light);
    color: var(--color-accent);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
}

/* --- Быстрые направления --- */
.weedu-quick {
    margin-bottom: 20px;
}
.weedu-quick__title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-secondary);
    margin-bottom: 10px;
}
.weedu-quick__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.weedu-quick__chip {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 16px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    white-space: nowrap;
}
.weedu-quick__chip:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: var(--color-accent-light);
    text-decoration: none;
}
.weedu-quick__chip.is-active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}

/* --- Поиск --- */
.weedu-search-form {
    margin-bottom: 20px;
    max-width: 720px;
}
.weedu-search__input {
    width: 100%;
    height: 56px;
    padding: 0 20px;
    border: 1px solid #D1D5DB;
    border-radius: 14px;
    font-size: 16px;
    background: #fff;
    color: var(--color-text-primary);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.weedu-search__input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px rgba(99, 91, 255, 0.12);
}

/* --- Toolbar --- */
.weedu-archive__toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0 16px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 16px;
}
.weedu-archive__count {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-primary);
}
.weedu-sort {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--color-text-secondary);
}
.weedu-sort__select {
    height: 40px;
    padding: 0 32px 0 12px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-primary);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%236B7280' stroke-width='1.5' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

/* --- Активные фильтры --- */
.weedu-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.weedu-active-filters:empty { display: none; }

.weedu-active-filters__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--color-accent-light);
    color: var(--color-accent);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: inherit;
}
.weedu-active-filters__chip:hover { background: #E0E7FF; }
.weedu-active-filters__chip::after {
    content: "×";
    font-size: 15px;
    line-height: 1;
    opacity: 0.7;
}
.weedu-active-filters__reset {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
    padding: 6px 4px;
    font-family: inherit;
}

/* --- Sidebar фильтров --- */
.weedu-filters {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 20px;
}

.weedu-filters__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
}
.weedu-filters__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-primary);
}
.weedu-filters__reset {
    background: none;
    border: none;
    color: var(--color-accent);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}
.weedu-filters__reset:hover { text-decoration: underline; }

.weedu-filters__footer {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}
.weedu-filters__footer .weedu-btn { flex: 1; }

.weedu-filter {
    border-bottom: 1px solid var(--color-border);
    padding: 4px 0;
}
.weedu-filter:last-of-type { border-bottom: none; }

.weedu-filter__summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-primary);
    cursor: pointer;
    list-style: none;
    position: relative;
}
.weedu-filter__summary::-webkit-details-marker { display: none; }
.weedu-filter__summary::after {
    content: "▾";
    font-size: 11px;
    color: var(--color-text-secondary);
    transition: transform 0.2s;
}
.weedu-filter[open] > .weedu-filter__summary::after { transform: rotate(180deg); }

.weedu-filter__body {
    padding: 0 0 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.weedu-checkbox,
.weedu-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--color-text-primary);
    cursor: pointer;
    padding: 4px 0;
    line-height: 1.3;
}
.weedu-checkbox input,
.weedu-radio input {
    width: 16px;
    height: 16px;
    accent-color: var(--color-accent);
    margin: 0;
    flex-shrink: 0;
}

.weedu-range {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}
.weedu-range input {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
}
.weedu-range input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.12);
}
.weedu-range span { color: var(--color-text-secondary); font-size: 12px; }

/* --- Мобильный toggle фильтров --- */
.weedu-filters-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: var(--color-text-primary);
    font-family: inherit;
    margin-bottom: 12px;
}
.weedu-filters-toggle__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--color-accent);
    color: #fff;
    font-size: 11px;
}

/* --- Drawer --- */
.weedu-filters-drawer {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}
.weedu-filters-drawer.is-open { display: block; }

.weedu-filters-drawer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}
.weedu-filters-drawer__panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 340px;
    max-width: 90vw;
    background: #fff;
    padding: 20px;
    overflow-y: auto;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
}
.weedu-filters-drawer__close {
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: var(--color-text-primary);
    cursor: pointer;
    padding: 0;
    float: right;
}

/* --- Skeleton --- */
.weedu-skeleton {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}
.weedu-skeleton__card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    overflow: hidden;
    min-height: 320px;
}
.weedu-skeleton__cover {
    height: 180px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: weedu-shimmer 1.5s infinite;
}
.weedu-skeleton__body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.weedu-skeleton__line {
    height: 14px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: weedu-shimmer 1.5s infinite;
    border-radius: 6px;
}
.weedu-skeleton__line--title { height: 20px; width: 75%; }
.weedu-skeleton__line--text  { height: 12px; width: 100%; }
.weedu-skeleton__line--short { height: 12px; width: 60%; }

@keyframes weedu-shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* --- Load More --- */
.weedu-load-more {
    text-align: center;
    margin: 32px 0;
}
.weedu-load-more__btn {
    padding: 12px 32px;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}
.weedu-load-more__btn:hover { background: var(--color-accent-hover); }
.weedu-load-more__btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* --- SEO-блок --- */
.weedu-archive__seo {
    max-width: 900px;
    margin: 48px auto 0;
    padding: 32px 0 0;
    border-top: 1px solid var(--color-border);
    font-size: 15px;
    line-height: 1.7;
    color: var(--color-text-secondary);
}
.weedu-archive__seo h2,
.weedu-archive__seo h3 {
    color: var(--color-text-primary);
    margin: 1.4em 0 0.5em;
}
.weedu-archive__seo p { margin: 0 0 1em; }
.weedu-archive__seo a { color: var(--color-accent); text-decoration: none; }
.weedu-archive__seo a:hover { color: var(--color-accent-hover); }

/* --- Подборки --- */
.weedu-archive__collections {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--color-border);
}
.weedu-archive__collections-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 20px;
    color: var(--color-text-primary);
}
.weedu-archive__collections-body ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.weedu-archive__collections-body li {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    transition: border-color 0.2s, transform 0.2s;
}
.weedu-archive__collections-body li:hover {
    border-color: var(--color-accent);
    transform: translateY(-2px);
}
.weedu-archive__collections-body a {
    display: block;
    padding: 14px 18px;
    color: var(--color-text-primary);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}
.weedu-archive__collections-body a:hover { color: var(--color-accent); text-decoration: none; }

/* ==========================================================================
   Карточка школы в архиве
   ========================================================================== */
.weedu-card--school {
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 12px;
}

.weedu-school-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.weedu-school-card-head__logo {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    background: #EEF2FF;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--color-accent);
    font-weight: 800;
    font-size: 24px;
    flex-shrink: 0;
}
.weedu-school-card-head__logo img { width: 100%; height: 100%; object-fit: cover; }
.weedu-school-card-head__rating {
    font-size: 14px;
    font-weight: 700;
    color: #F59E0B;
    white-space: nowrap;
}
.weedu-school-card-head__reviews {
    color: var(--color-text-secondary);
    font-weight: 400;
    font-size: 13px;
}

.weedu-card--school .weedu-card__title {
    font-size: 18px;
    margin: 0;
}
.weedu-card--school .weedu-card__excerpt {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.weedu-card--school .weedu-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.weedu-card--school .weedu-card__meta {
    font-size: 13px;
    color: var(--color-text-secondary);
    font-weight: 600;
}
.weedu-card--school .weedu-card__actions {
    margin-top: auto;
}
.weedu-card--school .weedu-card__actions .weedu-btn {
    width: 100%;
    justify-content: center;
}

/* ==========================================================================
   Карточка эксперта в архиве
   ========================================================================== */
.weedu-expert-card--archive {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 20px;
    text-align: left;
}

.weedu-expert-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.weedu-expert-card--archive .weedu-expert-card__photo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    background: #EEF2FF;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-decoration: none;
}
.weedu-expert-card--archive .weedu-expert-card__photo img {
    width: 100%; height: 100%; object-fit: cover;
}
.weedu-expert-card--archive .weedu-expert-card__placeholder {
    color: var(--color-accent);
    font-weight: 800;
    font-size: 26px;
}
.weedu-expert-card__rating {
    font-size: 14px;
    font-weight: 700;
    color: #F59E0B;
    white-space: nowrap;
}
.weedu-expert-card__reviews {
    color: var(--color-text-secondary);
    font-weight: 400;
    font-size: 13px;
}

.weedu-expert-card--archive .weedu-expert-card__name {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}
.weedu-expert-card--archive .weedu-expert-card__name a {
    color: var(--color-text-primary);
    text-decoration: none;
}
.weedu-expert-card--archive .weedu-expert-card__name a:hover {
    color: var(--color-accent);
    text-decoration: none;
}
.weedu-expert-card--archive .weedu-expert-card__position {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.4;
}
.weedu-expert-card--archive .weedu-expert-card__meta {
    font-size: 13px;
    color: var(--color-text-secondary);
    font-weight: 600;
}
.weedu-expert-card--archive .weedu-expert-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.weedu-expert-card--archive .weedu-expert-card__courses {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-primary);
}
.weedu-expert-card__actions {
    margin-top: auto;
    padding-top: 8px;
}
.weedu-expert-card__actions .weedu-btn {
    width: 100%;
    justify-content: center;
}

/* ==========================================================================
   Адаптив
   ========================================================================== */
@media (max-width: 1024px) {
    .weedu-archive__layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .weedu-archive__sidebar { position: static; }
    .weedu-archive__sidebar .weedu-filters { display: none; }
    .weedu-filters-toggle { display: inline-flex; }

    .weedu-skeleton { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .weedu-intro__title { font-size: 34px; }
    .weedu-archive__collections-body ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    .weedu-skeleton { grid-template-columns: 1fr; }
    .weedu-intro__title { font-size: 28px; }
    .weedu-intro__subtitle { font-size: 15px; }
    .weedu-archive__toolbar { flex-direction: column; align-items: stretch; }
    .weedu-archive__collections-body ul { grid-template-columns: 1fr; }
    .weedu-quick__list {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
    }
    .weedu-quick__list::-webkit-scrollbar { display: none; }
}