/* =====================================
   HEADER — Premium Minimal
===================================== */

.brand-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 16px 0;
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 18, 46, 0.06);
    border-radius: 0 0 20px 20px;
    box-shadow: 0 8px 32px rgba(0, 18, 46, 0.07);
    transition: padding var(--ease), box-shadow var(--ease);
    z-index: 999;
}

.brand-header.scrolled {
    padding: 12px 0;
    box-shadow: 0 12px 40px rgba(0, 18, 46, 0.1);
    border-bottom-color: rgba(0, 18, 46, 0.08);
}

.brand-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

@media (min-width: 993px) {
    .brand-header-inner {
        display: grid;
        /* Sağ sütun 1fr olunca dar ekranda aksiyonlar sıkışıp metin iki satıra düşer; max-content ile tek satır korunur */
        grid-template-columns: minmax(0, 1fr) auto max-content;
        align-items: center;
        gap: 1rem 1.25rem;
        flex-wrap: nowrap;
    }

    .brand-logo {
        justify-self: start;
        min-width: 0;
    }

    .brand-nav {
        justify-self: center;
        min-width: 0;
    }

    .brand-actions {
        justify-self: end;
        flex-wrap: nowrap;
        flex-shrink: 0;
        gap: 10px;
    }

    .brand-header .brand-login,
    .brand-header .btn-brand {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .brand-login {
        padding: 9px 12px;
        font-size: 13px;
    }

    .brand-header .btn-brand {
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* Dil seçici — masaüstü (dropdown) */
.brand-lang-switcher {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.2rem 0.35rem;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}
/* Dil bayrağı (PNG — Windows’ta emoji bayrakları güvenilir değil) */
.brand-lang-switcher__flag {
    line-height: 0;
    margin-right: 0.1rem;
    display: inline-flex;
    align-items: center;
}
.brand-lang-switcher__flag img {
    display: block;
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.brand-lang-switcher__sep {
    color: var(--border-light);
    user-select: none;
    margin: 0 0.1rem;
}
.brand-lang-switcher__link {
    color: var(--text);
    text-decoration: none;
    padding: 2px 4px;
    border-radius: 4px;
    transition: color var(--ease), background var(--ease);
}
.brand-lang-switcher__link:hover {
    color: var(--primary);
}
.brand-lang-switcher__link.is-active {
    color: var(--primary);
    font-weight: 700;
    background: rgba(242, 68, 5, 0.08);
}

.brand-lang-dropdown {
    position: relative;
}
.brand-lang-dropdown > summary {
    list-style: none;
    cursor: pointer;
}
.brand-lang-dropdown > summary::-webkit-details-marker {
    display: none;
}
.brand-lang-dropdown__summary {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 6px 10px;
    border-radius: 12px;
    border: 1px solid rgba(0, 18, 46, 0.12);
    background: #f8fafc;
    color: #0f172a;
    user-select: none;
    transition: background var(--ease), border-color var(--ease);
}
.brand-header.scrolled .brand-lang-dropdown__summary {
    background: #f8fafc;
}
.brand-lang-dropdown__summary:hover {
    border-color: rgba(242, 68, 5, 0.35);
}
.brand-lang-dropdown__current {
    font-weight: 700;
    letter-spacing: 0.02em;
}
.brand-lang-dropdown__chev {
    font-size: 0.85rem;
    opacity: 0.75;
}
.brand-lang-dropdown[open] .brand-lang-dropdown__chev {
    transform: rotate(180deg);
}
.brand-lang-dropdown__menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 160px;
    max-height: min(70vh, 360px);
    overflow-y: auto;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 40px rgba(17, 24, 39, 0.12);
    z-index: 1000;
}
.brand-lang-dropdown__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 8px 10px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
}
.brand-lang-dropdown__item-flag {
    line-height: 0;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
}
.brand-lang-dropdown__item-flag img {
    display: block;
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.brand-lang-dropdown__item-label {
    min-width: 0;
}
.brand-lang-dropdown__item:hover {
    background: rgba(242, 68, 5, 0.08);
    color: var(--primary);
}
.brand-lang-dropdown__item.is-active {
    background: rgba(242, 68, 5, 0.12);
    color: var(--primary);
}

/* Mobile dropdown */
.mobile-lang-dropdown > summary {
    list-style: none;
    cursor: pointer;
}
.mobile-lang-dropdown > summary::-webkit-details-marker {
    display: none;
}
.mobile-lang-dropdown__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    background: rgba(0, 0, 0, 0.04);
    color: #111;
}
.mobile-lang-dropdown__summary .mobile-lang-dropdown__chev {
    color: var(--text-secondary);
    opacity: 0.85;
    font-size: 0.9rem;
}
.mobile-lang-dropdown__menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px 2px 0 2px;
}
.mobile-lang-dropdown__item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 10px 10px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    background: rgba(0, 0, 0, 0.03);
    color: #111;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
}
.mobile-lang-dropdown__item-flag {
    line-height: 0;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
}
.mobile-lang-dropdown__item-flag img {
    display: block;
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.mobile-lang-dropdown__item-label {
    min-width: 0;
    color: inherit;
}
.mobile-lang-dropdown__item.is-active {
    border-color: rgba(242, 68, 5, 0.45);
    background: rgba(242, 68, 5, 0.14);
    color: #111;
}
.mobile-lang-dropdown__item:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #111;
}

