/* ============================================================
   Home page layout
   Page-specific structure only (hero grid, main grid, popular
   list). Reusable component styling lives in public/components.css.
   Linked per-page at the top of Pages/Home/Home.razor.
   ============================================================ */

.home-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

/* ---------- Hero block ---------- */
.home-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.home-hero__side {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.home-hero__side-item {
    flex: 1;
}

.home-hero__skeleton {
    height: 500px;
    margin-bottom: 3rem;
    border-radius: var(--tg-radius-2xl);
    background-color: var(--tg-bg-elev);
    animation: tg-pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ---------- Main grid ---------- */
.home-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

.home-grid__main > * + * {
    margin-top: 3rem;
}

.home-grid__sidebar > * + * {
    margin-top: 2rem;
}

/* ---------- Popular list (sidebar) ---------- */
.popular-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.popular-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.popular-item__rank {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.875rem;
    font-weight: 900;
    line-height: 1;
    color: var(--tg-bg-elev-2);
    transition: color 0.2s ease;
}

.popular-item:hover .popular-item__rank {
    color: #fff;
}

.popular-item__title {
    margin: 0 0 0.25rem;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.375;
    color: #fff;
    transition: color 0.2s ease;
}

.popular-item:hover .popular-item__title {
    color: #cbd5e1;
}

.popular-item__meta {
    font-size: 0.75rem;
    color: var(--tg-text-muted);
}

.popular-divider {
    height: 1px;
    width: 100%;
    background-color: var(--tg-bg-elev-2);
}

.popular-empty {
    font-size: 0.875rem;
    color: var(--tg-text-muted);
}

.content-section__empty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 1rem;
    margin: 0;
    font-size: 0.9rem;
    color: var(--tg-text-muted);
    background-color: var(--tg-bg-elev-1);
    border: 1px dashed var(--tg-bg-elev-2);
    border-radius: 0.5rem;
}

.content-section__empty .material-symbols-outlined {
    font-size: 1.25rem;
}

/* ---------- Social widget (sidebar) ---------- */
.social-widget__links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.625rem;
}

.social-widget__link {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 1rem;
    border-radius: var(--tg-radius-lg, 0.75rem);
    background-color: var(--tg-bg-elev);
    color: #fff;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.social-widget__link svg {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
}

.social-widget__text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    min-width: 0;
}

.social-widget__name {
    font-size: 0.875rem;
    font-weight: 700;
}

.social-widget__handle {
    font-size: 0.75rem;
    color: var(--tg-text-muted);
    transition: color 0.2s ease;
}

.social-widget__link:hover .social-widget__handle {
    color: rgba(255, 255, 255, 0.85);
}

.social-widget__link:hover {
    transform: translateY(-1px);
}

.social-widget__link--tiktok:hover {
    background-color: #010101;
    color: #25f4ee;
}

.social-widget__link--instagram:hover {
    background-image: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: #fff;
}

.social-widget__link--facebook:hover {
    background-color: #1877f2;
    color: #fff;
}

/* ---------- Responsive ---------- */
@media (min-width: 768px) {
    .home-container {
        padding: 1.5rem 1.5rem;
    }
}

@media (min-width: 1024px) {
    .home-container {
        padding: 2rem 2.5rem;
    }

    .home-hero {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }

    .home-hero__main {
        grid-column: span 8 / span 8;
    }

    .home-hero__side {
        grid-column: span 4 / span 4;
    }

    .home-grid {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }

    .home-grid__main {
        grid-column: span 8 / span 8;
    }

    .home-grid__sidebar {
        grid-column: span 4 / span 4;
    }
}

/* Home page main column shows one content per row (override compact 2-col) */
.home-grid__main .content-section__grid--compact {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .home-grid__main .content-section__grid--compact {
        grid-template-columns: 1fr;
    }
}
