/* ============================================================
   ÜST DUYURU ŞERİDİ — #FF6417 marka turuncusu
   Koreografi (her mesajda):
     1. emoji zıplayarak gelir
     2. başlık harf harf dalga gibi yükselir (bulanıktan nete)
     3. vurgu rozeti açılır, içinden parlama geçer
     4. buton belirir, ok iki kez ileri dürtülür
   Çıkış girişten hızlı ve bütün hâlinde.
   Zeminde yavaş aurora + parıltılar. Sağda hikâye tarzı ilerleme.
   Yükseklik sabit → mesaj değişirken sayfa asla kaymaz.
   ============================================================ */

.top-strip {
    --ts-h: 50px;
    --ts-ease: cubic-bezier(0.23, 1, 0.32, 1);
    --ts-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ts-stagger: 16ms;
    --ts-dur: 4000ms;
    position: relative;
    height: var(--ts-h);
    overflow: hidden;
    color: #fff;
    font-family: 'Gilroy', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(90deg, #ff7d3b 0%, #FF6417 38%, #f2560b 68%, #ff7432 100%);
    box-shadow: inset 0 -1px 0 rgba(120, 35, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    isolation: isolate;
    transition: height 280ms var(--ts-ease), opacity 220ms ease;
}

/* ── Aurora: zeminde yavaşça dolaşan ışık kümeleri ── */
.ts-aurora { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.ts-aurora span {
    position: absolute;
    top: -120%;
    width: 46%;
    height: 340%;
    border-radius: 50%;
    will-change: transform;
}
.ts-aurora span:nth-child(1) {
    left: -10%;
    background: radial-gradient(closest-side, rgba(255, 214, 120, 0.55), transparent);
    animation: ts-drift-a 14s ease-in-out infinite alternate;
}
.ts-aurora span:nth-child(2) {
    left: 30%;
    background: radial-gradient(closest-side, rgba(255, 70, 40, 0.45), transparent);
    animation: ts-drift-b 18s ease-in-out infinite alternate;
}
.ts-aurora span:nth-child(3) {
    left: 62%;
    background: radial-gradient(closest-side, rgba(255, 190, 140, 0.5), transparent);
    animation: ts-drift-a 22s ease-in-out -6s infinite alternate-reverse;
}
@keyframes ts-drift-a {
    from { transform: translateX(-12%) scale(1); }
    to   { transform: translateX(38%) scale(1.15); }
}
@keyframes ts-drift-b {
    from { transform: translateX(25%) scale(1.1); }
    to   { transform: translateX(-30%) scale(0.95); }
}

/* ── Parıltılar ── */
.ts-sparks { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.ts-sparks i {
    position: absolute;
    width: 9px;
    height: 9px;
    background: #fff4d6;
    clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
    opacity: 0;
    transform: scale(0.2);
    animation: ts-twinkle 3.6s ease-in-out infinite;
}
.ts-sparks i:nth-child(1) { left: 6%;  top: 22%; animation-delay: 0s; }
.ts-sparks i:nth-child(2) { left: 19%; top: 62%; animation-delay: 1.3s; width: 6px; height: 6px; }
.ts-sparks i:nth-child(3) { left: 31%; top: 18%; animation-delay: 2.4s; }
.ts-sparks i:nth-child(4) { left: 71%; top: 64%; animation-delay: 0.7s; width: 6px; height: 6px; }
.ts-sparks i:nth-child(5) { left: 80%; top: 20%; animation-delay: 1.9s; }
.ts-sparks i:nth-child(6) { left: 92%; top: 58%; animation-delay: 3s; width: 7px; height: 7px; }
.ts-sparks i:nth-child(7) { left: 49%; top: 12%; animation-delay: 2.8s; width: 5px; height: 5px; }
@keyframes ts-twinkle {
    0%, 70%, 100% { opacity: 0; transform: scale(0.2) rotate(0deg); }
    82%           { opacity: 0.95; transform: scale(1) rotate(45deg); }
}

/* ── Mesaj değişiminde ışık süpürmesi ── */
.top-strip::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 34%;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.28) 50%, transparent 100%);
    transform: translateX(-120%) skewX(-20deg);
    opacity: 0;
}
.top-strip.is-sweeping::after { animation: ts-sweep 1000ms cubic-bezier(0.45, 0, 0.2, 1); }
@keyframes ts-sweep {
    0%   { transform: translateX(-120%) skewX(-20deg); opacity: 1; }
    100% { transform: translateX(380%) skewX(-20deg); opacity: 1; }
}

.ts-inner {
    position: relative;
    z-index: 1;
    height: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 150px 0 56px;
}
.ts-viewport { position: relative; height: 100%; }

/* ── Tek mesaj ── */
.ts-msg {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
}
.ts-msg.is-active { opacity: 1; pointer-events: auto; }
.ts-msg.is-leaving {
    opacity: 0;
    transform: translateY(-45%);
    filter: blur(6px);
    transition: opacity 260ms ease, transform 300ms var(--ts-ease), filter 260ms ease;
}

.ts-sr {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* 1 — Emoji */
.ts-emoji {
    font-size: 21px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(120, 30, 0, 0.35));
}
.ts-msg.is-active .ts-emoji { animation: ts-pop 640ms var(--ts-spring) both; }
@keyframes ts-pop {
    0%   { opacity: 0; transform: scale(0.3) rotate(-25deg); }
    60%  { opacity: 1; transform: scale(1.18) rotate(8deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
}

/* 2 — Başlık: harf harf dalga */
.ts-text {
    display: inline-flex;
    gap: 0.32em;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.035em;
    text-transform: uppercase;
    line-height: 1;
    text-shadow: 0 2px 0 rgba(150, 40, 0, 0.28), 0 6px 16px rgba(120, 30, 0, 0.25);
}
.ts-word { display: inline-flex; }
.ts-char { display: inline-block; }
.ts-msg.is-active .ts-char {
    animation: ts-char-in 620ms var(--ts-ease) both;
    animation-delay: calc(var(--i) * var(--ts-stagger) + 90ms);
}
@keyframes ts-char-in {
    0%   { opacity: 0; transform: translateY(85%) rotate(8deg) scale(0.9); filter: blur(5px); }
    100% { opacity: 1; transform: none; filter: blur(0); }
}
.ts-text--mobile { display: none; }

/* 3 — Vurgu rozeti */
.ts-chip {
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #e8550c;
    background: linear-gradient(180deg, #ffffff 0%, #fff3ea 100%);
    border-radius: 10px;
    padding: 7px 12px 6px;
    line-height: 1;
    box-shadow: 0 6px 16px -6px rgba(120, 30, 0, 0.6), inset 0 -2px 0 rgba(232, 85, 12, 0.12);
}
.ts-chip::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 30%, rgba(255, 180, 120, 0.55) 50%, transparent 70%);
    transform: translateX(-120%);
}
.ts-msg.is-active .ts-chip {
    animation: ts-chip-in 560ms var(--ts-spring) both;
    animation-delay: calc(var(--n) * var(--ts-stagger) + 160ms);
}
.ts-msg.is-active .ts-chip::after {
    animation: ts-chip-shine 900ms ease-out both;
    animation-delay: calc(var(--n) * var(--ts-stagger) + 520ms);
}
@keyframes ts-chip-in {
    0%   { opacity: 0; transform: scale(0.6) rotate(-6deg); }
    100% { opacity: 1; transform: none; }
}
@keyframes ts-chip-shine {
    to { transform: translateX(120%); }
}

/* 4 — Buton */
.ts-cta {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 6px 6px 6px 14px;
    border-radius: 999px;
    background: rgba(120, 30, 0, 0.18);
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.55);
    transition: background-color 160ms ease, transform 160ms var(--ts-ease);
}
.ts-cta svg {
    width: 22px;
    height: 22px;
    padding: 4px;
    border-radius: 50%;
    background: #fff;
    color: #FF6417;
}
.ts-msg.is-active .ts-cta {
    animation: ts-cta-in 480ms var(--ts-ease) both;
    animation-delay: calc(var(--n) * var(--ts-stagger) + 300ms);
}
.ts-msg.is-active .ts-cta svg {
    animation: ts-nudge 700ms ease-in-out 2;
    animation-delay: calc(var(--n) * var(--ts-stagger) + 900ms);
}
@keyframes ts-cta-in {
    0%   { opacity: 0; transform: translateX(-10px); }
    100% { opacity: 1; transform: none; }
}
@keyframes ts-nudge {
    0%, 100% { transform: translateX(0); }
    45%      { transform: translateX(4px); }
}
a.ts-msg:active .ts-cta { transform: scale(0.96); }
@media (hover: hover) and (pointer: fine) {
    a.ts-msg:hover .ts-cta { background: rgba(255, 255, 255, 0.2); }
}
a.ts-msg:focus-visible { outline: none; }
a.ts-msg:focus-visible .ts-cta { box-shadow: inset 0 0 0 1.5px #fff, 0 0 0 3px rgba(255, 255, 255, 0.5); }

/* ── Hikâye tarzı ilerleme (zamanlayıcıyı da bu yönetir) ── */
.ts-progress {
    position: absolute;
    right: 52px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 4px;
}
.ts-seg {
    width: 18px;
    height: 3px;
    border-radius: 99px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.32);
}
.ts-seg i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #fff;
    transform: scaleX(0);
    transform-origin: left;
}
.ts-seg.is-done i { transform: scaleX(1); }
.ts-seg.is-active i { animation: ts-fill var(--ts-dur) linear forwards; }
.top-strip.is-paused .ts-seg.is-active i { animation-play-state: paused; }
@keyframes ts-fill { to { transform: scaleX(1); } }

