/* Homepage top slider — professional + responsive */
.nh-top-slider {
    --nh-top-navy: #1a2744;
    --nh-top-accent: #f15a24;
    --nh-top-pad-x: max(16px, calc((100vw - 1240px) / 2 + 16px));
    --nh-top-duration: 6000ms;
    position: relative;
    min-height: clamp(560px, 82vh, 720px);
    overflow: hidden;
    background: #0b1526;
    color: #fff;
    font-family: "DM Sans", Inter, sans-serif;
    isolation: isolate;
}

.nh-top-stage {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.nh-top-panel {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 0.55s ease, transform 0.85s ease;
}

.nh-top-panel.is-main {
    z-index: 1;
    transform: scale(1.03);
}

.nh-top-panel.is-prev,
.nh-top-panel.is-next {
    z-index: 2;
}

.nh-top-panel.is-prev {
    clip-path: polygon(0 0, 26% 0, 16% 100%, 0 100%);
}

.nh-top-panel.is-next {
    clip-path: polygon(80% 0, 100% 0, 100% 100%, 68% 100%);
}

.nh-top-veil {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background:
        linear-gradient(
            105deg,
            rgba(6, 12, 24, 0.82) 0%,
            rgba(6, 12, 24, 0.55) 38%,
            rgba(6, 12, 24, 0.18) 62%,
            rgba(6, 12, 24, 0.4) 100%
        ),
        linear-gradient(180deg, rgba(6, 12, 24, 0.25) 0%, transparent 35%, rgba(6, 12, 24, 0.55) 100%);
}

.nh-top-layout {
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-rows: 1fr auto;
    min-height: clamp(560px, 82vh, 720px);
    padding: 36px var(--nh-top-pad-x) 28px;
    box-sizing: border-box;
}

.nh-top-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-self: center;
    max-width: min(560px, 100%);
    padding: 12px 0 24px;
    animation: nhTopFadeIn 0.55s ease both;
}

.nh-top-content.is-updating {
    animation: none;
    opacity: 0.35;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

@keyframes nhTopFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nh-top-trust {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.nh-top-avatars {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nh-top-avatars span {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.95);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    margin-left: -8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.nh-top-avatars span:first-child {
    margin-left: 0;
    background: var(--nh-top-accent);
}

.nh-top-avatars span:nth-child(2) {
    background: #e8eef8;
    color: #1a2744;
}

.nh-top-avatars span:nth-child(3) {
    background: #243552;
}

.nh-top-trust-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.25;
    min-width: 0;
}

.nh-top-trust-copy strong {
    font-size: 13px;
    font-weight: 700;
}

.nh-top-trust-copy small {
    font-size: 12px;
    opacity: 0.85;
}

.nh-top-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 14px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nh-top-content h1 {
    margin: 0 0 12px;
    font-size: clamp(1.75rem, 4.2vw, 3.15rem);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.025em;
    text-wrap: balance;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
}

.nh-top-content > p {
    margin: 0 0 22px;
    max-width: 32rem;
    font-size: clamp(0.92rem, 1.5vw, 1.05rem);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.92);
    text-wrap: pretty;
}

.nh-top-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
}

.nh-top-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 700;
    border: 0;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}

.nh-top-btn:hover {
    transform: translateY(-1px);
}

.nh-top-btn:focus-visible {
    outline: 2px solid #ffd84d;
    outline-offset: 3px;
}

.nh-top-btn.primary {
    background: var(--nh-top-navy);
    color: #fff;
    box-shadow: 0 10px 28px rgba(10, 20, 40, 0.35);
}

.nh-top-btn.primary:hover {
    background: #243552;
}

