/* ═══════════════════════════════════════════════════════
   AXIOM — cards.css
   Article cards · Bento grid · Trending chips · Badges
   ═══════════════════════════════════════════════════════ */

/* ── Feed Header ──────────────────────────────────────── */
.axm-feed-header {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}
@media (min-width: 768px) {
    .axm-feed-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
    }
}

.axm-greeting__title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
    color: var(--axm-on-surface);
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 0.375rem;
}
.axm-greeting__sub {
    font-size: 1rem;
    color: var(--axm-on-surface-variant);
    line-height: 1.5;
}

/* ── Search Bar ───────────────────────────────────────── */
.axm-search-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: var(--r-full);
    padding: 0.375rem 0.375rem 0.375rem 1.25rem;
    background: var(--axm-surface);
    box-shadow: var(--neo-pressed);
    min-width: 0;
    width: 100%;
    max-width: 22rem;
    flex-shrink: 0;
}
.axm-search-bar__input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--axm-on-surface);
    min-width: 0;
}
.axm-search-bar__input::placeholder { color: var(--axm-outline); }
.axm-search-bar__btn {
    display: flex; align-items: center; justify-content: center;
    width: 2.25rem; height: 2.25rem;
    border-radius: var(--r-full);
    border: none; cursor: pointer;
    background: var(--axm-surface);
    color: var(--axm-primary);
    box-shadow: var(--neo-raised);
    flex-shrink: 0;
    transition: all var(--t-base);
}
.axm-search-bar__btn:hover { color: var(--axm-tertiary); }
.axm-search-bar__btn:active { box-shadow: var(--neo-pressed); }

/* ── Section Titles ───────────────────────────────────── */
.axm-section-title {
    display: flex; align-items: center; gap: 0.5rem;
    margin-bottom: 1rem;
}
.axm-section-title h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--axm-on-surface);
}
.axm-section-title .material-symbols-outlined { color: var(--axm-tertiary); }

.axm-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--axm-surface-container);
    box-shadow: 0 2px 4px rgba(255,255,255,0.4);
}
.axm-section-header__title {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 1.375rem; font-weight: 700; color: var(--axm-on-surface);
}
.axm-view-all {
    display: flex; align-items: center; gap: 0.25rem;
    font-size: 0.875rem; font-weight: 600;
    color: var(--axm-primary);
    text-decoration: none;
    transition: color var(--t-base);
}
.axm-view-all:hover { color: var(--axm-tertiary); }

/* ── Trending Chips ───────────────────────────────────── */
.axm-trending { margin-bottom: 2.5rem; }

.axm-chips {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.75rem;
    padding-top: 0.25rem;
}

.axm-chip {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding: 0.625rem 1.375rem;
    border-radius: var(--r-full);
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--axm-on-surface-variant);
    background: var(--axm-surface);
    box-shadow: var(--neo-raised);
    text-decoration: none;
    transition: all var(--t-base);
    flex-shrink: 0;
}
.axm-chip:hover { color: var(--axm-primary-text); transform: translateY(-2px); }
.axm-chip--active {
    color: var(--axm-primary-text);
    box-shadow: var(--neo-pressed);
}

/* ── Badges & Labels ─────────────────────────────────── */
.axm-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--r-full);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
}
.axm-badge--primary {
    background: color-mix(in srgb, var(--axm-surface) 80%, transparent);
    backdrop-filter: blur(8px);
    color: var(--axm-primary);
}

.axm-label {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    margin-bottom: 0.375rem;
}
.axm-label--primary  { color: var(--axm-primary); }
.axm-label--tertiary { color: var(--axm-tertiary); }
.axm-label--secondary{ color: var(--axm-secondary); }

/* ── Bento Grid (Featured) ───────────────────────────── */
.axm-featured-bento {
    margin-bottom: 3rem;
    /* Reserve space before content loads to prevent CLS */
    min-height: 22rem;
    contain: layout;
}

.axm-bento-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 1024px) {
    .axm-bento-grid { grid-template-columns: 2fr 1fr; }
}

/* Main feature card */
.axm-bento-main {
    border-radius: 2rem;
    padding: 1.5rem;
    background: var(--axm-surface);
    box-shadow: var(--neo-raised);
    cursor: pointer;
    transition: transform var(--t-slow), box-shadow var(--t-slow);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.axm-bento-main:hover { transform: scale(1.008); box-shadow: var(--neo-float); }

.axm-bento-main__img {
    position: relative;
    height: 18rem;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: var(--neo-pressed);
}
.axm-bento-main__img img,
.axm-bento-main__thumb {
    width: 100%; height: 100%; object-fit: cover;
    transition: opacity var(--t-slow);
}
.axm-bento-main:hover .axm-bento-main__thumb { opacity: 1; }

.axm-bento-main__img .axm-badge {
    position: absolute; top: 1rem; left: 1rem;
}

.axm-bento-main__body { display: flex; flex-direction: column; gap: 0.75rem; }

.axm-bento-main__title {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 700;
    line-height: 1.25;
    color: var(--axm-on-surface);
}
.axm-bento-main__title a {
    color: inherit; text-decoration: none;
    transition: color var(--t-base);
}
.axm-bento-main:hover .axm-bento-main__title a { color: var(--axm-primary); }

.axm-bento-main__excerpt {
    color: var(--axm-on-surface-variant);
    line-height: 1.7;
    font-size: 1rem;
}

.axm-bento-main__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 0.75rem;
}