/* ── Kapat ── */
.ts-close {
    position: absolute;
    z-index: 2;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 9px;
    color: #fff;
    background: rgba(120, 30, 0, 0.2);
    cursor: pointer;
    transition: background-color 150ms ease, transform 160ms var(--ts-ease);
}
.ts-close svg { width: 14px; height: 14px; }
.ts-close:hover { background: rgba(120, 30, 0, 0.34); }
.ts-close:active { transform: translateY(-50%) scale(0.92); }
.ts-close:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }

.top-strip.is-closed { height: 0; opacity: 0; }

/* ── Tablet ── */
@media (max-width: 1199.98px) {
    .ts-text { font-size: 16px; }
    .ts-chip { font-size: 13px; }
}
/* ── Mobil ── */
@media (max-width: 991.98px) {
    .ts-inner { padding: 0 44px 0 14px; }
    .ts-progress {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        transform: none;
        gap: 2px;
    }
    .ts-seg { flex: 1; height: 2px; border-radius: 0; background: rgba(255, 255, 255, 0.22); }
}
@media (max-width: 575.98px) {
    .top-strip { --ts-h: 44px; --ts-stagger: 14ms; }
    .ts-msg { justify-content: flex-start; gap: 9px; }
    .ts-emoji { font-size: 17px; }
    .ts-text { font-size: 14.5px; letter-spacing: 0.025em; }
    .ts-text--desktop { display: none; }
    .ts-text--mobile { display: inline-flex; }
    .ts-msg.is-active .ts-chip { animation-delay: calc(var(--nm) * var(--ts-stagger) + 160ms); }
    .ts-msg.is-active .ts-chip::after { animation-delay: calc(var(--nm) * var(--ts-stagger) + 520ms); }
    .ts-chip { font-size: 11.5px; padding: 5px 8px 4px; border-radius: 8px; }
    .ts-cta { display: none; } /* şeridin tamamı zaten tıklanabilir */
    .ts-close { right: 8px; width: 26px; height: 26px; }
    .ts-sparks i:nth-child(n+5) { display: none; }
}

