﻿.hero-section {
    min-height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    color: #232323;
    text-align: center;
    padding-top: 4rem;
    padding-bottom: 4rem;
    gap: 3rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    gap: 4rem;
    width: 100%;
    max-width: 1200px;
    padding: 0 4rem;
    z-index: 1;
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
            linear-gradient(45deg, transparent 49%, #e5e7eb 49%, #e5e7eb 51%, transparent 51%),
            linear-gradient(-45deg, transparent 49%, #e5e7eb 49%, #e5e7eb 51%, transparent 51%);
    background-size: 40px 40px;
    -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, #000 30%, transparent 70%);
    mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, #000 30%, transparent 70%);
    pointer-events: none; /* allow clicks through the background */
}

.countdown-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 2rem;
    width: 360px;
    height: 360px;
    background:
            radial-gradient(circle at center,
            rgba(255,255,255,0.08),
            var(--color-secondary) 70%);
    border-radius: 50%;
    box-shadow: 0 0 40px rgba(0,0,0,0.3);
}

.countdown-text {
    font-family: 'Teko', sans-serif;
    font-size: 2rem;
}

.hero-rotating-text {
    position: absolute;
    animation: rotating 40s linear infinite;
    font-family: 'Teko', serif;
    width: 520px;
    height: 520px;
}


.feature-hero {
    padding: 3.2rem 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(155, 155, 155, 0.4);
    background: var(--color-secondary);
    backdrop-filter: blur(6px);
    box-shadow:
            0 20px 40px rgba(0,0,0,0.15);
}


.feature-hero-bg {
    animation: gridDrift 20s linear infinite;
}

@keyframes gridDrift {
    from { background-position: 0 0; }
    to   { background-position: 80px 80px; }
}

.feature-hero-bg {
    position: absolute;
    inset: 0;
    background-image:
            linear-gradient(45deg, transparent 49%, #1f2933 49%, #1f2933 51%, transparent 51%),
            linear-gradient(-45deg, transparent 49%, #1f2933 49%, #1f2933 51%, transparent 51%);
    background-size: 48px 48px;
    opacity: 0.25;
    
    mask-image: radial-gradient(
            ellipse 80% 60% at 30% 20%,
            #000 40%,
            transparent 75%
    );

    pointer-events: none;
}


.feature-hero-index {
    font-size: 4rem;
    opacity: 0.25;
}

/* Title */
.feature-hero-title {
    position: relative;
    font-family: 'Teko', sans-serif;
    font-size: 2rem;
    letter-spacing: 0.12em;
    margin-bottom: 0.6rem;
    text-transform: uppercase;
}

/* Body text */
.feature-hero-text {
    position: relative;
    font-size: 1.2rem;
    line-height: 1.5;
    color: #939393;
    max-width: 32ch;
}

.feature-hero .button-primary-outline {
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
    position: absolute;
    bottom: 1rem;
    right: 1rem;
}

.filter-bar {
    z-index: 10;
    max-width: 700px;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid rgba(155, 155, 155, 0.4);
    background: var(--color-secondary);
    margin-left: 1rem;
    margin-right: 1rem;
    justify-content: space-between;
    align-items: center;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

/* Group buttons */
.btn-group {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    font-family: 'Teko', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: transparent;
    border: 1px solid #999;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    color: #232323;
}

.filter-btn:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.filter-btn.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.sort-dropdown {
    position: relative;
}

.sort-dropdown select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 0.4rem 0.8rem 0.4rem 2.5rem; /* space for icon */
    font-family: 'Teko', sans-serif;
    font-size: 1rem;
    border: none;
    background: transparent;
    color: #555;
    cursor: pointer;
}

.sort-dropdown select:focus {
    outline: none;
}

/* SVG icon inside dropdown */
.sort-dropdown .filter-icon {
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    stroke: #888;
    pointer-events: none; /* SVG does not block clicks */
    transition: stroke 0.2s ease;
}

.sort-dropdown select:hover + .filter-icon,
.sort-dropdown select:focus + .filter-icon {
    stroke: var(--color-primary);
}

.no-tournaments,
.no-tournaments-filtered {
    z-index: 10;
    padding: 4rem 2rem;
    font-size: 1.2rem;
    color: #888;
    width: 100%;
    text-align: center;
}

.tournament-list-container {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    overflow: hidden;
}

/* Card */
.tournament-card {
    position: relative;
    display: flex;
    flex-direction: column;
    /*display: grid;*/
    /*grid-template-columns: 300px 1fr;*/
    /*align-items: stretch;*/
    gap: 2.5rem;
    padding: 0;
    border: 1px solid rgba(155, 155, 155, 0.4);
    background: var(--color-secondary);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    overflow: hidden;
}

.tournament-poster {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}


.tournament-poster img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}


.tournament-details {
    padding: 2.8rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.6rem;
}

.tournament-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
            to right,
            rgba(0,0,0,0.35),
            rgba(0,0,0,0.05) 60%,
            transparent
    );
    pointer-events: none;
}

.tournament-header {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.tournament-title {
    font-family: 'Teko', sans-serif;
    font-size: 2.1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tournament-dates {
    font-size: 0.95rem;
    color: #b5b5b5;
}

.tournament-type {
    font-family: 'Teko', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.underline {
    margin-inline: auto;
    background-color: #2b2b2b;
    width: 50%;
    height: 1px;
}

.tournament-cta {
    margin-top: auto;
    display: flex;
    justify-content: center;
}

.tournament-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.meta-label {
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #363636;
}

.meta-value {
    font-size: 0.95rem;
    color: #8a8a8a;
}

.meta-muted .meta-value {
    color: #9a9a9a;
    font-size: 0.85rem;
}


@media (max-width: 768px) {

    .hero-section {
        height: auto;
        padding: 4rem 0;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 5rem;
        text-align: center;
    }

    .hero-logo-container {
        width: 230px;
        height: 230px;
    }

    .hero-rotating-text {
        width: 350px;
        height: 350px;
    }

    .countdown-text {
        padding-top: 2rem;
        font-size: 2rem;
    }

    .filter-bar {
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .tournament-card {
        grid-template-columns: 1fr;
    }

    .tournament-poster {
        height: 260px; /* intentional visual crop */
    }

    .tournament-details {
        text-align: center;
    }

    .tournament-meta {
        grid-template-columns: 1fr;
    }
}


@keyframes rotating {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}