/* =========================================================
   ALTINFİYATLARI INDEPENDENT HEADER
   Prefix: afh-
========================================================= */

/* DARK - mevcut tasarım birebir */
:root {
    --afh-header-bg: rgba(15, 17, 21, 0.97);
    --afh-header-border: rgba(255, 255, 255, 0.07);

    --afh-logo-text: #F5F5F5;
    --afh-nav-text: #9CA3AF;

    --afh-mobile-border: rgba(255, 255, 255, 0.09);
    --afh-mobile-trigger-bg: #15181D;
    --afh-mobile-panel-bg: #181B20;
    --afh-mobile-nav-text: #B4BAC3;
    --afh-mobile-account-border: rgba(255, 255, 255, 0.07);

    --afh-panel-shadow: rgba(0, 0, 0, 0.38);

    --afh-toggle-border: #292d34;
    --afh-toggle-bg: #111419;
    --afh-toggle-thumb: #d4af37;

    --afh-gold: #d4af37;
    --afh-gold-text: #111317;
}


/* LIGHT */
html[data-theme="light"] {
    --afh-header-bg: rgba(250, 250, 250, 0.97);
    --afh-header-border: #E0E3E7;

    --afh-logo-text: #181A1F;
    --afh-nav-text: #6D737C;

    --afh-mobile-border: #E0E3E7;
    --afh-mobile-trigger-bg: #F4F5F6;
    --afh-mobile-panel-bg: #FFFFFF;
    --afh-mobile-nav-text: #555C66;
    --afh-mobile-account-border: #E0E3E7;

    --afh-panel-shadow: rgba(0, 0, 0, 0.12);

    --afh-toggle-border: #e0e3e7;
    --afh-toggle-bg: #f2f3f5;
    --afh-toggle-thumb: #d4af37;

    --afh-gold: #d4af37;
    --afh-gold-text: #111317;
}


html {
    scrollbar-width: thin;
    scrollbar-color: #d4af37 transparent;
}


/* Chrome, Edge, Safari */

html::-webkit-scrollbar {
    width: 8px;
}

html::-webkit-scrollbar-track {
    background: transparent;
}

html::-webkit-scrollbar-thumb {
    border-radius: 999px;

    background: linear-gradient(
        180deg,
        #f2c94c 0%,
        #d4af37 50%,
        #b88914 100%
    );
}

html::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(
        180deg,
        #f6d96a 0%,
        #d4af37 50%,
        #a97d10 100%
    );
}


::selection {
    background: #FAF5E7;
    color: #111317;
}

::-moz-selection {
    background: #FAF5E7;
    color: #111317;
}


.afh-header,
.afh-header * {
    box-sizing: border-box;
}

