/* Article page layout & ads — loaded directly (no Vite required) */

.article-layout {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

@media (min-width: 1024px) {
    .article-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 332px;
        gap: 3rem;
        align-items: start;
    }
}

.article-layout__main {
    min-width: 0;
}

.article-layout__sidebar {
    width: 100%;
    max-width: 20rem;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 1024px) {
    .article-layout__sidebar {
        max-width: none;
        margin: 0;
        position: sticky;
        top: 6rem;
        align-self: start;
    }
}

.article-sidebar {
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(20, 20, 22, 0.85);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.article-sidebar__embed,
.article-sidebar__mpu {
    display: flex;
    justify-content: center;
}

/* Both sidebar 300×250 units share exact outer dimensions */
.article-ad-frame--300x250 {
    width: 300px;
    max-width: 100%;
    height: 250px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(24, 24, 27, 0.5);
    box-sizing: border-box;
}

.article-ad-frame--300x250 ins {
    display: block;
    width: 300px !important;
    max-width: 100%;
    height: 250px !important;
    line-height: 0;
    margin: 0 auto;
}

.article-ad-frame--300x250 iframe {
    max-width: 100%;
}

.article-related-slider__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.article-sidebar__related h2 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.article-related-slider__controls {
    display: flex;
    gap: 0.25rem;
}

.article-related-slider__btn {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.375rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(39, 39, 42, 0.8);
    color: #d4d4d8;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.article-related-slider__btn:hover {
    background: rgba(63, 63, 70, 0.9);
    color: #fff;
    border-color: rgba(244, 63, 94, 0.35);
}

.article-related-slider__viewport {
    overflow: hidden;
    width: 100%;
}

.article-related-slider__track {
    display: flex;
    transition: transform 0.35s ease;
    will-change: transform;
}

.article-related-slider__track .article-related-card {
    flex: 0 0 100%;
    width: 100%;
    box-sizing: border-box;
}

.article-related-slider__dots {
    display: flex;
    justify-content: center;
    gap: 0.375rem;
    margin-top: 0.75rem;
}

.article-related-slider__dot {
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 9999px;
    border: none;
    padding: 0;
    background: #3f3f46;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.article-related-slider__dot.is-active {
    background: #f43f5e;
    transform: scale(1.2);
}

.article-related-card {
    display: block;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(20, 20, 22, 0.7);
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}

.article-related-card:hover {
    border-color: rgba(244, 63, 94, 0.35);
    background: rgba(24, 24, 27, 0.9);
}

.article-related-card__title {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.35;
    color: #fafafa;
}

.article-related-card:hover .article-related-card__title {
    color: #fda4af;
}

.article-related-card__desc {
    margin-top: 0.375rem;
    font-size: 0.75rem;
    line-height: 1.4;
    color: #71717a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Leaderboard — left-aligned with article column on desktop */
.article-ad-leaderboard {
    margin: 0 0 2rem;
}

.article-ad-leaderboard__desktop {
    display: none;
    justify-content: flex-start;
    overflow: visible;
    width: 100%;
}

.article-ad-leaderboard__mobile {
    display: flex;
    justify-content: center;
    overflow: visible;
    width: 100%;
}

@media (max-width: 1023px) {
    .article-ad-leaderboard__desktop {
        display: none !important;
        visibility: hidden;
        height: 0;
        margin: 0;
        padding: 0;
        overflow: hidden;
    }
}

@media (min-width: 1024px) {
    .article-ad-leaderboard__desktop {
        display: flex;
    }

    .article-ad-leaderboard__mobile {
        display: none !important;
        visibility: hidden;
        height: 0;
        margin: 0;
        padding: 0;
        overflow: hidden;
    }
}

.article-ad-slot--leaderboard {
    padding: 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(24, 24, 27, 0.5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.article-ad-leaderboard__desktop .article-ad-slot--leaderboard {
    width: 744px;
    max-width: 100%;
    min-height: 98px;
}

.article-ad-leaderboard__mobile .article-ad-slot--leaderboard {
    width: 316px;
    max-width: 100%;
    min-height: 108px;
}

.article-ad-slot--leaderboard ins {
    display: block;
    line-height: 0;
    max-width: 100%;
}
