﻿/* tournaments page styles (aligned with css/site.css palette) */

        body {
            font-family: Inter, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
            background-color: var(--site-bg);
            color: var(--site-text);
            margin: 0;
            line-height: 1.6;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
        }

        h1 { margin: 3rem 0 2rem; font-size: 2.5rem; font-weight: 800; }

        .filters-section {
            background: var(--site-card);
            padding: 14px 14px 12px;
            border-radius: 24px;
            border: 1px solid var(--site-border);
            margin-bottom: 3rem;
            display: grid;
            grid-template-columns:
                minmax(175px, 185px)
                minmax(260px, 1fr)
                minmax(145px, 150px)
                minmax(145px, 150px)
                max-content;
            gap: 10px 12px;
            align-items: end;
        }

        .filter-group { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
        .filter-group label { font-size: 11px; text-transform: uppercase; color: var(--site-muted); font-weight: 800; letter-spacing: 0.4px; padding-left: 2px; }

        .filter-group--sport { min-width: 0; }
        .filter-group--q { min-width: 0; }
        .filter-group--date { min-width: 0; }

        select,
        input[type="text"],
        input[type="date"] {
            box-sizing: border-box;
            height: 40px;
            padding: 0 14px;
            border: 1px solid var(--site-border);
            border-radius: 12px;
            background: rgba(15, 23, 42, 0.85);
            color: var(--site-text);
            outline: none;
            transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
            width: 100%;
            font-size: 14px;
            line-height: 1.2;
            position: relative;
            z-index: 1;
            box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset;
        }

        select:focus,
        input[type="text"]:focus,
        input[type="date"]:focus {
            border-color: rgba(59, 130, 246, 0.85);
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
        }

        input::placeholder { color: rgba(148, 163, 184, 0.8); font-size: 14px; }

        .filter-actions {
            display: flex;
            gap: 10px;
            align-items: center;
            justify-content: flex-end;
            flex-wrap: nowrap;
            white-space: nowrap;
            min-width: 0;
            justify-self: end;
        }

        .btn {
            box-sizing: border-box;
            height: 40px;
            padding: 0 18px;
            border-radius: 12px;
            border: none;
            cursor: pointer;
            font-weight: 700;
            transition: 0.3s;
            font-size: 13px;
            line-height: 1.2;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            white-space: nowrap;
            text-decoration: none;
        }

        .btn-primary { min-width: 108px; }
        .btn-gray { min-width: 102px; }

        .btn-primary { background: var(--site-blue); color: white; }
        .btn-gray { background: rgba(15, 23, 42, 0.35); color: var(--site-muted); border: 1px solid var(--site-border); }
        .btn:hover { filter: brightness(1.12); }

        @media (max-width: 1180px) {
            .filters-section {
                grid-template-columns:
                    minmax(170px, 210px)
                    1fr
                    minmax(150px, 170px)
                    minmax(150px, 170px);
            }

            .filter-actions {
                grid-column: 1 / -1;
                justify-self: end;
            }
        }

        @media (max-width: 1120px) {
            .filters-section {
                grid-template-columns: 1fr 1fr;
            }

            .filter-group--q {
                grid-column: 1 / -1;
            }
        }

        @media (max-width: 980px) {
            .filters-section {
                grid-template-columns: 1fr 1fr;
            }

            .filter-group--sport,
            .filter-group--q,
            .filter-group--date {
                grid-column: auto;
            }

            .filter-group--q {
                grid-column: 1 / -1;
            }

            .filter-actions {
                justify-content: flex-start;
            }
        }

        .tournament-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
            gap: 2rem;
            margin-bottom: 5rem;
        }

        .empty-state {
            background: var(--site-card);
            border-radius: 24px;
            border: 1px solid var(--site-border);
            padding: 2.2rem;
            margin-bottom: 5rem;
            text-align: center;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 14px;
        }

        .empty-state__title {
            font-size: 1.2rem;
            font-weight: 800;
            margin-bottom: 0;
        }

        .empty-state__subtitle {
            color: var(--site-muted);
            font-size: 0.95rem;
            font-weight: 600;
            margin-bottom: 0;
            max-width: 760px;
            line-height: 1.6;
        }

        .empty-state__actions {
            display: flex;
            justify-content: center;
            margin-top: 0;
        }

        .empty-state__actions .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            line-height: 1.2;
            white-space: nowrap;
        }

        .card {
            background: var(--site-card);
            border-radius: 28px;
            overflow: hidden;
            border: 1px solid var(--site-border);
            display: flex;
            flex-direction: column;
            height: 100%;
            transition: 0.4s ease;
        }

        .card[hidden] { display: none; }
        .card:hover { transform: translateY(-10px); border-color: rgba(255,255,255,0.2); }

        .card-img-wrapper { height: 200px; overflow: hidden; }
        .card-img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.8); transition: 0.5s; }
        .card:hover .card-img { transform: scale(1.1); filter: brightness(1); }

        .card-body { padding: 1.8rem; display: flex; flex-direction: column; flex-grow: 1; }

        .card-title { font-size: 1.3rem; font-weight: 700; margin: 0 0 1rem 0; color: white; min-height: 2.8em; }

        .info-row { font-size: 0.9rem; margin-bottom: 0.5rem; color: var(--site-muted); }
        .participants { font-size: 0.95rem; font-weight: 600; margin-bottom: 1.5rem; }

        .card-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
            margin-top: auto;
            border-top: 1px solid var(--site-border);
            padding-top: 1.5rem;
        }

        .date-badge { font-size: 0.85rem; color: var(--site-muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; }

        .card-actions {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            justify-content: flex-end;
            align-items: center;
            margin-left: auto;
            min-width: 0;
        }

        .btn-details {
            min-height: 32px;
            min-width: 0;
            padding: 6px 12px;
            border-radius: 10px;
            font-size: 0.72rem;
            text-decoration: none;
            font-weight: 700;
            transition: 0.3s;
            text-transform: uppercase;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            white-space: nowrap;
        }

        .btn-details { background: rgba(59, 130, 246, 0.12); color: var(--site-blue); border: 1px solid rgba(59, 130, 246, 0.25); }
        .btn-details:hover { filter: brightness(1.25); }

        .btn-apply {
            min-height: 32px;
            min-width: 0;
            padding: 6px 10px;
            border-radius: 10px;
            font-size: 0.68rem;
            text-decoration: none;
            font-weight: 700;
            transition: 0.3s;
            text-transform: uppercase;
            letter-spacing: 0.3px;
            color: #fff;
            background: var(--site-blue);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            white-space: nowrap;
        }

        .btn-apply:hover {
            filter: brightness(1.08);
        }

        @media (max-width: 640px) {
            .filters-section {
                grid-template-columns: 1fr;
            }

            .filter-actions {
                display: grid;
                grid-template-columns: 1fr 1fr;
                width: 100%;
                justify-content: stretch;
            }

            .btn { padding: 0.8rem 1rem; }
            .card-img-wrapper { height: 140px; }
            .card-img { height: 100%; }
        }