.afh-header {
    position: relative;
    z-index: 1000;

    width: 100%;
    height: 70px;

    border-bottom: 1px solid var(--afh-header-border);

    background: var(--afh-header-bg);

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

.afh-header a {
    color: inherit;
    text-decoration: none;
}


/* =========================================================
   INNER
========================================================= */

.afh-inner {
    width: min(1180px, calc(100% - 40px));
    height: 100%;

    margin: 0 auto;

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

    gap: 30px;
}


/* =========================================================
   LOGO
========================================================= */

.afh-logo {
    display: flex;
    align-items: center;

    flex-shrink: 0;

    gap: 9px;
}

.afh-logo-icon {
    width: 34px;
    height: 34px;

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

    border: 1px solid rgba(212, 175, 55, 0.40);
    border-radius: 9px;

    background: rgba(212, 175, 55, 0.07);

    color: var(--afh-gold);

    font-size: 14px;
    font-weight: 700;
}

.afh-logo-text {
    color: var(--afh-logo-text);

    font-size: 19px;
    font-weight: 600;

    white-space: nowrap;
}

.afh-logo-text strong {
    color: var(--afh-gold);
}


/* =========================================================
   DESKTOP NAV
========================================================= */

.afh-nav {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 25px;
}

.afh-nav-link {
    position: relative;

    padding: 25px 0;

    color: var(--afh-nav-text) !important;

    font-size: 12px;
    font-weight: 600;

    white-space: nowrap;

    transition:
        color 0.18s ease;
}

.afh-nav-link:hover {
    color: var(--afh-gold) !important;
}

.afh-nav-link::after {
    content: "";

    position: absolute;

    left: 50%;
    bottom: 0;

    width: 0;
    height: 2px;

    transform: translateX(-50%);

    background: var(--afh-gold);

    transition: width 0.18s ease;
}

.afh-nav-link:hover::after {
    width: 100%;
}


/* =========================================================
   DESKTOP GOLD DROPDOWN
========================================================= */

.afh-nav-dropdown {
    position: relative;
}

.afh-nav-dropdown > summary {
    list-style: none;
    cursor: pointer;
}

.afh-nav-dropdown > summary::-webkit-details-marker {
    display: none;
}

.afh-dropdown-trigger {
    display: flex;
    align-items: center;

    gap: 5px;
}

.afh-dropdown-chevron {
    display: inline-block;

    margin-top: -2px;

    color: var(--afh-nav-text);

    font-size: 12px;

    transition:
        color 0.18s ease,
        transform 0.18s ease;
}

.afh-nav-dropdown:hover .afh-dropdown-trigger,
.afh-nav-dropdown[open] .afh-dropdown-trigger {
    color: var(--afh-gold) !important;
}

.afh-nav-dropdown:hover .afh-dropdown-trigger::after,
.afh-nav-dropdown[open] .afh-dropdown-trigger::after {
    width: 100%;
}

.afh-nav-dropdown:hover .afh-dropdown-chevron,
.afh-nav-dropdown[open] .afh-dropdown-chevron {
    color: var(--afh-gold);

    transform: rotate(180deg);
}

.afh-dropdown-menu {
    position: absolute;

    top: calc(100% - 1px);
    left: 50%;

    z-index: 1100;

    width: 260px;

    padding: 7px;

    opacity: 0;
    visibility: hidden;

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

    border: 1px solid var(--afh-mobile-border);
    border-radius: 11px;

    background: var(--afh-mobile-panel-bg);

    box-shadow:
        0 18px 45px var(--afh-panel-shadow);

    transition:
        opacity 0.16s ease,
        visibility 0.16s ease,
        transform 0.16s ease;
}

.afh-nav-dropdown:hover .afh-dropdown-menu,
.afh-nav-dropdown:focus-within .afh-dropdown-menu,
.afh-nav-dropdown[open] .afh-dropdown-menu {
    opacity: 1;
    visibility: visible;

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

.afh-dropdown-link {
    min-height: 54px;

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

    gap: 15px;

    padding: 9px 11px;

    border-radius: 7px;

    transition:
        background 0.18s ease;
}

.afh-dropdown-link:hover {
    background: rgba(212, 175, 55, 0.07);
}

.afh-dropdown-link > div {
    min-width: 0;
}

.afh-dropdown-link strong {
    display: block;

    color: var(--afh-mobile-nav-text);

    font-size: 11px;
    font-weight: 650;

    transition: color 0.18s ease;
}

.afh-dropdown-link span {
    display: block;

    margin-top: 3px;

    color: var(--afh-nav-text);

    font-size: 8px;
    font-weight: 500;
}

.afh-dropdown-link b {
    flex-shrink: 0;

    color: var(--afh-gold);

    font-size: 12px;
    font-weight: 500;

    transition: transform 0.18s ease;
}

.afh-dropdown-link:hover strong {
    color: var(--afh-gold);
}

.afh-dropdown-link:hover b {
    transform: translateX(2px);
}


/* =========================================================
   DESKTOP ACCOUNT
========================================================= */

.afh-account {
    display: flex;
    align-items: center;

    flex-shrink: 0;
}

.afh-account-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 34px;

    padding: 7px 13px;

    border: 1px solid rgba(212, 175, 55, 0.28);
    border-radius: 7px;

    background: transparent;

    color: var(--afh-gold) !important;

    font-size: 11px;
    font-weight: 700;

    white-space: nowrap;

    transition:
        background 0.18s ease,
        color 0.18s ease,
        border-color 0.18s ease;
}

.afh-account-button:hover {
    background: rgba(212, 175, 55, 0.09);

    border-color: rgba(212, 175, 55, 0.55);
}

.afh-logout-button {
    color: var(--afh-gold) !important;
}


/* =========================================================
   MOBILE MENU
========================================================= */

.afh-mobile-menu {
    position: relative;

    display: none;
}

.afh-mobile-menu > summary {
    list-style: none;
}

.afh-mobile-menu > summary::-webkit-details-marker {
    display: none;
}

.afh-mobile-trigger {
    width: 38px;
    height: 38px;

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

    gap: 4px;

    border: 1px solid var(--afh-mobile-border);
    border-radius: 8px;

    background: var(--afh-mobile-trigger-bg);

    cursor: pointer;
}

.afh-burger-line {
    width: 16px;
    height: 1.5px;

    display: block;

    border-radius: 5px;

    background: var(--afh-gold);

    transition:
        transform 0.18s ease,
        opacity 0.18s ease;
}


/* OPEN ICON */

.afh-mobile-menu[open] .afh-burger-line:nth-child(1) {
    transform: translateY(5.5px) rotate(45deg);
}

.afh-mobile-menu[open] .afh-burger-line:nth-child(2) {
    opacity: 0;
}

.afh-mobile-menu[open] .afh-burger-line:nth-child(3) {
    transform: translateY(-5.5px) rotate(-45deg);
}


/* =========================================================
   MOBILE DROPDOWN PANEL
========================================================= */

.afh-mobile-panel {
    position: absolute;

    top: 48px;
    right: 0;

    width: 260px;

    overflow: hidden;

    border: 1px solid var(--afh-mobile-border);
    border-radius: 11px;

    background: var(--afh-mobile-panel-bg);

    box-shadow:
        0 18px 45px var(--afh-panel-shadow);
}

.afh-mobile-nav {
    display: flex;
    flex-direction: column;

    padding: 8px;
}

.afh-mobile-nav a {
    display: flex;
    align-items: center;

    min-height: 42px;

    padding: 0 12px;

    border-radius: 7px;

    color: var(--afh-mobile-nav-text) !important;

    font-size: 12px;
    font-weight: 600;

    transition:
        color 0.18s ease,
        background 0.18s ease;
}

.afh-mobile-nav a:hover {
    background: rgba(212, 175, 55, 0.07);

    color: var(--afh-gold) !important;
}


/* MOBILE GROUP */

.afh-mobile-nav-title {
    display: block;

    margin: 7px 12px 3px;
    padding-top: 8px;

    border-top: 1px solid var(--afh-mobile-account-border);

    color: var(--afh-gold);

    font-size: 8px;
    font-weight: 800;

    letter-spacing: 1px;
}

.afh-mobile-nav .afh-mobile-sub-link {
    min-height: 37px;

    padding-left: 22px;

    color: var(--afh-nav-text) !important;

    font-size: 11px;
}


/* =========================================================
   MOBILE ACCOUNT
========================================================= */

.afh-mobile-account {
    padding: 10px;

    border-top: 1px solid var(--afh-mobile-account-border);
}

.afh-mobile-account-link {
    width: 100%;
    min-height: 39px;

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

    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 7px;

    color: var(--afh-gold) !important;

    font-size: 11px;
    font-weight: 700;

    transition:
        color 0.18s ease,
        background 0.18s ease;
}

.afh-mobile-account-link:hover {
    background: var(--afh-gold);

    color: var(--afh-gold-text) !important;
}


/* =========================================================
   THEME TOGGLE
========================================================= */

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 4px;

    border: 0;

    background: transparent;

    cursor: pointer;
}