/* ============================================================
   GÖRSEL BANNER (yazı şeridi yerine veya onunla birlikte)
   Görsel kırpılmadan, kendi oranıyla tam genişlikte gösterilir.
   ============================================================ */
.top-image-banner {
    position: relative;
    overflow: hidden;
    background: #FF6417;
    line-height: 0;
    transition: opacity 220ms ease;
}
.top-image-banner .tib-link { display: block; }
.top-image-banner img {
    display: block;
    width: 100%;
    height: auto;
    /* Yanlışlıkla yüksek bir görsel yüklenirse sayfanın üstünü kaplamasın */
    max-height: 110px;
    object-fit: cover;
    object-position: center;
    transition: filter 200ms ease;
}
@media (max-width: 768px) {
    .top-image-banner img { max-height: 90px; }
}

/* Bağlantılıysa hover'da hafif aydınlanma + bir kez ışık geçişi */
.top-image-banner a.tib-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.22) 50%, transparent 70%);
    transform: translateX(-110%);
    pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
    .top-image-banner a.tib-link:hover img { filter: brightness(1.05) saturate(1.05); }
    .top-image-banner a.tib-link:hover::after { animation: tib-shine 900ms cubic-bezier(0.45, 0, 0.2, 1); }
}
@keyframes tib-shine { to { transform: translateX(110%); } }
.top-image-banner a.tib-link:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }
.top-image-banner .tib-close {
    background: rgba(0, 0, 0, 0.32);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.top-image-banner .tib-close:hover { background: rgba(0, 0, 0, 0.5); }
.top-image-banner.is-closed { opacity: 0; }

/* ── Küçük telefonlar (iPhone SE vb.) ── */
@media (max-width: 380px) {
    .ts-inner { padding: 0 40px 0 10px; }
    .ts-msg { gap: 7px; }
    .ts-emoji { font-size: 15px; }
    .ts-text { font-size: 13px; letter-spacing: 0.01em; gap: 0.28em; }
    .ts-chip { font-size: 10.5px; padding: 5px 7px 4px; }
}

/* ── Hareket hassasiyeti: dalga/zıplama/aurora yok, sadece yumuşak geçiş ── */
@media (prefers-reduced-motion: reduce) {
    .ts-aurora span, .ts-sparks i { animation: none; }
    .ts-sparks { display: none; }
    .ts-msg.is-active .ts-char,
    .ts-msg.is-active .ts-emoji,
    .ts-msg.is-active .ts-chip,
    .ts-msg.is-active .ts-cta { animation: ts-fade 300ms ease both; }
    .ts-msg.is-active .ts-chip::after,
    .ts-msg.is-active .ts-cta svg,
    .top-strip.is-sweeping::after { animation: none; }
    .ts-msg.is-leaving { transform: none; filter: none; }
    .top-strip { transition: none; }
    .top-image-banner a.tib-link:hover::after { animation: none; }
}
@keyframes ts-fade { from { opacity: 0; } to { opacity: 1; } }
