html {
    font-size: 17px;
}

/* =========================================
   ORGANIC RANKINGS CARD
========================================= */

.rank-card {
    position: relative;
    overflow: hidden;

    background: var(--card);

    border: 1px solid rgba(244, 124, 32, .15);
    border-radius: 14px;

    padding: 1.8rem;

    box-shadow:
        0 8px 32px rgba(0, 0, 0, .07);

    /* Smooth movement */
    transition:
        transform .35s cubic-bezier(.16, 1, .3, 1),
        box-shadow .35s ease,
        border-color .35s ease;
}


/* =========================================
   MOVING LIGHT EFFECT
========================================= */

.rank-card::before {
    content: "";

    position: absolute;

    top: -100%;
    left: -60%;

    width: 50%;
    height: 300%;

    background: linear-gradient(90deg,
            transparent,
            rgba(244, 124, 32, .07),
            transparent);

    transform: rotate(25deg);

    opacity: 0;

    transition:
        left .7s ease,
        opacity .3s ease;
}


/* Subtle orange glow around card */
.rank-card::after {
    content: "";

    position: absolute;

    inset: 0;

    border-radius: inherit;

    box-shadow:
        inset 0 0 0 1px rgba(244, 124, 32, 0);

    pointer-events: none;

    transition: box-shadow .35s ease;
}


/* =========================================
   CARD HOVER
========================================= */

.rank-card:hover {
    transform: translateY(-7px);

    border-color: rgba(244, 124, 32, .32);

    box-shadow:
        0 18px 45px rgba(40, 25, 10, .12),
        0 0 30px rgba(244, 124, 32, .08);
}

.rank-card:hover::before {
    left: 130%;
    opacity: 1;
}

.rank-card:hover::after {
    box-shadow:
        inset 0 0 0 1px rgba(244, 124, 32, .08);
}


/* =========================================
   TITLE
========================================= */

.rank-title {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--gray);
    text-transform: uppercase;
    margin-bottom: 1.2rem;

    transition:
        color .3s ease,
        letter-spacing .3s ease;
}

.rank-card:hover .rank-title {
    color: var(--orange);
    letter-spacing: 3.4px;
}


/* =========================================
   RANK ROW
========================================= */

.rank-row {
    display: flex;
    align-items: center;

    gap: .8rem;
    margin-bottom: .7rem;

    padding: .35rem .4rem;

    border-radius: 8px;

    transition:
        background .25s ease,
        transform .25s ease;
}


/* Individual row hover */
.rank-row:hover {
    background: rgba(244, 124, 32, .045);
    transform: translateX(5px);
}


/* =========================================
   RANK NUMBER
========================================= */

.rank-pos {
    font-family: 'Barlow Condensed', system-ui, sans-serif;

    font-size: 1rem;
    font-weight: 700;

    width: 24px;

    color: var(--orange);

    transition:
        transform .25s ease,
        text-shadow .25s ease;
}

.rank-row:hover .rank-pos {
    transform: scale(1.12);
    text-shadow: 0 0 12px rgba(244, 124, 32, .25);
}


/* =========================================
   PROGRESS BAR
========================================= */

.rank-bar-wrap {
    flex: 1;

    height: 8px;

    background: rgba(244, 124, 32, .08);

    border-radius: 4px;

    overflow: hidden;

    transition:
        background .25s ease,
        transform .25s ease;
}

.rank-row:hover .rank-bar-wrap {
    background: rgba(244, 124, 32, .12);
    transform: scaleY(1.15);
}


.rank-bar {
    position: relative;

    height: 100%;

    border-radius: 4px;

    background:
        linear-gradient(90deg,
            var(--orange),
            var(--orange-light));

    transition:
        width 1.5s ease,
        filter .3s ease;
}


/* Glow on progress bar */
.rank-bar::after {
    content: "";

    position: absolute;

    top: 0;
    right: 0;

    width: 25px;
    height: 100%;

    background: rgba(255, 255, 255, .45);

    filter: blur(5px);

    opacity: 0;

    transition: opacity .3s ease;
}

.rank-row:hover .rank-bar::after {
    opacity: 1;
}


/* =========================================
   LABEL
========================================= */

.rank-label {
    font-size: .72rem;

    color: var(--gray);

    white-space: nowrap;

    transition:
        color .25s ease,
        transform .25s ease;
}

.rank-row:hover .rank-label {
    color: #3a2810;
    transform: translateX(2px);
}


/* =========================================
   UP INDICATOR
========================================= */

.rank-up {
    display: inline-block;

    font-size: .68rem;

    color: #22c55e;

    margin-left: .3rem;

    transition:
        transform .25s ease,
        text-shadow .25s ease;
}

.rank-row:hover .rank-up {
    transform: translateY(-2px);

    text-shadow:
        0 0 8px rgba(34, 197, 94, .3);
}


/* =========================================
   DIVIDER
========================================= */

.rank-divider {
    height: 1px;

    background: rgba(244, 124, 32, .08);

    margin: 1.2rem 0;

    transition:
        background .3s ease,
        box-shadow .3s ease;
}

.rank-card:hover .rank-divider {
    background: rgba(244, 124, 32, .18);

    box-shadow:
        0 0 8px rgba(244, 124, 32, .08);
}


/* =========================================
   SEO METRIC
========================================= */

.seo-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: .45rem .5rem;

    border-radius: 8px;

    transition:
        background .25s ease,
        transform .25s ease;
}

.seo-metric span {
    font-size: .78rem;
    color: var(--gray);

    transition: color .25s ease;
}

.seo-metric strong {
    font-size: .95rem;
    color: var(--orange);

    transition:
        transform .25s ease,
        text-shadow .25s ease;
}

.rank-card:hover .seo-metric {
    background: rgba(244, 124, 32, .035);
}

.rank-card:hover .seo-metric strong {
    transform: scale(1.08);

    text-shadow:
        0 0 14px rgba(244, 124, 32, .22);
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 560px) {

    .rank-card {
        padding: 1.4rem;
    }

    .rank-label {
        white-space: normal;
    }

    /* Keep mobile interaction subtle */
    .rank-card:hover {
        transform: translateY(-3px);
    }

    .rank-row:hover {
        transform: none;
    }
}


/* =========================================
   REDUCED MOTION
========================================= */

@media (prefers-reduced-motion: reduce) {

    .rank-card,
    .rank-card *,
    .rank-card::before,
    .rank-card::after {
        transition: none !important;
        animation: none !important;
    }

    .rank-card:hover {
        transform: none;
    }
}