/* Shared blog cards, matching the existing Tailwind design tokens. */
.es-blog-index {
    --blog-primary: #1849a9;
    --blog-foreground: #121926;
    --blog-body: #4b5565;
    --blog-muted: #697586;
    --blog-border: #e3e8ef;
    --blog-surface: #f8fafc;
    padding-top: 32px;
    padding-right: 20px;
    padding-bottom: 48px;
    padding-left: 20px;
    font-family: Inter, sans-serif;
}

.es-blog-index .es-blog-index__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.es-blog-index .es-blog-index__eyebrow {
    display: block;
    margin-bottom: 8px;
    color: var(--blog-primary);
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
}

.es-blog-index .es-blog-index__title {
    margin: 0 0 8px;
    color: var(--blog-foreground);
    font-size: clamp(24px, 2.5vw, 32px);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -.02em;
}

.es-blog-index .es-blog-index__subtitle {
    margin: 0;
    color: var(--blog-muted);
    font-size: 14px;
    line-height: 22px;
}

.es-blog-index .es-blog-index__count {
    flex-shrink: 0;
    padding: 6px 10px;
    border: 1px solid var(--blog-border);
    border-radius: 6px;
    color: var(--blog-body);
    background: var(--blog-surface);
    font-size: 12px;
    line-height: 18px;
}

.es-blog-index .es-blog-index__categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--blog-border);
}

.es-blog-index .es-blog-index__category {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border: 1px solid var(--blog-border);
    border-radius: 6px;
    background: #fff;
    color: var(--blog-body);
    font-size: 12px;
    font-weight: 500;
    line-height: 18px;
    text-decoration: none;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.es-blog-index .es-blog-index__category:hover,
.es-blog-index .es-blog-index__category.is-active {
    border-color: var(--blog-primary);
    background: #ecf2fd;
    color: var(--blog-primary);
}

.es-blog-index .es-blog-index__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 24px;
}

.es-blog-index .es-blog-card {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--blog-border);
    border-radius: 12px;
    background: #fff;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.es-blog-index .es-blog-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.es-blog-index .es-blog-card__cover {
    flex-shrink: 0;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 0;
    overflow: hidden;
    background: var(--blog-surface);
}

.es-blog-index .es-blog-card__cover img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
    object-fit: cover;
}

.es-blog-index .es-blog-card__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 100%;
    color: var(--blog-muted);
    font-size: 12px;
}

.es-blog-index .es-blog-card__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
}

.es-blog-index .es-blog-card__meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin: 0;
    font-size: 11px;
    line-height: 17px;
}

.es-blog-index .es-blog-card__category {
    min-width: 0;
    color: var(--blog-primary);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.es-blog-index .es-blog-card__date {
    flex-shrink: 0;
    color: var(--blog-muted);
    font-weight: 400;
    white-space: nowrap;
}

.es-blog-index .es-blog-card__title {
    margin: 0;
    color: var(--blog-foreground);
    font-size: 18px;
    font-weight: 600;
    line-height: 26px;
    overflow-wrap: anywhere;
}

.es-blog-index .es-blog-card__excerpt {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    max-height: 66px;
    margin: 0;
    overflow: hidden;
    color: var(--blog-body);
    font-size: 13px;
    font-weight: 400;
    line-height: 22px;
    overflow-wrap: anywhere;
}

.es-blog-index .es-blog-card:focus-within {
    outline: 2px solid var(--blog-primary);
    outline-offset: 3px;
}

.es-blog-index .es-blog-card__link:focus-visible {
    outline: none;
}

.es-blog-index .es-blog-index__category:focus-visible {
    outline: 2px solid var(--blog-primary);
    outline-offset: 3px;
}

.es-blog-index .es-blog-index__empty {
    grid-column: 1 / -1;
    padding: 32px 20px;
    border: 1px solid var(--blog-border);
    border-radius: 12px;
    background: var(--blog-surface);
    color: var(--blog-muted);
    text-align: center;
    font-size: 14px;
}

@media (hover: hover) and (pointer: fine) {
    .es-blog-index .es-blog-card:hover {
        transform: translateY(-3px);
        border-color: #cdd5df;
        box-shadow: 0 8px 20px rgb(18 25 38 / 8%);
    }
}

@media (min-width: 768px) {
    .es-blog-index .es-blog-index__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .es-blog-index .es-blog-index__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .es-blog-index {
        padding-top: 24px;
        padding-right: 16px;
        padding-bottom: 32px;
        padding-left: 16px;
    }

    .es-blog-index .es-blog-index__header {
        align-items: flex-start;
        margin-bottom: 20px;
    }

    .es-blog-index .es-blog-index__count {
        padding: 4px 8px;
    }

    .es-blog-index .es-blog-index__grid {
        gap: 20px;
    }

    .es-blog-index .es-blog-index__categories {
        margin-bottom: 20px;
        padding-bottom: 16px;
    }

    .es-blog-index .es-blog-card__body {
        padding: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .es-blog-index .es-blog-card,
    .es-blog-index .es-blog-index__category {
        transition: none;
    }

    .es-blog-index .es-blog-card:hover {
        transform: none;
    }
}

.es-blog-index.es-blog-index--home .es-blog-index__header {
    justify-content: center;
    text-align: center;
}

.es-blog-index.es-blog-index--home {
    padding-right: calc(var(--bs-gutter-x, 1.5rem) * .5);
    padding-left: calc(var(--bs-gutter-x, 1.5rem) * .5);
}

.es-blog-index.es-blog-index--home .es-blog-index__grid {
    gap: 16px;
}

@media (min-width: 1200px) {
    .es-blog-index .es-blog-index__grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 16px;
    }
}

.es-blog-index .es-blog-index__footer {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.es-blog-index .es-blog-index__all-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid var(--blog-primary);
    border-radius: 6px;
    color: var(--blog-primary);
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
    text-decoration: none;
    transition: background-color .18s ease, color .18s ease;
}

.es-blog-index .es-blog-index__all-link:hover {
    color: #fff;
    background: var(--blog-primary);
}

.es-blog-index .es-blog-index__all-link:focus-visible {
    outline: 2px solid var(--blog-primary);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .es-blog-index .es-blog-index__all-link {
        transition: none;
    }
}
