/* Coach Profile Header */
.coach-profile-header {
    background: linear-gradient(135deg, #1a6b2a 0%, #2d8f3e 50%, #1a6b2a 100%);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 24px;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.coach-header-content {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 20px;
}

.coach-profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    background-color: #f0f0f0;
}

.coach-header-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.coach-profile-name {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.coach-profile-role {
    font-size: 0.95rem;
    opacity: 0.85;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.coach-profile-nationality {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Summary Badges */
.coach-summary-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.coach-badge {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 12px 18px;
    text-align: center;
    min-width: 80px;
    backdrop-filter: blur(4px);
}

.coach-badge-win {
    background: rgba(40, 167, 69, 0.3);
}

.coach-badge-draw {
    background: rgba(255, 193, 7, 0.25);
}

.coach-badge-loss {
    background: rgba(220, 53, 69, 0.25);
}

.badge-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.badge-label {
    display: block;
    font-size: 0.75rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Career Section */
.coach-career-section {
    margin-bottom: 24px;
}

.coach-section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #1a6b2a;
}

/* Team Cards */
.coach-team-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 16px;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.coach-team-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 14px 18px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    gap: 10px;
}

.coach-team-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    transition: color 0.2s;
}

.coach-team-link:hover {
    color: #1a6b2a;
}

.coach-team-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.coach-team-name {
    font-size: 1.1rem;
    font-weight: 600;
}

.coach-team-summary {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.team-stat {
    font-size: 0.82rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.06);
    color: #555;
}

.team-stat-win {
    background: rgba(40, 167, 69, 0.15);
    color: #1a6b2a;
}

.team-stat-draw {
    background: rgba(255, 193, 7, 0.2);
    color: #856404;
}

.team-stat-loss {
    background: rgba(220, 53, 69, 0.15);
    color: #a71d2a;
}

/* Stats Table */
.coach-stats-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.coach-stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.coach-stats-table thead {
    background: #f8f9fa;
}

.coach-stats-table th {
    padding: 10px 12px;
    text-align: center;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #dee2e6;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.coach-stats-table th:first-child,
.coach-stats-table td:first-child {
    text-align: left;
    padding-left: 18px;
}

.coach-stats-table th:nth-child(2),
.coach-stats-table td:nth-child(2) {
    text-align: left;
}

.coach-stats-table td {
    padding: 10px 12px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    color: #444;
}

.coach-stats-table tbody tr:hover {
    background: #f8f9fa;
}

.coach-stats-table tbody tr:last-child td {
    border-bottom: none;
}

.stat-win {
    color: #28a745;
    font-weight: 600;
}

.stat-draw {
    color: #ffc107;
    font-weight: 600;
}

.stat-loss {
    color: #dc3545;
    font-weight: 600;
}

.stat-winpct {
    color: #0d6efd;
    font-weight: 600;
}

.stat-ppg {
    color: #6f42c1;
    font-weight: 600;
}

.season-total-row {
    background: #f0f4f0;
    border-top: 2px solid #dee2e6;
}

.season-total-row td {
    font-weight: 600;
}

.team-stat-winpct {
    background: rgba(13, 110, 253, 0.12);
    color: #0d6efd;
}

.team-stat-ppg {
    background: rgba(111, 66, 193, 0.12);
    color: #6f42c1;
}

/* Team Coach Card (used on team page) */
.team-coach-card {
    margin-bottom: 16px;
}

.team-coach-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border: 1px solid #e9ecef;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.team-coach-link:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #1a6b2a;
    color: #333;
}

.team-coach-photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #dee2e6;
    background-color: #f0f0f0;
}

.team-coach-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.team-coach-role {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.team-coach-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: #333;
}

/* Coach Link in Match Details */
.coach-profile-link {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

.coach-profile-link:hover {
    color: #1a6b2a;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .coach-profile-header {
        padding: 20px 16px;
    }

    .coach-header-content {
        gap: 16px;
    }

    .coach-profile-photo {
        width: 80px;
        height: 80px;
        border-width: 3px;
    }

    .coach-profile-name {
        font-size: 1.3rem;
    }

    .coach-profile-role {
        font-size: 0.85rem;
    }

    .coach-summary-badges {
        gap: 8px;
    }

    .coach-badge {
        padding: 8px 12px;
        min-width: 60px;
    }

    .badge-value {
        font-size: 1.2rem;
    }

    .badge-label {
        font-size: 0.68rem;
    }

    .coach-team-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 14px;
    }

    .coach-team-summary {
        width: 100%;
        justify-content: flex-start;
    }

    .coach-stats-table th,
    .coach-stats-table td {
        padding: 8px 6px;
        font-size: 0.78rem;
    }

    .coach-stats-table th:first-child,
    .coach-stats-table td:first-child {
        padding-left: 10px;
    }

    .coach-section-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .coach-header-content {
        flex-direction: column;
        text-align: center;
    }

    .coach-header-info {
        align-items: center;
    }

    .coach-profile-photo {
        width: 90px;
        height: 90px;
    }

    .coach-profile-name {
        font-size: 1.2rem;
    }

    .coach-summary-badges {
        justify-content: center;
    }

    .coach-badge {
        flex: 1 1 calc(33% - 8px);
        min-width: 0;
        padding: 8px 6px;
    }

    .team-coach-photo {
        width: 44px;
        height: 44px;
    }
}
