:root {
    --rih-navy: #081526;
    --rih-navy-2: #10243e;
    --rih-blue: #2e6cf6;
    --rih-green: #31ca75;
    --rih-green-dark: #1fa95d;
    --rih-amber: #ffb000;
    --rih-text: #142033;
    --rih-muted: #64748b;
    --rih-line: #e5eaf1;
    --rih-soft: #f5f7fb;
    --rih-white: #ffffff;
}

/* Poka 페이지 제목은 shortcode 내부 H1과 중복되므로 숨깁니다. */
body.rih-layout-page .entry-title,
body.rih-layout-page .page-title,
body.rih-layout-page .entry-header .title,
body.rih-layout-page .main-title {
    display: none !important;
}

body.rih-layout-page .entry-content,
body.rih-layout-page .page-content {
    margin-top: 0 !important;
}

.rih-home,
.rih-home *,
.rih-home *::before,
.rih-home *::after {
    box-sizing: border-box;
}

/*
 * [rih_home]은 플러그인 전용 full-width 템플릿에서 출력됩니다.
 * 기존 left:50% / margin-left:-50vw 방식은 Poka의 페이지 그리드와
 * 충돌해 콘텐츠가 오른쪽으로 밀릴 수 있으므로 사용하지 않습니다.
 */
body.rih-layout-page {
    overflow-x: hidden;
}

.rih-template-main {
    display: block !important;
    float: none !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
}

.rih-template-main .entry-content,
.rih-template-main .page-content {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.rih-home {
    position: relative;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    transform: none !important;
    color: var(--rih-text);
    background: var(--rih-soft);
    line-height: 1.65;
    overflow: hidden;
}

.rih-inner {
    width: min(1180px, calc(100% - 32px));
    margin-inline: auto;
}

.rih-hero {
    color: var(--rih-white);
    background:
        radial-gradient(circle at 82% 20%, rgba(46, 108, 246, .38), transparent 30%),
        linear-gradient(135deg, var(--rih-navy), var(--rih-navy-2));
}

.rih-hero__inner {
    padding-block: 58px 52px;
}

.rih-kicker {
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    color: #cbe4ff;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .02em;
}

.rih-hero h1 {
    max-width: 920px;
    margin: 17px 0 14px;
    color: var(--rih-white);
    font-size: clamp(35px, 5vw, 58px);
    font-weight: 950;
    line-height: 1.14;
    letter-spacing: -.055em;
    word-break: keep-all;
}

.rih-hero p {
    max-width: 840px;
    margin: 0;
    color: #cbd8e8;
    font-size: 17px;
}

.rih-disclosure {
    max-width: 900px;
    margin-top: 22px;
    padding: 14px 16px;
    color: #d9e5f3;
    background: rgba(255, 255, 255, .07);
    border-left: 4px solid var(--rih-green);
    border-radius: 8px;
    font-size: 13px;
}

.rih-section {
    padding-block: 50px;
}

.rih-section--white {
    background: var(--rih-white);
}

.rih-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 23px;
}

.rih-section-head h2 {
    margin: 0;
    color: var(--rih-text);
    font-size: clamp(27px, 3vw, 33px);
    font-weight: 950;
    line-height: 1.24;
    letter-spacing: -.04em;
    word-break: keep-all;
}

.rih-section-head p {
    max-width: 720px;
    margin: 7px 0 0;
    color: var(--rih-muted);
}

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

.rih-featured-card[hidden] {
    display: none !important;
}

.rih-featured-card {
    position: relative;
    min-width: 0;
    padding: 24px;
    background: var(--rih-white);
    border: 1px solid var(--rih-line);
    border-radius: 16px;
    box-shadow: 0 9px 30px rgba(23, 42, 69, .07);
}

.rih-featured-card.is-highlighted {
    border: 2px solid var(--rih-blue);
}

.rih-featured-card__badge {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 5px 9px;
    color: var(--rih-white);
    background: var(--rih-blue);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
}

.rih-featured-card__logo-wrap {
    display: grid;
    place-items: center;
    height: 72px;
    margin-bottom: 16px;
    padding: 8px 12px;
    background: #edf3fb;
    border-radius: 12px;
    overflow: hidden;
}

