/**
 * Archive Page Styles
 * Loaded on is_archive() || is_search() || is_home()
 *
 * Includes: Archive layout, title, islands, posts count
 * Note: Post card grid responsive handled by article-card.css
 *
 * @package MyChooz_Aesthetic
 */

/* ==========================================================================
   ARCHIVE PAGE
   ========================================================================== */

.archive-page,
.search-template,
.author-page {
    max-width: var(--mca-wide-width);
    margin: 0 auto;
    padding: var(--wp--custom--gap--header-desktop, 32px) 16px 0;
    /* Вертикальный ритм между островами — единый источник */
    display: flex;
    flex-direction: column;
    gap: var(--mca-island-gap);
}

@media (max-width: 768px) {
    .archive-page,
    .search-template,
    .author-page {
        padding-top: var(--wp--custom--gap--header-mobile, 24px);
        gap: var(--mca-island-gap-mobile);
    }
}

/* Archive Title (H1 with home icon) */
.archive-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 16px;
    line-height: 1;
}

.archive-title__home {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--mca-muted);
    opacity: 0.5;
    transition: all 150ms;
}

.archive-title__home:hover {
    color: var(--mca-primary);
    opacity: 1;
}

.archive-title__home svg {
    width: 20px;
    height: 20px;
}

.archive-title__sep {
    color: var(--mca-border);
    font-weight: 400;
}

.archive-title__text {
    color: var(--mca-text);
}

.archive-title__count {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 500;
    color: var(--mca-muted);
    background: var(--mca-bg);
    padding: 4px 10px;
    border-radius: 10px;
    line-height: 1;
    position: relative;
    top: 2px;
}

/* Islands — вертикальный ритм через gap родителя, остров отвечает только за себя */
.island {
    padding: 0;
    margin: 0;
}

/* Внутри flex-родителя (archive/search/author) у .mca-sheet вертикальные
   маргины обнуляем — расстояние решает gap. Сам .mca-sheet остаётся универсальным
   утилитом и сохраняет margin: 24px auto для single/page/404. */
.archive-page > .mca-sheet,
.search-template > .mca-sheet,
.author-page > .mca-sheet {
    margin-top: 0;
    margin-bottom: 0;
}

/* Base = .mca-sheet (style.css). Padding = общий токен (--mca-island-padding). */
.island--intro {
    padding: var(--mca-island-padding);
    text-align: center;
}

.island__title {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 16px;
}

.island__description {
    max-width: 720px;
    font-size: 14px;
    color: var(--mca-muted);
    line-height: 1.8;
    text-align: left;
}

.island__description a {
    color: var(--mca-link);
    text-decoration: none;
}

.island__description a:hover {
    text-decoration: underline;
}

.island__subtitle {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 24px;     /* верх = gap родителя; низ = воздух до grid */
    text-align: center;
}

/* Posts count pill */
.posts-count {
    text-align: center;
    margin-bottom: 24px;
}

.posts-count__pill {
    display: inline-block;
    padding: 4px 12px;
    background: var(--mca-border);
    color: var(--mca-muted);
    font-size: 12px;
    font-weight: 500;
    border-radius: 12px;
}

/* ==========================================================================
   ARCHIVE RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
    .island--intro {
        padding: var(--mca-island-padding-mobile);
    }

    .island__title {
        font-size: 20px;
    }

    /* Mobile inset карточек перенесён в article-card.css @media 768 (симметрично
       к его собственному padding: 0 !important) — здесь было бы дублированием. */
}

