/* ===== Header tam genişlik ===== */
html body header.tc-insaat-v5-header,
html body .tc-insaat-v5-header .header-top,
html body .tc-insaat-v5-header .menu-area,
html body .tc-insaat-v5-header #header-sticky {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

html body .tc-insaat-v5-header .header-top .second-header,
html body .tc-insaat-v5-header .menu-area .second-menu,
html body .tc-insaat-v5-header .header-top .container-box,
html body .tc-insaat-v5-header .menu-area .container-box {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

html body .tc-insaat-v5-header .header-top .container,
html body .tc-insaat-v5-header .menu-area .container,
html body .tc-insaat-v5-header .header-top .container-box,
html body .tc-insaat-v5-header .menu-area .container-box,
html body .tc-insaat-v5-header .container {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: clamp(8px, 1.15vw, 16px) !important;
    padding-right: clamp(8px, 1.15vw, 16px) !important;
    box-sizing: border-box !important;
}

/* Üst bar flex */
.tc-topbar-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 16px;
    width: 100%;
    min-height: 44px;
}

.tc-topbar-left {
    flex: 1 1 auto;
    min-width: 0;
}

.tc-topbar-right-wrap {
    flex: 0 0 auto;
    margin-left: auto;
}

.tc-insaat-v5-header .header-top .header-cta ul {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 6px 14px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.tc-insaat-v5-header .header-top .header-cta ul li {
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    font-size: 13px !important;
}

.tc-insaat-v5-header .header-top .header-cta ul li::after {
    display: none !important;
}

.tc-insaat-v5-header .header-top .header-cta ul li a,
.tc-insaat-v5-header .header-top .header-cta ul li span {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    max-width: min(280px, 32vw) !important;
}

.tc-insaat-header .header-top .tc-topbar-right {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 12px;
}

.tc-insaat-v5-header .header-top .footer-social {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
}

.tc-insaat-v5-header .header-top .footer-social a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    margin: 0 !important;
    border-radius: 5px !important;
    background: rgba(255, 255, 255, 0.12) !important;
    color: #fff !important;
    font-size: 14px !important;
    text-decoration: none !important;
}

.tc-insaat-v5-header .header-top .footer-social a:hover {
    background: #ff6600 !important;
}

.tc-insaat-v5-header .header-top .footer-social a i.fab,
html body .tc-insaat-v5-header .tc-insaat-mobile-topbar__social.footer-social a i.fab {
    font-family: "Font Awesome 6 Brands", "Font Awesome 5 Brands" !important;
    font-weight: 400 !important;
    font-style: normal !important;
}

html body .tc-insaat-v5-header .header-top {
    overflow: visible !important;
    position: relative !important;
    z-index: 10050 !important;
}

html body .tc-insaat-v5-header .menu-area,
html body .tc-insaat-v5-header #header-sticky {
    z-index: 100 !important;
}

/* ===== Sticky header — kaydırınca menü sabit kalır ===== */
@media (min-width: 992px) {
    html body.tc-insaat-is-sticky .tc-insaat-v5-header .tc-insaat-desktop-menu,
    html body.tc-insaat-is-sticky .tc-insaat-v5-header #header-sticky,
    html body .tc-insaat-v5-header .tc-insaat-desktop-menu.sticky-menu,
    html body .tc-insaat-v5-header #header-sticky.sticky-menu {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        z-index: 100000 !important;
        background: #fff !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
        transform: none !important;
    }

    html body.tc-insaat-is-sticky {
        padding-top: 92px !important;
    }
}

@media (max-width: 991.98px) {
    html body.tc-insaat-is-sticky .tc-insaat-v5-header,
    html body .tc-insaat-v5-header.tc-mobile-sticky {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 100000 !important;
        background: #fff !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1) !important;
    }

    html body.tc-insaat-is-sticky {
        padding-top: 112px !important;
    }
}

/* ===== Mobil üst bar (sosyal + dil) — yalnızca mobil ===== */
@media (min-width: 992px) {
    html body .tc-insaat-v5-header .tc-insaat-mobile-topbar {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        min-height: 0 !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
    }
}

