/* ==========================================================
   FAIR FUTURE FOUNDATION
   COUNT FIX + DYNAMIC ARCHIVE NAV V1

   - dynamic hierarchy navigation
   - more visible archive count
   - designed to sit directly below ARCHIVE SCOPE
   ========================================================== */


/* ==========================================================
   DYNAMIC ARCHIVE NAV
   ========================================================== */

body.fff-category-archive-v2-page
.fff-archive-nav-v1 {

    box-sizing: border-box;

    width: 100%;

    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap:
        0.7rem
        1rem;

    margin:
        -0.65rem
        0
        1.7rem;

    padding:
        0.85rem
        0
        0;

    border-top:
        1px solid
        #e2e7ef;
}


/* Small section label */
body.fff-category-archive-v2-page
.fff-archive-nav-v1__label {

    flex:
        0
        0
        auto;

    margin: 0;
    padding: 0;

    font-family:
        var(--fff-font-navigation);

    font-size:
        0.69rem;

    line-height:
        1.25;

    font-weight:
        700;

    letter-spacing:
        0.105em;

    text-transform:
        uppercase;

    color:
        #5a6a80;
}


/* Chip area */
body.fff-category-archive-v2-page
.fff-archive-nav-v1__links {

    display: flex;
    flex-wrap: wrap;

    align-items: center;

    gap:
        0.45rem;
}


/* Individual category link */
body.fff-category-archive-v2-page
.fff-archive-nav-v1__chip,
body.fff-category-archive-v2-page
.fff-archive-nav-v1__chip:visited {

    display: inline-flex;
    align-items: center;

    gap:
        0.38rem;

    min-height:
        2rem;

    padding:
        0.43rem
        0.72rem;

    border:
        1px solid
        #d8e0ea;

    border-radius:
        999px;

    background:
        #ffffff;

    font-family:
        var(--fff-font-body);

    font-size:
        0.79rem;

    line-height:
        1.25;

    font-weight:
        600;

    text-decoration:
        none;

    color:
        #34465f;

    box-shadow:
        none;

    transition:
        background-color 150ms ease,
        border-color 150ms ease,
        color 150ms ease,
        transform 150ms ease;
}


body.fff-category-archive-v2-page
.fff-archive-nav-v1__chip:hover,
body.fff-category-archive-v2-page
.fff-archive-nav-v1__chip:focus {

    background:
        #2857a4;

    border-color:
        #2857a4;

    color:
        #ffffff;

    text-decoration:
        none;

    transform:
        translateY(-1px);
}


/* Parent archive link */
body.fff-category-archive-v2-page
.fff-archive-nav-v1__chip--parent {

    padding-right:
        0.8rem;
}


body.fff-category-archive-v2-page
.fff-archive-nav-v1__arrow {

    display: inline-block;

    font-size:
        0.9rem;

    line-height:
        1;
}


/* ==========================================================
   ARCHIVE COUNT
   ========================================================== */


/*
 * The shortcode itself is now deliberately more visible.
 */
body.fff-category-archive-v2-page
.fff-archive-count-v1 {

    display: inline-block;

    font-family:
        var(--fff-font-navigation);

    font-size:
        0.79rem;

    line-height:
        1.3;

    font-weight:
        700;

    letter-spacing:
        0.025em;

    text-transform:
        none;

    color:
        #2857a4;
}


/*
 * Modern browsers:
 * make the entire small "FROM THIS ARCHIVE" line more
 * readable when it contains our dynamic count.
 */
body.fff-category-archive-v2-page
.et_pb_text_inner:has(.fff-archive-count-v1) {

    font-family:
        var(--fff-font-navigation);

    font-size:
        0.74rem;

    line-height:
        1.35;

    font-weight:
        700;

    letter-spacing:
        0.065em;

    text-transform:
        uppercase;

    color:
        #637187;
}


/* ==========================================================
   TABLET
   ========================================================== */

@media (max-width: 980px) {

    body.fff-category-archive-v2-page
    .fff-archive-nav-v1 {

        margin-bottom:
            1.5rem;

        gap:
            0.6rem
            0.8rem;
    }


    body.fff-category-archive-v2-page
    .fff-archive-nav-v1__chip {

        font-size:
            0.78rem;
    }
}


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

@media (max-width: 767px) {

    body.fff-category-archive-v2-page
    .fff-archive-nav-v1 {

        display: block;

        margin:
            -0.45rem
            0
            1.25rem;

        padding-top:
            0.75rem;
    }


    body.fff-category-archive-v2-page
    .fff-archive-nav-v1__label {

        margin-bottom:
            0.55rem;

        font-size:
            0.65rem;
    }


    body.fff-category-archive-v2-page
    .fff-archive-nav-v1__links {

        gap:
            0.4rem;
    }


    body.fff-category-archive-v2-page
    .fff-archive-nav-v1__chip {

        min-height:
            1.95rem;

        padding:
            0.4rem
            0.65rem;

        font-size:
            0.76rem;
    }


    body.fff-category-archive-v2-page
    .fff-archive-count-v1 {

        font-size:
            0.76rem;
    }


    body.fff-category-archive-v2-page
    .et_pb_text_inner:has(.fff-archive-count-v1) {

        font-size:
            0.7rem;

        letter-spacing:
            0.05em;
    }
}