/* Secondary bento column */
.axm-bento-col { display: flex; flex-direction: column; gap: 1.5rem; }

.axm-bento-secondary {
    border-radius: 2rem;
    padding: 1.5rem;
    background: var(--axm-surface);
    box-shadow: var(--neo-raised);
    cursor: pointer;
    transition: transform var(--t-base);
    display: flex; flex-direction: column; gap: 0.75rem;
}
.axm-bento-secondary:hover { transform: translateY(-4px); }

.axm-bento-secondary__img {
    height: 10rem; border-radius: 1rem;
    overflow: hidden; box-shadow: var(--neo-pressed);
}
.axm-bento-secondary__img img {
    width: 100%; height: 100%; object-fit: cover;
    opacity: 0.85;
}
.axm-bento-secondary h3 {
    font-size: 1.0625rem; font-weight: 700; color: var(--axm-on-surface);
    transition: color var(--t-base);
}
.axm-bento-secondary:hover h3 { color: var(--axm-primary); }
.axm-bento-secondary h3 a { color: inherit; text-decoration: none; }
.axm-excerpt-sm { font-size: 0.875rem; color: var(--axm-on-surface-variant); line-height: 1.6; }

/* CTA box */
.axm-cta-box {
    border-radius: 2rem;
    padding: 1.5rem;
    background: var(--axm-surface);
    box-shadow: var(--neo-pressed);
    display: flex; flex-direction: column; align-items: center;
    text-align: center; gap: 0.75rem;
}
.axm-cta-box__icon {
    width: 4rem; height: 4rem; border-radius: var(--r-full);
    display: flex; align-items: center; justify-content: center;
    background: var(--axm-surface); box-shadow: var(--neo-raised);
    color: var(--axm-primary);
}
.axm-cta-box__icon .material-symbols-outlined { font-size: 1.75rem; }
.axm-cta-box h3 { font-size: 1rem; font-weight: 700; color: var(--axm-on-surface); }
.axm-cta-box p  { font-size: 0.875rem; color: var(--axm-on-surface-variant); line-height: 1.5; }

/* ── Article Grid Cards ───────────────────────────────── */
.axm-articles-section { margin-bottom: 3rem; }

.axm-articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 640px)  { .axm-articles-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .axm-articles-grid { grid-template-columns: repeat(3, 1fr); } }

/* Individual card */
.axm-card {
    background: var(--axm-surface);
    border-radius: 1.5rem;
    padding: 1.25rem;
    box-shadow: var(--neo-raised);
    cursor: pointer;
    display: flex; flex-direction: column; gap: 0.75rem;
    transition: transform var(--t-slow), box-shadow var(--t-slow);
    text-decoration: none;
    color: inherit;
}
.axm-card:hover { transform: translateY(-3px); box-shadow: var(--neo-float); }

.axm-card__img {
    height: 12rem; border-radius: 0.875rem;
    overflow: hidden; box-shadow: var(--neo-pressed);
    flex-shrink: 0;
}
.axm-card__img img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform var(--t-slow);
}
.axm-card:hover .axm-card__img img { transform: scale(1.04); }

.axm-card__title {
    font-size: 1.0625rem; font-weight: 700;
    color: var(--axm-on-surface); line-height: 1.35;
    transition: color var(--t-base);
}
.axm-card:hover .axm-card__title { color: var(--axm-primary); }

.axm-card__meta {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: auto;
    font-size: 0.75rem; color: var(--axm-on-surface-variant);
}

.axm-card__author {
    margin: 0.35rem 0 1rem;
}

/* ── Author chip (inline) ─────────────────────────────── */
.axm-author-chip {
    display: flex; align-items: center; gap: 0.625rem;
    min-width: 0;
    text-decoration: none;
}
.axm-author-chip--card {
    padding: 0.45rem 0.55rem;
    border-radius: var(--r-lg);
    background: var(--axm-surface-container-low);
    color: inherit;
}
.axm-author-chip--card:hover {
    background: var(--axm-surface-container);
}
.axm-author-chip__avatar {
    width: 2rem; height: 2rem;
    border-radius: var(--r-full);
    object-fit: cover;
    box-shadow: var(--neo-raised);
    flex-shrink: 0;
}
.axm-author-chip__text {
    display: grid;
    min-width: 0;
}
.axm-author-chip__name {
    font-size: 0.8125rem; font-weight: 600;
    color: var(--axm-on-surface-variant);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.axm-author-chip__role {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--axm-outline);
    line-height: 1.2;
}

