/* =====================================================
   ETINION BLOG — blog.css
   Professional blog styles for archive & single post.
   Uses CSS custom properties set by the Customizer.
   ===================================================== */

/* ── CSS Variables (defaults — overridden by Customizer inline) ── */
:root {
    --ebl-accent:       #6366f1;
    --ebl-title-color:  #0f172a;
    --ebl-text-color:   #475569;
    --ebl-meta-color:   #94a3b8;
    --ebl-card-bg:      #ffffff;
    --ebl-page-bg:      #f8fafc;
    --ebl-title-size:   18px;
    --ebl-excerpt-size: 14px;
    --ebl-meta-size:    13px;
    --ebl-content-size: 17px;
    --ebl-single-title: 32px;
    --ebl-radius:       16px;
    --ebl-radius-sm:    10px;
    --ebl-gap:          28px;
    --ebl-transition:   .28s cubic-bezier(.4,0,.2,1);
}

/* ═══════════════════════════════════════════════════════
   ARCHIVE PAGE
═══════════════════════════════════════════════════════ */

.ebl-archive {
    background: var(--ebl-page-bg);
    min-height: 100vh;
}

.ebl-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Archive Header ── */
.ebl-archive-header {
    padding: 48px 0 12px;
    text-align: center;
}

.ebl-archive-header__label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--ebl-accent);
    margin-bottom: 12px;
}

.ebl-archive-header__label svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.ebl-archive-header__title {
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 800;
    color: var(--ebl-title-color);
    margin: 0 0 10px;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.ebl-archive-header__desc {
    font-size: 15px;
    color: var(--ebl-meta-color);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ── Archive Body (grid + optional sidebar) ── */
.ebl-archive-body {
    display: flex;
    gap: 36px;
    padding-top: 20px;
    padding-bottom: 64px;
}

.ebl-archive-body--no-sidebar {
    justify-content: center;
}

.ebl-archive-main {
    flex: 1;
    min-width: 0;
}

.ebl-archive-sidebar {
    flex: 0 0 300px;
    min-width: 0;
}

/* ── Grid Layout ── */
.ebl-grid {
    display: grid;
    gap: var(--ebl-gap);
}

.ebl-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.ebl-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.ebl-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Card (Grid Mode) ── */
.ebl-card {
    background: var(--ebl-card-bg);
    border-radius: var(--ebl-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--ebl-transition), box-shadow var(--ebl-transition);
}

.ebl-card--shadow {
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
}

.ebl-card--shadow:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(99,102,241,.12), 0 2px 8px rgba(0,0,0,.06);
}

.ebl-card--border {
    border: 1px solid #e2e8f0;
}

.ebl-card--border:hover {
    border-color: var(--ebl-accent);
    transform: translateY(-2px);
}

.ebl-card--flat:hover {
    background: #f1f5f9;
}

/* ── Thumbnail ── */
.ebl-card__thumb {
    position: relative;
    overflow: hidden;
    background: #e2e8f0;
}

.ebl-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s cubic-bezier(.4,0,.2,1);
}

.ebl-card:hover .ebl-card__thumb img {
    transform: scale(1.06);
}

.ebl-card__thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: var(--ebl-accent);
}

.ebl-card__thumb-placeholder svg {
    width: 48px;
    height: 48px;
    opacity: .5;
}

/* ── Category Badge ── */
.ebl-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--ebl-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    line-height: 1.4;
    z-index: 1;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* ── Card Body ── */
.ebl-card__body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ebl-card__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: var(--ebl-meta-size);
    color: var(--ebl-meta-color);
    margin-bottom: 10px;
}

.ebl-card__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ebl-card__meta-item svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    flex-shrink: 0;
}

.ebl-card__meta-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--ebl-meta-color);
}

.ebl-card__title {
    font-size: var(--ebl-title-size);
    font-weight: 700;
    color: var(--ebl-title-color);
    margin: 0 0 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    letter-spacing: -0.2px;
}

.ebl-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--ebl-transition);
}

.ebl-card__title a:hover {
    color: var(--ebl-accent);
}

.ebl-card__excerpt {
    font-size: var(--ebl-excerpt-size);
    color: var(--ebl-text-color);
    line-height: 1.65;
    margin: 0 0 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.ebl-card__footer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.ebl-card__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.ebl-card__author-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--ebl-title-color);
}

.ebl-card__read-link {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ebl-accent);
    text-decoration: none;
    transition: gap var(--ebl-transition);
}

