body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    background: #f4f6f9;
    color: #333;
}

header {
    text-align: center;
    padding: 40px;
    background: #2c3e50;
    color: white;
}

h1 {
    margin: 0;
}

h2 {
    margin: 40px 0 20px 0;
    text-align: center;
}

.persona-selection {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 40px;
}

.persona-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
    margin: 0 auto;
    /* centers the card inside its column */
}

.persona-card:hover {
    transform: translateY(-5px);
}

.persona-card img {
    width: 60%;
    border-radius: 50%;
    margin-bottom: 10px;
}

/* Pipeline / matrix layout */
#pipelineSection {
    padding: 30px 20px;
}

#pipeline {
    padding-bottom: 10px;
}

/* Table styling */
.matrix-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.matrix-table th,
.matrix-table td {
    text-align: center;
    vertical-align: middle;
    font-size: 0.9rem;
    padding: 8px 10px;
}

.matrix-table thead th {
    background: #f0f3f7;
    font-weight: 600;
    white-space: nowrap;
}

.matrix-table tbody th {
    text-align: left;
    background: #f8fafc;
    font-weight: 600;
    white-space: nowrap;
}

.matrix-empty {
    background: #fdfdfd;
}

/* Reuse your existing badge colors */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    margin: 0;
    color: white;
}

.basics {
    background: #27ae60;
}

.advanced {
    background: #e67e22;
}

.standard {
    display: block;
    font-size: 12px;
    margin-bottom: 5px;
}

#trainingContainer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    padding: 40px;
}

.training-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.training-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.training-title {
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.training-standard {
    font-size: 11px;
    margin-bottom: 8px;
    color: #666;
}

.training-card p {
    flex-grow: 1;
    margin-bottom: 12px;
    font-size: 14px;
}

.training-card a {
    color: #3498db;
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
}

.training-card a:hover {
    color: #2980b9;
}

#pipeline::-webkit-scrollbar {
    height: 8px;
}

#pipeline::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 10px;
}

.accordion-body {
    padding: 1.25rem 1.25rem;
}

.accordion-body .training-card:last-child {
    margin-bottom: 0;
}

/* Equal height cards + tight spacing */
.accordion-item {
    border: none;
    margin-bottom: 8px;
    /* Reduced from default ~16px */
}

.accordion-item:first-child {
    margin-top: 0;
}

.accordion-button {
    font-weight: 600;
    font-size: 1.1rem;
    padding: 12px 20px;
    /* Tighten button padding */
}

.accordion-button:not(.collapsed) {
    background: #f8f9fa;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .125);
}

.accordion-body {
    padding: 16px 20px;
    /* Tighten body padding */
    background: #fafbfc;
}

/* Perfect equal height cards */
.accordion-body .row {
    margin: -6px;
    /* Negative margin to tighten */
}

.accordion-body .col-md-4 {
    padding: 6px !important;
    /* Tight grid spacing */
}

/* Ensure cards are exactly equal */
.training-card {
    height: 100%;
    min-height: 180px;
    /* Fixed minimum for consistency */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px;
    /* Slightly tighter */
}

.training-card .training-standard {
    order: 1;
    margin-bottom: 6px;
}

.training-card .training-title {
    order: 2;
    margin-bottom: 8px;
    flex-grow: 0;
}

.training-card p {
    order: 3;
    margin-bottom: 12px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.training-card a {
    order: 4;
    margin-top: auto;
}

/* Perfectly centered cards - works for 1, 2, 3+ cards */
#trainingAccordion .row {
    justify-content: center;
}

#trainingAccordion .col-md-4 {
    max-width: 300px;
    /* Fixed width prevents stretching */
    flex: 0 0 auto;
    /* Don't grow/shrink */
}

/* Responsive behavior */
@media (max-width: 768px) {
    #trainingAccordion .col-md-4 {
        max-width: 100%;
        flex: 0 0 280px;
    }
}