/* --- INSIGHTS PAGE STYLES --- */
body {
    background-color: #F0F2F5;
}

.glass-header-bar {
    height: 200px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
    width: 100%;
    box-sizing: border-box;
    padding-top: 80px;
    display: flex;
    align-items: center;
}

.glass-header-bar .container,
.glass-header-bar .page-header {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.glass-header-bar .page-header-container {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
    padding: 0 1.5rem;
    box-sizing: border-box;
}

.glass-header-bar .page-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0;
    line-height: 1;
}

.glass-header-bar .page-slogan {
    font-size: 1rem;
    font-weight: 500;
    color: #6e6e73;
    margin: 0;
    line-height: 1;
}

.insights-layout {
    display: grid;
    max-width: 1200px;
    grid-template-columns: 220px 1fr 320px;
    gap: 1.5rem;
    align-items: flex-start;
    margin: 30px auto;
}

.left-column,
.right-column {
    position: sticky;
    top: 80px;
}

.mini-box {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid #DADDE1;
    margin-bottom: 1rem;
}

.mini-box h3 {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #1d1d1f;
}

.topic-list, 
.links-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.topic-filter-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: transparent;
    border: none;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.topic-filter-btn:hover,
.topic-filter-btn.is-active {
    background: rgba(0, 0, 0, 0.05);
    color: #000;
}

.topic-filter-btn .badge {
    font-size: 0.7rem;
    background: #e5e5ea;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    color: #333;
}

.links-list a {
    color: #555;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
}

.links-list a:hover {
    color: #000;
}

.feed-container {
    min-width: 0;
    max-width: 100%;
}

.feed-control-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid #DADDE1;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    margin-bottom: 1.25rem;
    min-width: 0;
    max-width: 100%;
}

.filter-pills-scroll {
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    min-width: 0;
    padding: 2px 0;
}

.filter-pills-scroll::-webkit-scrollbar {
    display: none;
}

.pill-btn {
    flex-shrink: 0;
    background: transparent;
    border: none;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.pill-btn.is-active {
    background: #000000;
    color: #ffffff;
}

.sort-dropdown-wrapper {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding-left: 0.5rem;
    border-left: 1px solid rgba(0, 0, 0, 0.08);
}

.sort-select {
    background: transparent;
    border: none;
    font-size: 0.78rem;
    font-weight: 600;
    color: #444;
    cursor: pointer;
    outline: none;
}

/* Feed Smooth Transition */
.main-feed {
    transition: opacity 0.2s ease;
}

.main-feed.is-filtering {
    opacity: 0.4;
    pointer-events: none;
}

@keyframes feedFadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-card.is-animating {
    animation: feedFadeSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.main-feed {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.article-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid #DADDE1;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    position: relative;
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.author-name {
    font-weight: 700;
    color: #1d1d1f;
    font-size: 0.95rem;
}

.category-pill-tag {
    font-size: 0.65rem;
    font-weight: 700;
    background: #f0f0f2;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    letter-spacing: 0.05em;
    color: #555;
}

.post-date {
    font-size: 0.8rem;
    color: #86868b;
}

.post-menu {
    position: absolute;
    right: 0;
    top: 0;
}

.post-menu-toggle {
    background: transparent;
    border: none;
    padding: 4px;
    border-radius: 50%;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.post-menu-toggle:hover {
    background: #f0f0f2;
}

.post-menu-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    padding: 0.35rem;
    z-index: 100;
    min-width: 180px;
}

.post-menu-dropdown.active {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.post-menu-btn {
    background: transparent;
    border: none;
    padding: 0.55rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #1d1d1f;
    cursor: pointer;
    width: 100%;
    text-align: left;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: background 0.15s ease;
}

.post-menu-btn:hover {
    background: #f5f5f7;
}

.post-content p {
    font-size: 0.92rem;
    line-height: 1.55;
    color: #2c2c2e;
    margin: 0 0 1rem 0;
}

.read-more-btn {
    color: var(--ruby-main);
    font-weight: 600;
    cursor: pointer;
}

.read-more-btn:hover {
    text-decoration: none;
}

.media-grid {
    display: grid;
    gap: 2px;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 0.75rem;
}

.media-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    background: #e5e5ea;
}

.media-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.media-grid[data-media-count="1"] .media-item { aspect-ratio: 16 / 9; }
.media-grid[data-media-count="2"] { grid-template-columns: 1fr 1fr; aspect-ratio: 16 / 9; }

.media-grid[data-media-count="3"] {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    aspect-ratio: 16 / 9;
    grid-template-areas: "large small-1" "large small-2";
}
.media-grid[data-media-count="3"] .media-item:nth-child(1) { grid-area: large; }
.media-grid[data-media-count="3"] .media-item:nth-child(2) { grid-area: small-1; }
.media-grid[data-media-count="3"] .media-item:nth-child(3) { grid-area: small-2; }

.media-grid[data-media-count="4"] {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr 1fr;
    aspect-ratio: 1 / 1;
    grid-template-areas: "large small-1" "large small-2" "large small-3";
}
.media-grid[data-media-count="4"] .media-item:nth-child(1) { grid-area: large; }
.media-grid[data-media-count="4"] .media-item:nth-child(2) { grid-area: small-1; }
.media-grid[data-media-count="4"] .media-item:nth-child(3) { grid-area: small-2; }
.media-grid[data-media-count="4"] .media-item:nth-child(4) { grid-area: small-3; }

/* --- 5+ MEDIA GRID (CONSOLIDATED) --- */
.media-grid[data-media-count="5+"] {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    aspect-ratio: 1 / 1;
}

.media-grid[data-media-count="5+"] .media-item {
    aspect-ratio: auto;
    height: 100%;
}

.media-grid[data-media-count="5+"] .media-item:nth-child(n+5) { 
    display: none; 
}

.media-grid[data-media-count="5+"] .media-item:nth-child(4)::after {
    content: attr(data-overlay-text);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 2.25rem;
    font-weight: 700;
}

.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.85rem;
    margin-top: 0.85rem;
    border-top: 1px solid #f0f0f2;
}

.post-stats {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #6e6e73;
    font-size: 0.85rem;
}

.btn.linkedin-like {
    height: 38px;
    padding: 0 1.25rem;
    border-radius: 999px;
    background: var(--ruby-main);
    color: var(--color-text-light);
    border: none;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn.linkedin-like:hover {
    background: var(--ruby-hover);
    box-shadow: 0 4px 14px var(--ruby-glow);
}

.featured-character-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #DADDE1;
    overflow: hidden;
    width: 100%;
}

.featured-character-card .image-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1.15;
    overflow: hidden;
    display: block;
}

.featured-character-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.featured-character-card .character-info {
    padding: 1.25rem;
    text-align: center;
}

.featured-character-card h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.15rem;
    color: #1d1d1f;
}

