/* =========================================
   UNDERSTAND CREDIT RATING PAGE STYLES
   ========================================= */

/* 1. What is Credit Rating */
.ucr-what-is {
    padding: 100px 0;
    background: var(--bg-main);
}

/* intro-layout component → see style.css */

/* 2. Quick Navigation Cards */
.ucr-nav-section {
    padding: 0 0 100px;
    background: var(--bg-main);
}

.ucr-nav-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.ucr-nav-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 28px 24px;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ucr-nav-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.ucr-nav-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary-color);
}

.ucr-nav-card:hover::after {
    transform: scaleX(1);
}

.ucr-nav-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(var(--secondary-rgb), 0.1), rgba(var(--accent-rgb), 0.06));
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ucr-nav-content h3 {
    font-size: 1.05rem;
    margin-bottom: 4px;
    color: var(--primary-color);
}

.ucr-nav-content p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.5;
}

.ucr-nav-arrow {
    margin-left: auto;
    color: var(--secondary-color);
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.ucr-nav-card:hover .ucr-nav-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* 3. Rating Scales Section */
.ucr-scales {
    padding: 100px 0;
    background: var(--surface-color);
    position: relative;
}

.ucr-scales::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.ucr-scales-header {
    text-align: center;
    margin-bottom: 48px;
}

.ucr-scales-header .section-title {
    margin-bottom: 16px;
}

.ucr-scales-desc {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

.ucr-scales-table-wrapper {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.ucr-scales-table {
    width: 100%;
    border-collapse: collapse;
}

.ucr-scales-table thead {
    background: var(--primary-color);
}

.ucr-scales-table thead th {
    padding: 16px 24px;
    text-align: left;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ucr-scales-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.ucr-scales-table tbody tr:last-child {
    border-bottom: none;
}

.ucr-scales-table tbody tr:hover {
    background: rgba(var(--secondary-rgb), 0.03);
}

.ucr-scales-table td {
    padding: 16px 24px;
    font-size: 0.92rem;
    color: var(--text-dark);
    line-height: 1.6;
}

.ucr-scale-type {
    padding: 28px;
    border-bottom: 1px solid var(--border-color);
}

.ucr-scale-type:last-child {
    border-bottom: none;
}

.ucr-scale-type-header {
    margin-bottom: 18px;
}

.ucr-scale-type-header h3 {
    margin-bottom: 8px;
    color: var(--primary-color);
    font-size: 1.15rem;
}

.ucr-scale-type-header p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.93rem;
    line-height: 1.7;
}

.ucr-scale-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ucr-scale-item {
    display: grid;
    grid-template-columns: 132px 1fr;
    gap: 0;
    align-items: stretch;
    border: 1px solid #e6e8ec;
    border-radius: 0;
    padding: 0;
    margin-bottom: 10px;
    overflow: hidden;
    transition: background-color 0.2s ease;
}

.ucr-scale-item:last-child {
    margin-bottom: 0;
}

.ucr-scale-item:hover {
    box-shadow: none;
}

.ucr-scale-item p {
    margin: 0;
    padding: 14px 16px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-dark);
}

.ucr-scale-item.grade-green {
    border-color: #dee6d5;
    background: #f9fbf6;
}

.ucr-scale-item.grade-yellow {
    border-color: #e7e0cc;
    background: #fcfaf4;
}

.ucr-scale-item.grade-red {
    border-color: #ede6e8;
    background: #fdfafb;
}

.ucr-scale-note {
    margin: 14px 0 0;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.ucr-scale-note a {
    font-weight: 600;
}

.ucr-grade-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-width: 0;
    padding: 14px 10px;
    border-radius: 0;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 1.1px;
    line-height: 1;
    border: none;
    box-shadow: none;
    font-family: var(--font-serif);
    text-shadow: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ucr-scale-item:hover .ucr-grade-badge {
    transform: none;
    box-shadow: none;
}

.ucr-grade-badge.investment {
    background: #d8e8ca;
    color: #3f6600;
}

.ucr-grade-badge.speculative {
    background: #f1ebd1;
    color: #ad4e00;
}

.ucr-grade-badge.default {
    background: #fbf5f4;
    color: #a8071a;
}

.ucr-scale-category {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
}

.ucr-scale-category.investment-grade {
    background: rgba(16, 185, 129, 0.08);
    color: #059669;
}

.ucr-scale-category.speculative-grade {
    background: rgba(249, 115, 22, 0.08);
    color: #ea580c;
}

.ucr-scale-category.default-grade {
    background: rgba(220, 38, 38, 0.08);
    color: #dc2626;
}

/* Who Uses Section */
.ucr-who-uses {
    padding: 100px 0 140px;
    background: var(--bg-main);
}

.ucr-who-uses .intro-layout--sticky .intro-layout-text {
    position: sticky;
    top: calc(var(--nav-height, 69px) + 96px);
    align-self: start;
}

/* 4. Methodologies Section */
.ucr-methodologies {
    padding: 100px 0;
    background: var(--bg-main);
}

.ucr-methodologies-header {
    margin-bottom: 48px;
}

.ucr-methodologies-header .section-title {
    margin-bottom: 16px;
}

.ucr-methodologies-lead {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 800px;
    line-height: 1.8;
}

/* Methodology list — compact row items */
.ucr-methodologies-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.ucr-methodology-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
    color: var(--text-dark);
}

.ucr-methodology-item:last-child {
    border-bottom: none;
}

.ucr-methodology-item:hover {
    background: rgba(var(--secondary-rgb), 0.04);
}

.ucr-methodology-item:hover .ucr-methodology-item-arrow {
    transform: translateX(4px);
    color: var(--secondary-color);
}

.ucr-methodology-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(var(--secondary-rgb), 0.08);
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ucr-methodology-icon img {
    max-width: 24px;
    max-height: 24px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.ucr-methodology-item-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.ucr-methodology-item-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.ucr-methodology-item-date {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.ucr-methodology-item-arrow {
    font-size: 1.1rem;
    color: var(--text-subtle);
    transition: transform 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

/* 5. Rating Process Section */
.ucr-process {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color) 0%, #122040 50%, var(--primary-color) 100%);
    color: #fff;
    padding: 100px 0;
    overflow: hidden;
}

.ucr-process .stats-bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

.ucr-process .glow-1 {
    top: -20%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(var(--secondary-rgb), 0.08);
}

.ucr-process .glow-2 {
    bottom: -20%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(var(--accent-rgb), 0.06);
}

.ucr-process-header {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.ucr-process-header .section-title {
    color: #fff;
    margin-bottom: 16px;
}

.ucr-process-lead {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 720px;
    margin: 0 auto 60px;
    line-height: 1.7;
    text-align: center;
    position: relative;
    z-index: 2;
}

.ucr-process-interactive {
    position: relative;
    z-index: 2;
    --loop-ms: 3500ms;
}

.ucr-process-track {
    position: relative;
    isolation: isolate;
    --step-gap: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    gap: var(--step-gap);
    margin-bottom: 18px;
    padding: 12px 0 24px;
}

.ucr-process-spotlight {
    position: absolute;
    top: 6px;
    bottom: 16px;
    left: 0;
    width: 96px;
    border-radius: 999px;
    background: radial-gradient(65% 100% at 50% 50%, rgba(57, 190, 255, 0.4) 0%, rgba(18, 95, 148, 0.22) 48%, rgba(10, 30, 56, 0) 100%);
    box-shadow: 0 20px 36px rgba(8, 55, 97, 0.24);
    pointer-events: none;
    z-index: 0;
    opacity: 0.95;
    transition: transform 0.42s cubic-bezier(0.22, 0.61, 0.36, 1), width 0.32s ease;
    animation: ucrSpotlightBreathe 3.2s ease-in-out infinite;
}

.ucr-process-track::before,
.ucr-process-track::after {
    content: "";
    position: absolute;
    left: 26px;
    right: 26px;
    top: 42px;
    height: 2px;
    pointer-events: none;
    z-index: 0;
    display: none;
}

.ucr-process-track::before {
    background: rgba(255, 255, 255, 0.12);
}

.ucr-process-track::after {
    right: auto;
    width: var(--progress, 0%);
    background: linear-gradient(90deg, rgba(0, 194, 255, 0.92) 0%, rgba(110, 231, 255, 0.92) 100%);
    transition: width 0.3s ease;
}

.ucr-process-card {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    justify-self: center;
    width: 64px;
    height: 64px;
    background: transparent;
    border: none;
    border-radius: 999px;
    padding: 0;
    min-height: 0;
    color: #fff;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    overflow: visible;
    transition: transform 0.22s ease;
}

.ucr-process-card:not(:last-child)::after {
    content: "";
    position: absolute;
    left: calc(100% + (var(--step-gap) / 2) - 4px);
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 1.5px solid rgba(110, 231, 255, 0.45);
    border-bottom: 1.5px solid rgba(110, 231, 255, 0.45);
    transform: translateY(-50%) rotate(-45deg);
    pointer-events: none;
}

.ucr-process-card:hover {
    transform: none;
}

.ucr-process-card.is-active {
    transform: none;
}

.ucr-process-card:focus-visible {
    outline: 2px solid rgba(110, 231, 255, 0.95);
    outline-offset: 2px;
}

.ucr-step-orb {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.02rem;
    font-weight: 700;
    font-family: var(--font-serif);
    color: rgba(221, 235, 255, 0.88);
    border: 1px solid rgba(128, 172, 219, 0.45);
    background:
        radial-gradient(90% 90% at 30% 24%, rgba(80, 135, 187, 0.28) 0%, rgba(17, 42, 77, 0.5) 58%, rgba(8, 20, 38, 0.85) 100%),
        #102748;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 8px 18px rgba(2, 7, 16, 0.38);
    transition: color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.ucr-process-card:hover .ucr-step-orb {
    border-color: rgba(110, 231, 255, 0.68);
    color: rgba(232, 245, 255, 0.98);
    transform: scale(1.03);
}

.ucr-process-card.is-active .ucr-step-orb {
    color: #eef9ff;
    border-color: rgba(110, 231, 255, 0.9);
    box-shadow:
        0 0 0 1px rgba(110, 231, 255, 0.6),
        0 0 22px rgba(29, 170, 245, 0.45),
        0 8px 20px rgba(2, 7, 16, 0.45);
    animation: ucrActivePulse 2.8s ease-in-out infinite;
}

.ucr-process-card.is-active .ucr-step-orb::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 999px;
    border: 1px dashed rgba(110, 231, 255, 0.7);
    animation: ucrOrbSpin var(--loop-ms) linear infinite;
    pointer-events: none;
}

.ucr-visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ucr-process-panels {
    position: relative;
}

.ucr-process-panel {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    padding: 22px 24px;
    display: none;
}

.ucr-process-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 160px;
    height: 2px;
    background: linear-gradient(90deg, rgba(110, 231, 255, 0.95) 0%, rgba(110, 231, 255, 0) 100%);
}

.ucr-process-panel::after {
    content: attr(data-step);
    position: absolute;
    right: 16px;
    top: 6px;
    font-size: 88px;
    font-weight: 700;
    line-height: 1;
    color: rgba(255, 255, 255, 0.045);
    pointer-events: none;
}

.ucr-process-panel.is-active {
    display: block;
    animation: ucrPanelIn 0.25s ease both;
}

.ucr-panel-tag {
    display: inline-flex;
    font-size: 0.72rem;
    text-transform: none;
    letter-spacing: 0.4px;
    font-weight: 600;
    color: rgba(110, 231, 255, 0.92);
    margin-bottom: 10px;
}

.ucr-process-panel h3 {
    color: #fff;
    margin-bottom: 8px;
    font-size: 1.14rem;
}

.ucr-process-panel p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.7;
    font-size: 0.95rem;
}

.ucr-process-panel p + p {
    margin-top: 10px;
}

@keyframes ucrPanelIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ucrActivePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.04);
    }
}

