/* Full-Width Glassmorphism Announcement Bar */
.announcement-bar {
    /* Glassmorphism effect */
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    
    color: #2e3647; /* Main text color */
    text-align: center;
    padding: 10px 0;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    z-index: 10000;
    
    /* Subtle Border & Shadow */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    
    /* Full width, no rounded corners */
    border-radius: 0;
    width: 100%;
    overflow: hidden; /* Added to prevent horizontal scrollbar from animations */
}

/* Glass Shine Effect - GPU accelerated (no CLS) */
.announcement-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 30%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: translateX(-400%) skewX(-25deg); /* Start off-screen via transform */
    animation: glassShine 6s infinite;
    will-change: transform; /* GPU hint */
    pointer-events: none;
}

@keyframes glassShine {
    0%   { transform: translateX(-400%) skewX(-25deg); }
    30%  { transform: translateX(500%) skewX(-25deg); }
    100% { transform: translateX(500%) skewX(-25deg); }
}

.announcement-bar .container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.announcement-bar-content {
    position: relative;
    width: 100%;
    text-align: center;
    /* Height fixed to one line height + padding to prevent clipping */
    min-height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Each announcement item */
.announcement-item {
    position: absolute;
    width: 100%;
    left: 0;
    right: 0;
    text-align: center;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    pointer-events: none;
    /* Prevent overflow clipping */
    padding: 0 15px;
    box-sizing: border-box;
    white-space: normal;
    word-break: break-word;
}

.announcement-item.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.announcement-item.leaving {
    opacity: 0;
    transform: translateY(-6px);
}

/* Link Style matching site buttons */
.announcement-bar a {
    background: #f5476a; /* Site accent color */
    color: #ffffff;
    padding: 3px 14px;
    border-radius: 4px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 12px;
    margin-left: 10px;
    transition: all 0.3s ease;
}

.announcement-bar a:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .announcement-bar {
        font-size: 13px;
        padding: 10px 0;
    }
    .announcement-item {
        padding: 0 20px;
    }
}