.rih-featured-card__logo,
.rih-operator__logo {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.rih-logo--fallback {
    display: grid;
    place-items: center;
    color: #17365f;
    font-size: 22px;
    font-weight: 950;
}

.rih-featured-card__type {
    color: var(--rih-blue);
    font-size: 13px;
    font-weight: 900;
}

.rih-featured-card__title {
    margin: 7px 0 6px;
    color: var(--rih-text);
    font-size: 21px;
    font-weight: 950;
    line-height: 1.3;
}

.rih-featured-card__description {
    margin: 0;
    color: var(--rih-muted);
    font-size: 14px;
}

.rih-featured-card__features {
    margin: 15px 0;
    padding: 0;
    color: #52657c;
    list-style: none;
    font-size: 14px;
}

.rih-featured-card__features li + li {
    margin-top: 6px;
}

.rih-featured-card__features li::before {
    content: "✓";
    margin-right: 8px;
    color: var(--rih-green);
    font-weight: 950;
}

.rih-featured-card__rating {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 14px 0;
    padding-top: 13px;
    border-top: 1px solid var(--rih-line);
}

.rih-stars {
    color: var(--rih-amber);
    font-size: 17px;
    letter-spacing: -2px;
    white-space: nowrap;
}

.rih-featured-card__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}

.rih-button,
.rih-table-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding-inline: 14px;
    border: 1px solid transparent;
    border-radius: 9px;
    text-decoration: none !important;
    font-weight: 900;
    line-height: 1.2;
    transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.rih-button:hover,
.rih-table-button:hover {
    transform: translateY(-1px);
}

.rih-button--primary {
    color: var(--rih-white) !important;
    background: var(--rih-green);
}

.rih-button--primary:hover {
    background: var(--rih-green-dark);
}

.rih-button--outline {
    color: #18304f !important;
    background: var(--rih-white);
    border-color: #18304f;
}

.rih-compare-controls {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 13px;
    padding: 12px 0;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(10px);
}

.rih-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rih-filter-button {
    padding: 9px 13px;
    color: #42526a;
    background: var(--rih-white);
    border: 1px solid var(--rih-line);
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
}

.rih-filter-button.is-active {
    color: var(--rih-white);
    background: var(--rih-blue);
    border-color: var(--rih-blue);
}

.rih-search {
    width: 210px;
    height: 42px;
    padding: 0 13px;
    color: var(--rih-text);
    background: var(--rih-white);
    border: 1px solid var(--rih-line);
    border-radius: 9px;
}

.rih-result-count {
    margin: 0 0 10px;
    color: var(--rih-muted);
    font-size: 13px;
}

.rih-table-scroll {
    max-width: 100%;
    overflow-x: auto;
    background: var(--rih-white);
    border: 1px solid var(--rih-line);
    border-radius: 15px;
    box-shadow: 0 8px 26px rgba(23, 42, 69, .05);
    -webkit-overflow-scrolling: touch;
}

