/*
 * FINF business detail layout aligned with the main homepage.
 * Scoped to page-business-detail so no other route is affected.
 */
html body.page-business-detail {
    --detail-blue: #1e5eff;
    --detail-blue-dark: #174bd1;
    --detail-ink: #2f343a;
    --detail-muted: #59626e;
    --detail-line: #dbe6f4;
    --detail-surface: #f7faff;
    --detail-gutter: clamp(32px, 6vw, 96px);
    background: #ffffff !important;
    color: var(--detail-ink);
}

html body.page-business-detail .site-header,
html body.page-business-detail .site-footer {
    display: block !important;
}

html body.page-business-detail .site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    height: 70px !important;
    min-height: 70px !important;
    background: rgba(255, 255, 255, 0.96) !important;
    border-bottom: 1px solid #e6eaf0 !important;
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
}

html body.page-business-detail .site-main {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 70px 0 0 !important;
    overflow: visible !important;
}

html body.page-business-detail .business-detail {
    width: min(calc(100% - (2 * var(--detail-gutter))), 1490px);
    margin: 0 auto;
    padding: 68px 0 112px;
    display: grid;
    gap: 0;
    color: var(--detail-ink);
}

html body.page-business-detail .business-detail__back {
    display: inline-flex;
    width: max-content;
    min-height: 38px;
    align-items: center;
    margin: 0 0 30px;
    padding: 8px 14px;
    border: 1px solid var(--detail-line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--detail-blue);
    font-size: 14px;
    line-height: 1.2;
    font-weight: 800;
    transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

html body.page-business-detail .business-detail__back:hover,
html body.page-business-detail .business-detail__back:focus-visible {
    border-color: rgba(30, 94, 255, 0.38);
    background: #eef4ff;
    color: var(--detail-blue-dark);
    transform: translateX(-2px);
}

html body.page-business-detail .business-detail__hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin: 0;
    padding: 64px 68px;
    border: 1px solid var(--detail-line);
    border-radius: 28px;
    background: var(--detail-surface);
    box-shadow: 0 18px 44px rgba(30, 94, 255, 0.07);
}

html body.page-business-detail .business-detail__hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: -180px;
    right: -120px;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(30, 94, 255, 0.13) 0%, rgba(30, 94, 255, 0) 68%);
    pointer-events: none;
}

html body.page-business-detail .business-detail__hero h1 {
    max-width: 1120px;
    margin: 0;
    color: var(--detail-ink);
    font-size: clamp(44px, 4vw, 56px);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.025em;
    word-break: keep-all;
}

html body.page-business-detail .business-detail__hero p {
    grid-column: auto;
    max-width: 1120px;
    margin: 0;
    color: #48505a;
    font-size: 20px;
    line-height: 1.7;
    font-weight: 500;
    word-break: keep-all;
}

html body.page-business-detail .business-detail__mobile-break {
    display: none;
}

html body.page-business-detail .business-detail__panel {
    display: grid;
    gap: 28px;
    margin-top: 34px;
    padding: 42px 48px;
    border: 1px solid var(--detail-line);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(30, 94, 255, 0.055);
}

html body.page-business-detail .business-detail__section {
    display: grid;
    gap: 28px;
    margin-top: 72px;
}

html body.page-business-detail .business-detail__panel h2,
html body.page-business-detail .business-detail__section h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    color: var(--detail-ink);
    font-size: 30px;
    line-height: 1.25;
    font-weight: 900;
    letter-spacing: -0.02em;
}

html body.page-business-detail .business-detail__panel h2 span,
html body.page-business-detail .business-detail__section h2 span {
    display: inline-grid;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    place-items: center;
    margin: 0;
    border: 1px solid rgba(30, 94, 255, 0.18);
    border-radius: 10px;
    background: #eef4ff;
    color: var(--detail-blue);
    font-size: 17px;
    line-height: 1;
}

html body.page-business-detail .origin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

html body.page-business-detail .origin-grid--single {
    grid-template-columns: minmax(0, 760px);
}

html body.page-business-detail .origin-card {
    min-height: 148px;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    padding: 30px 32px;
    border: 1px solid var(--detail-line);
    border-radius: 18px;
    background: #fbfdff;
    transition: border-color 220ms ease, background-color 220ms ease, transform 220ms ease;
}

