﻿* {
    box-sizing: border-box;
}

header {
    position: relative;
    z-index: 5;
}

.header-contanier {
    background: #ffffff;
    transition: margin 0.3s ease, box-shadow 0.3s ease;
}

.header .grid.wide {
}

.nav-link.ers {
    text-transform: revert-layer !important;
}

.header-nav .nav-item1::after {
    content: "";
    position: absolute;
    left: 0;
    height: 83px;
    width: 100%;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

header.fixed .header-contanier {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    margin: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.header-logo img {
    width: 150px;
    height: auto;
    margin: 0;
}

.header-nav .list {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.header-nav .nav-item {
    position: relative;
    padding: 0.625rem 0.625rem;
    color: #333;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.header-nav .nav-item1 {
    position: relative;
    padding: 0.625rem 0.625rem;
    color: #333;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s ease;
}



.header-nav .nav-item:hover {
    background: #9ff1cf7d;
    border-radius: 5px
}


.header-nav .nav-item .nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    height: 83px;
    width: 100%;
}


.header-nav .nav-item:hover::after {
    transform: scaleX(1);
}

.header-nav .nav-item .a {
    color: inherit;
    margin: 10px 0;
    text-decoration: none;
    font-family: interM;
    font-size: 15px;
    display: flex;
    gap: 13px;
    /* justify-content: center; */
    align-items: center;
    column-gap: 6px;
    row-gap: 28px;
}

.header-nav .nav-item a {
    color: inherit;
    text-decoration: none;
    font-family: interM;
    text-transform: uppercase;
}

.nav-drop {
    display: none;
    position: absolute;
    top: 166%;
    left: 27%;
    transform: translateX(-50%);
    background: #ffffff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    min-width: 400px;
    border-radius: 12px;
    z-index: 1000;
    padding: 0.5rem;
}

.drop-iteme {
    margin: 0.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.nav-drope {
    display: none;
    position: absolute;
    top: 171%;
    left: 12px;
    transform: translateX(-50%);
    background: #ffffff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    min-width: 183px;
    border-radius: 9px;
    z-index: 1000;
    /* padding: 0.5rem; */
    width: 70px;
}

.nav-item:hover .nav-drop {
    display: block;
}

.nav-drope .drop-item:hover {
    background: #5a5a5a1a;
    padding: 2px 7px;
}

.nav-drope .drop-item:first-child:hover {
    border-top-left-radius: 9px;
    border-top-right-radius: 9px;
}

.nav-drope .drop-item {
    padding: 2px 7px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-item1:hover .nav-drope {
    display: block;
}

.nav-drop .drop-item {
    margin: 0.5rem;
    border-bottom: 1px solid #f0f0f0;
}

    .nav-drop .drop-item:last-child {
        border-bottom: none;
    }

.drop-item .p-item .p-img {
}

.drop-item .p-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: background 0.3s ease;
}

    .drop-item .p-item:hover {
        background: rgba(44, 137, 206, 0.1);
        animation: floatUpDown 0.9s ease;
    }

@keyframes floatUpDown {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }

    100% {
        transform: translateY(0);
    }
}

.drop-item .p-img img {
    width: 76px;
    height: 66px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 1rem;
}

.drop-item .p-de {
    flex: 1;
}

    .drop-item .p-de .p-name {
        font-size: 0.9rem;
        font-weight: 600;
        color: #333;
        margin-bottom: 0.25rem;
    }

    .drop-item .p-de .p-des h3 {
        font-size: 0.8rem;
        font-weight: 400;
        color: #737373;
        margin: 0;
        line-height: 1.5;
        overflow: hidden;
        text-overflow: ellipsis;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        display: -webkit-box;
        text-transform: math-auto;
    }

/* Hamburger Menu */
.my-news-rs {
    display: none;
}


/* Responsive Design */

/* Tablet (≤1023px) */
@media (max-width: 1023px) {
    .header-contanier {
        margin: 0.5rem 0;
    }

    .header-content {
        padding: 0.5rem 0;
    }

    .header-logo img {
        width: 120px;
        /* margin: 0 0.5rem; */
    }

    .header-nav {
        display: none;
    }

    .my-news-rs {
        display: block;
    }

    .header-nav .list.show {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #ffffff;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        padding: 1rem;
        z-index: 999;
    }

    .header-nav .nav-item {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    .nav-drop {
        position: static;
        transform: none;
        box-shadow: none;
        min-width: 100%;
        background: #f9f9f9;
        padding: 0.5rem 1rem;
    }

    .drop-item .p-img img {
        width: 60px;
        height: 40px;
    }

    .drop-item .p-de .p-name {
        font-size: 0.85rem;
    }

    .drop-item .p-de .p-des h3 {
        font-size: 0.75rem;
    }
}

/* Mobile (≤480px) */
@media (max-width: 480px) {
    .header-contanier {
        margin: 0;
    }

    .header-content {
        flex-wrap: wrap;
        position: relative;
    }

    .header-logo img {
        width: 100px;
    }

    .header-nav {
        display: none;
    }

    .my-news-rs {
        display: block;
    }

    .header-nav .list.show {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #ffffff;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        padding: 1rem;
        z-index: 999;
    }

    .caret {
        display: flex;
        align-items: center;
        gap: 3px;
        justify-content: center;
    }

    .header-nav .nav-item {
        font-size: 1rem;
        padding: 0.75rem 1rem;
    }

        .header-nav .nav-item::after {
            height: 3px;
        }

    .drop-item .p-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .drop-item .p-img img {
        width: 100%;
        height: auto;
        margin: 0 0 0.5rem;
    }
}