.rih-compare-table {
    width: 100%;
    min-width: 1100px;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.rih-compare-table th,
.rih-compare-table td {
    padding: 15px 13px;
    border: 0;
    border-bottom: 1px solid var(--rih-line);
    text-align: left;
    vertical-align: middle;
}

.rih-compare-table thead th {
    color: var(--rih-white);
    background: var(--rih-navy-2);
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.rih-compare-table thead th:first-child {
    border-top-left-radius: 14px;
}

.rih-compare-table thead th:last-child {
    border-top-right-radius: 14px;
}

.rih-compare-table tbody tr:last-child td {
    border-bottom: 0;
}

.rih-compare-table tbody tr:hover {
    background: #f8fbff;
}

.rih-compare-row[hidden] {
    display: none !important;
}

.rih-operator {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 175px;
}

.rih-operator__logo-wrap {
    display: grid;
    place-items: center;
    flex: 0 0 48px;
    width: 48px;
    height: 42px;
    padding: 5px;
    background: #edf3fb;
    border-radius: 9px;
    overflow: hidden;
}

.rih-pill {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.rih-pill--blue {
    color: #245bc4;
    background: #eef4ff;
}

.rih-rating-cell {
    white-space: nowrap;
}

.rih-rating-cell .rih-stars {
    font-size: 13px;
}

.rih-table-actions {
    display: flex;
    gap: 7px;
    min-width: 170px;
}

.rih-table-button {
    min-height: 38px;
    padding-inline: 12px;
    color: var(--rih-white) !important;
    background: var(--rih-blue);
    border-radius: 7px;
    font-size: 13px;
}

.rih-table-button--external {
    background: var(--rih-green);
}

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

.rih-info-card,
.rih-guide-card,
.rih-quick-guide {
    background: var(--rih-white);
    border: 1px solid var(--rih-line);
    border-radius: 14px;
    box-shadow: 0 8px 26px rgba(23, 42, 69, .05);
}

.rih-info-card {
    padding: 22px;
}

.rih-info-card__icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 15px;
    color: var(--rih-white);
    background: linear-gradient(135deg, var(--rih-blue), #6b92ff);
    border-radius: 11px;
    font-weight: 950;
}

.rih-info-card h3 {
    margin: 0 0 7px;
    color: var(--rih-text);
    font-size: 19px;
    font-weight: 900;
}

.rih-info-card p {
    margin: 0;
    color: var(--rih-muted);
}

.rih-content-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 23px;
    align-items: start;
}

.rih-guide-card {
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
}

.rih-guide-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 34px rgba(23, 42, 69, .09);
}

.rih-guide-card__link {
    display: block;
    height: 100%;
    padding: 21px;
    color: inherit !important;
    text-decoration: none !important;
}

.rih-guide-card__image {
    display: block;
    margin: -21px -21px 17px;
    aspect-ratio: 16 / 9;
    background: #eaf0f7;
    overflow: hidden;
}

.rih-guide-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rih-guide-card__eyebrow {
    color: var(--rih-blue);
    font-size: 12px;
    font-weight: 900;
}

.rih-guide-card h3 {
    margin: 7px 0;
    color: var(--rih-text);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.4;
}

.rih-guide-card p {
    margin: 0;
    color: var(--rih-muted);
    font-size: 14px;
}

.rih-quick-guide {
    position: sticky;
    top: 86px;
    padding: 20px;
}

.rih-quick-guide h3 {
    margin: 0 0 8px;
    color: var(--rih-text);
    font-size: 19px;
    font-weight: 950;
}

.rih-quick-guide a {
    display: block;
    padding: 10px 0;
    color: #263b56 !important;
    border-bottom: 1px solid var(--rih-line);
    text-decoration: none !important;
    font-weight: 800;
}

.rih-quick-guide a:last-child {
    border-bottom: 0;
}

.rih-faq details {
    background: var(--rih-white);
    border: 1px solid var(--rih-line);
    border-radius: 12px;
}

.rih-faq details + details {
    margin-top: 10px;
}

.rih-faq summary {
    padding: 17px 19px;
    cursor: pointer;
    font-weight: 900;
}

.rih-faq details p {
    margin: 0;
    padding: 0 19px 19px;
    color: var(--rih-muted);
}

.rih-empty {
    padding: 18px;
    color: var(--rih-muted);
    background: var(--rih-white);
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
}

@media (max-width: 980px) {
    .rih-featured-grid,
    .rih-criteria-grid,
    .rih-guide-grid {
        grid-template-columns: 1fr;
    }

    .rih-content-layout {
        grid-template-columns: 1fr;
    }

    .rih-quick-guide {
        position: static;
    }
}

@media (max-width: 760px) {
    .rih-inner {
        width: min(100% - 20px, 1180px);
    }

    .rih-hero__inner {
        padding-block: 40px;
    }

    .rih-hero p {
        font-size: 15px;
    }

    .rih-section {
        padding-block: 38px;
    }

    .rih-section-head {
        display: block;
    }

    .rih-compare-controls {
        position: static;
        display: block;
    }

    .rih-search-wrap {
        display: block;
        margin-top: 10px;
    }

    .rih-search {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .rih-featured-card {
        padding: 18px;
    }

    .rih-featured-card__actions {
        grid-template-columns: 1fr;
    }

    .rih-filter-button {
        padding: 8px 11px;
        font-size: 13px;
    }
}


/* ==================================================
   RankInfoHub 전체 비교표 로고 가독성 개선
   v1.2.0: Review 대표 이미지와 별도로 선택한 전용 로고 사용
================================================== */

.rih-compare-table th:first-child,
.rih-compare-table td:first-child {
    min-width: 250px;
}

.rih-operator {
    gap: 14px;
    min-width: 225px;
}

.rih-operator__logo-wrap {
    flex: 0 0 112px;
    width: 112px;
    height: 54px;
    padding: 6px 9px;
    background: #edf3fb;
    border-radius: 9px;
}

.rih-operator__logo {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
}

@media (max-width: 760px) {
    .rih-operator__logo-wrap {
        flex-basis: 100px;
        width: 100px;
        height: 50px;
    }
}