.featured-character-card p {
    margin: 0 0 1rem 0;
    font-size: 0.85rem;
    color: #6e6e73;
}

.btn-gold {
    height: 38px;
    padding: 0 1.25rem;
    border-radius: 999px;
    border: 1px solid var(--ruby-main);
    color: var(--ruby-main);
    background: transparent;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-gold:hover {
    background: var(--ruby-main);
    color: #ffffff;
    box-shadow: 0 4px 14px var(--ruby-glow);
}

.featured-character-card.clean-skeleton-card {
    height: 480px;
    border: none;
    background: transparent;
}


.insights-single-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    margin-bottom: 2.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md, 12px);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.back-to-insights-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #000000;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.back-to-insights-btn:hover {
    color: #ffffff;
    transform: translateX(-3px);
}

.back-to-insights-btn svg {
    stroke: currentColor;
    transition: stroke 0.2s ease;
}

.single-post-badge {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #f87171;
    background: rgba(239, 68, 68, 0.12);
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(239, 68, 68, 0.25);
}


.insights-layout .skeleton,
.insights-layout .skeleton-light {
    background-color: #e8e8ed;
    background-image: linear-gradient(
        90deg,
        #e8e8ed 0%,
        #f5f5f7 50%,
        #e8e8ed 100%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 2.8s infinite ease-in-out;
}

.skeleton-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

.skeleton-title {
    width: 130px;
    height: 12px;
    border-radius: 4px;
}

.skeleton-sub {
    width: 80px;
    height: 10px;
    border-radius: 4px;
}

.skeleton-text {
    width: 100%;
    height: 12px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-media {
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-top: 12px;
    border-radius: 8px;
}

.skeleton-full-card {
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

@media (max-width: 1200px) {
    .insights-layout {
        grid-template-columns: 1fr;
        max-width: 640px;
        margin: 0 auto 3rem auto;
    }

    .left-column,
    .right-column {
        display: none;
    }
}

@media (max-width: 640px) {
    .glass-header-bar {
        padding-top: 60px;
        height: auto;
        padding-bottom: 1.5rem;
    }

    .glass-header-bar .page-header-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .glass-header-bar .page-title{
        margin: 0 0 1rem 0;
    }

    .feed-control-bar {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .article-card {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    .insights-single-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1rem;
    }
}