/* =====================================
   LOGO — ikon + BLAXN (kurumsal)
===================================== */

.brand-logo {
    display: flex;
    align-items: center;
}

.brand-logo--mark {
    gap: 0.4rem;
    text-decoration: none;
    color: inherit;
}

.brand-logo__icon {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #ff4d00 0%, #ff6a28 100%);
    color: #fff;
    font-size: 1.35rem;
    box-shadow: 0 8px 22px rgba(255, 77, 0, 0.28);
    flex-shrink: 0;
    transition: transform var(--ease), box-shadow var(--ease);
}

.brand-logo__word {
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    color: #0f172a;
}

.brand-header.scrolled .brand-logo__icon {
    width: 34px;
    height: 34px;
    font-size: 1.05rem;
}

.brand-header.scrolled .brand-logo__word {
    font-size: 1rem;
}

.brand-logo--mark:hover .brand-logo__icon {
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(255, 77, 0, 0.35);
}

.brand-logo img,
.brand-logo__img {
    height: 48px;
    width: auto;
    max-width: 240px;
    object-fit: contain;
    transition: height var(--ease), max-width var(--ease);
}

.brand-header.scrolled .brand-logo img,
.brand-header.scrolled .brand-logo__img {
    height: 42px;
    max-width: 200px;
}

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

.brand-nav {
    display: flex;
    align-items: center;
    gap: clamp(8px, 1vw, 16px);
}

.brand-nav a {
    display: inline-flex;
    align-items: center;
    gap: 0;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    transition: color var(--ease);
}

.brand-nav a:hover {
    color: #ff4d00;
    text-decoration: none;
}

.brand-nav a.active {
    color: #ff4d00;
    font-weight: 700;
}

/* =====================================
   ACTIONS (UPDATED)
===================================== */

.brand-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* LOGIN — LIGHT BUTTON */

.brand-login {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.15;

    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;

    background: #ffffff;
    border: 1px solid rgba(0, 18, 46, 0.12);
    border-radius: 12px;

    color: #0f172a;
    text-decoration: none;

    transition: all var(--ease);
}

.brand-login i {
    font-size: 16px;
    display: flex;
    align-items: center;
}

.brand-login:hover {
    background: rgba(255, 90, 0, 0.05);
    border-color: var(--primary);
    color: var(--primary);
}

/* PRIMARY BUTTON — SAME AS SLIDER */

.btn-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 1.15;

    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;

    background: var(--primary);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;

    transition: all var(--ease);
}