@keyframes ucrOrbSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes ucrSpotlightBreathe {
    0%, 100% {
        opacity: 0.88;
    }
    50% {
        opacity: 1;
    }
}

/* 6. Contact CTA Section — reuse existing .contact-elevated-section */

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .ucr-nav-grid {
        grid-template-columns: 1fr;
    }

    .ucr-process-track {
        --step-gap: 18px;
    }
}

@media (max-width: 768px) {
    .ucr-what-is,
    .ucr-scales,
    .ucr-methodologies,
    .ucr-process {
        padding: 56px 0;
    }

    .ucr-nav-section {
        padding: 0 0 56px;
    }

    .ucr-nav-card {
        padding: 20px 16px;
        border-radius: 16px;
    }

    .ucr-nav-icon {
        width: 48px;
        height: 48px;
        border-radius: 10px;
    }

    .ucr-scale-type {
        padding: 18px 16px;
    }

    .ucr-scale-type-header h3 {
        font-size: 1.05rem;
    }

    .ucr-scale-item {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .ucr-grade-badge {
        min-width: 0;
        padding: 12px 10px;
        font-size: 1.05rem;
    }

    .ucr-methodology-item {
        padding: 16px 18px;
        gap: 14px;
    }

    .ucr-methodology-icon {
        width: 38px;
        height: 38px;
    }

    .ucr-who-uses .intro-layout--sticky .intro-layout-text {
        position: static;
        top: auto;
    }

    .ucr-process-track {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 10px;
        padding: 8px 0 16px;
        margin-bottom: 12px;
    }

    .ucr-process-track::-webkit-scrollbar {
        display: none;
    }

    .ucr-process-track::before,
    .ucr-process-track::after,
    .ucr-process-spotlight,
    .ucr-process-card::after {
        display: none;
    }

    .ucr-process-card {
        flex: 0 0 auto;
        min-width: 52px;
        justify-self: auto;
        width: 52px;
        height: 52px;
    }

    .ucr-process-card.is-active {
        transform: none;
    }

    .ucr-step-orb {
        width: 44px;
        height: 44px;
        font-size: 0.9rem;
    }

    .ucr-process-panel {
        padding: 16px 14px;
        border-radius: 12px;
    }

    .ucr-process-panel::after {
        display: none;
    }

    .ucr-scales-header,
    .ucr-process-header {
        text-align: left;
    }

    .ucr-scales-desc,
    .ucr-process-lead {
        text-align: left;
        margin-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ucr-process-track::after,
    .ucr-process-card,
    .ucr-process-panel.is-active {
        transition: none;
    }

    .ucr-process-card.is-active,
    .ucr-process-card.is-active .ucr-step-orb,
    .ucr-process-card.is-active .ucr-step-orb::after,
    .ucr-process-panel.is-active,
    .ucr-process-spotlight {
        animation: none;
    }
}

@media (max-width: 480px) {
    .ucr-intro-lead {
        font-size: 0.95rem;
    }

    .ucr-scales-table-wrapper {
        border-radius: 12px;
    }

    .ucr-grade-badge {
        min-width: 0;
        padding: 11px 10px;
        font-size: 1rem;
    }
}
