/* =========================================================
   NETEREN HEADER
   ========================================================= */

.site-header,
.site-header * {
    box-sizing: border-box;
}

.site-header {
    position: relative;
    z-index: 1000;
    width: 100%;
    background: #000;
    color: #fff;
}

.site-header .site-container {
    width: calc(100% - 48px);
    max-width: 1200px;
    margin-right: auto;
    margin-left: auto;
}

/* =========================================================
   ANA YERLEŞİM
   Sol: Logo
   Sağ: Üst menü + ana menü
   ========================================================= */

.header-inner {
    min-height: 132px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 36px;
    position: relative;
}

.site-logo {
    display: flex;
    flex: 0 0 133px;
    width: 133px;
    min-width: 133px;
    align-items: center;
    justify-content: flex-start;
    color: #fff;
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

.site-logo img {
    display: block;
    width: 133px;
    max-width: 100%;
    height: auto;
    max-height: 100px;
    object-fit: contain;
}

.header-navigation-area {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    align-self: stretch;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 17px;
}

/* =========================================================
   ÜST SATIR
   ========================================================= */

.header-top-row {
    display: flex;
    width: 100%;
    min-height: 28px;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
}

.site-topnav {
    min-width: 0;
}

.site-topnav ul,
.site-topnav li,
.site-lang,
.site-lang li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-topnav .menuust {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.site-topnav .menuust > li {
    position: relative;
}

.site-topnav .menuust a {
    display: flex;
    min-height: 26px;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border: 1px solid #5f5f5f;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 13px;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease;
}

.site-topnav .menuust a:hover,
.site-topnav .menuust .current-menu-item > a,
.site-topnav .menuust .current-menu-ancestor > a {
    border-color: #4eb4ff;
    background: #4eb4ff;
    color: #fff;
}

/* =========================================================
   DİL SEÇİMİ
   ========================================================= */

.site-lang {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 4px;
}

.site-lang a {
    display: flex;
    width: 28px;
    height: 22px;
    align-items: center;
    justify-content: center;
    border: 1px solid #5f5f5f;
    color: #fff;
    font-size: 11px;
    line-height: 1;
    text-decoration: none;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease;
}

.site-lang a:hover,
.site-lang a.is-active {
    border-color: #4eb4ff;
    background: #4eb4ff;
    color: #fff;
}

/* =========================================================
   ANA MENÜ SATIRI
   ========================================================= */

.header-main-row {
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: center;
    justify-content: flex-end;
}

.site-nav {
    min-width: 0;
    margin-left: auto;
}

.site-nav ul,
.site-nav li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav .menum {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.site-nav .menum > li {
    position: relative;
    flex: 0 0 auto;
}

.site-nav .menum a {
    display: flex;
    min-height: 36px;
    align-items: center;
    padding: 7px 12px;
    color: #fff;
    font-size: 15px;
    line-height: 1.3;
    text-decoration: none;
    white-space: nowrap;
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.site-nav .menum > li > a:hover,
.site-nav .menum > li:hover > a,
.site-nav .menum > .current-menu-item > a,
.site-nav .menum > .current-menu-ancestor > a {
    background: #4eb4ff;
    color: #fff;
}

/* =========================================================
   MENÜ OKLARI
   ========================================================= */

.site-nav .menu-item-has-children > a::after {
    content: "";
    width: 6px;
    height: 6px;
    margin-left: 8px;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
}

.site-nav .menum ul .menu-item-has-children > a::after {
    margin-left: auto;
    transform: rotate(-45deg);
}

/* =========================================================
   MASAÜSTÜ AÇILIR MENÜLER
   ========================================================= */

.site-nav .menum ul {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1010;
    display: block;
    width: 240px;
    min-width: 240px;
    padding: 6px 0;
    border-top: 2px solid #4eb4ff;
    background: #000;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition:
        opacity 0.18s ease,
        transform 0.18s ease,
        visibility 0.18s ease;
}

.site-nav .menum li:hover > ul,
.site-nav .menum li:focus-within > ul {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.site-nav .menum ul li {
    position: relative;
    width: 100%;
}

.site-nav .menum ul a {
    width: 100%;
    min-height: 38px;
    justify-content: flex-start;
    padding: 9px 14px;
    color: #fff;
    font-size: 14px;
    line-height: 1.35;
    white-space: normal;
}

.site-nav .menum ul a:hover,
.site-nav .menum ul li:hover > a,
.site-nav .menum ul .current-menu-item > a,
.site-nav .menum ul .current-menu-ancestor > a {
    background: #4eb4ff;
    color: #fff;
}

/* Üçüncü seviye sağa açılır */

.site-nav .menum ul ul {
    top: -8px;
    left: 100%;
}

/* Sağdaki menüler ekran dışına taşmasın */

.site-nav .menum > li:nth-last-child(-n + 2) > ul {
    right: 0;
    left: auto;
}

.site-nav .menum > li:nth-last-child(-n + 2) > ul ul {
    right: 100%;
    left: auto;
}

/* =========================================================
   MOBİL MENÜ BUTONU
   ========================================================= */

.site-menu-toggle {
    display: none;
    width: 44px;
    height: 42px;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    padding: 0;
    border: 1px solid #555;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.site-menu-toggle-line {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}

.site-menu-toggle.is-active .site-menu-toggle-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.site-menu-toggle.is-active .site-menu-toggle-line:nth-child(2) {
    opacity: 0;
}

.site-menu-toggle.is-active .site-menu-toggle-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* =========================================================
   DAR MASAÜSTÜ
   ========================================================= */

@media (max-width: 1180px) and (min-width: 961px) {
    .header-inner {
        gap: 24px;
    }

    .header-navigation-area {
        gap: 14px;
    }

    .site-nav .menum {
        gap: 1px;
    }

    .site-nav .menum a {
        padding-right: 8px;
        padding-left: 8px;
        font-size: 14px;
    }

    .site-topnav .menuust {
        gap: 5px;
    }

    .site-topnav .menuust a {
        padding-right: 8px;
        padding-left: 8px;
        font-size: 12px;
    }
}

@media (max-width: 960px) {
    .site-header .site-container {
        width: calc(100% - 32px);
    }

    .header-inner {
        min-height: 96px;
        align-items: center;
        gap: 16px;
    }

    .site-logo {
        flex-basis: 105px;
        width: 105px;
        min-width: 105px;
    }

    .site-logo img {
        width: 105px;
        max-height: 78px;
    }

    .header-navigation-area {
        align-self: auto;
        justify-content: center;
        gap: 10px;
    }

    .header-top-row {
        min-height: 26px;
        justify-content: flex-end;
    }

    .header-main-row {
        justify-content: flex-end;
    }

    .site-menu-toggle {
        display: flex;
        margin-left: auto;
    }

    .site-nav {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        z-index: 1020;
        display: none;
        width: 100%;
        max-height: calc(100vh - 96px);
        margin: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        background: #000;
        border-top: 1px solid #333;
        box-shadow: 0 18px 30px rgba(0, 0, 0, 0.35);
    }

    .site-nav.is-open {
        display: block;
    }

    .site-nav .menum {
        display: block;
        width: 100%;
        padding: 8px 0;
    }

    .site-nav .menum > li {
        width: 100%;
        border-bottom: 1px solid #222;
    }

    .site-nav .menum a {
        width: 100%;
        min-height: 46px;
        justify-content: space-between;
        padding: 11px 16px;
        white-space: normal;
    }

    .site-nav .menu-item-has-children > a::after,
    .site-nav .menum ul .menu-item-has-children > a::after {
        margin-left: auto;
        transform: translateY(-2px) rotate(45deg);
    }

    .site-nav .menu-item-has-children.submenu-open > a::after {
        transform: translateY(2px) rotate(225deg);
    }

    /*
     * Mobilde tüm alt menüler normal belge akışındadır.
     * Başlangıçta gizlidir ve sağa açılmaz.
     */
    .site-nav .menum ul,
    .site-nav .menum ul ul,
    .site-nav .menum > li:nth-last-child(-n + 2) > ul,
    .site-nav .menum > li:nth-last-child(-n + 2) > ul ul {
        position: static;
        top: auto;
        right: auto;
        left: auto;
        display: none;
        width: 100%;
        min-width: 0;
        padding: 0;
        border: 0;
        background: #111;
        box-shadow: none;
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transform: none;
        transition: none;
    }

    /*
     * Dokunmatik cihazlarda :hover durumu kalıcı olabildiği için
     * yalnızca kapalı öğelerde alt menüyü gizliyoruz.
     */
    .site-nav .menum li:not(.submenu-open):hover > ul,
    .site-nav .menum li:not(.submenu-open):focus-within > ul {
        display: none;
    }

    /*
     * Alt menünün tek görünürlük kaynağı submenu-open sınıfıdır.
     * !important, masaüstü hover kurallarının mobilde ezmesini önler.
     */
    .site-nav .menum li.menu-item-has-children.submenu-open > ul,
    .site-nav .menum li.submenu-open > ul {
        display: block !important;
    }

    .site-nav .menum ul li {
        width: 100%;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
    }

    .site-nav .menum ul a {
        min-height: 42px;
        padding: 10px 16px 10px 30px;
        background: #111;
        font-size: 14px;
    }

    .site-nav .menum ul ul {
        background: #1a1a1a;
    }

    .site-nav .menum ul ul a {
        padding-left: 46px;
        background: #1a1a1a;
        font-size: 13px;
    }

    body.neteren-menu-open {
        overflow: hidden;
    }
}

/* =========================================================
   KÜÇÜK MOBİL
   ========================================================= */

@media (max-width: 640px) {
    .site-header .site-container {
        width: calc(100% - 24px);
    }

    .header-inner {
        min-height: 92px;
        gap: 10px;
    }

    .site-logo {
        flex-basis: 88px;
        width: 88px;
        min-width: 88px;
    }

    .site-logo img {
        width: 88px;
        max-height: 66px;
    }

    .header-navigation-area {
        gap: 8px;
    }

    .header-top-row {
        gap: 6px;
    }

    .site-topnav {
        min-width: 0;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .site-topnav::-webkit-scrollbar {
        display: none;
    }

    .site-topnav .menuust {
        gap: 4px;
    }

    .site-topnav .menuust a {
        min-height: 23px;
        padding: 4px 6px;
        font-size: 10px;
    }

    .site-lang {
        gap: 3px;
    }

    .site-lang a {
        width: 25px;
        height: 21px;
        font-size: 10px;
    }

    .site-menu-toggle {
        width: 42px;
        height: 38px;
        flex-basis: 42px;
    }

    .site-nav {
        max-height: calc(100vh - 92px);
    }
}

/* Çok dar telefonlarda üst satır taşmasın */

@media (max-width: 420px) {
    .site-logo {
        flex-basis: 76px;
        width: 76px;
        min-width: 76px;
    }

    .site-logo img {
        width: 76px;
        max-height: 58px;
    }

    .site-topnav .menuust a {
        padding-right: 5px;
        padding-left: 5px;
        font-size: 9px;
    }

    .site-lang a {
        width: 23px;
        font-size: 9px;
    }
}