/* Hero heading - smaller */
.hero h1 {
    font-size: clamp(1.75rem, 4vw, 3rem);
}

/* Mobile/Desktop column headers */
.th-mobile {
    display: none;
}

/* Content fullwidth - inherits from .content but goes full width on mobile */
.content-fullwidth {
    background: var(--color-bg-secondary);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    margin-bottom: var(--spacing-md);
}

@media (max-width: 768px) {
    .th-full {
        display: none;
    }
    .th-mobile {
        display: inline;
    }

    /* Full width table only on mobile */
    .players-table-container {
        margin-left: calc(-1 * var(--spacing-md));
        margin-right: calc(-1 * var(--spacing-md));
        width: calc(100% + 2 * var(--spacing-md));
    }

    .players-table {
        border-radius: 0;
    }

    /* Nazwisko column - add left padding */
    .players-table th:first-child,
    .players-table td:first-child {
        padding-left: 1.5rem;
    }

    /* NAR column closer to Nazwisko */
    .players-table th:nth-child(2),
    .players-table td:nth-child(2) {
        padding-left: 0;
    }

    /* HCP column left-aligned on mobile */
    .players-table th:nth-child(3),
    .players-table td:nth-child(3) {
        text-align: left;
    }
}

/* Section tag styling */
.staff-section .section-tag {
    color: #999;
    margin-bottom: var(--spacing-sm);
    display: block;
}

.staff-section .staff-text > p {
    font-size: 1.2rem;
}



/* Search Row - search bar + year tabs */
.search-row {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    align-items: stretch;
}

.search-container {
    flex: 1;
    margin-bottom: 0;
}

/* Year Tabs */
.year-tabs {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.year-tab {
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--color-border);
    border-radius: 9999px;
    background: var(--color-bg-secondary);
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.year-tab:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.year-tab.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #ffffff;
}

.year-tab.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Historical year selector */
.year-selector {
    position: relative;
}

.year-selector-btn {
    padding: 0.6rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 9999px;
    background: var(--color-bg-secondary);
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.year-selector-btn:hover {
    border-color: var(--color-accent);
}

.year-selector-btn svg {
    width: 14px;
    height: 14px;
}

.year-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
    display: none;
    min-width: 100px;
}

.year-dropdown.open {
    display: block;
}

