/* 공개 지원사업 조회 페이지 */

.funding-page {
    background: #f7f9fd;
}

.funding-page .site-nav a[aria-current="page"] {
    color: var(--blue);
}

.funding-page .site-nav a[aria-current="page"]::after {
    right: 0;
}

.funding-hero {
    position: relative;
    overflow: hidden;
    padding: 102px 0 126px;
    background:
        radial-gradient(circle at 78% 22%, rgba(47, 109, 255, .17), transparent 27%),
        radial-gradient(circle at 8% 92%, rgba(255, 216, 77, .14), transparent 26%),
        linear-gradient(180deg, #fff 0%, #f7f9ff 100%);
}

.funding-hero-grid {
    position: absolute;
    inset: 0;
    opacity: .5;
    background-image:
        linear-gradient(#e9edf6 1px, transparent 1px),
        linear-gradient(90deg, #e9edf6 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(to bottom, #000, transparent 92%);
}

.funding-hero-inner {
    position: relative;
    width: min(1120px, calc(100% - 48px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 70px;
    align-items: end;
}

.funding-eyebrow,
.funding-search-heading p,
.funding-results-head > div > p,
.funding-next-copy > p {
    margin: 0 0 18px;
    color: var(--blue);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .14em;
}

.funding-eyebrow span {
    display: inline-block;
    width: 22px;
    height: 3px;
    margin: 0 9px 3px 0;
    border-radius: 3px;
    background: var(--yellow);
}

.funding-hero h1 {
    margin: 0;
    font-size: clamp(46px, 5.1vw, 70px);
    line-height: 1.17;
    letter-spacing: -.06em;
}

.funding-hero h1 strong {
    color: var(--blue);
    font-weight: inherit;
}

.funding-hero-copy > p:last-child {
    margin: 30px 0 0;
    color: var(--text);
    font-size: 17px;
    line-height: 1.8;
}

.funding-hero-summary {
    display: grid;
    gap: 10px;
    width: 245px;
}

.funding-hero-summary span {
    display: grid;
    grid-template-columns: 38px 1fr;
    align-items: center;
    min-height: 54px;
    padding: 0 17px;
    border: 1px solid rgba(220, 227, 241, .9);
    border-radius: 13px;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 10px 28px rgba(37, 61, 118, .06);
    backdrop-filter: blur(12px);
}

.funding-hero-summary b {
    color: var(--blue);
    font-size: 11px;
}

.funding-hero-summary i {
    color: #4e596e;
    font-size: 13px;
    font-style: normal;
    font-weight: 750;
}

.funding-explorer {
    width: min(1120px, calc(100% - 48px));
    margin: -54px auto 0;
    padding-bottom: 112px;
}

.funding-search-panel {
    position: relative;
    z-index: 2;
    padding: 32px 34px 30px;
    border: 1px solid #e4e9f3;
    border-radius: 22px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 24px 60px rgba(37, 61, 118, .12);
}

.funding-search-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 23px;
}

.funding-search-heading p,
.funding-results-head > div > p {
    margin-bottom: 7px;
}

.funding-search-heading h2,
.funding-results-head h2 {
    margin: 0;
    font-size: 26px;
    letter-spacing: -.035em;
}

.funding-search-heading > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #687388;
    font-size: 11px;
    font-weight: 700;
}

.funding-search-heading > span i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #36b879;
    box-shadow: 0 0 0 4px rgba(54, 184, 121, .12);
}

.funding-search-form label {
    position: absolute;
    overflow: hidden;
    width: 1px;
    height: 1px;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.funding-search-field {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    align-items: center;
    min-height: 58px;
    padding: 5px 5px 5px 18px;
    border: 1px solid #dfe5f0;
    border-radius: 14px;
    background: #fbfcff;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.funding-search-field:focus-within {
    border-color: #9bb8ff;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(47, 109, 255, .1);
}

.funding-search-field > span {
    color: var(--blue);
    font-size: 24px;
    line-height: 1;
}

.funding-search-field input {
    min-width: 0;
    height: 46px;
    padding: 0 13px;
    border: 0;
    outline: 0;
    color: var(--ink);
    background: transparent;
    font: inherit;
    font-size: 15px;
}

.funding-search-field input::placeholder {
    color: #9aa3b4;
}

.funding-search-field button,
.funding-pagination button,
.funding-state button {
    border: 0;
    cursor: pointer;
    font: inherit;
}

.funding-search-field button {
    min-width: 94px;
    height: 46px;
    padding: 0 20px;
    border-radius: 10px;
    color: #fff;
    background: var(--blue);
    font-size: 13px;
    font-weight: 800;
    transition: transform .18s ease, background .18s ease;
}

.funding-search-field button:hover {
    background: var(--blue-dark);
    transform: translateY(-1px);
}

.funding-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.funding-categories button {
    min-height: 36px;
    padding: 0 13px;
    border: 1px solid #e3e7ef;
    border-radius: 999px;
    color: #606a7c;
    background: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 720;
    transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}

.funding-categories button:hover {
    border-color: #cbd9fb;
    color: var(--blue);
    transform: translateY(-1px);
}

.funding-categories button.active {
    border-color: #d5e2ff;
    color: var(--blue);
    background: var(--blue-soft);
}

.funding-categories button:focus-visible,
.funding-search-field button:focus-visible,
.funding-pagination button:focus-visible,
.funding-state button:focus-visible {
    outline: 3px solid rgba(47, 109, 255, .22);
    outline-offset: 3px;
}

.funding-results-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin: 72px 0 25px;
}

.funding-results-head h2 span {
    margin-left: 4px;
    color: var(--blue);
    font-size: 15px;
    vertical-align: 3px;
}

.funding-result-note {
    margin: 0;
    color: #7a8497;
    font-size: 12px;
}

.funding-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 17px;
}

.funding-card {
    position: relative;
    min-width: 0;
    min-height: 292px;
    padding: 25px 24px 22px;
    display: flex;
    flex-direction: column;
    border: 1px solid #e3e8f1;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 26px rgba(37, 61, 118, .045);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.funding-card:hover {
    border-color: #d4dff3;
    box-shadow: 0 17px 38px rgba(37, 61, 118, .09);
    transform: translateY(-3px);
}

.funding-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.funding-card-category,
.funding-card-deadline {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 0 9px;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 800;
}

.funding-card-category {
    color: var(--blue);
    background: var(--blue-soft);
}

.funding-card-deadline {
    color: #d95a49;
    background: #fff0ed;
}

.funding-card-deadline.is-urgent {
    color: #c13a28;
    background: #ffe8e4;
}

.funding-card h3 {
    margin: 19px 0 13px;
    min-height: 3.2em;
    overflow: hidden;
    font-size: 18px;
    line-height: 1.55;
    letter-spacing: -.025em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.funding-card dl {
    display: grid;
    gap: 9px;
    margin: 0 0 20px;
}

.funding-card dl > div {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 9px;
    min-width: 0;
}

.funding-card dt,
.funding-card dd {
    margin: 0;
    font-size: 11px;
    line-height: 1.5;
}

.funding-card dt {
    color: #9aa2b1;
}

.funding-card dd {
    overflow: hidden;
    color: #5f687a;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.funding-card-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 17px;
    border-top: 1px solid #edf0f5;
    color: #344054;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.funding-card-link span {
    color: var(--blue);
    font-size: 16px;
    transition: transform .18s ease;
}

.funding-card-link:hover {
    color: var(--blue);
}

.funding-card-link:hover span {
    transform: translateX(3px);
}

.funding-skeleton {
    min-height: 292px;
    padding: 25px;
    border: 1px solid #e8ebf2;
    border-radius: 18px;
    background: #fff;
}

.funding-skeleton > * {
    display: block;
    border-radius: 6px;
    background: linear-gradient(90deg, #f0f2f6 25%, #f7f8fa 40%, #f0f2f6 65%);
    background-size: 400% 100%;
    animation: funding-shimmer 1.35s ease infinite;
}

.funding-skeleton i { width: 62px; height: 27px; }
.funding-skeleton b { width: 92%; height: 48px; margin-top: 22px; }
.funding-skeleton span { width: 76%; height: 12px; margin-top: 19px; }
.funding-skeleton span:last-child { width: 58%; margin-top: 12px; }

@keyframes funding-shimmer {
    from { background-position: 100% 0; }
    to { background-position: 0 0; }
}

.funding-state {
    grid-column: 1 / -1;
    min-height: 270px;
    padding: 60px 24px;
    display: grid;
    place-items: center;
    align-content: center;
    border: 1px dashed #d8deea;
    border-radius: 18px;
    background: rgba(255, 255, 255, .7);
    text-align: center;
}

.funding-state > span {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 17px;
    border-radius: 15px;
    color: var(--blue);
    background: var(--blue-soft);
    font-size: 23px;
}

.funding-state strong {
    font-size: 17px;
}

.funding-state p {
    margin: 9px 0 0;
    color: #758095;
    font-size: 13px;
    line-height: 1.65;
}

.funding-state button {
    margin-top: 20px;
    min-height: 39px;
    padding: 0 16px;
    border-radius: 9px;
    color: #fff;
    background: var(--blue);
    font-size: 12px;
    font-weight: 800;
}

.funding-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 19px;
    margin-top: 34px;
}

.funding-pagination[hidden] {
    display: none;
}

.funding-pagination button {
    min-width: 82px;
    min-height: 39px;
    padding: 0 14px;
    border: 1px solid #dfe4ee;
    border-radius: 10px;
    color: #4f596d;
    background: #fff;
    font-size: 12px;
    font-weight: 750;
}

.funding-pagination button:hover:not(:disabled) {
    border-color: #b8cafa;
    color: var(--blue);
}

.funding-pagination button:disabled {
    opacity: .38;
    cursor: default;
}

.funding-pagination > span {
    min-width: 60px;
    color: #6f798c;
    font-size: 12px;
    font-weight: 750;
    text-align: center;
}

.funding-source,
.funding-noscript {
    margin: 27px 0 0;
    color: #8a93a4;
    font-size: 11px;
    line-height: 1.6;
    text-align: center;
}

.funding-noscript {
    padding: 15px;
    border-radius: 10px;
    background: #fff3d1;
    color: #755900;
}

.funding-next-step {
    width: min(1120px, calc(100% - 48px));
    margin: 0 auto 112px;
    padding: 50px 54px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 44px;
    overflow: hidden;
    border-radius: 24px;
    color: #fff;
    background:
        radial-gradient(circle at 100% 0, rgba(255, 216, 77, .19), transparent 30%),
        linear-gradient(120deg, #1f57df, #3975f4 60%, #6a6be7);
    box-shadow: 0 25px 60px rgba(34, 88, 220, .22);
}

.funding-next-copy > p {
    color: rgba(255, 255, 255, .65);
    margin-bottom: 10px;
}

.funding-next-copy h2 {
    margin: 0;
    font-size: clamp(27px, 3.3vw, 40px);
    line-height: 1.35;
    letter-spacing: -.045em;
}

.funding-next-copy > span {
    display: block;
    margin-top: 17px;
    color: rgba(255, 255, 255, .72);
    font-size: 13px;
    line-height: 1.7;
}

.funding-next-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.funding-primary {
    min-width: 184px;
    color: var(--blue-dark);
    background: #fff;
    box-shadow: 0 12px 28px rgba(16, 50, 130, .23);
}

.funding-next-actions > a:last-child {
    color: rgba(255, 255, 255, .78);
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
}

.funding-next-actions > a:last-child:hover {
    color: #fff;
}

@media (max-width: 900px) {
    .funding-hero-inner { grid-template-columns: 1fr; gap: 40px; }
    .funding-hero-summary { width: 100%; grid-template-columns: repeat(3, 1fr); }
    .funding-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .funding-next-step { grid-template-columns: 1fr; text-align: center; }
}

@media (max-width: 800px) {
    .funding-hero { padding: 78px 0 112px; }
}

@media (max-width: 620px) {
    .funding-hero-inner,
    .funding-explorer,
    .funding-next-step { width: calc(100% - 32px); }
    .funding-hero { padding: 64px 0 95px; }
    .funding-hero h1 { font-size: 40px; }
    .funding-hero-copy > p:last-child { font-size: 15px; }
    .funding-hero-summary { grid-template-columns: 1fr; gap: 7px; }
    .funding-hero-summary span { min-height: 48px; }
    .funding-explorer { margin-top: -40px; padding-bottom: 82px; }
    .funding-search-panel { padding: 25px 20px 22px; border-radius: 17px; }
    .funding-search-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
    .funding-search-field { grid-template-columns: 25px 1fr; padding-right: 6px; }
    .funding-search-field button { grid-column: 1 / -1; width: 100%; margin: 1px 0 1px; }
    .funding-search-field input { padding-right: 4px; }
    .funding-categories { flex-wrap: nowrap; overflow-x: auto; margin-right: -20px; padding: 0 20px 6px 0; scrollbar-width: none; }
    .funding-categories::-webkit-scrollbar { display: none; }
    .funding-categories button { flex: 0 0 auto; }
    .funding-results-head { align-items: flex-start; flex-direction: column; gap: 11px; margin-top: 55px; }
    .funding-card-grid { grid-template-columns: 1fr; }
    .funding-card { min-height: 275px; }
    .funding-skeleton { min-height: 275px; }
    .funding-next-step { margin-bottom: 82px; padding: 41px 25px; border-radius: 19px; }
    .funding-next-actions { width: 100%; }
    .funding-primary { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .funding-skeleton > * { animation: none; }
}