.ebl-card__read-link:hover {
    gap: 8px;
}

.ebl-card__read-link svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* ═══════════════════════════════════════════════════════
   LIST LAYOUT
═══════════════════════════════════════════════════════ */

.ebl-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ebl-card--list {
    flex-direction: row;
    border-radius: var(--ebl-radius);
    overflow: hidden;
}

.ebl-card--list .ebl-card__thumb {
    flex: 0 0 280px;
    min-height: 200px;
}

.ebl-card--list .ebl-card__body {
    padding: 24px;
}

.ebl-card--list .ebl-card__title {
    font-size: calc(var(--ebl-title-size) + 2px);
    -webkit-line-clamp: 2;
}

.ebl-card--list .ebl-card__excerpt {
    -webkit-line-clamp: 2;
}

/* ═══════════════════════════════════════════════════════
   PAGINATION
═══════════════════════════════════════════════════════ */

.ebl-pagination {
    padding: 48px 0 64px;
    display: flex;
    justify-content: center;
}

.ebl-pagination .nav-links {
    display: flex;
    gap: 6px;
    align-items: center;
}

.ebl-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ebl-text-color);
    text-decoration: none;
    border-radius: 10px;
    background: var(--ebl-card-bg);
    border: 1px solid #e2e8f0;
    transition: all var(--ebl-transition);
}

.ebl-pagination .page-numbers:hover {
    border-color: var(--ebl-accent);
    color: var(--ebl-accent);
}

.ebl-pagination .page-numbers.current {
    background: var(--ebl-accent);
    border-color: var(--ebl-accent);
    color: #fff;
}

.ebl-pagination .prev,
.ebl-pagination .next {
    font-size: 13px;
}

/* ═══════════════════════════════════════════════════════
   NO POSTS
═══════════════════════════════════════════════════════ */

.ebl-no-posts {
    text-align: center;
    padding: 80px 20px;
}

.ebl-no-posts__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 50%;
}

.ebl-no-posts__icon svg {
    width: 36px;
    height: 36px;
    fill: var(--ebl-meta-color);
}

.ebl-no-posts__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--ebl-title-color);
    margin: 0 0 8px;
}

.ebl-no-posts__desc {
    font-size: 15px;
    color: var(--ebl-meta-color);
}

/* ═══════════════════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════════════════ */

.ebl-sidebar-widget {
    background: var(--ebl-card-bg);
    border-radius: var(--ebl-radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.ebl-sidebar-widget__title {
    font-size: 15px;
    font-weight: 700;
    color: var(--ebl-title-color);
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ebl-sidebar-widget__title svg {
    width: 16px;
    height: 16px;
    fill: var(--ebl-accent);
}

/* Search widget */
.ebl-search-form {
    display: flex;
    border-radius: var(--ebl-radius-sm);
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: border-color var(--ebl-transition);
}

.ebl-search-form:focus-within {
    border-color: var(--ebl-accent);
}

.ebl-search-form__input {
    flex: 1;
    border: none;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--ebl-title-color);
    background: transparent;
    outline: none;
}

.ebl-search-form__btn {
    background: var(--ebl-accent);
    border: none;
    color: #fff;
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--ebl-transition);
}

.ebl-search-form__btn:hover {
    background: #4f46e5;
}

.ebl-search-form__btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Recent posts widget */
.ebl-recent-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ebl-recent-list li {
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}

.ebl-recent-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.ebl-recent-list__link {
    display: flex;
    gap: 12px;
    text-decoration: none;
    align-items: flex-start;
}

.ebl-recent-list__thumb {
    width: 64px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.ebl-recent-list__info {
    flex: 1;
    min-width: 0;
}

.ebl-recent-list__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ebl-title-color);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 4px;
    transition: color var(--ebl-transition);
}

.ebl-recent-list__link:hover .ebl-recent-list__title {
    color: var(--ebl-accent);
}

.ebl-recent-list__date {
    font-size: 12px;
    color: var(--ebl-meta-color);
}

/* Category list widget */
.ebl-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ebl-cat-list li {
    margin-bottom: 4px;
}

.ebl-cat-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--ebl-text-color);
    text-decoration: none;
    transition: all var(--ebl-transition);
}

.ebl-cat-list a:hover {
    background: #f1f5f9;
    color: var(--ebl-accent);
}

.ebl-cat-list__count {
    font-size: 12px;
    background: #f1f5f9;
    color: var(--ebl-meta-color);
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}

