/*
 * homepageNavbar3 header
 * assets2 klasorunden bagimsizdir. Tum siniflar "ihd-" on eki ile
 * yazildi, boylece tema CSS'leri (assets2/*Tema) ile cakismaz.
 * Tema renkleri eski homepage-navbar.css dosyalarindan birebir alindi;
 * aktif tema header'a "ihd-theme-..." sinifi olarak ASP'den gelir.
 * Dosya bilincli olarak sadece ASCII karakter icerir (windows-1254 uyumu).
 */

/* ---------- Tema renkleri ---------- */
.ihd-header,
.ihd-theme-anaTema {
    /* scroll edilince header + mobil cekmece arka plani */
    --ihd-grad: linear-gradient(330deg, rgba(214,65,185,1) 0%, rgba(183,84,196,1) 25%, rgba(166,97,202,1) 40%, rgba(148,109,208,1) 55%, rgba(129,121,215,1) 77%, rgba(111,133,222,1) 88%, rgba(104,138,225,1) 97%, rgba(93,145,229,1) 100%);
    /* Giris Yap butonu */
    --ihd-btn-grad: var(--ihd-grad);
    /* link hover */
    --ihd-accent: rgba(148,109,208,1);
    /* Online Kullanici / Toplam Kalem seritleri */
    --ihd-stats-color: #d641b9;
}

.ihd-theme-kusursuzTema {
    --ihd-grad: linear-gradient(150deg, #58d641 10%, #2b75c2 75%);
    --ihd-btn-grad: var(--ihd-grad);
    --ihd-accent: #6585e7;
    --ihd-stats-color: #2b75c2;
}

.ihd-theme-maviTema {
    --ihd-grad: linear-gradient(330deg, #265073, #336b99, #265073, #336b99, #265073, #ffffff);
    --ihd-btn-grad: linear-gradient(330deg, #265073, #336b99, #265073, #336b99, #265073);
    /* cekmecede beyaza giden uc gorunmesin */
    --ihd-drawer-grad: var(--ihd-btn-grad);
    --ihd-accent: #336b99;
    --ihd-stats-color: #265073;
}

.ihd-theme-siyahTema {
    --ihd-grad: linear-gradient(330deg, #1a1a1a, #404040, #1a1a1a, #404040, #1a1a1a, #808080);
    --ihd-btn-grad: var(--ihd-grad);
    --ihd-accent: #808080;
    --ihd-stats-color: #404040;
}

/* ---------- Header ---------- */
.ihd-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    width: 100%;
    padding: 10px 18px 0;
    background: transparent;
    transition: padding 0.3s;
}

.ihd-header.ihd-scrolled {
    padding-top: 8px;
    padding-bottom: 8px;
    background: var(--ihd-grad);
}

.ihd-header *,
.ihd-header *::before,
.ihd-header *::after {
    box-sizing: border-box;
}

.ihd-bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
}

/* ---------- Logo ---------- */
.ihd-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}

.ihd-brand img {
    width: 60px;
    height: auto;
    transition: width 0.3s;
}

.ihd-header .ihd-title {
    margin: 0 0 0 8px;
    font-family: 'Pretoria', 'Pretoria Woff2';
    font-size: 34px !important;
    line-height: 1.2;
    white-space: nowrap;
    color: #fff !important;
    text-shadow: 0 0 4px black;
    transition: font-size 0.3s;
}

.ihd-scrolled .ihd-brand img {
    width: 55px;
}

.ihd-header.ihd-scrolled .ihd-title {
    font-size: 28px !important;
    text-shadow: none;
}

/* ---------- Menu (masaustu: satir ici) ---------- */
.ihd-menu {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-top: 4px;
}

.ihd-menu-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px 8px;
    margin-bottom: 8px;
}

.ihd-menu-head,
.ihd-overlay {
    display: none;
}