.brand-header .btn-brand {
    background: linear-gradient(135deg, #ff4d00 0%, #ff6a28 100%);
    border-radius: 999px;
    padding: 11px 22px;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(255, 77, 0, 0.28);
}

.brand-header .btn-brand:hover {
    background: linear-gradient(135deg, #e64500 0%, #ff5a18 100%);
    filter: brightness(1.02);
}

.btn-brand i {
    font-size: 16px;
    display: flex;
    align-items: center;
}

.btn-brand:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* =====================================
   MOBILE TOGGLE
===================================== */

.brand-mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    background: none;
    border: none;
}

.brand-mobile-toggle span {
    width: 100%;
    height: 1.5px;
    background: var(--text);
    transition: transform var(--ease), opacity var(--ease);
}

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

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 320px;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    background: var(--bg);
    box-shadow: -4px 0 24px rgba(0,0,0,0.06);
    transition: right 0.35s ease;
    z-index: 1001;
    overflow-y: auto;
    overflow-x: hidden;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-inner {
    padding: 80px 28px 40px;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.mobile-menu-top {
    position: absolute;
    top: 20px;
    right: 24px;
}

.mobile-close {
    font-size: 1.25rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
}

.mobile-close:hover {
    color: var(--primary);
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 32px;
}

.mobile-nav a {
    display: inline-flex;
    align-items: center;
    gap: 0;
    font-size: 17px;
    padding: 12px 0;
    color: var(--text);
}

.mobile-nav a:hover {
    color: var(--primary);
}

.mobile-nav a.active {
    color: var(--primary);
    font-weight: 600;
}

.mobile-lang-switcher {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 1.25rem;
    padding: 0.75rem 0;
    font-size: 15px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
}
.mobile-lang-switcher__label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
    color: var(--text);
}
.mobile-lang-switcher__flag {
    line-height: 0;
    display: inline-flex;
    align-items: center;
}
.mobile-lang-switcher__flag img {
    display: block;
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.mobile-lang-switcher__links {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}
.mobile-lang-switcher__link {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
}
.mobile-lang-switcher__link:hover {
    color: var(--primary);
}
.mobile-lang-switcher__link.is-active {
    color: var(--primary);
    font-weight: 700;
    background: rgba(242, 68, 5, 0.08);
}

.mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

.mobile-actions .brand-login,
.mobile-actions .btn-brand {
    justify-content: center;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Overlay */

.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.25);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--ease), visibility var(--ease);
    z-index: 1000;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (prefers-color-scheme: dark) {
    .mobile-menu {
        background: #141416;
        color: #f5f5f7;
        color-scheme: dark;
        box-shadow: -4px 0 32px rgba(0, 0, 0, 0.55);
    }

    .mobile-menu .mobile-close {
        color: #f5f5f7;
    }

    .mobile-menu .mobile-nav a {
        color: #f5f5f7;
    }

    .mobile-menu .mobile-lang-switcher {
        color: rgba(245, 245, 247, 0.68);
        border-bottom-color: rgba(255, 255, 255, 0.12);
    }

    .mobile-menu .mobile-lang-switcher__label {
        color: #f5f5f7;
    }

    .mobile-menu .mobile-lang-dropdown__summary {
        border-color: rgba(255, 255, 255, 0.16);
        background: rgba(255, 255, 255, 0.07);
        color: #f5f5f7;
    }

    .mobile-menu .mobile-lang-dropdown__summary .mobile-lang-dropdown__chev {
        color: rgba(245, 245, 247, 0.75);
    }

    .mobile-menu .mobile-lang-dropdown__item {
        border-color: rgba(255, 255, 255, 0.12);
        background: rgba(255, 255, 255, 0.05);
        color: #f5f5f7;
    }

    .mobile-menu .mobile-lang-dropdown__item.is-active {
        background: rgba(242, 68, 5, 0.22);
        color: #fff;
    }

    .mobile-menu .mobile-lang-dropdown__item:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
    }

    .mobile-menu .mobile-actions {
        border-top-color: rgba(255, 255, 255, 0.12);
    }

    .mobile-menu .mobile-logo {
        border-top-color: rgba(255, 255, 255, 0.12);
    }

    .mobile-menu .mobile-logo .brand-logo__word {
        color: #f8fafc;
    }

    .mobile-menu .mobile-logo .brand-logo__icon {
        box-shadow: 0 8px 22px rgba(255, 77, 0, 0.35);
    }

    /* Eski görsel logo (varsa) */
    .mobile-menu .mobile-logo img {
        filter: brightness(0) invert(1);
    }
}

/* Hamburger → X */

.brand-mobile-toggle.active span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.brand-mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.brand-mobile-toggle.active span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

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

/* Mobil: dil seçici + hamburger (masaüstü dil .brand-actions içinde kalır) */
.brand-header-mobile-tools {
    display: none;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

@media (max-width: 992px) {

    .brand-nav,
    .brand-actions {
        display: none;
    }

    .brand-header-mobile-tools {
        display: flex;
    }

    .brand-mobile-toggle {
        display: flex;
    }

    /* Araç çubuğunda kompakt dil kutusu */
    .brand-lang-switcher--header-toolbar .brand-lang-dropdown__summary {
        padding: 5px 8px;
        gap: 0.25rem;
        border-radius: 999px;
    }

    .brand-lang-switcher--header-toolbar .brand-lang-dropdown__current {
        max-width: 5.5rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 12px;
    }

    .brand-lang-switcher--header-toolbar .brand-lang-dropdown__chev {
        font-size: 0.75rem;
    }
}

@media (max-width: 380px) {
    .brand-lang-switcher--header-toolbar .brand-lang-dropdown__current {
        max-width: 3.75rem;
    }
}

/* =============================
   MOBILE LOGO FIX
============================= */

.mobile-logo {
    margin-top: 32px;
    padding-top: 24px;
    padding-bottom: 30px;
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.mobile-logo a {
    display: inline-flex;
    max-width: 100%;
    justify-content: center;
}

.mobile-logo .brand-logo--mobile-footer {
    justify-content: center;
}

.mobile-logo img,
.mobile-logo .brand-logo__img {
    height: 46px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}