/**
 * Codlion Theme - Announcement Bar
 * 
 * Isolated announcement bar styling that sits above the header and hero section
 * - Full-width design with no right-side space issues
 * - Properly isolated from header and hero components
 * - Responsive design for both desktop and mobile
 */

/* Base announcement bar styling */
.announcement-bar {
    background-color: var(--top-bar-bg-color);
    color: var(--top-bar-text-color);
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    height: 36px; /* Fixed desktop height */
    padding: 0;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.2px;
    overflow: hidden;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, opacity 0.3s ease; /* Smooth scroll animation */
}

.announcement-content {
    width: 100%;
    overflow: hidden;
    padding: 0;
    margin: 0 auto;
}

.announcement-marquee {
    display: inline-block;
    white-space: nowrap;
    animation: announcement-marquee 20s linear infinite;
    padding-right: 100px; /* Extra padding to ensure no space on the right */
}

.announcement-text {
    display: inline-block;
    padding: 0 10px;
}

.announcement-separator {
    display: inline-block;
    margin: 0 15px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 10px;
    vertical-align: middle;
}

/* Animation for marquee effect */
@keyframes announcement-marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Add padding to body only when announcement bar is present */
body.has-announcement-bar {
    padding-top: 36px; /* Height of announcement bar - Desktop */
}

body.no-announcement-bar {
    padding-top: 0; /* No padding when announcement bar is disabled */
}

/* Responsive styles - Following Development Recommendations */
/* Mobile/Tablet: max-width: 991px (tablets >991px treated as desktop) */
@media (max-width: 991px) {
    .announcement-bar {
        height: 30px !important;
        padding: 3px 0;
        font-size: 12px;
        font-weight: 400;
        line-height: 24px;
    }
    
    body {
        padding-top: 30px; /* Adjusted for mobile */
    }
}