/* ==========================================================
   FAIR FUTURE FOUNDATION
   ARCHIVE DYNAMIC NAV - VISUAL POLISH V2

   Purpose:
   Make archive hierarchy navigation clearly visible.

   Visual language:
   - blue = archive information
   - Fair Future red = navigation / action
   ========================================================== */


/* ----------------------------------------------------------
   NAVIGATION AREA
   ---------------------------------------------------------- */

body.fff-category-archive-v2-page
.fff-archive-nav-v1 {

    --fff-archive-nav-red: #b42318;
    --fff-archive-nav-red-dark: #8f1f16;
    --fff-archive-nav-red-soft: #fff7f5;
    --fff-archive-nav-red-border: #dfaaa4;

    gap:
        0.85rem
        1.1rem !important;

    margin:
        -0.35rem
        0
        1.85rem !important;

    padding:
        1rem
        0
        0 !important;

    border-top:
        1px solid
        #e2e7ef !important;
}


/* ----------------------------------------------------------
   EXPLORE THIS SECTION / PART OF
   ---------------------------------------------------------- */

body.fff-category-archive-v2-page
.fff-archive-nav-v1__label {

    margin:
        0 !important;

    padding:
        0 !important;

    font-family:
        var(--fff-font-navigation) !important;

    font-size:
        0.78rem !important;

    line-height:
        1.25 !important;

    font-weight:
        800 !important;

    letter-spacing:
        0.105em !important;

    text-transform:
        uppercase !important;

    color:
        var(--fff-archive-nav-red) !important;
}


/* ----------------------------------------------------------
   CHIP GROUP
   ---------------------------------------------------------- */

body.fff-category-archive-v2-page
.fff-archive-nav-v1__links {

    gap:
        0.55rem !important;
}


/* ----------------------------------------------------------
   NAVIGATION CHIPS
   ---------------------------------------------------------- */

body.fff-category-archive-v2-page
.fff-archive-nav-v1__chip,
body.fff-category-archive-v2-page
.fff-archive-nav-v1__chip:visited {

    min-height:
        2.35rem !important;

    padding:
        0.55rem
        0.9rem !important;

    border:
        1px solid
        var(--fff-archive-nav-red-border) !important;

    border-radius:
        999px !important;

    background:
        var(--fff-archive-nav-red-soft) !important;

    font-family:
        var(--fff-font-body) !important;

    font-size:
        0.88rem !important;

    line-height:
        1.2 !important;

    font-weight:
        650 !important;

    letter-spacing:
        -0.005em !important;

    color:
        var(--fff-archive-nav-red-dark) !important;

    box-shadow:
        0 2px 7px
        rgba(117, 30, 20, 0.045) !important;

    text-decoration:
        none !important;

    transition:
        background-color 150ms ease,
        border-color 150ms ease,
        color 150ms ease,
        box-shadow 150ms ease,
        transform 150ms ease !important;
}


/* ----------------------------------------------------------
   HOVER / KEYBOARD FOCUS
   ---------------------------------------------------------- */

body.fff-category-archive-v2-page
.fff-archive-nav-v1__chip:hover,

body.fff-category-archive-v2-page
.fff-archive-nav-v1__chip:focus,

body.fff-category-archive-v2-page
.fff-archive-nav-v1__chip:focus-visible {

    background:
        var(--fff-archive-nav-red) !important;

    border-color:
        var(--fff-archive-nav-red) !important;

    color:
        #ffffff !important;

    box-shadow:
        0 5px 12px
        rgba(180, 35, 24, 0.16) !important;

    transform:
        translateY(-1px) !important;

    text-decoration:
        none !important;

    outline:
        none !important;
}


/* ----------------------------------------------------------
   PARENT LINK ARROW
   ---------------------------------------------------------- */

body.fff-category-archive-v2-page
.fff-archive-nav-v1__arrow {

    margin-left:
        0.12rem;

    font-size:
        0.98rem !important;

    font-weight:
        700 !important;

    line-height:
        1 !important;
}


/* ==========================================================
   TABLET
   ========================================================== */

@media (max-width: 980px) {

    body.fff-category-archive-v2-page
    .fff-archive-nav-v1 {

        margin-bottom:
            1.55rem !important;

        gap:
            0.7rem
            0.9rem !important;
    }


    body.fff-category-archive-v2-page
    .fff-archive-nav-v1__label {

        font-size:
            0.74rem !important;
    }


    body.fff-category-archive-v2-page
    .fff-archive-nav-v1__chip {

        min-height:
            2.25rem !important;

        padding:
            0.51rem
            0.82rem !important;

        font-size:
            0.84rem !important;
    }

}


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

@media (max-width: 767px) {

    body.fff-category-archive-v2-page
    .fff-archive-nav-v1 {

        display:
            block !important;

        margin:
            -0.15rem
            0
            1.35rem !important;

        padding-top:
            0.85rem !important;
    }


    body.fff-category-archive-v2-page
    .fff-archive-nav-v1__label {

        margin-bottom:
            0.6rem !important;

        font-size:
            0.69rem !important;

        line-height:
            1.25 !important;
    }


    body.fff-category-archive-v2-page
    .fff-archive-nav-v1__links {

        gap:
            0.45rem !important;
    }


    body.fff-category-archive-v2-page
    .fff-archive-nav-v1__chip {

        min-height:
            2.1rem !important;

        padding:
            0.46rem
            0.7rem !important;

        font-size:
            0.79rem !important;

        box-shadow:
            none !important;
    }

}

