/* The styles below only apply to the homepage masthead. */
body.th570-home {
    --th570-ink: #101827;
    --th570-red: #d90818;
    --th570-rule: #e6e9ef;
    --th570-muted: #536176;
}

/* Older masthead helpers may still print their own bar after the new one. */
body.th570-home > .topline,
body.th570-home .thv3216-topline { display: none !important; }

.th570-home .th570-topline {
    color: var(--th570-ink);
    background: #f7f8fa;
    border-bottom: 1px solid var(--th570-rule);
}
.th570-home .th570-topline-inner,
.th570-home .th570-ticker,
.th570-home .th570-topline-meta {
    display: flex;
    align-items: center;
    min-width: 0;
}
.th570-home .th570-topline-inner {
    justify-content: space-between;
    min-height: 41px;
    gap: 18px;
}
.th570-home .th570-ticker { flex: 1 1 auto; gap: clamp(8px, 1.45vw, 22px); }
.th570-home .th570-breaking {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    padding: 6px 11px;
    border-radius: 20px;
    color: #fff;
    background: var(--th570-red);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.12;
    text-transform: uppercase;
    white-space: nowrap;
}
.th570-home .th570-breaking svg { width: 17px; height: 17px; }
.th570-home .th570-ticker-headlines { min-width: 0; max-width: 535px; }
.th570-home .th570-ticker-headlines a {
    display: block;
    color: var(--th570-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 800;
}
.th570-home .th570-ticker-headlines a:hover { color: var(--th570-red); }
.th570-home .th570-ticker-controls { display: flex; align-items: center; gap: 4px; }
.th570-home .th570-ticker-controls button {
    display: grid;
    place-items: center;
    flex: none;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #eef1f5;
    color: var(--th570-ink);
    cursor: pointer;
}
.th570-home .th570-ticker-controls button:hover { background: #e2e7ee; }
.th570-home .th570-topline-meta {
    flex: none;
    margin-left: auto;
    gap: 17px;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 650;
}
.th570-home .th570-topline-meta time,
.th570-home .th570-topline-meta .thv3216-city-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.th570-home .th570-topline-meta .thv3216-city-chip { border-left: 1px solid #d9dfe8; padding-left: 16px; }

/* Retain the CMS menu, logo selection, live quotes, and existing search and menu buttons. */
.th570-home .header.thv3216-header {
    position: relative;
    z-index: 15;
    color: var(--th570-ink);
    background: #fff;
    border: 0;
    box-shadow: 0 2px 7px #1220330a;
}
.th570-home .header.th515-header .th515-masthead {
    background: #fff;
    color: var(--th570-ink);
}
.th570-home .header.th515-header .th515-masthead::before { content: none; }
.th570-home .header.th515-header .header-main.container,
.th570-home .header.th515-header .th515-nav-inner.container {
    width: min(1240px, calc(100% - 20px)) !important;
    max-width: 1240px !important;
    margin-inline: auto !important;
}
.th570-home .header.th515-header .header-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 89px;
    height: auto;
    gap: clamp(13px, 2vw, 29px);
    padding: 9px 0;
}
.th570-home .header.th515-header .th515-brand-group,
.th570-home .header.th515-header .th528-market-panel { transform: none !important; }
.th570-home .header.th515-header .th515-brand-group {
    max-width: none;
    padding-right: clamp(12px, 1.5vw, 22px);
    border-right: 1px solid #e1e5ec;
}
.th570-home .header.th515-header .th515-custom-logo {
    min-height: 0;
    padding: 0 !important;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    max-width: none;
}
.th570-home .header.th515-header .th515-custom-logo img,
.th570-home .header.th515-header .th515-custom-logo .th519-transparent-logo img {
    height: auto !important;
    width: clamp(147px, 13vw, 190px) !important;
    max-width: 100% !important;
    max-height: 80px !important;
    object-fit: contain;
}
.th570-home .header.th515-header .th519-transparent-logo {
    position: relative;
    display: inline-flex;
    padding: 0;
    transform: none !important;
}
/* The supplied transparent logo is white on top. Darken that word only on the light masthead. */
.th570-home .header.th515-header .th519-transparent-logo:has(img[src*="trendhaber-logo-header-transparent-v032519.png"])::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("trendhaber-logo-header-transparent-v032519.png") left center / contain no-repeat;
    clip-path: inset(19% 0 42.5% 39%);
    filter: brightness(.08);
    pointer-events: none;
}
.th570-home .header.th515-header .th528-market-panel {
    color: var(--th570-ink);
    min-width: 0;
    width: 100%;
    max-width: none;
    padding: 2px 0 0;
    background: transparent;
}
.th570-home .header.th515-header .th528-market-cards {
    display: flex;
    align-items: center;
    justify-content: safe center !important;
    flex-wrap: nowrap;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.th570-home .header.th515-header .th528-market-card {
    display: flex;
    flex: 0 1 auto;
    flex-direction: row;
    align-items: baseline;
    gap: clamp(4px, .5vw, 8px);
    max-width: none;
    min-height: 0;
    min-width: auto;
    padding: 4px clamp(7px, 1.05vw, 15px);
    border: none;
    border-radius: 0;
    border-left: 1px solid var(--th570-rule);
    background: transparent;
    color: var(--th570-ink);
    box-shadow: none;
    transform: none;
}
.th570-home .header.th515-header .th528-market-card:hover { background: #f6f8fb; color: var(--th570-ink); }
.th570-home .header.th515-header .th528-kind-usd { order: 0; border-left: 0; }
.th570-home .header.th515-header .th528-kind-eur { order: 1; }
.th570-home .header.th515-header .th528-kind-bist { order: 2; }
.th570-home .header.th515-header .th528-kind-gold { order: 3; }
.th570-home .header.th515-header .th528-kind-silver { order: 4; }
.th570-home .header.th515-header .th528-kind-btc { order: 5; }
@media (min-width: 1040px) {
    .th570-home .header.th515-header .th528-kind-bist,
    .th570-home .header.th515-header .th528-kind-gold { display: flex !important; }
}
.th570-home .header.th515-header .th528-card-icon,
.th570-home .header.th515-header .th528-abs-change { display: none; }
.th570-home .header.th515-header .th528-card-title,
.th570-home .header.th515-header .th528-card-price { color: var(--th570-ink); font-size: 13px; font-weight: 850; }
.th570-home .header.th515-header .th528-card-change { font-size: 11px; }
.th570-home .header.th515-header .th528-change-up { color: #08782d; }
.th570-home .header.th515-header .th528-change-down { color: #c81020; }
.th570-home .header.th515-header .th528-change-flat { color: var(--th570-muted); }
.th570-home .header.th515-header .th528-change-up::before { content: "▲ "; }
.th570-home .header.th515-header .th528-change-down::before { content: "▼ "; }
.th570-home .header.th515-header .th528-market-meta { justify-content: center; margin-top: 5px; }
.th570-home .header.th515-header .th528-market-source,
.th570-home .header.th515-header .th528-market-offline { color: var(--th570-muted); }
.th570-home .header.th515-header .th528-market-offline { border: 1px solid var(--th570-rule); }
.th570-home .header.th515-header .header-buttons {
    justify-content: flex-end;
    gap: 8px;
    margin-left: 0;
}
.th570-home .header.th515-header .header-buttons .thv3216-city-chip { display: none; }
.th570-home .header.th515-header .header-buttons #search-toggle,
.th570-home .header.th515-header .header-buttons #menu-toggle,
.th570-home .header.th515-header .header-buttons .th515-bell {
    width: 40px;
    height: 40px;
    border: 1px solid #e9edf3;
    border-radius: 50%;
    color: #23334c !important;
    background: #fff;
    box-shadow: 0 2px 6px #15274010;
}
.th570-home .header.th515-header .header-buttons #search-toggle:hover,
.th570-home .header.th515-header .header-buttons #menu-toggle:hover,
.th570-home .header.th515-header .header-buttons .th515-bell:hover { background: #f0f3f7; border-color: #dee3ec; }
.th570-home .header.th515-header .th515-navband { background: #fff; border-top: 1px solid #f1f3f6; border-bottom: 1px solid var(--th570-rule); }
.th570-home .header.th515-header .th515-nav-inner { min-height: 53px; align-items: center; justify-content: flex-start; gap: 10px; }
.th570-home .header.th515-header .th515-nav-home {
    position: relative;
    isolation: isolate;
    display: inline-grid;
    place-items: center;
    flex: 0 0 clamp(98px, 11vw, 146px);
    margin-left: 6px;
    height: 37px;
    background: transparent;
    font-weight: 800;
    font-size: 14px;
}
.th570-home .header.th515-header .th515-nav-home::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0 3px;
    background: var(--th570-red);
    transform: skewX(-22deg);
    border-radius: 7px;
}
.th570-home .header.th515-header .th515-nav-home::after { content: "Ana Sayfa"; }
.th570-home .header.th515-header .th515-nav-home svg { display: none; }
.th570-home .header.th515-header .th515-nav-home:hover::before { background: #b90918; }
.th570-home .header.th515-header .desktop-nav {
    flex: 1 1 auto;
    justify-content: space-between;
    align-self: stretch;
    overflow-x: auto;
    scrollbar-width: none;
    gap: clamp(6px, 1.4vw, 17px);
}
.th570-home .header.th515-header .desktop-nav a {
    flex: 0 0 auto;
    padding: 0 4px;
    min-height: 51px;
    color: var(--th570-ink);
    border-bottom: 2px solid transparent;
    text-transform: none;
    font-size: clamp(11px, 1vw, 15px);
    font-weight: 800;
}
.th570-home .header.th515-header .desktop-nav a:hover,
.th570-home .header.th515-header .desktop-nav a:focus-visible {
    background: transparent;
    color: var(--th570-red);
    border-bottom: 2px solid var(--th570-red);
}
.th570-home .header.th515-header .mobile-nav:not([hidden]) {
    background: #fff;
    border-top: 1px solid var(--th570-rule);
    box-shadow: 0 12px 26px #172d4922;
}
.th570-home .header.th515-header .mobile-nav a {
    color: var(--th570-ink);
    border-color: var(--th570-rule);
}
.th570-home .header.th515-header .mobile-nav a:hover { color: var(--th570-red); background: #f7f8fa; }


.th570-home .th570-ticker [hidden] { display: none !important; }

@media (max-width: 1050px) {
    .th570-home .th570-topline-meta { gap: 10px; font-size: 12px; }
    .th570-home .header.th515-header .th528-market-card { padding-inline: 7px; }
    .th570-home .header.th515-header .th528-card-title,
    .th570-home .header.th515-header .th528-card-price { font-size: 12px; }
}
@media (max-width: 930px) {
    .th570-home .header.th515-header .header-main {
        grid-template-columns: minmax(0,1fr) auto;
        min-height: 0;
        padding: 8px 0 6px;
        gap: 6px 12px;
    }
    .th570-home .header.th515-header .th515-brand-group { border-right: 0; padding: 0; }
    .th570-home .header.th515-header .th515-custom-logo .th519-transparent-logo img,
    .th570-home .header.th515-header .th515-custom-logo img { width: clamp(128px, 23vw, 176px) !important; max-height: 60px !important; }
    .th570-home .header.th515-header .th528-market-panel { margin: 0; border-top: 1px solid var(--th570-rule); padding-top: 6px; }
    .th570-home .header.th515-header .th515-navband { display: block; }
    .th570-home .header.th515-header .th515-nav-inner { min-height: 43px; }
    .th570-home .header.th515-header .desktop-nav { display: flex !important; justify-content: flex-start; gap: 12px; }
    .th570-home .header.th515-header .desktop-nav a { min-height: 40px; font-size: 12px; }
    .th570-home .header.th515-header .th515-nav-home { height: 29px; margin-left: 0; flex-basis: 88px; font-size: 12px; }
}
@media (max-width: 760px) {
    .th570-home .th570-topline-meta { display: none; }
    .th570-home .th570-ticker { width: 100%; }
    .th570-home .th570-ticker-headlines { flex: 1 1 auto; }
    .th570-home .th570-ticker-headlines a { font-size: 12px; }
}
@media (max-width: 560px) {
    .th570-home .header.th515-header .th528-kind-gold,
    .th570-home .header.th515-header .th528-kind-bist { display: none; }
    .th570-home .header.th515-header .th528-market-cards { justify-content: flex-start !important; }
    .th570-home .header.th515-header .th528-market-card { flex: 1 1 0; justify-content: center; }
    .th570-home .header.th515-header .th528-market-meta { display: none; }
    .th570-home .th570-breaking { padding: 5px 7px; font-size: 10px; }
    .th570-home .th570-breaking svg { width: 14px; height: 14px; }
    .th570-home .th570-ticker-controls { gap: 1px; }
    .th570-home .th570-ticker-controls button { width: 25px; height: 28px; }
}