/* =========================================================
   FEDERASYONWEB PREMIUM UI V4
   MAIN NAVIGATION + PORTAL + SEARCH
========================================================= */


/* =========================================================
   01. MAIN NAVIGATION
========================================================= */

.main-nav {
    position: relative;
    z-index: 50;

    width: 100%;
    min-height: 62px;

    border-top: 1px solid rgba(255, 255, 255, .04);
    border-bottom: 1px solid rgba(255, 255, 255, .07);

    background:
        linear-gradient(90deg,
            #061a38 0%,
            #082653 48%,
            #061a38 100%);

    box-shadow:
        0 8px 24px rgba(2, 12, 29, .14);
}


/* =========================================================
   02. NAV CONTAINER
========================================================= */

.nav-container {
    width: min(calc(100% - 60px), 1700px);
    max-width: 1700px;
    min-height: 62px;

    margin-inline: auto;
    padding: 0;

    display: grid;

    /*
     * Desktop:
     * Sol optik denge / Menü / Sağ aksiyonlar
     */
    grid-template-columns:
        64px minmax(0, 1fr) auto;

    align-items: center;

    column-gap: 28px;
}


/* Desktop'ta brand gizli */
.nav-brand {
    display: none;
}


/* =========================================================
   03. DESKTOP MENU
========================================================= */

.nav-menu {
    min-width: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: clamp(28px, 2.2vw, 50px);

    margin: 0;
    padding: 0;

    list-style: none;
}

.nav-menu>li {
    position: relative;

    flex: 0 0 auto;

    margin: 0;
    padding: 0;
}

.nav-menu>li>a {
    position: relative;

    min-height: 62px;

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

    padding: 0 8px;

    color: rgba(255, 255, 255, .84);

    text-decoration: none;

    white-space: nowrap;

    font-size: 14px;
    line-height: 1;
    font-weight: 800;

    letter-spacing: -.01em;

    transition:
        color .22s ease,
        background .22s ease;
}


/* =========================================================
   04. MENU UNDERLINE
========================================================= */

.nav-menu>li>a::after {
    content: "";

    position: absolute;

    right: 4px;
    bottom: 0;
    left: 4px;

    height: 3px;

    border-radius: 3px 3px 0 0;

    background: #f5b400;

    transform: scaleX(0);
    transform-origin: center;

    transition:
        transform .22s ease;
}

.nav-menu>li>a:hover,
.nav-menu>li>a.active {
    color: #ffffff;
}

.nav-menu>li>a:hover::after,
.nav-menu>li>a.active::after {
    transform: scaleX(1);
}


/* =========================================================
   05. ACTIVE MENU
========================================================= */

.nav-menu>li>a.active {
    padding-inline: 14px;

    border-radius: 6px;

    background:
        linear-gradient(180deg,
            rgba(255, 255, 255, .12),
            rgba(255, 255, 255, .045));

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .08),
        0 8px 18px rgba(0, 0, 0, .12);
}


/* =========================================================
   06. DROPDOWN
========================================================= */

.nav-menu .has-dropdown {
    position: relative;
}


/*
 * Menü ile dropdown arasında boşluk
 * oluştuğunda hover kaybolmasın.
 */
.nav-menu .has-dropdown::before {
    content: "";

    position: absolute;

    top: 100%;
    left: -22px;

    width: calc(100% + 44px);
    height: 24px;

    z-index: 4;

    background: transparent;
}

.nav-menu .dropdown-menu {
    position: absolute;

    top: calc(100% + 12px);
    left: 50%;

    z-index: 100;

    min-width: 235px;

    margin: 0;
    padding: 8px;

    list-style: none;

    border: 1px solid rgba(7, 28, 53, .10);
    border-radius: 7px;

    background: #ffffff;

    box-shadow:
        0 20px 50px rgba(2, 12, 29, .18);

    opacity: 0;
    visibility: hidden;

    pointer-events: none;

    transform:
        translateX(-50%) translateY(-7px);

    transition:
        opacity .18s ease,
        visibility .18s ease,
        transform .18s ease;
}

