/**
 * Research section — sub-navigation, data tables, document cards, overview tiles.
 * Notice list reuses recruitment.css (calendar-style items).
 */

/* Sub-navigation pills */
.research-page .research-subnav {
    margin-bottom: 1.25rem;
}

.research-page .research-subnav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.research-page .research-subnav__link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(12, 63, 145, 0.18);
    border-radius: 999px;
    background: #fff;
    color: var(--knu-blue-dark, #0c3f91);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.research-page .research-subnav__link:hover,
.research-page .research-subnav__link:focus-visible {
    border-color: var(--knu-blue-dark, #0c3f91);
    background: #f1f6ff;
    color: var(--knu-blue-dark, #0c3f91);
}

.research-page .research-subnav__link.is-active {
    border-color: var(--knu-blue-dark, #0c3f91);
    background: var(--knu-blue-dark, #0c3f91);
    color: #fff;
}

/* Content blocks */
.research-page .research-intro {
    margin-bottom: 1.25rem;
}

.research-page .research-block + .research-block {
    margin-top: 1.75rem;
}

.research-page .research-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--knu-muted, #5c6780);
}

.research-page .research-empty i {
    display: block;
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: var(--knu-blue-dark, #0c3f91);
}

.research-page .research-empty p {
    text-align: center;
}

/* Download buttons: keep Bootstrap button colours inside .content-page-body links */
.research-page .content-page-body a.research-download {
    color: var(--bs-btn-color);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    border-radius: 8px;
}

.research-page .content-page-body a.research-download:hover,
.research-page .content-page-body a.research-download:focus-visible {
    color: var(--bs-btn-hover-color);
    text-decoration: none;
}

/* Data tables */
.research-page .research-table {
    font-size: 0.9rem;
    margin-bottom: 0;
}

.research-page .research-table th {
    color: var(--knu-blue-dark, #0c3f91);
    font-weight: 800;
    white-space: nowrap;
}

.research-page .research-table td {
    word-break: break-word;
}

.research-page .research-table__narrow {
    width: 1%;
}

/* Document cards (MoU and similar) */
.research-page .content-page-body ul.research-docs,
.research-page .content-page-body ul.research-cards,
.research-page .content-page-body ul.research-notice-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.research-page .research-docs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.research-page .content-page-body .research-doc {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 1rem;
    margin: 0;
    padding: 1.15rem 1.25rem;
    border: 1px solid rgba(12, 63, 145, 0.12);
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 8px 20px rgba(0, 31, 73, 0.06);
}

.research-page .research-doc__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(160deg, var(--knu-blue-dark, #0c3f91) 0%, #063a78 100%);
    color: var(--knu-gold, #f0b429);
    font-size: 1.4rem;
}

.research-page .research-doc__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    min-width: 0;
}

.research-page .research-doc__title {
    margin: 0;
    color: var(--knu-blue-dark, #0c3f91);
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.45;
}

.research-page .content-page-body .research-doc__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    margin: 0;
    color: var(--knu-muted, #5c6780);
    font-size: 0.88rem;
    font-weight: 600;
    text-align: left;
}

.research-page .content-page-body .research-doc__desc {
    margin: 0;
    line-height: 1.7;
}

/* Overview tiles */
.research-page .research-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.research-page .content-page-body .research-cards li {
    margin: 0;
}

.research-page .content-page-body a.research-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    height: 100%;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(12, 63, 145, 0.14);
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    color: var(--knu-blue-dark, #0c3f91);
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(0, 31, 73, 0.05);
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.research-page .content-page-body a.research-card:hover,
.research-page .content-page-body a.research-card:focus-visible {
    border-color: var(--knu-blue-dark, #0c3f91);
    color: var(--knu-blue-dark, #0c3f91);
    text-decoration: none;
    box-shadow: 0 12px 26px rgba(0, 31, 73, 0.1);
    transform: translateY(-1px);
}

.research-page .research-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--knu-blue-dark, #0c3f91);
    color: var(--knu-gold, #f0b429);
    font-size: 1.15rem;
}

.research-page .research-card__label {
    flex: 1 1 auto;
    font-weight: 800;
    line-height: 1.35;
}

.research-page .research-card__arrow {
    flex-shrink: 0;
    opacity: 0.6;
}

.research-page .content-page-body .research-notice-list > li {
    margin-bottom: 0;
}

@media (max-width: 767.98px) {
    .research-page .research-subnav__list {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.35rem;
        -webkit-overflow-scrolling: touch;
    }

    .research-page .research-subnav__link {
        white-space: nowrap;
        font-size: 0.85rem;
        padding: 0.45rem 0.85rem;
    }

    /* Stack table rows as label/value cards on small screens */
    .research-page .research-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .research-page .research-table,
    .research-page .research-table tbody,
    .research-page .research-table tr,
    .research-page .research-table td {
        display: block;
        width: 100%;
    }

    .research-page .research-table tr {
        margin-bottom: 0.85rem;
        border: 1px solid rgba(12, 63, 145, 0.14);
        border-radius: 10px;
        overflow: hidden;
    }

    .research-page .research-table td {
        display: grid;
        grid-template-columns: minmax(96px, 38%) minmax(0, 1fr);
        gap: 0.65rem;
        border-width: 0 0 1px;
    }

    .research-page .research-table td:last-child {
        border-bottom: 0;
    }

    .research-page .research-table td::before {
        content: attr(data-label);
        color: var(--knu-blue-dark, #0c3f91);
        font-weight: 800;
    }

    .research-page .research-table .research-download {
        justify-self: start;
    }

    .research-page .content-page-body .research-doc {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .research-page .content-page-body a.research-download:not(.btn-sm) {
        width: 100%;
        text-align: center;
        white-space: normal;
    }
}

@media (prefers-reduced-motion: reduce) {
    .research-page .research-subnav__link,
    .research-page .content-page-body a.research-card {
        transition: none;
    }
}