@media (max-width: 991.98px) {
    html body .tc-insaat-v5-header .tc-insaat-mobile-topbar {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
        background: #341400;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        position: relative;
        z-index: 100002;
    }

    html body .tc-insaat-v5-header .tc-insaat-mobile-topbar__inner {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
        gap: 10px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: 42px;
        padding: 6px clamp(8px, 1.15vw, 16px);
        box-sizing: border-box;
        overflow: visible !important;
    }

    /* index.php .footer-social kurallarının üzerine — taşmayı önle */
    html body .tc-insaat-v5-header .tc-insaat-mobile-topbar__social.footer-social {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        flex-wrap: nowrap !important;
        flex: 1 1 auto !important;
        flex-shrink: 1 !important;
        min-width: 0 !important;
        max-width: calc(100% - 100px) !important;
        gap: 6px !important;
        margin: 0 auto 0 0 !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    html body .tc-insaat-v5-header .tc-insaat-mobile-topbar__social.footer-social::-webkit-scrollbar {
        display: none;
    }

    html body .tc-insaat-v5-header .tc-insaat-mobile-topbar__social.footer-social a {
        display: inline-flex !important;
        flex: 0 0 auto !important;
        align-items: center !important;
        justify-content: center !important;
        width: 30px !important;
        height: 30px !important;
        margin: 0 !important;
        border-radius: 5px !important;
        background: rgba(255, 255, 255, 0.12) !important;
        color: #fff !important;
        font-size: 13px !important;
        text-decoration: none !important;
        line-height: 1 !important;
    }

    html body .tc-insaat-v5-header .tc-insaat-mobile-topbar__social.footer-social a i.fab {
        font-family: "Font Awesome 6 Brands", "Font Awesome 5 Brands" !important;
        font-weight: 400 !important;
        font-style: normal !important;
        display: inline-block !important;
        line-height: 1 !important;
    }

    html body .tc-insaat-v5-header .tc-insaat-mobile-topbar__social.footer-social a:hover {
        background: #ff6600 !important;
    }

    .tc-lang-dropdown--mobile-topbar {
        flex: 0 0 auto !important;
        flex-shrink: 0 !important;
        margin-left: auto !important;
        z-index: 10055;
    }

    .tc-lang-dropdown--mobile-topbar .tc-lang-dropdown__trigger {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        height: 34px;
        padding: 0 12px;
        border: 1px solid rgba(255, 255, 255, 0.25);
        border-radius: 6px;
        background: rgba(255, 255, 255, 0.1);
        color: #fff !important;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        line-height: 1;
        white-space: nowrap;
    }

    .tc-lang-dropdown--mobile-topbar .tc-lang-dropdown__menu {
        right: 0;
        left: auto;
    }
}

@media (max-width: 575.98px) {
    html body .tc-insaat-v5-header .tc-insaat-mobile-topbar__inner {
        gap: 6px !important;
    }

    html body .tc-insaat-v5-header .tc-insaat-mobile-topbar__social.footer-social {
        max-width: calc(100% - 84px) !important;
        gap: 5px !important;
    }

    html body .tc-insaat-v5-header .tc-insaat-mobile-topbar__social.footer-social a {
        width: 28px !important;
        height: 28px !important;
        font-size: 12px !important;
    }

    html body .tc-insaat-v5-header .tc-lang-dropdown--mobile-topbar .tc-lang-dropdown__label {
        max-width: 64px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    html body .tc-insaat-v5-header .tc-lang-dropdown--mobile-topbar .tc-lang-dropdown__trigger {
        height: 32px;
        padding: 0 10px;
        gap: 6px;
        font-size: 12px;
    }
}

html body .tc-insaat-v5-header .tc-topbar-right-wrap,
html body .tc-insaat-v5-header .tc-topbar-right {
    overflow: visible !important;
    position: relative !important;
}

/* ===== Dil açılır liste ===== */
.tc-lang-dropdown {
    position: relative;
}

.tc-lang-dropdown--topbar {
    flex-shrink: 0;
    z-index: 10055;
}

.tc-lang-dropdown__trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    line-height: 1;
    white-space: nowrap;
}

.tc-lang-dropdown__flag,
.tc-lang-dropdown__item-flag {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
}

.tc-lang-dropdown__label {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tc-lang-dropdown__chevron {
    font-size: 10px;
    transition: transform 0.2s;
}

.tc-lang-dropdown.is-open .tc-lang-dropdown__chevron {
    transform: rotate(180deg);
}

.tc-lang-dropdown__menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    max-width: 240px;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fff !important;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    display: block;
    transition: opacity 0.15s, visibility 0.15s;
    z-index: 100000;
}

.tc-lang-dropdown.is-open .tc-lang-dropdown__menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.tc-lang-dropdown__menu li {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

/* Eski tema .tac-gt-btn stillerini geçersiz kıl */
.tc-lang-dropdown__menu .tc-lang-dropdown__item,
.tc-lang-dropdown__menu .tc-lang-gt-btn {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    height: auto !important;
    min-height: 36px !important;
    padding: 8px 10px !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 6px !important;
    background: transparent !important;
    color: #341400 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-align: left !important;
    overflow: visible !important;
    box-shadow: none !important;
    transform: none !important;
    cursor: pointer !important;
}

.tc-lang-dropdown__menu .tc-lang-dropdown__item span {
    display: inline !important;
    color: #341400 !important;
    font-size: 14px !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
}

.tc-lang-dropdown__menu .tc-lang-dropdown__item:hover,
.tc-lang-dropdown__menu .tc-lang-dropdown__item.active {
    background: #fff3eb !important;
    color: #ff6600 !important;
    border-color: transparent !important;
}

.tc-lang-dropdown__menu .tc-lang-dropdown__item:hover span,
.tc-lang-dropdown__menu .tc-lang-dropdown__item.active span {
    color: #ff6600 !important;
}

/* Google Translate gizle — dil menüsüne dokunma */
#tacGoogleTranslate,
.tc-google-translate-holder {
    position: fixed !important;
    left: -99999px !important;
    top: -99999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    overflow: hidden !important;
    visibility: hidden !important;
}

/* Eski bayrak listesi */
.tc-insaat-v5-header .tc-insaat-desktop-lang,
.tc-insaat-v5-header .tc-insaat-mobile-top-lang {
    display: none !important;
}

/* ===== Ana menü — ekrana göre akıcı ölçekleme (992px+) ===== */
@media (min-width: 992px) {
    html body .tc-insaat-v5-header .container,
    html body .tc-insaat-v5-header .container-box,
    html body.tc-insaat-is-sticky .tc-insaat-v5-header .tc-insaat-desktop-menu .container,
    html body .tc-insaat-v5-header .tc-insaat-desktop-menu.sticky-menu .container {
        max-width: 100% !important;
        width: 100% !important;
        padding-left: clamp(8px, 1.15vw, 16px) !important;
        padding-right: clamp(8px, 1.15vw, 16px) !important;
    }

    html body .tc-insaat-v5-header .tc-insaat-menu-flex,
    html body .tc-insaat-v5-header.tc-insaat-has-logo .tc-insaat-menu-flex,
    html body.tc-insaat-is-sticky .tc-insaat-v5-header.tc-insaat-has-logo .tc-insaat-menu-flex {
        display: grid !important;
        width: 100% !important;
        max-width: 100% !important;
        grid-template-columns: minmax(clamp(120px, 12vw, 210px), auto) minmax(0, 1fr) auto !important;
        gap: clamp(8px, 1vw, 16px) !important;
        align-items: center !important;
        min-height: clamp(72px, 7vw, 88px) !important;
    }

    html body .tc-insaat-v5-header .tc-insaat-logo-wrap {
        max-width: clamp(120px, 12vw, 210px) !important;
        min-width: 0 !important;
    }

    html body .tc-insaat-v5-header .tc-insaat-logo-wrap img {
        max-width: clamp(120px, 12vw, 200px) !important;
        max-height: clamp(48px, 4.8vw, 64px) !important;
    }

    html body .tc-insaat-v5-header .tc-insaat-desktop-nav {
        width: 100% !important;
        min-width: 0 !important;
        justify-self: stretch !important;
        display: flex !important;
        justify-content: flex-end !important;
        align-items: center !important;
    }

    html body .tc-insaat-v5-header .main-menu,
    html body .tc-insaat-v5-header .main-menu nav,
    html body .tc-insaat-v5-header #mobile-menu {
        width: auto !important;
        max-width: 100% !important;
        text-align: right !important;
    }

    html body .tc-insaat-v5-header .main-menu nav > ul {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: flex-end !important;
        align-items: center !important;
        width: auto !important;
        max-width: 100% !important;
        gap: clamp(6px, 0.65vw, 14px) !important;
        margin: 0 0 0 auto !important;
        padding: 0 clamp(4px, 0.6vw, 12px) 0 0 !important;
    }

    html body .tc-insaat-v5-header .main-menu nav > ul > li {
        margin: 0 !important;
        flex: 0 1 auto !important;
        min-width: 0 !important;
    }

    html body .tc-insaat-v5-header .main-menu nav > ul > li > a {
        font-size: clamp(11.5px, 0.68rem + 0.32vw, 15px) !important;
        font-weight: 700 !important;
        min-height: auto !important;
        height: auto !important;
        padding: clamp(6px, 0.55vw, 10px) clamp(8px, 0.65vw, 14px) !important;
        max-width: none !important;
        overflow: visible !important;
        text-overflow: unset !important;
        white-space: nowrap !important;
        line-height: 1.15 !important;
    }

    html body .tc-insaat-v5-header .tc-insaat-desktop-cta {
        flex-shrink: 0 !important;
    }

    html body .tc-insaat-v5-header .tc-insaat-desktop-cta .top-btn {
        min-width: clamp(92px, 8vw, 128px) !important;
        height: clamp(42px, 4vw, 52px) !important;
        padding: 0 clamp(10px, 1vw, 18px) !important;
        font-size: clamp(11.5px, 0.68rem + 0.22vw, 14px) !important;
        max-width: none !important;
        white-space: nowrap !important;
    }

    html body .tc-insaat-v5-header .header-top .tc-topbar-flex {
        width: 100% !important;
        gap: clamp(6px, 0.8vw, 12px) !important;
    }

    html body .tc-insaat-v5-header .header-top .header-cta ul {
        gap: clamp(4px, 0.7vw, 12px) !important;
    }

    html body .tc-insaat-v5-header .header-top .header-cta ul li a,
    html body .tc-insaat-v5-header .header-top .header-cta ul li span {
        font-size: clamp(11px, 0.65rem + 0.2vw, 13px) !important;
        max-width: min(320px, 34vw) !important;
    }
}

@media (min-width: 1400px) {
    html body .tc-insaat-v5-header .main-menu nav > ul > li > a {
        font-size: clamp(13px, 0.82vw, 15px) !important;
    }
}

@media (min-width: 992px) and (max-width: 1100px) {
    html body .tc-insaat-v5-header .main-menu nav > ul > li > a {
        font-size: 11.5px !important;
    }

    html body .tc-insaat-v5-header .tc-nav-menu-icon {
        width: 28px !important;
        height: 28px !important;
        flex-basis: 28px !important;
        font-size: 12px !important;
    }

    html body .tc-insaat-v5-header .tc-nav-menu-icon--compact {
        width: 24px !important;
        height: 24px !important;
        flex-basis: 24px !important;
        font-size: 11px !important;
    }
}

/* Mobil çekmece dil */
.tc-insaat-mobile-lang-block .tc-lang-dropdown {
    width: 100%;
}

.tc-insaat-mobile-lang-block .tc-lang-dropdown__trigger {
    width: 100%;
    justify-content: space-between;
    height: 42px;
    color: #341400 !important;
    background: #f8f8f8;
    border-color: #e8e8e8;
}

.tc-insaat-mobile-lang-block .tc-lang-dropdown__menu {
    position: static;
    transform: none;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    border: none;
    box-shadow: none;
    opacity: 1;
    visibility: hidden;
}

.tc-insaat-mobile-lang-block .tc-lang-dropdown.is-open .tc-lang-dropdown__menu {
    visibility: visible;
    max-height: 320px;
    padding: 6px;
    border: 1px solid #e8e8e8;
    margin-top: 8px;
}

@media (max-width: 991.98px) {
    .tc-topbar-flex {
        justify-content: center;
    }

    .tc-topbar-right-wrap {
        margin-left: 0;
        width: 100%;
    }

    .tc-insaat-header .header-top .tc-topbar-right {
        justify-content: center;
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .tc-lang-dropdown--topbar .tc-lang-dropdown__label {
        display: none;
    }

    .tc-insaat-v5-header .header-top .header-cta ul li a,
    .tc-insaat-v5-header .header-top .header-cta ul li span {
        max-width: 140px !important;
        font-size: 11px !important;
    }
}

/* Üst menü ikonları */
html body .tc-insaat-v5-header .main-menu nav > ul > li > a,
html body .tc-insaat-v5-header .main-menu nav > ul > li > ul > li > a,
html body .tc-insaat-v5-header .main-menu nav ul li ul li > a {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
}

html body .tc-insaat-v5-header .main-menu nav > ul > li > ul > li > a,
html body .tc-insaat-v5-header .main-menu nav ul li ul li > a {
    justify-content: flex-start !important;
    min-height: auto !important;
    height: auto !important;
    padding: 10px 16px !important;
    white-space: normal !important;
}

.tc-nav-menu-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #fff1e7;
    color: #ff5b00;
    display: inline-grid;
    place-items: center;
    font-size: 14px;
    flex: 0 0 32px;
    transition: .2s ease;
}

.tc-nav-menu-icon--compact {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 13px;
    flex-basis: 28px;
}

html body .tc-insaat-v5-header .main-menu nav > ul > li:hover > a .tc-nav-menu-icon,
html body .tc-insaat-v5-header .main-menu nav > ul > li.active > a .tc-nav-menu-icon,
html body .tc-insaat-v5-header .main-menu nav > ul > li.current > a .tc-nav-menu-icon,
html body .tc-insaat-v5-header .main-menu nav ul li ul li:hover > a .tc-nav-menu-icon,
html body .tc-insaat-v5-header .main-menu nav ul li ul li.active > a .tc-nav-menu-icon,
html body .tc-insaat-v5-header .main-menu nav ul li ul li.current > a .tc-nav-menu-icon {
    background: #ff5b00;
    color: #fff;
}

.tc-nav-menu-label {
    display: inline-block;
    line-height: 1.15;
}

.tc-insaat-mobile-nav > ul > li > a,
.tc-insaat-mobile-nav > ul > li > ul > li > a {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
}

/* Mobil üst bar — kenar boşluğu minimum */
html body .tc-insaat-v5-header .tc-insaat-mobile-bar__inner {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: clamp(8px, 1.15vw, 16px) !important;
    padding-right: clamp(8px, 1.15vw, 16px) !important;
    box-sizing: border-box !important;
}

/* Menü hizası — logo ile Teklif Al arasında sağa yaslı (v13) */
@media (min-width: 992px) {
    html body .tc-insaat-v5-header .tc-insaat-desktop-nav {
        justify-content: flex-end !important;
    }

    html body .tc-insaat-v5-header .main-menu,
    html body .tc-insaat-v5-header .main-menu nav {
        text-align: right !important;
    }

    html body .tc-insaat-v5-header .main-menu nav > ul {
        justify-content: flex-end !important;
        width: auto !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: 0 !important;
        gap: clamp(6px, 0.65vw, 14px) !important;
        padding-right: clamp(4px, 0.6vw, 12px) !important;
    }

    html body .tc-insaat-v5-header .main-menu nav > ul > li {
        margin: 0 !important;
    }

    html body .tc-insaat-v5-header .main-menu nav > ul > li > a {
        padding-left: clamp(8px, 0.65vw, 14px) !important;
        padding-right: clamp(8px, 0.65vw, 14px) !important;
    }
}
