.option-grid {
    display: grid;
    gap: 15px;
    width: 100%;
}

.overflow-y-auto {
    overflow-y: auto !important;
}

.two-columns {
    grid-template-columns: repeat(2, 1fr);
}

.three-columns {
    grid-template-columns: repeat(3, 1fr);
}

.four-columns {
    grid-template-columns: repeat(4, 1fr);
}

.five-columns {
    grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 768px) {
    .two-columns,
    .four-columns,
    .five-columns {
        grid-template-columns: 1fr !important;
    }
}

.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    background: #e1f0ff;
    color: #3699ff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tag-close {
    cursor: pointer;
    font-weight: bold;
}

/* Added by SP Start */

.form-group label {
    color: #64748b !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 24px;
    }

    .page-header p {
        font-size: 14px;
    }
}

#course-finder-filter-wizard.card {
    border-radius: 16px;
    overflow: hidden;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.wizard-nav {
    background-color: #f0f9ff;
    border-bottom: 1px solid #e2e8f0;
}

.wizard.wizard-1 .wizard-steps {
    display: flex;
    align-items: center;
    position: relative;
}

.wizard.wizard-1 .wizard-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    cursor: default;
}

.wizard.wizard-1 .wizard-step .wizard-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.wizard.wizard-1 .wizard-step .wizard-icon-custom {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ffffff;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    font-style: normal;
    border: 2px solid #e2e8f0;
}

.wizard.wizard-1 .wizard-step .wizard-icon-custom:before {
    content: none !important;
}

.wizard.wizard-1 .wizard-step .wizard-title {
    font-size: 14px;
    font-weight: 500;
    color: #64748b !important;
    margin: 0;
    text-align: center;
    transition: all 0.3s ease;
}

.wizard.wizard-1 .wizard-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(26px);
    width: calc(100% - 26px);
    height: 2px;
    background: #e2e8f0;
    z-index: 1;
    transition: all 0.3s ease;
}

.wizard.wizard-1 .wizard-step[data-wizard-state="current"] .wizard-icon-custom {
    background: #0891b2;
    color: #ffffff;
    border-color: #0891b2;
    box-shadow: 0 0 0 4px #e0f2fe;
}

.wizard.wizard-1 .wizard-step[data-wizard-state="current"] .wizard-title {
    color: #0284c7 !important;
    font-weight: 600;
}

.wizard.wizard-1 .wizard-step[data-wizard-state="done"] .wizard-icon-custom {
    background: #10b981;
    color: #ffffff;
    border-color: #10b981;
}

.wizard.wizard-1 .wizard-step[data-wizard-state="done"] .wizard-title {
    color: #64748b !important;
    font-weight: 500;
}

.wizard.wizard-1 .wizard-step[data-wizard-state="done"]::after {
    background: #10b981;
}

.wizard.wizard-1 .wizard-arrow {
    display: none !important;
}

.wizard.wizard-1 .wizard-step:hover {
    cursor: default;
}

@media (max-width: 768px) {
    .wizard-nav {
        display: none;
    }
}

.action-prev,
.action-next,
.action-submit {
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2);
    border: none;
    border-radius: 14px;
}

.action-next,
.action-submit {
    background-color: #0284c7 !important;
}

.action-prev {
    background: white !important;
    color: #64748b !important;
    border: 1px solid #e2e8f0 !important;
}

.action-prev:hover {
    color: #000000 !important;
}

.action-next:hover,
.action-submit:hover {
    background-color: #0c4a6e !important;
}

#course-finder-filter-wizard .option-grid.two-columns,
#course-finder-filter-wizard .option-grid.three-columns,
#course-finder-filter-wizard .option-grid.four-columns,
#course-finder-filter-wizard .option-grid.five-columns {
    grid-template-columns: repeat(2, 1fr) !important;
}

@media (min-width: 769px) {
    #course-finder-filter-wizard .option-grid.two-columns {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    #course-finder-filter-wizard .option-grid.three-columns {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    #course-finder-filter-wizard .option-grid.four-columns {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    #course-finder-filter-wizard .option-grid.five-columns {
        grid-template-columns: repeat(5, 1fr) !important;
    }
}

#course-finder-filter-wizard .option-card {
    border: 2px solid #ebedf3 !important;
    border-radius: 12px !important;
    padding: 20px !important;
    text-align: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-size: 1.3rem;
    font-weight: 600 !important;
    color: #3f4254 !important;
    background: #fff !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 80px !important;
}

#course-finder-filter-wizard .option-card:hover {
    border: 1px solid #0284c7 !important;
    box-shadow: 0 0 0 2px #e2e8f0;
}

#course-finder-filter-wizard .option-card.selected {
    border: 3px solid #0284c7 !important;
    background-color: #e1f0ff !important;
    color: #0c4a6e !important;
    box-shadow: 0 0 0 2px #e2e8f0;
}

.text-custom {
    color: var(--ocean-mid) !important;
}

.course-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--ocean-mid);
}

/* Added by SP End */


/* Course-card rankings — a full-width row BELOW the logo+title pair, so it
   spans the whole tile (including the space under the logo). Flex-wrap means
   items flow 2-per-line on narrow 4-up cards, one line on wide cards, and
   NOTHING can ever be cropped out of the tile — overflow wraps instead. */
.cf-ranks {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 16px;
    row-gap: 4px;
    margin-top: 10px;
    min-width: 0;
}

.cf-ranks .cf-rank {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    white-space: nowrap; /* each pair stays intact; wrapping happens between pairs */
}

/* Title column: allowed to shrink so long course/university names wrap inside
   the tile instead of pushing content out of it. */
.cf-card-title {
    flex: 1 1 auto;
    min-width: 0;
}

/* Course name: show as much as fits in two lines, ellipsis only if it truly
   overflows — adapts to the card width instead of a fixed character cut. Full
   name stays available via the link's title attribute. */
.cf-card-title a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.cf-card-title span {
    overflow-wrap: anywhere;
}

.cf-ranks .cf-rank-src {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #9aa0b3;
}

.cf-ranks .cf-rank-num {
    font-size: 0.8rem;
    font-weight: 700;
    color: #025f7f; /* ocean brand blue — highlights the rank numbers */
    font-variant-numeric: tabular-nums;
}