.nav-menu .has-dropdown:hover>.dropdown-menu,
.nav-menu .has-dropdown:focus-within>.dropdown-menu {
    opacity: 1;
    visibility: visible;

    pointer-events: auto;

    transform:
        translateX(-50%) translateY(0);
}

.nav-menu .dropdown-menu li {
    margin: 0;
    padding: 0;
}

.nav-menu .dropdown-menu a {
    width: 100%;

    display: flex;
    align-items: center;

    min-height: 38px;

    padding: 9px 12px;

    border-radius: 6px;

    color: #23364d;

    text-decoration: none;

    font-size: .78rem;
    font-weight: 700;

    transition:
        color .16s ease,
        background .16s ease;
}

.nav-menu .dropdown-menu a:hover {
    color: #071c35;

    background: #f5f7fa;
}


/* =========================================================
   07. DESKTOP RIGHT ACTIONS
========================================================= */

.nav-desktop-actions {
    justify-self: end;

    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 9px;

    min-width: max-content;

    margin: 0;
    padding: 0;
}


/* =========================================================
   08. CENTER PORTAL BUTTON
========================================================= */

.center-portal-trigger {
    position: relative;

    width: 42px;
    height: 42px;

    min-width: 42px;
    min-height: 42px;

    flex: 0 0 42px;

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

    margin: 0;
    padding: 0;

    border: 1px solid rgba(245, 180, 0, .30);
    border-radius: 7px;

    background:
        rgba(245, 180, 0, .08);

    color: #f5b400;

    text-decoration: none;

    line-height: 1;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .06),
        0 6px 18px rgba(0, 0, 0, .10);

    transition:
        color .18s ease,
        border-color .18s ease,
        background .18s ease,
        transform .18s ease,
        box-shadow .18s ease;
}


/*
 * Portal ikonuna menu underline
 * veya başka pseudo element bulaşmasın.
 */
.center-portal-trigger::before,
.center-portal-trigger::after {
    content: none !important;
    display: none !important;
}

.center-portal-trigger svg {
    display: block;

    width: 20px;
    height: 20px;

    stroke: currentColor;

    color: currentColor;

    fill: none;

    pointer-events: none;
}

.center-portal-trigger:hover {
    transform: translateY(-1px);

    border-color: #f5b400;

    background: #f5b400;

    color: #061b3a;

    box-shadow:
        0 10px 24px rgba(245, 180, 0, .18);
}


/* =========================================================
   09. SEARCH BUTTON
========================================================= */

.search-trigger {
    width: 42px;
    height: 42px;

    min-width: 42px;
    min-height: 42px;

    flex: 0 0 42px;

    display: inline-grid;
    place-items: center;

    margin: 0;
    padding: 0;

    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 7px;

    color: #ffffff;

    background:
        rgba(255, 255, 255, .06);

    cursor: pointer;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .05);

    transition:
        color .18s ease,
        border-color .18s ease,
        background .18s ease,
        transform .18s ease;
}

.search-trigger svg {
    display: block;

    width: 18px;
    height: 18px;
}

.search-trigger:hover {
    transform: translateY(-1px);

    border-color: #f5b400;

    color: #061b3a;

    background: #f5b400;
}


/* =========================================================
   10. FOCUS
========================================================= */

.center-portal-trigger:focus-visible,
.search-trigger:focus-visible,
.mobile-portal-trigger:focus-visible,
.mobile-nav-search-trigger:focus-visible,
.mobile-menu-trigger:focus-visible {
    outline: 2px solid #f5b400;
    outline-offset: 3px;
}


/* Screen reader */
.sr-only {
    position: absolute !important;

    width: 1px !important;
    height: 1px !important;

    padding: 0 !important;
    margin: -1px !important;

    overflow: hidden !important;

    clip: rect(0, 0, 0, 0) !important;

    white-space: nowrap !important;

    border: 0 !important;
}


/* =========================================================
   11. MOBILE ACTIONS
========================================================= */

.nav-mobile-actions {
    display: none;
}


/* =========================================================
   12. LARGE DESKTOP
========================================================= */

