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

.pub-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

/* 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 (Minimal Flat Design) ── */
.pub-sidebar__search {
    margin: 0;
}

.pub-sidebar__search-form {
    display: flex;
    align-items: center;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 0.35rem 0.35rem 0.35rem 1.15rem;
    box-shadow: none;
    transition: border-color 0.2s ease;
    margin: 0;
}

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

.pub-sidebar__search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0.5rem 0.5rem 0.5rem 0;
    font-size: 0.9375rem;
    color: #0A1E3D;
    background: transparent;
    box-shadow: none;
    font-family: inherit;
}

.pub-sidebar__search-input::placeholder {
    color: #94A3B8;
    font-size: 0.9375rem;
}

.pub-sidebar__search-btn {
    background: #0055FF;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    cursor: pointer;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.2s ease, transform 0.15s ease;
    box-shadow: none;
}

.pub-sidebar__search-btn:hover {
    background: #0042CC;
    color: #FFFFFF;
}

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

/* ── Video Gallery Slider Widget (Minimal, No Title) ── */
.pub-sidebar__video-gallery {
    padding: 1.15rem;
}

.pub-sidebar__video-slider-wrap {
    position: relative;
    margin-top: 0;
    border-radius: 10px;
    overflow: hidden;
    background: #0A1E3D;
    border: 1px solid #E2E8F0;
}

.pub-sidebar__video-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}

.pub-sidebar__video-slider::-webkit-scrollbar {
    display: none;
}

.pub-sidebar__video-slide {
    flex: 0 0 100%;
    min-width: 100%;
    width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.pub-sidebar__video-embed {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000000;
}

.pub-sidebar__video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.pub-sidebar__video-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
    padding: 0 0.15rem;
}

.pub-sidebar__video-dots {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.pub-sidebar__video-dot {
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background: #CBD5E1;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.pub-sidebar__video-dot:hover {
    background: #94A3B8;
}

.pub-sidebar__video-dot.is-active {
    width: 22px;
    background: #0055FF;
    border-radius: 4px;
}

.pub-sidebar__video-controls-right {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.pub-sidebar__video-counter {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748B;
    font-variant-numeric: tabular-nums;
}

.pub-sidebar__video-curr {
    color: #0055FF;
}

.pub-sidebar__video-navs {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.pub-sidebar__video-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
    color: #0A1E3D;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
}

.pub-sidebar__video-nav:hover {
    background: #0055FF;
    border-color: #0055FF;
    color: #FFFFFF;
}

.pub-sidebar__video-nav svg {
    width: 13px;
    height: 13px;
}

/* ── Photo Gallery Widget ── */
.pub-sidebar__gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

.pub-sidebar__gallery-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    background: #F1F5F9;
    display: block;
}

.pub-sidebar__gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pub-sidebar__gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 85, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.pub-sidebar__gallery-overlay svg {
    width: 18px;
    height: 18px;
    transform: scale(0.85);
    transition: transform 0.25s ease;
}

.pub-sidebar__gallery-item:hover img {
    transform: scale(1.08);
}

.pub-sidebar__gallery-item:hover .pub-sidebar__gallery-overlay {
    opacity: 1;
}

.pub-sidebar__gallery-item:hover .pub-sidebar__gallery-overlay svg {
    transform: scale(1);
}

/* ── 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;
    }
}
