/* ================================================================
   TWL Blog Archives — Clean, light, minimal design
   ================================================================ */

/* Force light background — override EVERYTHING from parent theme */
body:has(.twl-blog),
body:has(.twl-blog) .page_content_wrap,
body:has(.twl-blog) .content_wrap,
body:has(.twl-blog) .content,
body:has(.twl-blog) .page_wrap,
body:has(.twl-blog) .body_wrap,
body:has(.twl-blog) #page,
body:has(.twl-blog) #content,
body:has(.twl-blog) .site-content,
body:has(.twl-blog) .scheme_default {
    background: #fff !important;
    background-color: #fff !important;
}

/* Hide parent theme sidebar (the one on the far right) */
body:has(.twl-blog) .sidebar,
body:has(.twl-blog) .sidebar_widgets,
body:has(.twl-blog) .widget_area,
body:has(.twl-blog) aside.sidebar {
    display: none !important;
}

/* Make content full width (no parent theme column constraints) */
body:has(.twl-blog) .page_content_wrap .content_wrap {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}
body:has(.twl-blog) .page_content_wrap .content {
    width: 100% !important;
    float: none !important;
    padding: 0 !important;
}
body:has(.twl-blog) .page_content_wrap {
    padding: 0 !important;
}

/* Hide parent page title bar */
body:has(.twl-blog) .page_title_wrap,
body:has(.twl-blog) .top_panel_title {
    display: none !important;
}

.twl-blog {
    background: #fff !important;
    color: #1a1a1a !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    padding-bottom: 60px;
    width: 100%;
}

/* ── Header ─────────────────────────────── */
.twl-blog__header {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 40px 32px;
    border-bottom: 1px solid #e8e8e8;
}

.twl-blog__breadcrumbs ol {
    list-style: none;
    display: flex;
    gap: 6px;
    padding: 0;
    margin: 0 0 16px;
    font-size: 0.8rem;
    color: #999;
}
.twl-blog__breadcrumbs li::after { content: '/'; margin-left: 6px; color: #ccc; }
.twl-blog__breadcrumbs li:last-child::after { content: ''; }
.twl-blog__breadcrumbs a { color: #666; text-decoration: none; }
.twl-blog__breadcrumbs a:hover { color: #ff6a00; }

.twl-blog__title {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    color: #111;
    margin: 0 0 8px;
    letter-spacing: -0.01em;
}

.twl-blog__subtitle {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
    margin: 0;
    max-width: 560px;
}

.twl-blog__pillar {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.82rem;
    color: #ff6a00;
    text-decoration: none;
    font-weight: 500;
}
.twl-blog__pillar:hover { text-decoration: underline; }

/* ── Layout: main + sidebar ─────────────── */
.twl-blog__layout {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 40px 0;
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 56px;
    align-items: start;
}

/* ── Post count ─────────────────────────── */
.twl-blog__count {
    font-size: 0.78rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 20px;
}

/* ── Posts grid ─────────────────────────── */
.twl-blog__posts {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Card: horizontal list item ─────────── */
.twl-blog__card {
    border-bottom: 1px solid #eee;
}
.twl-blog__card:last-child { border-bottom: none; }

.twl-blog__card-link {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    text-decoration: none;
    color: inherit;
    align-items: center;
    transition: background 0.15s;
}
.twl-blog__card-link:hover { background: rgba(0,0,0,0.015); border-radius: 8px; padding-left: 12px; padding-right: 12px; margin-left: -12px; margin-right: -12px; }

.twl-blog__card-img {
    flex-shrink: 0;
    width: 180px;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16/11;
}
.twl-blog__card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.twl-blog__card-content {
    flex: 1;
    min-width: 0;
}

.twl-blog__card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #111;
    margin: 0 0 6px;
    line-height: 1.4;
}
.twl-blog__card-link:hover .twl-blog__card-title {
    color: #ff6a00;
}

.twl-blog__card-excerpt {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.55;
    margin: 0 0 8px;
}

.twl-blog__card-meta {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Pagination ─────────────────────────── */
.twl-blog__pagination {
    padding: 32px 0;
    text-align: center;
}
.twl-blog__pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: 0 2px;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #555;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.15s;
}
.twl-blog__pagination .page-numbers.current,
.twl-blog__pagination .page-numbers:hover {
    background: #111;
    border-color: #111;
    color: #fff;
}
.twl-blog__pagination .prev,
.twl-blog__pagination .next {
    width: auto;
    padding: 0 12px;
}

/* ── Sidebar ────────────────────────────── */
.twl-blog__sidebar {
    position: sticky;
    top: 100px;
}

.twl-blog__sidebar-section h3 {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #999;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.twl-blog__sidebar-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.twl-blog__sidebar-section li {
    margin: 0;
}

.twl-blog__sidebar-section li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    font-size: 0.82rem;
    color: #444;
    text-decoration: none;
    border-bottom: 1px solid #f5f5f5;
    transition: color 0.15s;
}
.twl-blog__sidebar-section li a:hover {
    color: #ff6a00;
}
.twl-blog__sidebar-section li.is-active a {
    color: #ff6a00;
    font-weight: 600;
}

.twl-blog__sidebar-section li a span {
    font-size: 0.72rem;
    color: #bbb;
    font-weight: 400;
}

/* Sidebar CTA */
.twl-blog__sidebar-cta {
    margin-top: 28px;
    padding: 20px;
    background: #111;
    border-radius: 10px;
    color: #fff;
    font-size: 0.85rem;
    line-height: 1.5;
}
.twl-blog__sidebar-cta p { margin: 0 0 8px; }
.twl-blog__sidebar-cta strong { color: #fff; }
.twl-blog__sidebar-cta a {
    display: inline-block;
    margin-top: 4px;
    color: #ff6a00;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.82rem;
}
.twl-blog__sidebar-cta a:hover { text-decoration: underline; }

/* ── Empty state ────────────────────────── */
.twl-blog__empty {
    text-align: center;
    padding: 60px 0;
    color: #999;
}
.twl-blog__empty a {
    color: #ff6a00;
    text-decoration: none;
    font-weight: 500;
}

/* ── Responsive ─────────────────────────── */
@media (max-width: 860px) {
    .twl-blog__layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .twl-blog__sidebar {
        position: static;
        border-top: 1px solid #eee;
        padding-top: 24px;
    }
}

@media (max-width: 600px) {
    .twl-blog__header { padding: 32px 16px 24px; }
    .twl-blog__layout { padding: 20px 16px 0; }

    .twl-blog__card-img { width: 100px; }
    .twl-blog__card-link {
        gap: 12px;
        padding: 14px 0;
    }
    .twl-blog__card-title { font-size: 0.95rem; }
    .twl-blog__card-excerpt { display: none; }
}
