/* ═══════════════════════════════════════════════
   SEO & Performance CSS
   Breadcrumbs, skeleton loaders, CLS prevention
   ═══════════════════════════════════════════════ */

/* ── Breadcrumb Navigation ────────────────────── */
.seo-breadcrumb {
    padding: .5rem 0;
    margin-bottom: .5rem;
}

.seo-breadcrumb__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .25rem;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: .82rem;
    color: var(--color-text-muted, #6b7280);
}

.seo-breadcrumb__item {
    display: inline-flex;
    align-items: center;
}

.seo-breadcrumb__item:not(:last-child)::after {
    content: '›';
    margin-left: .4rem;
    color: var(--color-text-muted, #94a3b8);
    font-size: .9em;
}

.seo-breadcrumb__item a {
    color: var(--site-color-accent, var(--color-brand, #2563eb));
    text-decoration: none;
    transition: color .2s;
}

.seo-breadcrumb__item a:hover {
    text-decoration: underline;
    color: var(--site-color-text-primary, var(--color-text, #1a1a2e));
}

.seo-breadcrumb__current {
    color: var(--site-color-text-primary, var(--color-text, #1a1a2e));
    font-weight: 600;
}

/* ── CLS Prevention: reserve space for images ──── */
img {
    max-width: 100%;
    height: auto;
}

img:not([width]):not([height]) {
    aspect-ratio: auto;
}

/* ── Category SEO Text Block ──────────────────── */
.seo-category-text {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--color-surface, #fafafa);
    border-radius: 12px;
    border: 1px solid var(--color-border-base, #e2e8f0);
    font-size: .9rem;
    line-height: 1.7;
    color: var(--color-text-muted, #6b7280);
}

.seo-category-text h2,
.seo-category-text h3 {
    color: var(--color-text, #1a1a2e);
    font-size: 1.1rem;
    margin-bottom: .5rem;
}

/* ── Internal Linking Grid ────────────────────── */
.seo-internal-links {
    margin-top: 2rem;
}

.seo-internal-links__title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: .75rem;
    color: var(--color-text, #1a1a2e);
}

.seo-internal-links__grid {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.seo-internal-links__grid a {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .4rem .8rem;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 500;
    text-decoration: none;
    background: var(--color-surface, #f8fafc);
    border: 1px solid var(--color-border-base, #e2e8f0);
    color: var(--color-text, #374151);
    transition: all .2s;
}

.seo-internal-links__grid a:hover {
    background: var(--site-color-accent, var(--color-brand, #2563eb));
    color: #fff;
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
}

/* ── Smart Prefetch Indicator ─────────────────── */
[data-prefetch] {
    position: relative;
}

/* ── Skeleton Loader Improvements ─────────────── */
.skeleton-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer .8s infinite linear;
}

@keyframes skeleton-shimmer {
    from {
        background-position: 200% 0;
    }

    to {
        background-position: -200% 0;
    }
}

/* font-display:swap is handled via Google Fonts URL &display=swap parameter */