.ebl-cat-list a:hover .ebl-cat-list__count {
    background: var(--ebl-accent);
    color: #fff;
}

/* Tags widget */
.ebl-tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ebl-tags-cloud a {
    display: inline-block;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ebl-text-color);
    background: #f1f5f9;
    border-radius: 20px;
    text-decoration: none;
    transition: all var(--ebl-transition);
}

.ebl-tags-cloud a:hover {
    background: var(--ebl-accent);
    color: #fff;
}

/* ═══════════════════════════════════════════════════════
   SINGLE POST
═══════════════════════════════════════════════════════ */

.ebl-single {
    background: var(--ebl-page-bg);
    min-height: 100vh;
}

/* ── Hero ── */
.ebl-single-hero {
    text-align: center;
    padding: 48px 0 32px;
}

.ebl-single-hero__cats {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.ebl-single-hero__cat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(99,102,241,.1);
    color: var(--ebl-accent);
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 6px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all var(--ebl-transition);
}

.ebl-single-hero__cat:hover {
    background: var(--ebl-accent);
    color: #fff;
}

.ebl-single-hero__title {
    font-size: var(--ebl-single-title);
    font-weight: 800;
    color: var(--ebl-title-color);
    max-width: 800px;
    margin: 0 auto 20px;
    line-height: 1.25;
    letter-spacing: -0.5px;
}

.ebl-single-hero__meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: var(--ebl-meta-size);
    color: var(--ebl-meta-color);
}

.ebl-single-hero__author {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ebl-single-hero__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.ebl-single-hero__author-name {
    font-weight: 600;
    color: var(--ebl-title-color);
}

.ebl-single-hero__dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--ebl-meta-color);
}

.ebl-single-hero__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ebl-single-hero__meta-item svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* ── Featured Image ── */
.ebl-single-featured {
    max-width: 900px;
    margin: 0 auto 40px;
    border-radius: var(--ebl-radius);
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,.08);
}

.ebl-single-featured img {
    width: 100%;
    height: auto;
    display: block;
}

/* ── Content Area ── */
.ebl-single-body {
    display: flex;
    gap: 40px;
    padding-bottom: 60px;
}

.ebl-single-body--no-sidebar {
    justify-content: center;
}

.ebl-single-content {
    flex: 1;
    min-width: 0;
    max-width: 760px;
}

.ebl-single-body--no-sidebar .ebl-single-content {
    margin: 0 auto;
}

.ebl-single-sidebar {
    flex: 0 0 300px;
    min-width: 0;
}

/* ── Prose / Content Styles ── */
.ebl-prose {
    font-size: var(--ebl-content-size);
    color: var(--ebl-text-color);
    line-height: 1.8;
}

.ebl-prose h1, .ebl-prose h2, .ebl-prose h3,
.ebl-prose h4, .ebl-prose h5, .ebl-prose h6 {
    color: var(--ebl-title-color);
    margin-top: 2em;
    margin-bottom: 0.6em;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.ebl-prose h2 { font-size: 1.5em; }
.ebl-prose h3 { font-size: 1.25em; }
.ebl-prose h4 { font-size: 1.1em; }

.ebl-prose p {
    margin-bottom: 1.4em;
}

.ebl-prose a {
    color: var(--ebl-accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color var(--ebl-transition);
}

.ebl-prose a:hover {
    color: #4f46e5;
}

.ebl-prose img {
    max-width: 100%;
    height: auto;
    border-radius: var(--ebl-radius-sm);
    margin: 1.5em 0;
}

.ebl-prose blockquote {
    border-left: 4px solid var(--ebl-accent);
    margin: 1.5em 0;
    padding: 16px 24px;
    background: rgba(99,102,241,.04);
    border-radius: 0 var(--ebl-radius-sm) var(--ebl-radius-sm) 0;
    font-style: italic;
    color: var(--ebl-title-color);
}

.ebl-prose ul, .ebl-prose ol {
    padding-left: 1.5em;
    margin-bottom: 1.4em;
}

.ebl-prose li {
    margin-bottom: 0.4em;
}

.ebl-prose pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 20px 24px;
    border-radius: var(--ebl-radius-sm);
    overflow-x: auto;
    font-size: 0.9em;
    line-height: 1.7;
    margin: 1.5em 0;
}

.ebl-prose code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #e11d48;
}

.ebl-prose pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.ebl-prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.95em;
}

.ebl-prose th, .ebl-prose td {
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    text-align: left;
}

