/*
 * Responsibility: layout and visuals for the nationwide per-field detail page
 * (/kierunek/{slug}/ — src/views/kierunek-detal). Not used by any other route.
 * Mirrors the visual language of the /kierunek/ index (kierunek-index/page.css):
 * light gradient shell, Poppins, one centered content column.
 */

body.kierunek-detal-route {
    font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(180deg, #EAF1FB 0%, #F5F8FC 420px, #F5F8FC 100%);
    /* Fixed header (~91px); without this the route renders underneath it. */
    padding-top: 91px;
    color: #1E293B;
}

@media (max-width: 991px) {
    body.kierunek-detal-route {
        padding-top: 70px;
    }
}

.kierunek-detal {
    padding-bottom: 64px;
}

.kierunek-detal__container {
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
}

/* --- Shared breadcrumb component on a light background ------------------- */

body.kierunek-detal-route .uczelnie-breadcrumb-wrap {
    max-width: 1140px;
    padding-left: 16px;
    padding-right: 16px;
    padding-top: 32px;
    margin: 0 auto;
}

body.kierunek-detal-route .breadcrumb {
    background: transparent !important;
    padding: 0;
    font-size: 15px;
    line-height: 1.4;
    margin-bottom: 4px;
    --bs-breadcrumb-divider: ">";
}

body.kierunek-detal-route .breadcrumb-item a.color-white {
    color: #1D5FCC !important;
    font-weight: 500;
}

body.kierunek-detal-route .breadcrumb-item.active a.color-white {
    color: #334155 !important;
    font-weight: 500;
    pointer-events: none;
}

body.kierunek-detal-route .breadcrumb-item + .breadcrumb-item {
    padding-left: 10px;
}

body.kierunek-detal-route .breadcrumb-item + .breadcrumb-item::before {
    color: #94A3B8;
    padding-right: 10px;
}

/* --- Hero -------------------------------------------------------------- */

.kd-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 260px);
    gap: 32px;
    align-items: center;
    padding: 6px 0 4px;
}

.kd-hero__title {
    font-size: 32px;
    line-height: 1.2;
    font-weight: 700;
    color: #0F172A;
    margin: 0 0 14px;
    text-wrap: balance;
}

.kd-hero__lead {
    font-size: 17px;
    line-height: 1.6;
    color: #475569;
    max-width: 620px;
    margin: 0 0 22px;
}

.kd-hero__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.kd-hero__stat {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 14px 24px 14px 16px;
    background: #FFFFFF;
    border: 1px solid #E8EEF6;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(16, 35, 63, 0.06);
}

.kd-hero__stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #EAF1FB;
    color: #1D5FCC;
    flex: 0 0 auto;
}

.kd-hero__stat-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
}

.kd-hero__stat-value {
    font-size: 22px;
    font-weight: 700;
    color: #10233F;
}

.kd-hero__stat-label {
    font-size: 13px;
    color: #5B6B82;
}

.kd-hero__art {
    color: #1D5FCC;
    justify-self: end;
    width: 100%;
    max-width: 240px;
}

.kd-hero__art svg {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 860px) {
    .kd-hero {
        grid-template-columns: 1fr;
        gap: 18px;
        padding-bottom: 20px;
    }

    .kd-hero__art {
        display: none;
    }

    .kd-hero__title {
        font-size: 25px;
    }
}

/* --- Filter bar ------------------------------------------------------------ */

.kd-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 16px;
    align-items: end;
    margin-top: 24px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 12px 30px -18px rgba(15, 23, 42, 0.25);
}

.kd-filters__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
}

.kd-filters__label {
    font-size: 13px;
    font-weight: 500;
    color: #64748B;
}

.kd-filters__select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 44px;
    padding: 0 38px 0 14px;
    border: 1px solid #CBD5E1;
    border-radius: 10px;
    background-color: #FFFFFF;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    font: inherit;
    font-size: 15px;
    color: #1E293B;
    cursor: pointer;
}

.kd-filters__select:focus {
    outline: 2px solid #1D5FCC;
    outline-offset: 1px;
    border-color: #1D5FCC;
}

.kd-filters__submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 22px;
    border: 0;
    border-radius: 10px;
    background: #1D5FCC;
    color: #FFFFFF;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease;
}

.kd-filters__submit:hover {
    background: #1748A0;
}

@media (max-width: 860px) {
    .kd-filters {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 16px;
    }

    .kd-filters__submit {
        width: 100%;
        justify-content: center;
    }
}

/* --- Tabs -------------------------------------------------------------- */