/* ---------- Linkler ---------- */
.ihd-nav ul {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ihd-nav li {
    margin: 0 4px;
}

.ihd-nav a {
    display: block;
    padding: 4px 8px;
    border-radius: 6px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
    text-shadow: 0 0 4px black;
}

.ihd-nav a:hover,
.ihd-nav a:focus-visible {
    background: var(--ihd-accent);
    color: #fff;
    outline: none;
}

/* ---------- Giris formu ---------- */
.ihd-login {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.ihd-login label {
    display: none;
}

.ihd-login input {
    width: 128px;
    height: 24px;
    padding: 0 8px;
    border: 0;
    border-radius: 4px;
    background-color: #ffffffe6;
    color: #000;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    box-shadow: none;
}

.ihd-login input::placeholder {
    color: #5f5f5f;
}

.ihd-login input:focus {
    outline: 0;
    background-color: #fff;
}

.ihd-login input:focus::placeholder {
    color: #000;
}

.ihd-scrolled .ihd-login input {
    box-shadow: 0 0 8px -3px black;
}

.ihd-login button {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 25px;
    padding: 3px 9px;
    border: 0;
    border-radius: 4px;
    background: var(--ihd-btn-grad);
    color: #f3f3f3;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 0 8px -3px black;
    transition: 0.3s;
}

.ihd-scrolled .ihd-login button {
    border: 1px solid #ffffffc2;
}

/* Tema CSS'lerindeki #navbarSubmit2 kurali id secicisi ile geldigi icin
   boyutlar burada id ile tekrar veriliyor. */
.ihd-header #navbarSubmit2 {
    height: 25px;
    padding: 3px 9px !important;
}

.ihd-header.ihd-scrolled #navbarSubmit2 {
    border: 1px solid #ffffffc2;
}

.ihd-login button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.ihd-login .loading {
    width: 15px;
    height: 15px !important;
    border-top-color: #fff !important;
}

/* ---------- Istatistikler (Online Kullanici / Toplam Kalem) ---------- */
.ihd-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.ihd-stat {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    /* eski tasarimda serit tam genislikti ve %23'te seffaflasiyordu */
    width: 23vw;
    min-width: 400px;
    padding: 2px 6px 2px 0;
    border-radius: 4px;
    background: linear-gradient(270deg, var(--ihd-stats-color), transparent);
    color: #fff;
    font-size: 18px;
    transition: 0.3s;
}

.ihd-scrolled .ihd-stat {
    padding: 0;
    background: transparent;
}

.ihd-stat .value {
    font-size: 18px;
}

/* ---------- Hamburger (sadece mobil) ---------- */
.ihd-toggle {
    display: none;
    position: relative;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
}

.ihd-toggle span {
    position: absolute;
    left: 8px;
    right: 8px;
    height: 3px;
    border-radius: 2px;
    background: #fff;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
    transition: transform 0.3s, opacity 0.3s, top 0.3s;
}

.ihd-toggle span:nth-child(1) { top: 11px; }
.ihd-toggle span:nth-child(2) { top: 19px; }
.ihd-toggle span:nth-child(3) { top: 27px; }

.ihd-toggle[aria-expanded="true"] span:nth-child(1) {
    top: 19px;
    transform: rotate(45deg);
}

.ihd-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.ihd-toggle[aria-expanded="true"] span:nth-child(3) {
    top: 19px;
    transform: rotate(-45deg);
}

.ihd-toggle:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* ---------- Masaustu: linkler + inputlar + buton tek satirda ----------
   Genislik azaldikca font, bosluk ve input genislikleri vw ile kuculur;
   ust sinirlar eski tasarimin olculeridir (1600px ve ustu). */
@media (min-width: 992px) {
    .ihd-bar {
        gap: clamp(8px, 1vw, 16px);
    }

    .ihd-brand img {
        width: clamp(36px, 3.75vw, 60px);
    }

    .ihd-scrolled .ihd-brand img {
        width: clamp(34px, 3.45vw, 55px);
    }

    .ihd-header .ihd-title {
        margin-left: clamp(4px, 0.5vw, 8px);
        font-size: clamp(17px, 2.125vw, 34px) !important;
    }

    .ihd-header.ihd-scrolled .ihd-title {
        font-size: clamp(16px, 1.75vw, 28px) !important;
    }

    .ihd-menu {
        min-width: 0;
    }

    .ihd-menu-row {
        flex-wrap: nowrap;
        gap: clamp(4px, 0.5vw, 8px);
    }

    .ihd-nav li {
        margin: 0 clamp(0px, 0.25vw, 4px);
    }

    .ihd-nav a {
        padding: 4px clamp(4px, 0.5vw, 8px);
        font-size: clamp(13px, 1vw, 16px);
    }

    .ihd-login {
        flex-shrink: 0;
        gap: clamp(4px, 0.5vw, 8px);
    }

    .ihd-login input {
        width: clamp(88px, 8vw, 128px);
        padding: 0 clamp(4px, 0.5vw, 8px);
        font-size: clamp(12px, 0.875vw, 14px);
    }

    .ihd-login button,
    .ihd-header #navbarSubmit2 {
        padding: 3px clamp(6px, 0.5625vw, 9px) !important;
        font-size: clamp(12px, 0.875vw, 14px);
    }
}

