/* ==============================================================
   PORTFOLIO V3 — PUBLIC EXPLORE PAGE STYLES
   ============================================================== */

:root {
    --sidebar-width: 260px;
    --border-color: rgba(255, 255, 255, 0.08);
    --bg-panel: rgba(255, 255, 255, 0.02);
    --bg-hover: rgba(255, 255, 255, 0.06);
    --text-muted: rgba(255, 255, 255, 0.6);
}

/* Explore Grid Layout Container */
.explore-container {
    display: flex;
    max-width: 1600px;
    margin: 80px auto 0; /* Align below top bar */
    padding: 24px;
    gap: 30px;
    min-height: calc(100vh - 160px);
}

/* LEFT SIDEBAR (Desktop) */
.explore-sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    position: sticky;
    top: 104px; /* below topbar */
    height: calc(100vh - 140px);
    overflow-y: auto;
    padding-right: 12px;
}

/* Scrollbar styling for sidebar */
.explore-sidebar::-webkit-scrollbar {
    width: 4px;
}
.explore-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.explore-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 99px;
}

.explore-sidebar-title {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 16px;
    padding-left: 8px;
}

.explore-sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.explore-sidebar-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.76);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.18s, color 0.18s;
}

.explore-sidebar-item a:hover {
    background: var(--bg-hover);
    color: #fff;
}

.explore-sidebar-item.is-active a {
    background: rgba(var(--accent-rgb, 255, 51, 102), 0.12);
    color: var(--accent);
    font-weight: 700;
}

.explore-sidebar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.explore-sidebar-avatar-ph {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
    flex-shrink: 0;
}

.explore-sidebar-count {
    margin-left: auto;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 7px;
    border-radius: 99px;
}

/* MAIN CONTENT AREA */
.explore-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* TOP SEARCH BAR & HEADER */
.explore-main-header {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.explore-title-block h1 {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 800;
    margin: 0;
    color: #fff;
}

.explore-title-block p {
    font-size: 15px;
    color: var(--text-muted);
    margin: 8px 0 0;
    line-height: 1.5;
}

/* Search Bar (YouTube Reference) */
.explore-search-bar {
    max-width: 600px;
    width: 100%;
}

.explore-search-form {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 99px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.explore-search-form:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb, 255, 51, 102), 0.15);
}

.explore-search-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 20px;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
}

.explore-search-input:focus {
    outline: none;
}

.explore-search-button {
    background: rgba(255, 255, 255, 0.04);
    border: none;
    border-left: 1px solid var(--border-color);
    padding: 0 20px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.explore-search-button:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

/* CATEGORY CHIPS (Horizontal Scroll) */
.explore-chips-container {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    display: flex;
    gap: 8px;
    padding-bottom: 4px;
}

.explore-chips-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.explore-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.18s, border-color 0.18s, color 0.18s;
    flex: 0 0 auto;
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.explore-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.explore-chip.is-active {
    background: #fff;
    color: #000;
    border-color: #fff;
}

/* SECTION BLOCKS & GRIDS */
.explore-section-block {
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 32px;
}

.explore-section-block:last-of-type {
    border-bottom: none;
}

.explore-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.explore-section-title-area h2 {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.explore-section-title-area p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 4px 0 0;
}

.explore-view-all-link {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: opacity 0.18s;
}

.explore-view-all-link:hover {
    opacity: 0.8;
}

/* GRID OF CARDS (Reuses work-card classes) */
.explore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* MOBILE CHANNELS BAR (Horizontal scroll of subscriptions) */
.explore-channels-mobile {
    display: none;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    gap: 16px;
    padding: 8px 4px 16px;
    border-bottom: 1px solid var(--border-color);
}

.explore-channels-mobile::-webkit-scrollbar {
    display: none;
}

.explore-channel-mobile-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: inherit;
    text-align: center;
    flex: 0 0 auto;
    scroll-snap-align: start;
    width: 68px;
}

.explore-channel-mobile-item img,
.explore-channel-mobile-item-ph {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.04);
    transition: border-color 0.2s, transform 0.2s;
}

.explore-channel-mobile-item:hover img,
.explore-channel-mobile-item.is-active img {
    border-color: var(--accent);
    transform: scale(1.05);
}

.explore-channel-mobile-name {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    width: 100%;
}

.explore-channel-mobile-item.is-active .explore-channel-mobile-name {
    color: #fff;
    font-weight: 700;
}

/* PAGINATION CONTROLS */
.explore-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding: 16px 0;
}

.explore-pagination-btn,
.explore-pagination-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 8px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.explore-pagination-btn:hover:not(.is-disabled),
.explore-pagination-num:hover:not(.is-active) {
    background: var(--bg-hover);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.explore-pagination-num.is-active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.explore-pagination-btn.is-disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.explore-pagination-info {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 12px;
}

/* EMPTY STATES */
.explore-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 24px;
    border: 1px dashed var(--border-color);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.01);
}

.explore-empty-icon {
    font-size: 48px;
    color: var(--accent);
    margin-bottom: 16px;
}

.explore-empty-state h3 {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
}

.explore-empty-state p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
    max-width: 400px;
    line-height: 1.5;
}

/* Back Link on subviews */
.explore-back-link {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: -10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.explore-back-link:hover {
    color: #fff;
}

/* ==============================================================
   RESPONSIVENESS (Mobile and Tablets)
   ============================================================== */

@media (max-width: 992px) {
    .explore-container {
        gap: 20px;
        padding: 16px;
    }
}

@media (max-width: 768px) {
    .explore-container {
        flex-direction: column;
        margin-top: 64px;
    }

    .explore-sidebar {
        display: none; /* Hide vertical sidebar on mobile */
    }

    .explore-channels-mobile {
        display: flex; /* Show horizontal subscriptions strip */
    }

    .explore-main {
        gap: 24px;
    }

    .explore-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .explore-grid {
        grid-template-columns: 1fr;
    }
}