.kd-tabs {
    display: flex;
    gap: 4px;
    margin: 24px 0 8px;
    border-bottom: 1px solid #E2E8F0;
    overflow-x: auto;
    scrollbar-width: none;
}

.kd-tabs::-webkit-scrollbar {
    display: none;
}

.kd-tabs__tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 500;
    color: #64748B;
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.kd-tabs__icon {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
}

.kd-tabs__tab:hover {
    color: #1E293B;
}

.kd-tabs__tab.is-active {
    color: #1D5FCC;
    border-bottom-color: #1D5FCC;
}

/* --- Tab panels ------------------------------------------------------------ */

.kd-panel[hidden] {
    display: none;
}

/* --- Placeholder panel -------------------------------------------------- */

.kd-placeholder {
    margin-top: 28px;
    text-align: center;
    background: #FFFFFF;
    border: 1px solid #E8EEF6;
    border-radius: 16px;
    padding: 44px 28px;
    box-shadow: 0 6px 20px rgba(16, 35, 63, 0.05);
}

.kd-placeholder__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #EAF1FB;
    color: #1D5FCC;
    margin-bottom: 14px;
}

.kd-placeholder__title {
    font-size: 19px;
    font-weight: 700;
    color: #0F172A;
    margin: 0 0 8px;
}

.kd-placeholder__text {
    max-width: 520px;
    margin: 0 auto;
    font-size: 14px;
    line-height: 1.7;
    color: #64748B;
}

/* --- City strip --------------------------------------------------------- */

.kd-cities {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 22px;
    background: #FFFFFF;
    border: 1px solid #E8EEF6;
    border-radius: 14px;
    padding: 16px 24px;
    margin-top: 24px;
    box-shadow: 0 6px 20px rgba(16, 35, 63, 0.05);
    overflow: hidden;
}

.kd-cities__title {
    font-size: 15px;
    font-weight: 700;
    color: #0F172A;
    margin: 0;
    flex: 0 0 auto;
}

.kd-cities__list {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    align-items: center;
    gap: 22px;
    list-style: none;
    margin: 0;
    padding: 0;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.kd-cities__list::-webkit-scrollbar {
    display: none;
}

.kd-cities__link {
    font-size: 14px;
    font-weight: 500;
    color: #1D5FCC;
    text-decoration: none;
    white-space: nowrap;
}

.kd-cities__link:hover {
    text-decoration: underline;
}

.kd-cities__link.is-active {
    font-weight: 700;
    text-decoration: underline;
}

.kd-cities__count {
    color: #1D5FCC;
    font-weight: 400;
}

.kd-cities__all {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #1D5FCC;
    text-decoration: none;
    white-space: nowrap;
}

.kd-cities__all:hover {
    text-decoration: underline;
}

/* --- University list --------------------------------------------------- */

.kd-unis {
    margin-top: 32px;
}

.kd-unis__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.kd-unis__title {
    font-size: 24px;
    font-weight: 700;
    color: #0F172A;
    margin: 0;
}

.kd-unis__filterbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #475569;
}

.kd-unis__count {
    font-weight: 700;
    color: #10233F;
}

.kd-unis__chip {
    background: #EEF2F7;
    border-radius: 999px;
    padding: 3px 11px;
    font-weight: 600;
    color: #475569;
}

.kd-unis__clear {
    margin-left: auto;
    color: #1D5FCC;
    font-weight: 500;
    text-decoration: none;
}

.kd-unis__clear:hover {
    text-decoration: underline;
}

.kd-unis__sort {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 14px;
    color: #64748B;
}

.kd-unis__sort-select {
    appearance: none;
    -webkit-appearance: none;
    height: 38px;
    padding: 0 34px 0 12px;
    border: 1px solid #CBD5E1;
    border-radius: 9px;
    background-color: #FFFFFF;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    font: inherit;
    font-size: 14px;
    color: #1E293B;
    cursor: pointer;
}

.kd-unis__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.kd-uni {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    background: #FFFFFF;
    border: 1px solid #E8EEF6;
    border-radius: 14px;
    padding: 14px 20px;
    box-shadow: 0 6px 20px rgba(16, 35, 63, 0.05);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.kd-uni:hover {
    border-color: #C7D7F5;
    box-shadow: 0 14px 30px -18px rgba(15, 23, 42, 0.35);
}

.kd-uni__logo {
    position: relative;
    width: 54px;
    height: 54px;
    border-radius: 11px;
    background: #FFFFFF;
    border: 1px solid #E8EEF6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.kd-uni__logo img {
    position: relative;
    z-index: 1;
    max-width: 82%;
    max-height: 82%;
    object-fit: contain;
}

.kd-uni__logo-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 700;
    color: #94A3B8;
}