.nh-top-btn.ghost {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.nh-top-btn.ghost:hover {
    background: rgba(255, 255, 255, 0.2);
}

.nh-top-footer {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 16px 24px;
    width: 100%;
    padding-top: 8px;
}

.nh-top-rail {
    align-self: center;
    justify-self: start;
    width: min(220px, 28vw);
    height: 3px;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 99px;
    overflow: hidden;
}

.nh-top-rail > span {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ffd84d, #fff3b0);
    border-radius: inherit;
    will-change: width;
}

.nh-top-thumbs {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    justify-self: end;
    max-width: 100%;
}

.nh-top-thumb {
    position: relative;
    flex: 0 0 auto;
    width: 76px;
    height: 50px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.32);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: #111;
    opacity: 0.72;
    transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.nh-top-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nh-top-thumb:hover {
    opacity: 0.92;
}

.nh-top-thumb:focus-visible {
    outline: 2px solid #ffd84d;
    outline-offset: 2px;
}

.nh-top-thumb.is-active {
    opacity: 1;
    border-color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 0 0 2px rgba(26, 39, 68, 0.45), 0 10px 22px rgba(0, 0, 0, 0.35);
}

.nh-top-thumb-progress {
    position: absolute;
    left: 5px;
    right: 5px;
    bottom: 5px;
    height: 3px;
    border-radius: 99px;
    background: rgba(0, 0, 0, 0.35);
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.nh-top-thumb.is-active .nh-top-thumb-progress {
    opacity: 1;
}

.nh-top-thumb-progress > span {
    display: block;
    height: 100%;
    width: 0%;
    background: #ffd84d;
    border-radius: inherit;
    will-change: width;
}

@media (max-width: 1024px) {
    .nh-top-panel.is-prev {
        clip-path: polygon(0 0, 20% 0, 12% 100%, 0 100%);
    }

    .nh-top-panel.is-next {
        clip-path: polygon(84% 0, 100% 0, 100% 100%, 74% 100%);
    }

    .nh-top-content {
        max-width: min(480px, 100%);
    }
}

@media (max-width: 768px) {
    .nh-top-slider {
        min-height: auto;
    }

    .nh-top-layout {
        min-height: min(78vh, 640px);
        padding: 28px 16px 20px;
        gap: 20px;
    }

    .nh-top-panel.is-prev {
        display: none;
    }

    .nh-top-panel.is-next {
        clip-path: polygon(88% 0, 100% 0, 100% 100%, 78% 100%);
        opacity: 0.95;
    }

    .nh-top-veil {
        background:
            linear-gradient(180deg, rgba(6, 12, 24, 0.45) 0%, rgba(6, 12, 24, 0.55) 45%, rgba(6, 12, 24, 0.78) 100%),
            linear-gradient(90deg, rgba(6, 12, 24, 0.55) 0%, rgba(6, 12, 24, 0.2) 70%, rgba(6, 12, 24, 0.45) 100%);
    }

    .nh-top-content {
        justify-content: flex-end;
        align-self: stretch;
        max-width: 100%;
        padding: 0 0 8px;
    }

    .nh-top-content h1 {
        font-size: clamp(1.55rem, 7vw, 2.15rem);
    }

    .nh-top-content > p {
        font-size: 0.95rem;
        margin-bottom: 18px;
    }

    .nh-top-btn {
        min-height: 44px;
        padding: 0 16px;
        font-size: 0.88rem;
        flex: 1 1 auto;
    }

    .nh-top-footer {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .nh-top-rail {
        width: 100%;
        justify-self: stretch;
        order: 2;
    }

    .nh-top-thumbs {
        justify-self: stretch;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
        order: 1;
    }

    .nh-top-thumbs::-webkit-scrollbar {
        display: none;
    }

    .nh-top-thumb {
        width: 68px;
        height: 46px;
    }
}

@media (max-width: 480px) {
    .nh-top-layout {
        min-height: min(72vh, 580px);
        padding: 22px 14px 16px;
    }

    .nh-top-trust {
        margin-bottom: 12px;
    }

    .nh-top-pill {
        margin-bottom: 12px;
        font-size: 10px;
        padding: 6px 12px;
    }

    .nh-top-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .nh-top-btn {
        width: 100%;
    }

    .nh-top-panel.is-next {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nh-top-panel,
    .nh-top-content,
    .nh-top-btn,
    .nh-top-thumb,
    .nh-top-rail > span,
    .nh-top-thumb-progress > span {
        transition: none !important;
        animation: none !important;
    }
}
