:root {
    --index-bg: var(--page-bg);
    --index-text: var(--page-text);
    --index-muted: var(--page-muted);
    --index-line: var(--page-line);
    --index-shadow: var(--page-shadow);
    --index-orange: var(--brand-orange);
}

.index-page {
    min-height: 100vh;
    padding: 0 clamp(1rem, 4vw, 3rem) 3rem;
}

.hero-section,
.sport-grid,
.filter-panel {
    width: min(100%, 1120px);
    margin-inline: auto;
}

.hero-section {
    padding: 0.75rem 0 2rem;
    text-align: center;
}

.hero-kicker {
    margin: 0 0 0.35rem;
    color: var(--index-muted);
    font-size: clamp(1rem, 2.1vw, 1.2rem);
    font-weight: 700;
}

.hero-section h1 {
    margin: 0;
    color: #6e7585;
    font-size: clamp(2.05rem, 5.2vw, 4.7rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: 0;
}

.sport-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1rem, 3vw, 2rem);
}

.sport-card {
    display: grid;
    place-items: center;
    min-height: clamp(10rem, 24vw, 16rem);
    padding: 1.5rem;
    border: 2px solid transparent;
    border-radius: 1.55rem;
    color: var(--index-text);
    text-align: center;
    text-decoration: none;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.sport-card:hover,
.sport-card:focus {
    color: var(--index-text);
    transform: translateY(-2px);
    box-shadow: var(--index-shadow);
}

.sport-card-basketball {
    border-color: #ff701a;
    background: linear-gradient(135deg, #ffe7dc, #fff8f5);
}

.sport-card-football {
    border-color: #5cbc78;
    background: linear-gradient(135deg, #daf4df, #f6fffa);
}

.sport-card-baseball {
    border-color: #9fc1ff;
    background: linear-gradient(135deg, #dbe8ff, #f6f9ff);
}

.sport-card-hockey,
.sport-card-default {
    border-color: #9bdcf5;
    background: linear-gradient(135deg, #d9f3fd, #f7fdff);
}

.sport-card.is-selected {
    border-width: 4px;
}

.sport-icon {
    display: block;
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    line-height: 1;
}

.sport-name {
    display: block;
    margin-top: 1rem;
    font-size: clamp(1.45rem, 3vw, 2.35rem);
    font-weight: 800;
}

.filter-panel {
    padding-top: clamp(1.6rem, 4vw, 2.5rem);
}

.listing-size-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(0.65rem, 2vw, 1.5rem);
}

.listing-size-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 5.3rem;
    padding: 0.8rem;
    border: 2px solid var(--index-line);
    border-radius: 1.25rem;
    background: #fff;
    color: var(--index-text);
    font-size: clamp(1rem, 2.1vw, 1.55rem);
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
}

.listing-size-option.is-selected {
    border-color: var(--index-orange);
    background: var(--index-orange);
    color: #fff;
}

.listing-size-icon {
    flex: 0 0 auto;
}

.search-form {
    display: grid;
    gap: 1rem;
    margin-top: clamp(1.5rem, 4vw, 2.5rem);
}

.search-box,
.sport-select {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 4.35rem;
    border: 2px solid var(--index-line);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.04);
}

.search-box {
    gap: 1rem;
    padding: 0 1.35rem;
}

.search-icon {
    position: relative;
    width: 1.45rem;
    height: 1.45rem;
    flex: 0 0 1.45rem;
    border: 3px solid #768091;
    border-radius: 999px;
}

.search-icon::after {
    content: "";
    position: absolute;
    right: -0.48rem;
    bottom: -0.42rem;
    width: 0.75rem;
    height: 0.18rem;
    border-radius: 999px;
    background: #768091;
    transform: rotate(45deg);
}

.search-box input,
.sport-select select {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--index-text);
    font: inherit;
}

.search-box input {
    min-width: 0;
    font-size: clamp(1.15rem, 2.3vw, 1.8rem);
    font-weight: 700;
}

.search-box input::placeholder {
    color: #707889;
    opacity: 1;
}

.sport-select {
    gap: 0.75rem;
    padding: 0 1rem 0 1.35rem;
}

.selected-sport-icon {
    width: 1.8rem;
    flex: 0 0 1.8rem;
    font-size: 1.5rem;
    line-height: 1;
}

.sport-select select {
    min-height: 4.1rem;
    font-size: clamp(1.1rem, 2.2vw, 1.55rem);
    font-weight: 700;
    appearance: auto;
}

.search-submit {
    min-height: 3.75rem;
    border-radius: 1rem;
    font-size: 1.05rem;
    font-weight: 800;
}

@media (min-width: 768px) {
    .index-page {
        padding-top: 0.5rem;
    }

    .search-form {
        grid-template-columns: minmax(18rem, 1fr) minmax(14rem, 20rem) auto;
        align-items: stretch;
    }

    .search-submit {
        min-width: 10rem;
    }
}

@media (min-width: 992px) {
    .sport-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .index-page {
        padding-inline: 1.5rem;
    }

    .sport-card {
        min-height: 10.8rem;
        border-radius: 1.25rem;
    }

    .listing-size-group {
        gap: 0.75rem;
    }

    .listing-size-option {
        min-height: 5rem;
        border-radius: 1rem;
        font-size: 1rem;
    }
}