@media (min-width: 1500px) {

    .nav-container {
        width:
            min(calc(100% - 96px),
                1680px);

        max-width: 1680px;

        grid-template-columns:
            58px minmax(0, 1fr) auto;

        column-gap: 30px;
    }

    .nav-menu {
        gap:
            clamp(32px,
                2.2vw,
                52px);
    }

    .nav-menu>li>a {
        font-size: 13.5px;
    }
}


/* =========================================================
   13. MEDIUM DESKTOP
========================================================= */

@media (max-width: 1250px) and (min-width: 993px) {

    .nav-container {
        width:
            min(calc(100% - 34px),
                1280px);

        grid-template-columns:
            40px minmax(0, 1fr) auto;

        column-gap: 13px;
    }

    .nav-menu {
        gap: 17px;
    }

    .nav-menu>li>a {
        padding-inline: 5px;

        font-size: 11.7px;
    }

    .center-portal-trigger,
    .search-trigger {
        width: 38px;
        height: 38px;

        min-width: 38px;
        min-height: 38px;

        flex-basis: 38px;
    }

    .center-portal-trigger svg {
        width: 18px;
        height: 18px;
    }

    .search-trigger svg {
        width: 17px;
        height: 17px;
    }
}


/* =========================================================
   14. TABLET + MOBILE
========================================================= */

@media (max-width: 992px) {

    .main-nav {
        min-height: 64px;
    }

    .nav-container {
        width: calc(100% - 28px);
        min-height: 64px;

        display: flex;
        align-items: center;

        column-gap: 12px;
    }


    /* Desktop alanları mobilde kapat */
    .nav-menu,
    .nav-desktop-actions {
        display: none;
    }


    /* Mobil marka */
    .nav-brand {
        flex: 1 1 auto;

        min-width: 0;

        display: flex;
        align-items: center;

        gap: 10px;

        color: #ffffff;

        text-decoration: none;
    }

    .nav-brand img {
        width: 38px;
        height: 38px;

        flex: 0 0 38px;

        object-fit: contain;
    }

    .nav-brand-mark {
        width: 38px;
        height: 38px;

        flex: 0 0 38px;

        display: flex;
        align-items: center;
        justify-content: center;

        border-radius: 7px;

        background: #f5b400;

        color: #061b3a;

        font-size: .9rem;
        font-weight: 900;
    }

    .nav-brand-copy {
        min-width: 0;
    }

    .nav-brand-copy strong,
    .nav-brand-copy small {
        display: block;
    }

    .nav-brand-copy strong {
        overflow: hidden;

        color: #ffffff;

        font-size: .76rem;
        font-weight: 800;

        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .nav-brand-copy small {
        margin-top: 2px;

        color: rgba(255, 255, 255, .48);

        font-size: .60rem;
    }


    /* Mobil sağ aksiyonlar */

    .nav-mobile-actions {
        flex: 0 0 auto;

        display: flex;
        align-items: center;

        gap: 7px;
    }

    .mobile-portal-trigger,
    .mobile-nav-search-trigger,
    .mobile-menu-trigger {
        width: 38px;
        height: 38px;

        min-width: 38px;
        min-height: 38px;

        flex: 0 0 38px;

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

        margin: 0;
        padding: 0;

        border-radius: 7px;

        cursor: pointer;

        transition:
            color .18s ease,
            border-color .18s ease,
            background .18s ease;
    }

    .mobile-portal-trigger {
        border: 1px solid rgba(245, 180, 0, .30);

        background:
            rgba(245, 180, 0, .08);

        color: #f5b400;

        text-decoration: none;
    }

    .mobile-nav-search-trigger,
    .mobile-menu-trigger {
        border:
            1px solid rgba(255, 255, 255, .13);

        background:
            rgba(255, 255, 255, .06);

        color: #ffffff;
    }

    .mobile-portal-trigger svg,
    .mobile-nav-search-trigger svg,
    .mobile-menu-trigger svg {
        display: block;

        width: 18px;
        height: 18px;
    }

    .mobile-portal-trigger:hover {
        border-color: #f5b400;

        background: #f5b400;

        color: #061b3a;
    }

    .mobile-nav-search-trigger:hover,
    .mobile-menu-trigger:hover {
        border-color: #f5b400;

        color: #f5b400;
    }
}


/* =========================================================
   15. MOBILE
========================================================= */

@media (max-width: 768px) {

    /*
     * Üst kurumsal header
     * mobilde gizleniyor.
     */
    .site-header.site-header-v2 .site-header__top {
        display: none !important;
    }

    .nav-container {
        width: calc(100% - 22px);
    }

    .nav-brand img,
    .nav-brand-mark {
        width: 34px;
        height: 34px;

        flex-basis: 34px;
    }

    .nav-brand-copy strong {
        max-width: 190px;
    }

    .mobile-portal-trigger,
    .mobile-nav-search-trigger,
    .mobile-menu-trigger {
        width: 36px;
        height: 36px;

        min-width: 36px;
        min-height: 36px;

        flex-basis: 36px;
    }

    .mobile-portal-trigger svg,
    .mobile-nav-search-trigger svg,
    .mobile-menu-trigger svg {
        width: 17px;
        height: 17px;
    }
}


/* =========================================================
   16. SMALL MOBILE
========================================================= */

@media (max-width: 420px) {

    .nav-container {
        width: calc(100% - 16px);

        column-gap: 8px;
    }

    .nav-brand-copy strong {
        max-width: 145px;

        font-size: .70rem;
    }

    .nav-brand-copy small {
        display: none;
    }

    .nav-mobile-actions {
        gap: 5px;
    }

    .mobile-portal-trigger,
    .mobile-nav-search-trigger,
    .mobile-menu-trigger {
        width: 34px;
        height: 34px;

        min-width: 34px;
        min-height: 34px;

        flex-basis: 34px;
    }

    .mobile-portal-trigger svg,
    .mobile-nav-search-trigger svg,
    .mobile-menu-trigger svg {
        width: 16px;
        height: 16px;
    }
}

/* =========================================================
   FINAL FIX — MERKEZ PORTALI HEADER BUTTON
   BUNU HEADER.CSS DOSYASININ EN ALTINA EKLE
========================================================= */

.main-nav .nav-container .nav-desktop-actions a.center-portal-trigger {
    appearance: none !important;
    -webkit-appearance: none !important;

    position: relative !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 42px !important;
    height: 42px !important;

    min-width: 42px !important;
    min-height: 42px !important;
    max-width: 42px !important;
    max-height: 42px !important;

    flex: 0 0 42px !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 1px solid rgba(255, 255, 255, .14) !important;
    border-radius: 7px !important;

    background: rgba(255, 255, 255, .06) !important;
    background-color: rgba(255, 255, 255, .06) !important;
    background-image: none !important;

    color: #f5b400 !important;

    text-decoration: none !important;

    line-height: 1 !important;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .05),
        0 5px 16px rgba(0, 0, 0, .10) !important;

    overflow: hidden !important;

    opacity: 1 !important;

    filter: none !important;

    transition:
        background .18s ease,
        border-color .18s ease,
        color .18s ease,
        transform .18s ease !important;
}


