/* === HERO SEO === */

.seo-hero {
    position: relative;
    overflow: hidden;
}

.seo-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.12) 0, transparent 50%),
        radial-gradient(circle at 85% 15%, rgba(129, 140, 248, 0.14) 0, transparent 55%),
        linear-gradient(180deg, #f5f7ff 0%, #eef2ff 40%, #f9fbff 100%);
    z-index: 0;
    pointer-events: none;
    animation: seoHeroBgDrift 30s ease-in-out infinite alternate;
}

@keyframes seoHeroBgDrift {
    0%   { transform: translate3d(0, 0, 0); }
    50%  { transform: translate3d(-10px, -8px, 0); }
    100% { transform: translate3d(8px, 10px, 0); }
}

.seo-hero .container {
    position: relative;
    z-index: 1;
}

.seo-eyebrow {
    font-size: 0.9rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 600;
}

.seo-hero-h1 {
    font-size: clamp(1.9rem, 2.4vw, 2.4rem);
    font-weight: 700;
    color: #020617;
}

.seo-hero-title {
    font-size: clamp(2.1rem, 3vw, 2.8rem);
    font-weight: 700;
    line-height: 1.1;
    color: #020617;
}

.seo-hero-title .text-primary {
    font-weight: 800;
}

.seo-hero-mission {
    font-size: 1rem;
    color: #475569;
    max-width: 38rem;
}

/* karta po prawej */

.seo-hero-card {
    position: relative;
    border-radius: 28px;
    padding: 24px 24px 22px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow:
        0 26px 65px rgba(15, 23, 42, 0.22),
        0 0 0 1px rgba(148, 163, 184, 0.22);
    backdrop-filter: blur(18px);
    overflow: hidden;
}

.seo-hero-card::after {
    content: "";
    position: absolute;
    inset: auto 12% -26px 12%;
    height: 40px;
    border-radius: 999px;
    background: radial-gradient(circle at 50% 0, rgba(15, 23, 42, 0.24), transparent 70%);
    opacity: 0.9;
    pointer-events: none;
}

/* KPI */

.seo-hero-card-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.seo-hero-kpis {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.seo-kpi-pill {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid rgba(129, 140, 248, 0.3);
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
}

.seo-kpi-label {
    font-size: 0.8rem;
    color: #64748b;
}

.seo-kpi-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1d4ed8;
}

/* widget wyników */

.seo-rank-widget {
    margin-top: 6px;
    border-radius: 18px;
    padding: 14px 14px 16px;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.95), rgba(239, 246, 255, 0.95));
}

.seo-rank-topbar {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.seo-rank-title {
    font-size: 0.86rem;
    font-weight: 600;
    color: #0f172a;
}

.seo-rank-subtitle {
    font-size: 0.76rem;
    color: #94a3b8;
}

.seo-rank-body {
    position: relative;
    margin-top: 2px;
    --row-h: 40px;
}

/* lista wyników */

.seo-rank-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.seo-rank-item {
    display: flex;
    align-items: center;
    gap: 10px;
    height: var(--row-h);
    border-radius: 999px;
    padding: 6px 10px;
    color: #334155;
    font-size: 0.9rem;
}

.seo-rank-item:nth-child(odd) {
    background: rgba(248, 250, 252, 0.8);
}

/* numer pozycji */

.seo-rank-pos {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    background: #e2e8f0;
    color: #0f172a;
}

.seo-rank-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ruchomy highlight */

.seo-rank-highlight {
    position: absolute;
    left: 4px;
    right: 4px;
    top: 0;
    transform: translateY(calc(5 * var(--row-h)));
    border-radius: 999px;
    padding: 6px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    box-shadow:
        0 16px 32px rgba(37, 99, 235, 0.45),
        0 0 0 1px rgba(191, 219, 254, 0.5);
    color: #eff6ff;
    pointer-events: none;
    /* TU ZMIANA: 12s -> 15s */
    animation: seoRankClimb 15s cubic-bezier(0.32, 0.72, 0, 1) infinite;
}


.seo-rank-highlight-main {
    display: flex;
    align-items: center;
    gap: 10px;
}

.seo-rank-pos--your {
    background: rgba(15, 23, 42, 0.17);
    color: #eff6ff;
}

.seo-rank-label--your {
    font-weight: 600;
}

.seo-rank-highlight-note {
    font-size: 0.75rem;
    opacity: 0.95;
}

/* animacja przesuwania: 6 -> 3 -> 2 -> 1 */

@keyframes seoRankClimb {
    0% {
        transform: translateY(calc(5 * var(--row-h)));
    }
    32% {
        transform: translateY(calc(2 * var(--row-h)));
    }
    64% {
        transform: translateY(calc(1 * var(--row-h)));
    }
    100% {
        transform: translateY(0);
    }
}

/* responsywność */

@media (max-width: 991.98px) {
    .seo-hero-card {
        margin-top: 8px;
    }
}

@media (max-width: 575.98px) {
    .seo-hero-card {
        padding: 20px 18px 18px;
    }

    .seo-rank-highlight {
        --row-h: 38px;
    }
}
