/**
 * Explore — grid of post tiles (Nexus Social Network)
 */

.explore-page .feed-main {
    padding-top: 1rem;
}

/* Search/scan bar at top of header (mobile only) — opens scan sidebar */
.explore-header-search {
    display: none;
    padding: 0 0.75rem 0.75rem;
    background: var(--dark-bg, #0a0a0a);
}

@media (max-width: 768px) {
    .explore-header-search {
        display: block;
    }
}

.explore-header-search-inner {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.7rem 1rem;
    background: #252525;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Hudson', sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.explore-header-search-inner:hover,
.explore-header-search-inner:focus {
    background: #2a2a2a;
    color: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 0.15);
}

.explore-header-search-inner i {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.55);
    flex-shrink: 0;
}

.explore-layout {
    display: flex;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding-left: 0;
}

@media (min-width: 1260px) {
    .explore-layout {
        padding-left: 244px;
    }
}

.explore-center {
    flex: 1;
    min-width: 0;
    padding: 0 1rem 2rem;
}

/* Mobile: search bar at top (opens scan sidebar) */
.explore-mobile-search {
    display: none;
    margin-bottom: 0.75rem;
}

@media (max-width: 768px) {
    .explore-mobile-search {
        display: block;
    }
}

.explore-mobile-search-inner {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    color: var(--text-muted);
    font-family: 'Hudson', sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.explore-mobile-search-inner:hover,
.explore-mobile-search-inner:focus {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-light);
    border-color: rgba(255, 255, 255, 0.15);
}

.explore-mobile-search-inner i {
    font-size: 0.9rem;
    opacity: 0.9;
}

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

@media (max-width: 768px) {
    .explore-grid {
        gap: 3px;
    }
}

.explore-column {
    flex: 1;
    min-width: 0;
}

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

@media (max-width: 768px) {
    .explore-column-list {
        gap: 3px;
    }
}

.explore-column-list > li {
    display: block;
}

.explore-tile {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.explore-tile--portrait {
    aspect-ratio: 9 / 16;
}

.explore-tile:focus {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

.explore-tile video,
.explore-tile .explore-tile-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.explore-tile .explore-tile-poster {
    z-index: 0;
}

/* Thumbnail (poster) visible when video paused; video on top when playing */
.explore-tile video {
    z-index: 1;
    transition: opacity 0.2s ease;
}

.explore-tile:not(.explore-tile--playing) video {
    opacity: 0;
}

.explore-tile.explore-tile--playing video {
    opacity: 1;
}

.explore-tile-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    pointer-events: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.explore-tile:hover .explore-tile-play {
    background: rgba(0, 0, 0, 0.7);
    transform: translate(-50%, -50%) scale(1.05);
}

.explore-tile:hover video {
    filter: brightness(1.05);
}

/* Hover overlay: likes, comments, caption, author */
.explore-tile-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 40%, transparent 70%);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0.75rem;
}

.explore-tile:hover .explore-tile-overlay {
    opacity: 1;
}

.explore-tile-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.95);
}

.explore-tile-stats span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.explore-tile-stats i {
    font-size: 0.9rem;
    opacity: 0.9;
}

.explore-tile-caption {
    font-size: 0.78rem;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.9);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.explore-tile-author {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--primary-green);
}

.explore-tile-author-link {
    cursor: pointer;
}

.explore-tile-author-link:hover {
    text-decoration: underline;
}

/* Search results page heading */
.explore-search-page-title {
    font-family: 'Hudson', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-white);
    margin: 0 0 1rem;
    padding: 0;
}

.explore-search-page-title .explore-search-query {
    color: var(--primary-green);
}

.explore-search-page-title .explore-search-count {
    color: var(--text-muted);
    font-weight: 500;
    margin-left: 0.35rem;
}
