/* ==========================================================================
   HOMEPAGE (front-page.php)
   ========================================================================== */

.home-category-nav {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 60px;
    z-index: 40;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
}

.home-category-nav__scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.home-category-nav__list {
    display: flex;
    gap: 0;
    white-space: nowrap;
    padding: 0;
    margin: 0;
    list-style: none;
}

.home-category-nav__link {
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--foreground);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    display: inline-block;
}

.home-category-nav__link:hover,
.home-category-nav__link:focus {
    border-bottom-color: var(--gaming-red);
    color: var(--gaming-red);
}

.home-category-nav__scroll::-webkit-scrollbar {
    height: 3px;
}

.home-category-nav__scroll::-webkit-scrollbar-thumb {
    background: var(--gaming-red);
    border-radius: 10px;
}

.home-sr-only {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.home-section {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.home-section--muted,
.home-section--creators {
    background: var(--muted);
}

.home-section--gradient {
    background: linear-gradient(to bottom, transparent 0%, var(--muted) 10%, var(--muted) 90%, transparent 100%);
}

.home-section--bottom {
    padding-bottom: 3rem;
}

.home-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.home-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--gaming-red);
    display: inline-block;
    margin: 0;
}

.home-section-title--solo {
    margin-bottom: 1rem;
}

.home-section-title--creators {
    margin-bottom: 1.5rem;
}

.home-section-more {
    color: var(--gaming-red);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
}

.home-section-more:hover {
    text-decoration: underline;
}

.home-hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.home-hero-large {
    grid-column: 1;
    grid-row: 1 / 3;
}

.home-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.home-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.home-card--featured {
    position: relative;
    min-height: 450px;
    cursor: pointer;
}

.home-card__link-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
}

.home-card__stretch {
    display: block;
    color: inherit;
    text-decoration: none;
}

.home-card__stretch:hover .home-card__title {
    color: var(--gaming-red);
}

.home-grid .home-card,
.home-list-item {
    position: relative;
}

.home-card__media {
    position: absolute;
    inset: 0;
}

.home-card__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.home-card:hover .home-card__media img {
    transform: scale(1.05);
}

.home-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    z-index: 1;
}

.home-placeholder {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--gaming-red) 0%, #1e293b 100%);
}

.home-placeholder--muted {
    background: linear-gradient(135deg, var(--gaming-red) 0%, #64748b 100%);
}

.home-badge {
    background: var(--gaming-red);
    color: #fff;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
}

.home-badge--on-image {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 2;
}

.home-badge--sm {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.65rem;
    border-radius: 3px;
}

.home-badge--card {
    padding: 0.25rem 0.6rem;
    font-size: 0.7rem;
    border-radius: 3px;
    margin-bottom: 0.5rem;
}

.home-card__content-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    z-index: 2;
}

.home-card__title-lg {
    font-size: clamp(1.25rem, 3vw, 2rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.home-card__excerpt-light {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
}

.home-card__meta-light {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.75);
}

.home-card--compact .home-card__row {
    display: flex;
    gap: 1rem;
}

.home-card__thumb-sm {
    flex-shrink: 0;
    width: 140px;
    height: 100px;
    overflow: hidden;
    position: relative;
}

.home-card__thumb-sm img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.home-card__body-sm {
    flex: 1;
    padding: 0.75rem 0.75rem 0.75rem 0;
    min-width: 0;
}

.home-card__title-sm {
    font-weight: 700;
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.home-card__title-sm--clamp {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-card__title-sm--clamp a {
    display: block;
}

.home-card__title-sm a,
.home-card__title a {
    color: var(--foreground);
    text-decoration: none;
}

.home-card__title-sm a:hover,
.home-card__title a:hover {
    color: var(--gaming-red);
}

.home-card__meta-sm {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.home-card__thumb-wrap {
    display: block;
    position: relative;
}

.home-card__ratio {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.home-card__stretch .home-card__body {
    display: block;
}

.home-card__ratio img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.home-badge--grid {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.35rem 0.65rem;
    font-size: 0.7rem;
}

.home-card__body {
    padding: 1rem;
}

.home-card__title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.home-card__excerpt {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.home-card__meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

.home-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.home-list-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: box-shadow 0.3s;
}

.home-list-item__link {
    display: flex;
    gap: 1rem;
    padding: 1rem;
}

.home-list-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.home-list-item__thumb {
    flex-shrink: 0;
    width: 180px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 6px;
    position: relative;
}

.home-list-item__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-list-item__body {
    flex: 1;
    min-width: 0;
}

.home-event-card {
    display: flex;
    flex-direction: column;
}

.home-event-card .home-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.home-event-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.8125rem;
    color: var(--muted-foreground);
}

.home-event-meta__row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.home-event-meta__icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.home-event-organizer {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.home-event-organizer__link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: opacity 0.2s;
}

.home-event-organizer__link:hover {
    opacity: 0.7;
}

.home-event-organizer__logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
    background: #f8f9fa;
    padding: 4px;
}

.home-event-organizer__label {
    font-size: 0.6875rem;
    color: var(--muted-foreground);
    margin-bottom: 2px;
}

.home-event-organizer__name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--foreground);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-creators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.home-creator-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.home-creator-card__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: transform 0.2s;
}

.home-creator-card__link:hover {
    transform: translateY(-5px);
}

.home-creator-card__avatar {
    width: 100px;
    height: 100px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 0.75rem;
}

.home-creator-card__avatar img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.home-creator-card__placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--gaming-red) 0%, #64748b 100%);
    border-radius: 50%;
}

.home-creator-card__name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--foreground);
    line-height: 1.3;
    max-width: 120px;
    word-wrap: break-word;
}

@media (min-width: 1024px) {
    .home-hero-grid {
        grid-template-columns: 2fr 1fr;
    }

    .home-hero-large {
        grid-column: 1;
        grid-row: 1 / 5;
    }
}

@media (max-width: 768px) {
    .home-hero-grid {
        grid-template-columns: 1fr;
    }

    .home-card--featured {
        min-height: 350px;
    }

    .home-category-nav__link {
        font-size: 0.8125rem;
        padding: 0.875rem 1rem;
    }

    .home-list-item__link {
        flex-direction: column;
    }

    .home-list-item__thumb {
        width: 100%;
    }
}