html body.page-business-detail .origin-card:hover {
    border-color: rgba(30, 94, 255, 0.28);
    background: #f5f9ff;
    transform: translateY(-2px);
}

html body.page-business-detail .origin-card > strong {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 16px;
    background: var(--detail-blue);
    color: #ffffff;
    font-size: 18px;
    line-height: 1;
    font-weight: 900;
}

html body.page-business-detail .origin-card h3 {
    margin: 0;
    color: var(--detail-ink);
    font-size: 20px;
    line-height: 1.3;
    font-weight: 900;
}

html body.page-business-detail .origin-card p {
    margin: 9px 0 0;
    color: var(--detail-muted);
    font-size: 15px;
    line-height: 1.55;
    font-weight: 500;
}

html body.page-business-detail .spec-table {
    overflow: hidden;
    border: 1px solid var(--detail-line);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(30, 94, 255, 0.05);
}

html body.page-business-detail .spec-table__row {
    display: grid;
    grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
    min-height: 88px;
    border-top: 1px solid #e7edf6;
}

html body.page-business-detail .spec-table__row:first-child {
    border-top: 0;
}

html body.page-business-detail .spec-table__row > div {
    display: grid;
    align-content: center;
    padding: 22px 32px;
    color: #48505a;
    font-size: 16px;
    line-height: 1.65;
    font-weight: 500;
}

html body.page-business-detail .spec-table__row > div:first-child {
    border-right: 1px solid #e7edf6;
    text-align: left;
}

html body.page-business-detail .spec-table__head > div {
    min-height: 58px;
    background: #eef4ff;
    color: var(--detail-ink);
    font-size: 14px;
    line-height: 1.3;
    font-weight: 900;
    text-align: left;
}

html body.page-business-detail .spec-table__row strong {
    color: var(--detail-ink);
    font-size: 17px;
    line-height: 1.3;
    font-weight: 900;
}

html body.page-business-detail .spec-table__row span {
    display: block;
    margin-top: 5px;
    color: #7a8491;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 700;
}

html body.page-business-detail .partner-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

html body.page-business-detail .partner-grid--single {
    grid-template-columns: minmax(0, 760px);
}

html body.page-business-detail .partner-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

html body.page-business-detail .partner-card {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    padding: 30px 28px;
    border: 1px solid var(--detail-line);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(30, 94, 255, 0.055);
    transition: border-color 220ms ease, transform 220ms ease;
}

html body.page-business-detail .partner-card:hover {
    border-color: rgba(30, 94, 255, 0.3);
    transform: translateY(-2px);
}

html body.page-business-detail .partner-card > span {
    display: inline-flex;
    width: max-content;
    min-height: 28px;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eef4ff;
    color: var(--detail-blue);
    font-size: 12px;
    line-height: 1.2;
    font-weight: 900;
}

html body.page-business-detail .partner-card h3 {
    margin: 28px 0 0;
    color: var(--detail-ink);
    font-size: 24px;
    line-height: 1.25;
    font-weight: 900;
}

html body.page-business-detail .partner-card p {
    margin: 14px 0 0;
    color: var(--detail-muted);
    font-size: 15px;
    line-height: 1.6;
    font-weight: 500;
}

html body.page-business-detail .business-detail__cta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 32px;
    align-items: center;
    margin-top: 72px;
    padding: 40px 46px;
    border: 1px solid var(--detail-line);
    border-radius: 22px;
    background: var(--detail-surface);
}

html body.page-business-detail .business-detail__cta p {
    margin: 0;
    color: var(--detail-ink);
    font-size: 20px;
    line-height: 1.5;
    font-weight: 800;
    word-break: keep-all;
}

