/* PETGAS Mobile-Optimized Marquee */

.marquee {
    background: linear-gradient(90deg, #0a4b2a, #11914b);
    color: white;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 1000;
    width: 100%;
    /* Prevent layout shifts */
    contain: layout style paint;
    will-change: auto;
    
    /* Mobile-first sizing */
    height: 40px;
    font-size: 0.875rem;
}

.marquee-content {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding: 0 1rem;
    gap: 1rem;
    
    /* Mobile-optimized animation - slower for readability */
    animation: marqueeScroll 40s linear infinite;
    
    /* Performance optimizations */
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: transform;
}

.marquee-content span {
    display: inline-flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    margin: 0 1rem;
}

.marquee-logo {
    height: 20px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    animation: logoGlow 2s ease-in-out infinite alternate;
}

.marquee-icon {
    height: 18px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

@keyframes marqueeScroll {
    0% { 
        transform: translateX(100%); 
    }
    100% { 
        transform: translateX(-100%); 
    }
}

@keyframes logoGlow {
    from {
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)) brightness(1);
    }
    to {
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)) brightness(1.2) drop-shadow(0 0 10px rgba(17, 145, 75, 0.5));
    }
}

/* iPhone Plus and larger */
@media (min-width: 26.75em) {
    .marquee {
        height: 45px;
        font-size: 1rem;
    }
    
    .marquee-logo {
        height: 25px;
    }
    
    .marquee-icon {
        height: 20px;
    }
    
    .marquee-content {
        padding: 0 1.5rem;
        gap: 1.5rem;
    }
    
    .marquee-content span {
        margin: 0 1.5rem;
    }
}

/* iPad and larger */
@media (min-width: 48em) {
    .marquee {
        height: 50px;
        font-size: 1rem;
    }
    
    .marquee-logo {
        height: 30px;
    }
    
    .marquee-icon {
        height: 25px;
    }
    
    .marquee-content {
        padding: 0 2rem;
        gap: 2rem;
    }
    
    .marquee-content span {
        margin: 0 1.5rem;
    }
}

/* Desktop - faster animation */
@media (min-width: 64em) {
    .marquee-content {
        animation: marqueeScroll 30s linear infinite;
    }
}

/* Touch interaction - pause on touch/hover */
.marquee:hover .marquee-content,
.marquee:active .marquee-content,
.marquee.paused .marquee-content {
    animation-play-state: paused;
}

/* Accessibility - Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .marquee-content {
        animation: none !important;
        transform: translateX(0);
        justify-content: center;
        position: static;
    }
    
    .marquee-logo {
        animation: none !important;
    }
    
    /* Center content when motion is reduced */
    .marquee {
        justify-content: center;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .marquee {
        background: #000;
        border-bottom: 2px solid #fff;
    }
    
    .marquee-content span {
        color: #fff;
        text-shadow: none;
    }
}

/* Focus styles for accessibility */
.marquee:focus-within {
    outline: 2px solid #4CAF50;
    outline-offset: -2px;
}

/* Performance optimization for low-end devices */
@media (max-width: 20em) {
    .marquee-content {
        animation-duration: 45s; /* Even slower for very small screens */
    }
    
    .marquee-logo {
        animation: none; /* Disable glow on very small screens */
    }
}