.kd-uni__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    /* Reserve room for a one-line name + meta + the tuition/threshold row so
       every card is the same height regardless of how much data it carries. */
    min-height: 78px;
}

.kd-uni__name {
    display: block;
    max-width: 100%;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    color: #0F172A;
    text-decoration: none;
    /* Keep the name to one line so card height only depends on the stats row,
       which is reserved above. Full name stays in the title attribute. */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kd-uni__name:hover {
    color: #1D5FCC;
    text-decoration: underline;
}

.kd-uni__meta {
    font-size: 12px;
    color: #64748B;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.kd-uni__badge {
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    background: #EEF2F7;
    border-radius: 999px;
    padding: 2px 9px;
}

.kd-uni__badge--public {
    color: #1E7A46;
    background: #E4F4EA;
}

.kd-uni__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    margin-top: 3px;
    padding-top: 7px;
    border-top: 1px solid #EEF2F7;
}

.kd-uni__stat {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.kd-uni__stat-label {
    font-size: 12px;
    color: #64748B;
}

.kd-uni__stat-value {
    font-size: 12px;
    font-weight: 700;
    color: #10233F;
}

.kd-uni__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    background: #1D5FCC;
    font-size: 13px;
    font-weight: 600;
    color: #FFFFFF;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s ease;
}

.kd-uni__cta:hover {
    background: #1748A0;
    color: #FFFFFF;
}

.kd-unis__empty {
    color: #64748B;
    font-size: 15px;
}

@media (max-width: 720px) {
    .kd-uni {
        grid-template-columns: 52px minmax(0, 1fr);
        grid-template-areas:
            "logo body"
            "cta cta";
        gap: 14px 16px;
        padding: 16px 18px;
    }

    .kd-uni__logo {
        grid-area: logo;
        width: 52px;
        height: 52px;
    }

    .kd-uni__body {
        grid-area: body;
    }

    .kd-uni__stats {
        gap: 4px 18px;
    }

    .kd-uni__cta {
        grid-area: cta;
        justify-self: stretch;
        justify-content: center;
    }
}

/* --- Pagination ------------------------------------------------------------ */

.kd-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 24px;
    justify-content: center;
}

.kd-pagination__link {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #E2E8F0;
    border-radius: 9px;
    background: #FFFFFF;
    font-size: 14px;
    color: #334155;
    text-decoration: none;
}

.kd-pagination__link:hover {
    border-color: #1D5FCC;
    color: #1D5FCC;
}

.kd-pagination__link.is-current {
    background: #1D5FCC;
    border-color: #1D5FCC;
    color: #FFFFFF;
    font-weight: 600;
}

/* --- Progi tab: ranked list ------------------------------------------------ */

.kd-progi-list {
    margin-top: 28px;
}

.kd-progi-list__head {
    margin-bottom: 16px;
}

.kd-progi-list__title {
    font-size: 22px;
    font-weight: 700;
    color: #0F172A;
    margin: 0 0 6px;
}

.kd-progi-list__lead {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #64748B;
    max-width: 640px;
}

.kd-progi-list__group {
    list-style: none;
    margin: 18px 0 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94A3B8;
}

.kd-progi-list__group:first-child {
    margin-top: 0;
}

.kd-progi-list__note {
    margin: 16px 0 0;
    font-size: 13px;
    color: #64748B;
    text-align: center;
}

.kd-progi-card .kd-uni__body {
    min-height: 92px;
}

.kd-progi-card__row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin-top: 4px;
}

.kd-progi-card__pct {
    font-size: 18px;
    font-weight: 800;
    color: #1D5FCC;
    line-height: 1;
}

.kd-progi-card__pct--raw {
    font-size: 15px;
    color: #10233F;
}

.kd-progi-card__detail {
    font-size: 12px;
    color: #64748B;
}

.kd-progi-card__detail--muted {
    color: #94A3B8;
}

.kd-progi-card__bar {
    display: block;
    height: 6px;
    margin-top: 8px;
    border-radius: 999px;
    background: #EEF2F7;
    overflow: hidden;
}

.kd-progi-card__bar > span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #3B82F6, #1D5FCC);
}

.kd-progi-card--tier0 {
    opacity: 0.72;
}

/* --- Description ----------------------------------------------------------- */

.kd-desc {
    margin-top: 36px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 24px 26px;
}

.kd-desc__title {
    font-size: 20px;
    font-weight: 700;
    color: #0F172A;
    margin: 0 0 10px;
}

.kd-desc__text {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: #475569;
}