html body.page-business-detail .business-detail__cta a {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    padding: 13px 22px;
    border: 1px solid var(--detail-blue);
    border-radius: 10px;
    background: var(--detail-blue);
    color: #ffffff;
    font-size: 15px;
    line-height: 1.2;
    font-weight: 900;
    text-align: center;
    transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

html body.page-business-detail .business-detail__cta a:hover,
html body.page-business-detail .business-detail__cta a:focus-visible {
    border-color: var(--detail-blue-dark);
    background: var(--detail-blue-dark);
    transform: translateY(-1px) scale(1.005);
}

html body.page-business-detail .business-detail__cta a:active {
    transform: translateY(0) scale(0.99);
}

/* Activate the reveal runtime already provided by business-detail.php. */
html body.page-business-detail .business-detail-reveal {
    opacity: 0;
    translate: 0 28px;
    scale: 0.985;
}

html body.page-business-detail .business-detail-reveal--left {
    translate: -34px 0;
    scale: 1;
}

html body.page-business-detail .business-detail-reveal--soft {
    translate: 0 18px;
    scale: 1;
}

html body.page-business-detail .business-detail-reveal.is-business-detail-visible {
    animation: finf-business-detail-reveal 820ms cubic-bezier(0.22, 1, 0.36, 1) var(--business-detail-reveal-delay, 0ms) both;
}

@keyframes finf-business-detail-reveal {
    to {
        opacity: 1;
        translate: 0 0;
        scale: 1;
    }
}

@media (min-width: 861px) and (max-width: 1180px) {
    html body.page-business-detail {
        --detail-gutter: 32px;
    }

    html body.page-business-detail .business-detail__hero {
        padding: 52px 46px;
    }

    html body.page-business-detail .partner-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    html body.page-business-detail .partner-grid--single {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 860px) {
    html body.page-business-detail {
        --detail-gutter: 18px;
    }

    html body.page-business-detail .site-header {
        height: auto !important;
        min-height: 70px !important;
    }

    html body.page-business-detail .site-main {
        padding-top: 84px !important;
    }

    html body.page-business-detail .business-detail {
        padding: 34px 0 72px;
    }

    html body.page-business-detail .business-detail__back {
        margin-bottom: 22px;
        font-size: 13px;
    }

    html body.page-business-detail .business-detail__hero {
        gap: 18px;
        padding: 34px 22px;
        border-radius: 20px;
    }

    html body.page-business-detail .business-detail__hero h1 {
        font-size: clamp(32px, 9vw, 42px);
        line-height: 1.18;
    }

    html body.page-business-detail .business-detail__hero p {
        font-size: 16px;
        line-height: 1.65;
        word-break: keep-all;
        overflow-wrap: normal;
    }

    html body.page-business-detail .business-detail__nowrap {
        white-space: normal;
    }

    html body.page-business-detail .business-detail__panel {
        gap: 22px;
        margin-top: 22px;
        padding: 28px 20px;
        border-radius: 18px;
    }

    html body.page-business-detail .business-detail__section {
        gap: 20px;
        margin-top: 50px;
    }

    html body.page-business-detail .business-detail__panel h2,
    html body.page-business-detail .business-detail__section h2 {
        align-items: flex-start;
        font-size: 24px;
    }

    html body.page-business-detail .business-detail__panel h2 span,
    html body.page-business-detail .business-detail__section h2 span {
        flex-basis: 32px;
        width: 32px;
        height: 32px;
        font-size: 15px;
    }

    html body.page-business-detail .origin-grid,
    html body.page-business-detail .origin-grid--single,
    html body.page-business-detail .partner-grid,
    html body.page-business-detail .partner-grid--single {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    html body.page-business-detail .origin-card {
        min-height: 0;
        grid-template-columns: 52px minmax(0, 1fr);
        gap: 16px;
        padding: 22px 18px;
    }

    html body.page-business-detail .origin-card > strong {
        width: 48px;
        height: 48px;
        border-radius: 13px;
        font-size: 15px;
    }

    html body.page-business-detail .origin-card h3 {
        font-size: 17px;
    }

    html body.page-business-detail .origin-card p {
        min-width: 0;
        max-width: 100%;
        font-size: 14px;
    }

    html body.page-business-detail.lang-ko .origin-card p {
        word-break: keep-all;
        overflow-wrap: normal;
    }

    html body.page-business-detail.lang-zh .origin-card p {
        word-break: break-all;
        overflow-wrap: anywhere;
    }

    html body.page-business-detail .spec-table {
        border-radius: 18px;
    }

    html body.page-business-detail .spec-table__head {
        display: none;
    }

    html body.page-business-detail .spec-table__row {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
        padding: 20px 0;
    }

    html body.page-business-detail .spec-table__row > div {
        padding: 5px 20px;
        font-size: 15px;
    }

    html body.page-business-detail.lang-ko .spec-table__row > div {
        word-break: keep-all;
        overflow-wrap: normal;
    }

    html body.page-business-detail .business-detail__mobile-break {
        display: block;
    }

    html body.page-business-detail .business-detail__desktop-break {
        display: none;
    }

    html body.page-business-detail .spec-table__row > div:first-child {
        border-right: 0;
        text-align: left;
    }

    html body.page-business-detail .partner-card {
        min-height: 0;
        padding: 24px 20px;
    }

    html body.page-business-detail .partner-card h3 {
        margin-top: 20px;
        font-size: 22px;
    }

    html body.page-business-detail .business-detail__cta {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
        margin-top: 50px;
        padding: 28px 22px;
        border-radius: 18px;
    }

    html body.page-business-detail .business-detail__cta p {
        font-size: 17px;
    }

    html body.page-business-detail .business-detail__cta a {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    html body.page-business-detail .business-detail-reveal,
    html body.page-business-detail .business-detail-reveal.is-business-detail-visible {
        opacity: 1;
        translate: none;
        scale: 1;
        animation: none !important;
    }
}

/* Detail hero: text-only presentation */
html body.page-business-detail .business-detail__hero {
    overflow: visible;
    padding: 12px 0 24px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

html body.page-business-detail .business-detail__hero::before {
    display: none;
    content: none;
}

@media (max-width: 860px) {
    html body.page-business-detail .business-detail__hero {
        padding: 8px 0 18px;
        border-radius: 0;
    }
}

/* Match the business-detail desktop header to the homepage header. */
@media (min-width: 861px) {
    html body.page-business-detail .site-header__inner {
        position: relative !important;
        width: min(calc(100% - (2 * var(--finf-page-gutter))), 1500px) !important;
        max-width: 1500px !important;
        height: 70px !important;
        min-height: 70px !important;
        margin-inline: auto !important;
        padding: 0 !important;
        display: grid !important;
        grid-template-columns: 120px minmax(0, 1fr) 120px !important;
        align-items: center !important;
    }

    html body.page-business-detail .site-brand {
        justify-self: start !important;
    }

    html body.page-business-detail .site-logo__image {
        width: 66px !important;
        height: 54px !important;
        object-fit: contain !important;
    }

    html body.page-business-detail .site-nav {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        justify-content: center !important;
        gap: clamp(48px, 3.8vw, 74px) !important;
        margin: 0 !important;
        padding: 0 !important;
        white-space: nowrap !important;
    }

    html body.page-business-detail .site-nav > .site-nav__link,
    html body.page-business-detail .site-nav__item > .site-nav__link {
        padding: 10px 0 !important;
        font-size: 17px !important;
        line-height: 1.2 !important;
        font-weight: 600 !important;
    }

    html body.page-business-detail .site-lang--dropdown {
        justify-self: end !important;
    }
}


/* Desktop detail specs: keep supporting copy visually below item names. */
@media (min-width: 861px) {
    html body.page-business-detail .spec-table__row .spec-table__description {
        font-size: 18px !important;
        line-height: 1.6 !important;
    }

    html body.page-business-detail .spec-table__row:not(.spec-table__head) > div:first-child > strong {
        font-size: 18px !important;
    }

    html body.page-business-detail .business-detail__panel h2 > span[aria-hidden="true"],
    html body.page-business-detail .business-detail__section h2 > span[aria-hidden="true"] {
        position: relative;
        color: transparent !important;
    }

    html body.page-business-detail .business-detail__panel h2 > span[aria-hidden="true"]::after,
    html body.page-business-detail .business-detail__section h2 > span[aria-hidden="true"]::after {
        position: absolute;
        top: 50%;
        left: 50%;
        color: var(--detail-blue);
        font-family: Arial, sans-serif;
        font-size: 20px;
        line-height: 1;
        transform: translate(-50%, -50%);
    }

    html body.page-business-detail #origin-title > span::after { content: "⊕"; }
    html body.page-business-detail #spec-title > span::after {
        content: "▣";
        font-size: 17px;
    }
    html body.page-business-detail #partner-title > span::after {
        content: "◆";
        font-size: 17px;
    }
}