/* İkon */

.main-nav .nav-container .nav-desktop-actions a.center-portal-trigger svg {
    display: block !important;

    width: 20px !important;
    height: 20px !important;

    min-width: 20px !important;
    min-height: 20px !important;

    max-width: 20px !important;
    max-height: 20px !important;

    margin: 0 !important;
    padding: 0 !important;

    color: #f5b400 !important;

    stroke: #f5b400 !important;
    fill: none !important;

    opacity: 1 !important;

    filter: none !important;
}


/* Eski pseudo stiller tamamen kapalı */

.main-nav .nav-container .nav-desktop-actions a.center-portal-trigger::before,
.main-nav .nav-container .nav-desktop-actions a.center-portal-trigger::after {
    content: none !important;
    display: none !important;
}


/* Hover */

.main-nav .nav-container .nav-desktop-actions a.center-portal-trigger:hover {
    transform: translateY(-1px) !important;

    border-color: #f5b400 !important;

    background: #f5b400 !important;
    background-color: #f5b400 !important;

    color: #061b3a !important;

    box-shadow:
        0 8px 22px rgba(245, 180, 0, .18) !important;
}

.main-nav .nav-container .nav-desktop-actions a.center-portal-trigger:hover svg {
    color: #061b3a !important;
    stroke: #061b3a !important;
}