.theme-toggle-track {
    position: relative;

    width: 40px;
    height: 22px;

    display: block;

    border: 1px solid var(--afh-toggle-border);
    border-radius: 20px;

    background: var(--afh-toggle-bg);

    transition: .2s ease;
}

.theme-toggle-thumb {
    position: absolute;

    top: 3px;
    left: 3px;

    width: 14px;
    height: 14px;

    border-radius: 50%;

    background: var(--afh-toggle-thumb);

    transition: transform .22s ease;
}

html[data-theme="light"] .theme-toggle-thumb {
    transform: translateX(18px);
}

.theme-toggle:hover .theme-toggle-track {
    border-color: var(--afh-toggle-thumb);
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 950px) {

    .afh-nav {
        display: none;
    }

    .afh-account {
        display: none;
    }

    .afh-mobile-menu {
        display: block;
    }

}


@media (max-width: 650px) {

    .afh-header {
        height: 62px;
    }

    .afh-inner {
        width: calc(100% - 28px);
    }

    .afh-logo-icon {
        width: 31px;
        height: 31px;

        border-radius: 8px;
    }

    .afh-logo-text {
        font-size: 17px;
    }

    .afh-mobile-trigger {
        width: 35px;
        height: 35px;
    }

    .afh-mobile-panel {
        top: 43px;

        width: min(270px, calc(100vw - 28px));
    }

}