/* ==========================================================================
   BLOG SIDEBAR
   ========================================================================== */

.pub-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    position: sticky;
    top: 100px;
}

/* Widget Base */
.pub-sidebar__widget {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    padding: 1.5rem;
}

.pub-sidebar__widget-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0A1E3D;
    margin: 0 0 0.35rem;
    font-style: italic;
    position: relative;
    padding-bottom: 0.85rem;
}

.pub-sidebar__widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 36px;
    height: 3px;
    border-radius: 2px;
    background: #0055FF;
}

/* ── Search Widget ── */
.pub-sidebar__search-form {
    display: flex;
    align-items: center;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 1rem;
    transition: border-color 0.2s ease;
}

.pub-sidebar__search-form:focus-within {
    border-color: #0055FF;
}

.pub-sidebar__search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0.65rem 0.85rem;
    font-size: 0.875rem;
    color: #0A1E3D;
    background: transparent;
}

.pub-sidebar__search-input::placeholder {
    color: #94A3B8;
}

.pub-sidebar__search-btn {
    background: none;
    border: none;
    padding: 0.6rem 0.85rem;
    cursor: pointer;
    color: #0055FF;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pub-sidebar__search-btn svg {
    width: 18px;
    height: 18px;
}

/* ── Categories Widget ── */
.pub-sidebar__cat-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
}

.pub-sidebar__cat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0;
    border-bottom: 1px solid #F1F5F9;
}

.pub-sidebar__cat-item:last-child {
    border-bottom: none;
}

.pub-sidebar__cat-link {
    font-size: 0.875rem;
    color: #334155;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.pub-sidebar__cat-link:hover {
    color: #0055FF;
}

.pub-sidebar__cat-count {
    font-size: 0.8125rem;
    color: #0055FF;
    font-weight: 600;
}

/* ── Most Popular Widget ── */
.pub-sidebar__popular-list {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    margin-top: 1rem;
}

.pub-sidebar__popular-item {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    text-decoration: none;
    padding: 0.65rem;
    border-radius: 10px;
    border: 1px solid #F1F5F9;
    background: #FAFBFD;
    transition: border-color 0.2s ease;
}

.pub-sidebar__popular-item:hover {
    border-color: #CBD5E1;
}

.pub-sidebar__popular-thumb {
    width: 72px;
    height: 54px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #E2E8F0;
}

.pub-sidebar__popular-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pub-sidebar__popular-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0A1E3D, #0055FF);
}

.pub-sidebar__popular-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.pub-sidebar__popular-date {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    color: #64748B;
    font-weight: 500;
}

.pub-sidebar__popular-date svg {
    width: 12px;
    height: 12px;
    stroke: #0055FF;
    flex-shrink: 0;
}

.pub-sidebar__popular-title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #0A1E3D;
    margin: 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Content + Sidebar Layout ── */
.pub-content-wrap {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2.5rem;
    align-items: start;
}

/* Single Post with Sidebar */
.single-content-wrap {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2.5rem;
    align-items: start;
    max-width: 100%;
    box-sizing: border-box;
    padding-top: 3rem; /* Padding for Mobile */
}

@media (min-width: 1024px) {
    .single-content-wrap {
        padding-top: 5rem; /* Padding for PC */
    }
}

.single-content-main {
    max-width: 100%;
    box-sizing: border-box;
}

/* Responsive */
@media (max-width: 1023px) {
    .pub-content-wrap,
    .single-content-wrap {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .pub-sidebar {
        position: static;
    }
}