/* ── Bookmark button ─────────────────────────────────── */
.axm-bookmark-btn {
    display: flex; align-items: center; justify-content: center;
    width: 2.5rem; height: 2.5rem;
    border-radius: var(--r-full); border: none; cursor: pointer;
    background: var(--axm-surface); box-shadow: var(--neo-raised);
    color: var(--axm-on-surface-variant);
    transition: all var(--t-base);
    flex-shrink: 0;
}
.axm-bookmark-btn:hover { color: var(--axm-primary); }
.axm-bookmark-btn:active { box-shadow: var(--neo-pressed); }
.axm-bookmark-btn--active { color: var(--axm-primary); }
.axm-bookmark-btn--active .material-symbols-outlined {
    font-variation-settings: 'FILL' 1 !important;
}

/* ── Pagination ───────────────────────────────────────── */
.axm-pagination { display: flex; justify-content: center; gap: 0.5rem; margin-top: 2rem; }
.axm-pagination ul {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none !important;
}
.axm-pagination li {
    list-style: none !important;
    margin: 0;
    padding: 0;
}
.axm-pagination a.page-numbers,
.axm-pagination span.page-numbers {
    display: flex; align-items: center; justify-content: center;
    min-width: 2.5rem; height: 2.5rem; padding: 0 0.75rem;
    border-radius: var(--r-lg);
    background: var(--axm-surface); box-shadow: var(--neo-raised);
    color: var(--axm-on-surface-variant); font-weight: 600; font-size: 0.875rem;
    text-decoration: none; transition: all var(--t-base);
}
.axm-pagination a.page-numbers:hover { color: var(--axm-primary); }
.axm-pagination span.page-numbers.current {
    box-shadow: var(--neo-pressed); color: var(--axm-primary);
}
.axm-no-posts {
    grid-column: 1/-1; text-align: center;
    color: var(--axm-on-surface-variant); padding: 3rem;
}

/* ── Tags ─────────────────────────────────────────────── */
.axm-tag {
    display: inline-flex; align-items: center;
    padding: 0.375rem 1rem; border-radius: var(--r-full);
    font-size: 0.8125rem; font-weight: 600;
    color: var(--axm-on-surface-variant);
    background: var(--axm-surface); box-shadow: var(--neo-raised);
    text-decoration: none; transition: all var(--t-base);
}
.axm-tag:hover { color: var(--axm-primary); transform: translateY(-1px); }
.axm-tag--primary   { color: var(--axm-primary); }
.axm-tag--secondary { color: var(--axm-secondary); }

/* ── Card Excerpt ────────────────────────────────────── */
.axm-card__excerpt {
    font-size: 0.875rem;
    color: var(--axm-on-surface-variant);
    line-height: 1.55;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Feed Tabs ────────────────────────────────────────── */
.axm-feed-tabs-container {
    margin-bottom: 2rem;
    display: flex;
    justify-content: flex-start;
}

.axm-feed-tabs {
    display: inline-flex;
    gap: 0.25rem;
    border-radius: var(--r-full);
    padding: 0.25rem;
    background: var(--axm-surface);
    box-shadow: var(--neo-pressed);
}

.axm-feed-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    background: transparent;
    padding: 0.625rem 1.25rem;
    border-radius: var(--r-full);
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--axm-on-surface-variant);
    transition: all var(--t-base);
}

.axm-feed-tab:hover {
    color: var(--axm-primary-text);
}

.axm-feed-tab--active {
    color: var(--axm-primary-text);
    background: var(--axm-surface);
    box-shadow: var(--neo-raised);
}

.axm-feed-tab .material-symbols-outlined {
    font-size: 1.125rem;
}

/* ── Banner and Fallbacks ─────────────────────────────── */
.axm-banner-info {
    grid-column: 1 / -1;
    padding: 2.5rem 2rem;
    border-radius: var(--r-xl);
    background: var(--axm-surface);
    box-shadow: var(--neo-pressed);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.axm-banner-info__icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--r-full);
    background: var(--axm-surface);
    box-shadow: var(--neo-raised);
    color: var(--axm-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.axm-banner-info__icon .material-symbols-outlined {
    font-size: 1.5rem;
}

.axm-banner-info h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--axm-on-surface);
    margin: 0;
}

.axm-banner-info p {
    font-size: 0.875rem;
    color: var(--axm-on-surface-variant);
    max-width: 28rem;
    margin: 0;
    line-height: 1.5;
}

.axm-banner-info .axm-btn-primary {
    margin-top: 0.5rem;
}

/* ── Load More (Show More) ────────────────────────────── */
.axm-load-more-container {
    display: flex;
    justify-content: center;
    margin-top: 2.5rem;
    width: 100%;
}

.axm-btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: var(--r-lg);
    border: none;
    cursor: pointer;
    background: var(--axm-surface);
    color: var(--axm-primary);
    font-family: inherit;
    font-weight: 700;
    font-size: 0.875rem;
    box-shadow: var(--neo-raised);
    transition: all var(--t-base);
}

.axm-btn-load-more:hover:not([disabled]) {
    color: var(--axm-tertiary);
    transform: translateY(-1px);
    box-shadow: var(--neo-float);
}

.axm-btn-load-more:active:not([disabled]) {
    box-shadow: var(--neo-pressed);
    transform: translateY(0) scale(0.98);
}

.axm-btn-load-more[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: var(--neo-pressed);
}

