/* Blog list + blog cards. px units: the theme sets html { font-size: 62.5% } */
/* Colours follow the site theme: dark by default, light when the visitor picks "Light"
   (this theme puts .active-dark-mode on <body> for its LIGHT look). */
:root {
    --ui-surface: #17151f;
    --ui-surface-2: #1f1c2a;
    --ui-line: rgba(255, 255, 255, .12);
    --ui-heading: #ffffff;
    --ui-text: #c4c4cc;
    --ui-muted: #9a9aa6;
    --ui-shadow: rgba(0, 0, 0, .35);
}
body.active-dark-mode {
    --ui-surface: #ffffff;
    --ui-surface-2: #f3f4f6;
    --ui-line: #e5e7eb;
    --ui-heading: #111827;
    --ui-text: #55595c;
    --ui-muted: #6b7280;
    --ui-shadow: rgba(17, 24, 39, .08);
}

.blog-posts-area { padding: 40px 0 80px; }
.blog-hero { text-align: center; margin: 10px auto 32px; max-width: 720px; }
.blog-hero h1 { color: var(--ui-heading); font-size: clamp(32px, 5vw, 48px); margin: 0 0 8px; }
.blog-hero p { color: var(--ui-text); font-size: 17px; margin: 0; }

.blog-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.blog-search { display: flex; flex: 1 1 320px; max-width: 460px; order: 2; }
.blog-search input { flex: 1; min-width: 0; height: 48px; padding: 0 18px; font-size: 16px; border: 1px solid var(--ui-line); border-right: 0; border-radius: 999px 0 0 999px; background: var(--ui-surface); color: var(--ui-heading); }
.blog-search input::placeholder { color: var(--ui-muted); }
.blog-search input:focus { outline: none; border-color: #805af5; box-shadow: 0 0 0 3px rgba(128, 90, 245, .15); }
.blog-search button { height: 48px; padding: 0 20px; border: 0; border-radius: 0 999px 999px 0; background: #805af5; color: #fff; font-size: 15px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.blog-search button:hover { background: #6a48f2; }
.blog-filters { display: flex; flex-wrap: wrap; gap: 10px; order: 1; }
.blog-filter-btn { height: 48px; padding: 0 16px; font-size: 15px; border: 1px solid var(--ui-line); border-radius: 10px; background: var(--ui-surface); color: var(--ui-heading); display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.blog-filter-btn__k { color: var(--ui-muted); }
.blog-filter-btn [data-product-label] { max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blog-menu { background: var(--ui-surface); font-size: 15px; max-height: 360px; overflow-y: auto; border-radius: 12px; padding: 6px; box-shadow: 0 12px 30px var(--ui-shadow); border: 1px solid var(--ui-line); }
.blog-menu .dropdown-item { padding: 9px 12px; border-radius: 8px; color: var(--ui-text); }
.blog-menu .dropdown-item:hover { background: var(--ui-surface-2); color: var(--ui-heading); }
.blog-menu .dropdown-item.active, .blog-menu .dropdown-item:active { background: #805af5; color: #fff; }

.blog-results { transition: opacity .15s; }
#blog-app.is-loading .blog-results { opacity: .45; pointer-events: none; }
.blog-results-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.blog-results-count { margin: 0; font-size: 15px; color: var(--ui-muted); }
.blog-results-count strong { color: var(--ui-heading); }
.blog-clear { display: inline-flex; align-items: center; min-height: 32px; font-size: 14px; color: #805af5; text-decoration: none; font-weight: 600; }

.blog-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.blog-card { display: flex; flex-direction: column; background: var(--ui-surface); border: 1px solid var(--ui-line); border-radius: 14px; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px var(--ui-shadow); }
.blog-card__media { display: block; aspect-ratio: 40 / 21; background: var(--ui-surface-2); overflow: hidden; }
.blog-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-card__body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 20px; }
.blog-card__meta { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--ui-muted); margin-bottom: 10px; }
.blog-card__cat { color: #805af5; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blog-card__meta time { white-space: nowrap; }
.blog-card__title { font-size: 17px; line-height: 1.4; font-weight: 600; margin: 0 0 8px; }
.blog-card__title a { color: var(--ui-heading); text-decoration: none; }
.blog-card__title a:hover { color: #805af5; }
.blog-card__excerpt { font-size: 14px; line-height: 1.6; color: var(--ui-muted); margin: 0 0 14px; }
.blog-card__more { margin-top: auto; font-size: 15px; font-weight: 600; color: #805af5; text-decoration: none; }

.blog-empty { text-align: center; padding: 48px 16px; border: 1px dashed var(--ui-line); border-radius: 14px; }
.blog-empty p { font-size: 16px; margin-bottom: 16px; }
.blog-pagination { margin-top: 40px; display: flex; justify-content: center; }
.blog-pagination .pagination { flex-wrap: wrap; justify-content: center; gap: 4px; font-size: 15px; }
.blog-pagination .pagination .page-item .page-link, .blog-pagination .page-link { font-size: 15px; background: var(--ui-surface); border-color: var(--ui-line); border-radius: 8px; color: var(--ui-text); min-width: 40px; text-align: center; }
.blog-pagination .page-item.active .page-link { background: #805af5; border-color: #805af5; color: #fff; }
.blog-pagination p.small { display: none; }

@media (max-width: 767.98px) {
    .blog-search { order: 1; flex-basis: 100%; max-width: none; }
    .blog-filters { order: 2; width: 100%; }
    .blog-filters .dropdown { flex: 1 1 0; min-width: 0; }
    .blog-filter-btn { width: 100%; justify-content: space-between; font-size: 14px; }
    .blog-filter-btn [data-product-label] { max-width: 120px; }
    .blog-search button span { display: none; }
    .blog-grid { gap: 16px; }
}

/* Blog post page */
.blog-related { padding-top: 24px !important; }
.blog-related__title { font-size: clamp(24px, 3vw, 32px); text-align: center; margin: 0 0 28px; }
.blog-related .blog-card__title { font-size: 17px; }
.blog-old-content { font-size: 16px; line-height: 1.75; }
.blog-old-content img { max-width: 100%; height: auto; }
