
/* =========================================================
   AL ASIF TRADERS
   Premium Top Bar CSS
   Responsive / Fixed Header Compatible
   ========================================================= */

/* =========================================================
   TOP BAR
   ========================================================= */

.top-bar {
    width: 100%;
    height: 44px;
    min-height: 44px;

    background: linear-gradient(
        90deg,
        #16a34a 0%,
        #22c55e 50%,
        #16a34a 100%
    );

    color: #ffffff;

    position: relative;
    z-index: 10000;

    overflow: hidden;

    border-bottom: 1px solid rgba(255, 255, 255, 0.12);

    font-family: "Poppins", sans-serif;
}


/* =========================================================
   TOP BAR CONTAINER
   ========================================================= */

.top-bar .container-xl {
    height: 100%;
}

.topbar-wrapper {
    height: 44px;
    min-height: 44px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}


/* =========================================================
   LEFT SIDE
   ========================================================= */

.topbar-left {
    display: flex;
    align-items: center;

    gap: 20px;

    flex-shrink: 0;

    height: 100%;
}


/* =========================================================
   TOPBAR ITEM
   ========================================================= */

.topbar-item {
    display: flex;
    align-items: center;

    gap: 8px;

    color: #ffffff;

    white-space: nowrap;

    user-select: none;

    transition: all 0.3s ease;
}

.topbar-item:hover {
    transform: translateY(-1px);
}


/* =========================================================
   TOPBAR ICON
   ========================================================= */

.topbar-item > i {
    width: 28px;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.12);

    color: #ffffff;

    font-size: 14px;

    flex-shrink: 0;

    transition: all 0.3s ease;
}

.topbar-item:hover > i {
    background: rgba(255, 255, 255, 0.22);

    transform: scale(1.08);
}


/* =========================================================
   TOPBAR TEXT
   ========================================================= */

.topbar-item strong {
    display: block;

    color: #ffffff;

    font-size: 11px;

    font-weight: 600;

    line-height: 1.1;
}

.topbar-item small {
    display: block;

    color: rgba(255, 255, 255, 0.85);

    font-size: 10px;

    font-weight: 400;

    line-height: 1.1;

    margin-top: 2px;
}


/* =========================================================
   CENTER ANNOUNCEMENT
   ========================================================= */

.topbar-center {
    flex: 1;

    min-width: 0;

    height: 44px;

    display: flex;
    align-items: center;

    overflow: hidden;

    position: relative;
}


/* =========================================================
   ANNOUNCEMENT SLIDER
   ========================================================= */

.announcement-slider {
    width: 100%;

    height: 100%;

    display: flex;
    align-items: center;

    overflow: hidden;

    position: relative;
}


/* =========================================================
   ANNOUNCEMENT TRACK
   ========================================================= */

.announcement-track {
    display: flex;
    align-items: center;

    gap: 70px;

    width: max-content;

    min-width: max-content;

    white-space: nowrap;

    animation: topbarSlide 28s linear infinite;

    will-change: transform;
}


/* =========================================================
   ANNOUNCEMENT TEXT
   ========================================================= */

.announcement-track span {
    display: inline-flex;
    align-items: center;

    gap: 7px;

    color: #ffffff;

    font-size: 12px;

    font-weight: 500;

    line-height: 1;

    user-select: none;
}

.announcement-track span i {
    font-size: 13px;

    color: #ffffff;
}


/* =========================================================
   ANNOUNCEMENT ANIMATION
   ========================================================= */

@keyframes topbarSlide {

    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }

}


/* =========================================================
   PAUSE ANNOUNCEMENT ON HOVER
   ========================================================= */

.announcement-slider:hover .announcement-track {
    animation-play-state: paused;
}


/* =========================================================
   RIGHT SIDE
   ========================================================= */

.topbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    flex-shrink: 0;

    height: 100%;
}


/* =========================================================
   HOTLINE BUTTON
   ========================================================= */

.topbar-hotline {
    display: flex;
    align-items: center;

    gap: 9px;

    min-height: 34px;

    padding: 4px 12px;

    border-radius: 50px;

    border: 1px solid rgba(255, 255, 255, 0.18);

    background: rgba(255, 255, 255, 0.08);

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    color: #ffffff;

    text-decoration: none;

    transition: all 0.3s ease;

    white-space: nowrap;
}

