/* HERO */
.category-hero {
    position: relative;
    height: 400px;
    background: url("../../imgs/single-section-image.webp") center/cover no-repeat;
    color: var(--white);
    padding-block: 40px;
}

.category-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
}

#show-aside-category-header {
    color: var(--white);
    font-size: 33px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    display: none;
}

.content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

/* TITLE */
.title {
    font-size: 48px;
    font-weight: 700;
    line-height: 12rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.title h1 {
    width: fit-content;
}

.back-arrow {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    transition: opacity .3s;
}

.back-arrow:hover {
    opacity: .7;
}

/* headerIGATION */
.category-header {
    display: flex;
    gap: 32px;
}

.header-item {
    position: relative;
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.label {
    display: block;
    font-size: 16px;
    font-weight: 600;
}

.header-item .count {
    position: relative;
    font-size: 13px;
    opacity: .75;
    display: flex;
    gap: 20px;
}

/* UNDERLINE ANIMATION */
.header-item .count::after {
    content: "";
    position: absolute;
    bottom: 0px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--secondaryColor);
    transition: all .4s ease;
    transform: translate(-50%, 10px);
}


.has-dropdown.open .count::after {
    width: 100%;
}

.has-dropdown.open .dropdown {
    max-height: 600px;
    /* كافية لكل العناصر */
    opacity: 1;
    transform: translateY(10px);
    pointer-events: auto;
    background: #111;

}

.has-dropdown.open .fa-chevron-left {
    transform: rotate(90deg);
}

.has-dropdown .dropdown {
    position: absolute;
    top: 100%;
    right: 0%;

    max-height: 0;
    min-height: 0;
    opacity: 0;

    transition:
        max-height .8s ease-in-out,
        opacity .25s ease-in-out,
        transform .7s ease-in-out;

    background: #111;
    min-width: 180px;
    padding: 14px 20px;

    pointer-events: none;
    transition: .35s ease;

    display: flex;
    flex-direction: column;
    gap: 18px;
}

.has-dropdown .dropdown a {
    display: block;
    color: var(--white);
    text-decoration: none;
    font-size: 14px;
    padding: 6px 0;
}

.has-dropdown .dropdown a:hover {
    color: var(--secondaryColor);
}

@media (max-width:1024px) {

    .title {
        font-size: 40px;
        font-weight: 700;
        line-height: 12rem;
        display: flex;
        align-items: center;
        gap: 12px;
    }

    #show-aside-category-header {
        display: block;
    }

    .category-header {
        background-color: rgba(0, 0, 0, 0.856);
        opacity: 0;
        pointer-events: none;

        position: fixed;
        top: 122px;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 10000;

        overflow-y: scroll;
        box-sizing: border-box;
        height: auto;
        width: 100%;

        transform: translateX(100%);
        transition: .4s ease;

        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        gap: 35px;
        padding: 24px 12px;
    }

    .category-header.active {
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
    }

    .title {
        font-size: 30px;
        font-weight: 500;
        line-height: 8rem;
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .label {
        font-size: 20px;
        font-weight: 50;
    }

    .has-dropdown.open .dropdown {
        position: static;
        max-height: fit-content;
        opacity: 1;
        transform: translateY(0px);
        padding: 7px 10px  ;
    }

    .has-dropdown .dropdown {
        background: #2c2c2c;
        box-shadow: 0 10px 30px rgba(250, 250, 250, 0.219);
        gap: 5px;
        min-width: 100px;

    }

    .has-dropdown .dropdown a {
        font-size: 18px;
        padding: 10px 0;
    }

    .header-item .count {
        font-size: 20px;
        padding: 10px 0;
        opacity: .75;
        display: flex;
        gap: 20px;
    }

}