/* ============================================
   ANNOUNCEMENT BAR - Sabit ve Tutarlı Layout
   Tüm sayfalarda aynı şekilde çalışır
   ============================================ */

/* Ana container - Normal document flow içinde */
.announcement-bar {
    position: relative;
    width: 100%;
    height: 40px;
    background: linear-gradient(135deg, #2b2f3f 0%, #343a50 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    z-index: 100;
    /* Body'nin en üstünde, header'dan önce */
    margin: 0;
    padding: 0;
}

/* İçerik container */
.announcement-content {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    width: 100%;
}

/* Kayan yazı container */
.announcement-marquee {
    display: flex;
    align-items: center;
    white-space: nowrap;
    animation: scroll-announcement 60s linear infinite;
    will-change: transform;
    /* Başlangıçta görünür olsun */
    transform: translateX(0);
}

/* Animasyon - Daha yavaş ve görünür */
@keyframes scroll-announcement {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Duyuru item'ları */
.announcement-item {
    display: inline-block;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    padding: 0 20px;
    white-space: nowrap;
}

/* Ayırıcı */
.announcement-separator {
    display: inline-block;
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
    margin: 0 20px;
}

/* Link stilleri */
.announcement-link {
    color: #4fd1ff;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.announcement-link:hover {
    color: #ffffff;
    border-bottom-color: #4fd1ff;
}

/* ============================================
   RESPONSIVE - Mobil ve Tablet
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
    .announcement-bar {
        height: 36px;
    }
    
    .announcement-item {
        font-size: 13px;
        padding: 0 15px;
    }
    
    .announcement-marquee {
        animation-duration: 70s;
    }
}

/* Mobil */
@media (max-width: 768px) {
    .announcement-bar {
        height: 32px;
    }
    
    .announcement-item {
        font-size: 12px;
        padding: 0 12px;
    }
    
    .announcement-separator {
        margin: 0 12px;
        font-size: 10px;
    }
    
    .announcement-marquee {
        animation-duration: 80s;
    }
}

/* Küçük mobil */
@media (max-width: 480px) {
    .announcement-bar {
        height: 28px;
    }
    
    .announcement-item {
        font-size: 11px;
        padding: 0 10px;
    }
    
    .announcement-separator {
        margin: 0 10px;
    }
}

/* ============================================
   DARK THEME (Varsayılan ve Tek Tema)
   ============================================ */
body.dark-theme .announcement-bar,
.announcement-bar {
    background: linear-gradient(135deg, #2b2f3f 0%, #343a50 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-theme .announcement-item,
.announcement-item {
    color: #ffffff;
}

body.dark-theme .announcement-link,
.announcement-link {
    color: #4fd1ff;
}

body.dark-theme .announcement-link:hover,
.announcement-link:hover {
    color: #ffffff;
    border-bottom-color: #4fd1ff;
}

body.dark-theme .announcement-separator,
.announcement-separator {
    color: rgba(255, 255, 255, 0.4);
}

/* ============================================
   PERFORMANS OPTİMİZASYONLARI
   ============================================ */

/* GPU hızlandırması */
.announcement-marquee {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Animasyon duraklatma (sayfa gizlendiğinde) */
.announcement-marquee.paused {
    animation-play-state: paused;
}

/* ============================================
   BODY MARGIN FIX
   Header'ın announcement bar'ın altında olması için
   ============================================ */
body {
    margin: 0;
    padding: 0;
}

/* Header announcement bar'dan sonra gelsin */
header,
.header,
.main-header {
    margin-top: 0;
    position: relative;
}