/* ---------- 992-1200: 6 link + form tek satira sigsin diye daha sikisik ---------- */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .ihd-brand img,
    .ihd-scrolled .ihd-brand img {
        width: 36px;
    }

    /* 992px'te 17px -> 1199px'te ~24px, 1200 ustundeki olcege kesintisiz baglanir */
    .ihd-header .ihd-title {
        font-size: clamp(17px, 3.4vw - 16.7px, 25px) !important;
    }

    .ihd-header.ihd-scrolled .ihd-title {
        font-size: clamp(16px, 2.4vw - 7.8px, 21px) !important;
    }

    .ihd-nav li {
        margin: 0;
    }

    .ihd-nav a {
        padding: 4px 4px;
        font-size: 12px;
    }
}

/* ---------- Mobil: sagdan acilan cekmece ---------- */
@media (max-width: 991.98px) {
    .ihd-header {
        padding: 12px 14px;
    }

    .ihd-header.ihd-scrolled {
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .ihd-bar {
        align-items: center;
    }

    .ihd-brand img,
    .ihd-scrolled .ihd-brand img {
        width: 47px;
    }

    .ihd-header .ihd-title,
    .ihd-header.ihd-scrolled .ihd-title {
        font-size: 25px !important;
    }

    .ihd-toggle {
        display: block;
    }

    .ihd-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1040;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s, visibility 0.3s;
    }

    .ihd-menu {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 1050;
        width: 300px;
        max-width: 85vw;
        margin: 0;
        align-items: stretch;
        padding-bottom: 24px;
        background: var(--ihd-drawer-grad, var(--ihd-grad));
        box-shadow: -8px 0 24px rgba(0, 0, 0, 0.35);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 0.3s, visibility 0.3s;
    }

    .ihd-header.ihd-open .ihd-menu {
        transform: translateX(0);
        visibility: visible;
    }

    .ihd-header.ihd-open .ihd-overlay {
        opacity: 1;
        visibility: visible;
    }

    .ihd-menu-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 12px 0 24px;
        color: #fff;
        font-size: 18px;
        font-weight: 700;
        text-shadow: 0 0 4px black;
    }

    .ihd-close {
        width: 40px;
        height: 40px;
        padding: 0;
        border: 0;
        border-radius: 6px;
        background: transparent;
        color: #fff;
        font-size: 32px;
        line-height: 1;
        text-shadow: 0 0 4px black;
        cursor: pointer;
    }

    .ihd-menu-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 0;
    }

    .ihd-nav ul {
        flex-direction: column;
        align-items: stretch;
        padding: 4px 12px 12px;
    }

    .ihd-nav li {
        margin: 0 0 4px;
    }

    .ihd-nav a {
        padding: 10px 12px;
        font-size: 17px;
        font-weight: 600;
    }

    .ihd-login {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 16px 24px 0;
        border-top: 1px solid rgba(255, 255, 255, 0.35);
    }

    .ihd-login input,
    .ihd-login button {
        width: 100%;
        height: 38px;
        font-size: 15px;
    }

    .ihd-login button,
    .ihd-header #navbarSubmit2 {
        height: 38px;
        border: 1px solid #ffffffc2;
    }

    /* Mobilde Online Kullanici / Toplam Kalem gosterilmez */
    .ihd-stats {
        display: none;
    }

    body.ihd-lock {
        overflow: hidden;
    }
}

@media (max-width: 449.98px) {
    .ihd-brand img,
    .ihd-scrolled .ihd-brand img {
        width: 35px;
    }

    .ihd-header .ihd-title,
    .ihd-header.ihd-scrolled .ihd-title {
        font-size: 18px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ihd-header,
    .ihd-header * {
        transition: none !important;
    }
}
