/* Assetto Corsa servers — card grid */

.ac-servers-section {
    padding-top: 0;
}

.page-hero--compact {
    padding-bottom: 1.5rem;
}

.ac-srv-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .ac-srv-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .ac-srv-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.ac-srv-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.ac-srv-card:hover {
    border-color: rgba(241, 90, 36, 0.55);
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.ac-srv-card__media {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
    background: var(--bg);
}

.ac-srv-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.ac-srv-card:hover .ac-srv-card__img {
    transform: scale(1.04);
}

.ac-srv-card__media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(13, 15, 20, 0.92) 100%);
    pointer-events: none;
}

.ac-srv-card__badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 1;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(241, 90, 36, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.ac-srv-card--track .ac-srv-card__badge {
    background: rgba(88, 120, 255, 0.88);
}

.ac-srv-card--drift .ac-srv-card__badge {
    background: rgba(180, 80, 220, 0.88);
}

.ac-srv-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.85rem;
    padding: 1.1rem 1.15rem 1.25rem;
}

.ac-srv-card__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
}

.ac-srv-card__location {
    margin: -0.35rem 0 0;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.ac-srv-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.ac-srv-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
}

.ac-srv-tag--cars {
    border-color: rgba(241, 90, 36, 0.35);
    color: var(--accent);
}

.ac-srv-tag--weather {
    border-color: rgba(100, 180, 255, 0.35);
    color: #8ec8ff;
}

.ac-srv-traffic.t-light {
    color: #7dd3a8;
    border-color: rgba(125, 211, 168, 0.35);
}

.ac-srv-traffic.t-medium {
    color: #f5c842;
    border-color: rgba(245, 200, 66, 0.35);
}

.ac-srv-traffic.t-heavy {
    color: #ff9f43;
    border-color: rgba(255, 159, 67, 0.35);
}

.ac-srv-traffic.t-none {
    color: var(--text-muted);
}

.ac-srv-card__meta {
    display: grid;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ac-srv-card__meta-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
}

.ac-srv-card__meta-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.ac-srv-card__meta-value {
    font-size: 0.9rem;
    font-weight: 600;
    text-align: right;
}

.ac-srv-card__meta-value code {
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.12rem 0.4rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.ac-srv-card__join {
    width: 100%;
    margin-top: auto;
}

.ac-srv-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    padding: 2rem 1rem;
}

.ac-servers-help__actions {
    margin-top: 1.25rem;
    justify-content: flex-start;
}

@media (max-width: 560px) {
    .ac-srv-card__meta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.15rem;
    }

    .ac-srv-card__meta-value {
        text-align: left;
    }
}
