/* Training Providers page: neutral surfaces, GLMIS green for actions only. */

:root {
    --tp-primary: #0d8e45;
    --tp-primary-dark: #056b33;
    --tp-primary-light: #eff9f2;
    --tp-text: #1f2d3d;
    --tp-muted: #6b7785;
    --tp-border: #e3e8ee;
    --tp-radius: 14px;
}

.tp-page {
    background: #f6f8f7;
    min-height: 100vh;
    padding: 1.5rem 0 3rem;
}

.tp-container {
    max-width: 1140px;
}

/* Header */
.tp-title {
    color: var(--tp-text);
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 700;
    margin: 0 0 0.25rem;
}
.tp-subtitle {
    color: var(--tp-muted);
    margin: 0 0 1.25rem;
}

/* Search */
.tp-search {
    display: flex;
    gap: 0.6rem;
    background: #fff;
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius);
    padding: 0.8rem;
    margin-bottom: 1.5rem;
}
.tp-search-field {
    position: relative;
    flex: 1;
    min-width: 0;
}
.tp-search-field > i {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--tp-muted);
    font-size: 1.1rem;
    pointer-events: none;
}
.tp-search-input {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--tp-border);
    border-radius: 10px;
    padding: 0.6rem 0.9rem 0.6rem 2.5rem;
    font-size: 0.95rem;
}
.tp-search-input:focus {
    border-color: #9aa5b1;
    box-shadow: 0 0 0 0.2rem rgba(107, 119, 133, 0.15);
    outline: none;
}
.tp-search-btn {
    background: var(--tp-primary);
    border: 1px solid var(--tp-primary);
    color: #fff;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.6rem 1.4rem;
    white-space: nowrap;
    transition: background 0.2s ease;
}
.tp-search-btn:hover {
    background: var(--tp-primary-dark);
    border-color: var(--tp-primary-dark);
}

/* Provider grid */
.tp-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 768px) {
    .tp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.tp-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius);
    padding: 1.2rem 1.25rem 1rem;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.tp-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--tp-primary);
    transform: scaleY(0);
    transition: transform 0.25s ease;
}
.tp-card:hover {
    transform: translateY(-2px);
    border-color: #cfe3d7;
    box-shadow: 0 10px 24px rgba(31, 45, 61, 0.08);
}
.tp-card:hover::before {
    transform: scaleY(1);
}

.tp-card-top {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
}
.tp-avatar {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--tp-primary-light);
    color: var(--tp-primary-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.05rem;
}
.tp-card-info {
    min-width: 0;
}
.tp-name {
    color: var(--tp-text);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 0.25rem;
    word-break: break-word;
}
.tp-location {
    color: var(--tp-muted);
    font-size: 0.9rem;
    margin: 0;
}
.tp-location i {
    color: var(--tp-primary);
    margin-right: 0.25rem;
}

.tp-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.9rem;
}
.tp-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
}
.tp-badge-accreditation {
    background: var(--tp-primary-light);
    color: var(--tp-primary-dark);
}
.tp-badge-category {
    background: #f1f3f5;
    color: #4b5563;
}

.tp-card-footer {
    margin-top: auto;
    padding-top: 0.9rem;
    margin-top: 1rem;
    border-top: 1px solid #eef1f4;
    display: flex;
    justify-content: flex-end;
}
.tp-programmes-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--tp-primary-dark);
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
}
.tp-programmes-link i {
    transition: transform 0.2s ease;
}
.tp-programmes-link:hover {
    color: var(--tp-primary);
}
.tp-programmes-link:hover i {
    transform: translateX(3px);
}

/* Empty state */
.tp-empty {
    background: #fff;
    border: 1px dashed #b7d9c4;
    border-radius: var(--tp-radius);
    padding: 2.5rem 1rem;
    text-align: center;
}
.tp-empty > i {
    font-size: 3rem;
    color: var(--tp-primary);
}
.tp-empty h2 {
    color: var(--tp-text);
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0.75rem 0 0.3rem;
}
.tp-empty p {
    color: var(--tp-muted);
    margin-bottom: 0.9rem;
}
.tp-clear {
    color: var(--tp-primary-dark);
    font-weight: 600;
}

/* Programmes page */
.tp-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--tp-muted);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 1rem;
}
.tp-back:hover {
    color: var(--tp-primary-dark);
}
.tp-grid-single {
    grid-template-columns: 1fr !important;
}
.tp-grid-single .tp-card {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
}
.tp-grid-single .tp-card-top {
    flex: 1;
    min-width: 0;
}
.tp-grid-single .tp-badges {
    margin-top: 0;
}
.tp-avatar i {
    font-size: 1.3rem;
}

/* Pagination */
.tp-pagination {
    margin-top: 1.75rem;
}
.tp-pagination .pagination {
    flex-wrap: wrap;
    justify-content: center;
}
.tp-pagination .page-link {
    color: var(--tp-text);
    border-radius: 8px;
    margin: 0 2px;
    border-color: var(--tp-border);
}
.tp-pagination .page-item.active .page-link {
    background: var(--tp-text);
    border-color: var(--tp-text);
    color: #fff;
}

/* Phone */
@media (max-width: 576px) {
    .tp-search {
        flex-direction: column;
        padding: 0.7rem;
    }
    .tp-search-input {
        font-size: 16px;
    }
    .tp-search-btn {
        width: 100%;
    }
}