.year-dropdown-item {
    padding: 0.6rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.year-dropdown-item:hover {
    background: var(--color-bg-secondary);
}

.year-dropdown-item:first-child {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.year-dropdown-item:last-child {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

/* Desktop layout */
@media (min-width: 768px) {
    .search-row {
        flex-direction: row;
        align-items: stretch;
    }

    .search-container {
        flex: 1;
        margin-right: var(--spacing-md);
    }

    .year-tabs {
        flex-shrink: 0;
    }

    .year-tab {
        padding: 0.9rem 1.5rem;
    }
}

/* Search Bar */

.search-input {
    width: 100%;
    padding: 0.9rem 1.2rem 0.9rem 3rem;
    font-size: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 9999px;
    background-color: var(--color-bg-secondary);
    color: var(--color-text-primary);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    font-family: inherit;
}

.search-input:focus {
    outline: none;
    border-color: #711517;
    box-shadow: 0 0 0 3px rgba(113, 21, 23, 0.1);
}

.search-input::placeholder {
    color: var(--color-text-secondary);
}

.search-wrapper {
    position: relative;
    display: block;
    width: 100%;
}

.search-wrapper::before {
    content: '';
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23666666'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'%3E%3C/path%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.no-results {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--color-text-secondary);
    font-size: 1.1rem;
    display: none;
}

.no-results.visible {
    display: block;
}

/* Players Table Container */
.players-table-container {
    overflow-x: auto;
    margin-top: var(--spacing-md);
}

/* Players Table - Benchmark Style */
.players-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.players-table thead {
    background: var(--color-text-primary);
}

.players-table th {
    color: var(--color-bg-primary);
    padding: 1.2rem 1rem;
    text-align: left;
    font-size: 0.85rem;
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.players-table td {
    padding: 1.2rem 1rem;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-primary);
    font-weight: var(--font-weight-medium);
}

.players-table tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.players-table tbody tr:last-child td {
    border-bottom: none;
}

.players-table td:first-child {
    font-weight: 600;
}

/* Gender/Category Badges */
.gender-badge {
    display: inline-block;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    text-align: center;
    line-height: 28px;
    font-size: 0.8rem;
    font-weight: bold;
}

.gender-mixed {
    background-color: var(--color-text-primary);
    color: var(--color-bg-primary);
}

.gender-female {
    background-color: var(--color-accent-alt);
    color: #000000;
}

/* Nationality */
.nationality {
    font-weight: 600;
    color: var(--color-text-primary);
    padding: 0.25rem 0.5rem;
    background-color: var(--color-bg-tertiary);
    border-radius: 4px;
    font-size: 0.85rem;
}

.nationality-na {
    font-weight: 400;
    color: #aaa;
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
    font-style: italic;
}

/* Handicap */
.handicap {
    font-weight: 700;
    color: var(--color-text-primary);
    font-size: 1.1rem;
}

/* Club */
.club-name {
    color: var(--color-text-secondary);
    font-weight: 500;
}

/* Club name link */
.club-name-link {
    color: var(--color-text-secondary);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.club-name-link:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

.club-unaffiliated {
    color: #999;
    font-style: italic;
}

/* Club logo link */
td a:has(.club-logo) {
    display: block;
    transition: transform 0.2s ease;
}

td a:has(.club-logo):hover {
    transform: scale(1.1);
}

/* Club logo in table */
.club-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    border-radius: 50%;
}

.national-team {
    color: var(--color-accent-alt);
    font-weight: 700;
    font-size: 0.85rem;
}

/* Sortable columns */
.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background-color 0.2s ease;
}

@media (hover: hover) {
    .sortable:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }
}

.sortable::after {
    content: '⇅';
    margin-left: 0.5rem;
    opacity: 0.5;
    font-size: 0.9rem;
}

.sortable.sorted-asc::after {
    content: '↑';
    opacity: 1;
    color: var(--color-accent-alt);
}

.sortable.sorted-desc::after {
    content: '↓';
    opacity: 1;
    color: var(--color-accent-alt);
}

/* Contact Button */
.contact-button-container {
    display: flex;
    justify-content: flex-end;
    margin: var(--spacing-lg) 0;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background-color: #711517;
    color: var(--color-bg-primary);
    text-decoration: none;
    padding: 0.9rem 1.2rem 0.9rem 1.8rem;
    border-radius: 9999px;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.contact-btn::after {
    content: '';
    width: 40px;
    height: 40px;
    background-color: var(--color-bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23711517' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E");
    background-size: 50%;
    background-repeat: no-repeat;
    background-position: center;
}

.contact-btn:hover {
    background-color: var(--color-text-primary);
    color: var(--color-bg-primary);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.contact-btn:hover::after {
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .search-row {
        margin-bottom: 0.25rem;
    }

    .players-table-container {
        margin-top: 0.25rem;
    }

    .content-fullwidth {
        margin-bottom: 0;
    }

    .players-table {
        font-size: 0.75rem;
    }

    .players-table th,
    .players-table td {
        padding: 0.6rem 0.4rem;
    }

    .players-table th {
        font-size: 0.65rem;
    }

    .club-logo {
        width: 24px;
        height: 24px;
    }

    .nationality {
        font-size: 0.7rem;
        padding: 0.15rem 0.3rem;
    }

    .handicap {
        font-size: 0.9rem;
    }

    .club-name,
    .club-name-link {
        font-size: 0.7rem;
    }

    .national-team {
        font-size: 0.65rem;
    }
}

/* Even smaller screens - keep horizontal but more compact */
@media (max-width: 480px) {
    .players-table {
        font-size: 0.65rem;
    }

    .players-table th,
    .players-table td {
        padding: 0.5rem 0.25rem;
    }

    .players-table th {
        font-size: 0.55rem;
        letter-spacing: 0.02em;
    }

    .club-logo {
        width: 20px;
        height: 20px;
    }

    .nationality {
        font-size: 0.6rem;
        padding: 0.1rem 0.2rem;
    }

    .handicap {
        font-size: 0.8rem;
    }

    .club-name,
    .club-name-link {
        font-size: 0.6rem;
    }

    .national-team {
        font-size: 0.55rem;
    }
}