.ebl-prose th {
    background: #f8fafc;
    font-weight: 700;
    color: var(--ebl-title-color);
}

.ebl-prose hr {
    border: none;
    border-top: 2px solid #f1f5f9;
    margin: 2em 0;
}

/* ── Tags in Single ── */
.ebl-single-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 24px;
    margin-top: 32px;
    border-top: 1px solid #e2e8f0;
}

.ebl-single-tags__label {
    font-size: 13px;
    font-weight: 700;
    color: var(--ebl-title-color);
}

.ebl-single-tags a {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ebl-text-color);
    background: #f1f5f9;
    border-radius: 20px;
    text-decoration: none;
    transition: all var(--ebl-transition);
}

.ebl-single-tags a:hover {
    background: var(--ebl-accent);
    color: #fff;
}

/* ── Share Buttons ── */
.ebl-share {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 0;
    margin-top: 8px;
}

.ebl-share__label {
    font-size: 13px;
    font-weight: 700;
    color: var(--ebl-title-color);
    margin-right: 4px;
}

.ebl-share__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    text-decoration: none;
    transition: all var(--ebl-transition);
    color: #fff;
}

.ebl-share__btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.ebl-share__btn--facebook  { background: #1877F2; }
.ebl-share__btn--twitter   { background: #0f1419; }
.ebl-share__btn--whatsapp  { background: #25D366; }
.ebl-share__btn--linkedin  { background: #0A66C2; }
.ebl-share__btn--telegram  { background: #0088cc; }
.ebl-share__btn--copy      { background: #64748b; }

.ebl-share__btn:hover {
    transform: translateY(-2px);
    opacity: .85;
}

/* ── Author Box ── */
.ebl-author-box {
    display: flex;
    gap: 20px;
    padding: 28px;
    background: var(--ebl-card-bg);
    border-radius: var(--ebl-radius);
    margin-top: 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    border: 1px solid #f1f5f9;
}

.ebl-author-box__avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.ebl-author-box__info {
    flex: 1;
    min-width: 0;
}

.ebl-author-box__label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ebl-accent);
    margin-bottom: 4px;
}

.ebl-author-box__name {
    font-size: 18px;
    font-weight: 700;
    color: var(--ebl-title-color);
    margin: 0 0 6px;
}

.ebl-author-box__bio {
    font-size: 14px;
    color: var(--ebl-text-color);
    line-height: 1.6;
    margin: 0;
}

/* ── Post Navigation ── */
.ebl-post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 40px;
}

.ebl-post-nav__link {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px 24px;
    background: var(--ebl-card-bg);
    border-radius: var(--ebl-radius);
    text-decoration: none;
    transition: all var(--ebl-transition);
    border: 1px solid #f1f5f9;
}

.ebl-post-nav__link:hover {
    border-color: var(--ebl-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99,102,241,.08);
}

.ebl-post-nav__link--next {
    text-align: right;
}

.ebl-post-nav__label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ebl-accent);
}

.ebl-post-nav__title {
    font-size: 15px;
    font-weight: 600;
    color: var(--ebl-title-color);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Related Posts ── */
.ebl-related {
    margin-top: 56px;
    padding-top: 48px;
    border-top: 2px solid #f1f5f9;
}

.ebl-related__title {
    font-size: 22px;
    font-weight: 800;
    color: var(--ebl-title-color);
    margin: 0 0 28px;
    text-align: center;
    letter-spacing: -0.3px;
}

.ebl-related__grid {
    display: grid;
    gap: 24px;
}

.ebl-related__grid--2 { grid-template-columns: repeat(2, 1fr); }
.ebl-related__grid--3 { grid-template-columns: repeat(3, 1fr); }

/* ═══════════════════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════════════════ */

@keyframes eblFadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ebl-animate-in {
    animation: eblFadeInUp .5s cubic-bezier(.4,0,.2,1) both;
}

.ebl-grid .ebl-card:nth-child(1)  { animation-delay: 0s;    }
.ebl-grid .ebl-card:nth-child(2)  { animation-delay: .06s;  }
.ebl-grid .ebl-card:nth-child(3)  { animation-delay: .12s;  }
.ebl-grid .ebl-card:nth-child(4)  { animation-delay: .18s;  }
.ebl-grid .ebl-card:nth-child(5)  { animation-delay: .24s;  }
.ebl-grid .ebl-card:nth-child(6)  { animation-delay: .3s;   }
.ebl-grid .ebl-card:nth-child(7)  { animation-delay: .36s;  }
.ebl-grid .ebl-card:nth-child(8)  { animation-delay: .42s;  }
.ebl-grid .ebl-card:nth-child(9)  { animation-delay: .48s;  }

.ebl-list .ebl-card:nth-child(1)  { animation-delay: 0s;    }
.ebl-list .ebl-card:nth-child(2)  { animation-delay: .06s;  }
.ebl-list .ebl-card:nth-child(3)  { animation-delay: .12s;  }
.ebl-list .ebl-card:nth-child(4)  { animation-delay: .18s;  }
.ebl-list .ebl-card:nth-child(5)  { animation-delay: .24s;  }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .ebl-grid--cols-4 {
        grid-template-columns: repeat(3, 1fr);
    }

    .ebl-archive-sidebar,
    .ebl-single-sidebar {
        flex: 0 0 260px;
    }
}

@media (max-width: 768px) {
    .ebl-container {
        padding: 0 16px;
    }

    .ebl-archive-header {
        padding: 32px 0 8px;
    }

    .ebl-archive-header__title {
        font-size: 24px;
    }

    .ebl-grid--cols-2,
    .ebl-grid--cols-3,
    .ebl-grid--cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .ebl-archive-body {
        flex-direction: column;
    }

    .ebl-archive-sidebar,
    .ebl-single-sidebar {
        flex: none;
        width: 100%;
    }

    /* List cards stack on mobile */
    .ebl-card--list {
        flex-direction: column;
    }

    .ebl-card--list .ebl-card__thumb {
        flex: none;
        min-height: unset;
    }

    /* Single */
    .ebl-single-body {
        flex-direction: column;
    }

    .ebl-single-hero__title {
        font-size: clamp(22px, 5vw, var(--ebl-single-title));
    }

    .ebl-single-featured {
        margin-left: -16px;
        margin-right: -16px;
        border-radius: 0;
    }

    .ebl-post-nav {
        grid-template-columns: 1fr;
    }

    .ebl-post-nav__link--next {
        text-align: left;
    }

    .ebl-author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .ebl-related__grid--3 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Gap reduce */
    .ebl-grid {
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .ebl-grid--cols-2,
    .ebl-grid--cols-3,
    .ebl-grid--cols-4 {
        grid-template-columns: 1fr;
    }

    .ebl-related__grid--2,
    .ebl-related__grid--3 {
        grid-template-columns: 1fr;
    }

    .ebl-card__body {
        padding: 16px;
    }

    .ebl-archive-header__title {
        font-size: 22px;
    }

    .ebl-share {
        flex-wrap: wrap;
    }
}

/* ═══════════════════════════════════════════════════════
   DARK MODE SUPPORT (optional — for future)
═══════════════════════════════════════════════════════ */

@media (prefers-color-scheme: dark) {
    /* Uncomment to enable auto dark mode
    :root {
        --ebl-title-color:  #f1f5f9;
        --ebl-text-color:   #cbd5e1;
        --ebl-meta-color:   #64748b;
        --ebl-card-bg:      #1e293b;
        --ebl-page-bg:      #0f172a;
    }
    */
}

/* ═══════════════════════════════════════════════════════
   SCROLL-TO-TOP (Single Post)
═══════════════════════════════════════════════════════ */

.ebl-scroll-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--ebl-accent);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(12px);
    transition: all var(--ebl-transition);
    pointer-events: none;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(99,102,241,.3);
}

.ebl-scroll-top.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.ebl-scroll-top:hover {
    background: #4f46e5;
    transform: translateY(-2px);
}

.ebl-scroll-top svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ═══════════════════════════════════════════════════════
   TABLE OF CONTENTS (Single Post Sidebar)
═══════════════════════════════════════════════════════ */

.ebl-toc {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ebl-toc li {
    margin-bottom: 6px;
}

.ebl-toc a {
    display: block;
    padding: 6px 12px;
    font-size: 13px;
    color: var(--ebl-text-color);
    text-decoration: none;
    border-radius: 6px;
    border-left: 2px solid transparent;
    transition: all var(--ebl-transition);
    line-height: 1.4;
}

.ebl-toc a:hover,
.ebl-toc a.is-active {
    background: #f1f5f9;
    color: var(--ebl-accent);
    border-left-color: var(--ebl-accent);
}

.ebl-toc--h3 {
    padding-left: 24px !important;
    font-size: 12px !important;
}

/* Sticky TOC in single sidebar */
.ebl-sidebar-sticky {
    position: sticky;
    top: 100px;
}