.topbar-hotline:hover {
    color: #ffffff;

    background: rgba(255, 255, 255, 0.18);

    border-color: rgba(255, 255, 255, 0.30);

    transform: translateY(-1px);
}


/* =========================================================
   HOTLINE ICON
   ========================================================= */

.topbar-hotline > i {
    width: 30px;
    height: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.15);

    color: #ffffff;

    font-size: 14px;

    flex-shrink: 0;

    transition: all 0.3s ease;
}

.topbar-hotline:hover > i {
    background: rgba(255, 255, 255, 0.25);

    transform: scale(1.05);
}


/* =========================================================
   HOTLINE TEXT
   ========================================================= */

.topbar-hotline div {
    display: flex;

    flex-direction: column;

    justify-content: center;
}

.topbar-hotline small {
    display: block;

    color: rgba(255, 255, 255, 0.80);

    font-size: 9px;

    font-weight: 400;

    line-height: 1;

    margin-bottom: 3px;
}

.topbar-hotline strong {
    display: block;

    color: #ffffff;

    font-size: 11px;

    font-weight: 600;

    line-height: 1.1;
}


/* =========================================================
   TOP BAR LINKS
   ========================================================= */

.top-bar a {
    color: #ffffff;

    text-decoration: none;
}

.top-bar a:hover {
    color: #ffffff;
}


/* =========================================================
   SELECTION
   ========================================================= */

.top-bar ::selection {
    background: rgba(255, 255, 255, 0.25);

    color: #ffffff;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1200px) {

    .topbar-left {
        gap: 14px;
    }

    .topbar-item:nth-child(3) {
        display: none;
    }

    .announcement-track {
        gap: 50px;
    }

}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 992px) {

    .top-bar {
        height: 42px;
        min-height: 42px;
    }

    .topbar-wrapper {
        height: 42px;
        min-height: 42px;
    }

    .topbar-left {
        display: none;
    }

    .topbar-center {
        height: 42px;
    }

    .topbar-right {
        flex-shrink: 0;
    }

    .announcement-track {
        gap: 45px;

        animation-duration: 24s;
    }

    .announcement-track span {
        font-size: 11px;
    }

    .topbar-hotline {
        padding: 3px 9px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

    .top-bar {
        height: 40px;
        min-height: 40px;
    }

    .topbar-wrapper {
        height: 40px;
        min-height: 40px;

        gap: 8px;
    }

    .topbar-center {
        height: 40px;
    }

    .announcement-track {
        gap: 40px;

        animation-duration: 21s;
    }

    .announcement-track span {
        font-size: 10.5px;
    }

    .announcement-track span i {
        font-size: 11px;
    }

    .topbar-hotline {
        min-height: 30px;

        padding: 2px 7px;

        gap: 6px;
    }

    .topbar-hotline > i {
        width: 26px;
        height: 26px;

        font-size: 12px;
    }

    .topbar-hotline small {
        display: none;
    }

    .topbar-hotline strong {
        font-size: 10px;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 576px) {

    .top-bar {
        height: 38px;
        min-height: 38px;
    }

    .topbar-wrapper {
        height: 38px;
        min-height: 38px;

        display: block;
    }

    .topbar-left {
        display: none;
    }

    .topbar-right {
        display: none;
    }

    .topbar-center {
        width: 100%;

        height: 38px;
    }

    .announcement-slider {
        height: 38px;
    }

    .announcement-track {
        gap: 35px;

        animation-duration: 18s;
    }

    .announcement-track span {
        font-size: 10px;
    }

}


/* =========================================================
   VERY SMALL DEVICES
   ========================================================= */

@media (max-width: 400px) {

    .announcement-track {
        gap: 30px;

        animation-duration: 16s;
    }

    .announcement-track span {
        font-size: 9.5px;
    }

}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .announcement-track {
        animation: none;
    }

    .topbar-item,
    .topbar-item > i,
    .topbar-hotline,
    .topbar-hotline > i {
        transition: none;
    }

}
