/* Enhanced CSS for Counters and Urgency Timer */

/* Counter Animation Effects */
.counter-container {
    transition: all 0.3s ease;
}

.counter {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    display: inline-block;
    min-width: 1ch;
}

/* Urgency Timer Effects */
.days-counter {
    animation: pulse-glow 2s ease-in-out infinite;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

.urgent-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #FF6B6B, #FF4444);
    color: white;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 12px;
    animation: pulse 1.5s ease-in-out infinite;
    white-space: nowrap;
}

/* Responsive Logo Sizes */
.logo-container {
    transition: all 0.3s ease;
}

/* Responsive Breakpoint Adjustments */
@media (max-width: 768px) {
    .counter-container .text-4xl {
        font-size: 2.5rem; /* 40px */
    }
    
    .counter-container .text-5xl {
        font-size: 3rem; /* 48px */
    }
    
    .counter-container .text-6xl {
        font-size: 3.5rem; /* 56px */
    }
}

@media (max-width: 640px) {
    .counter-container .text-4xl {
        font-size: 2rem; /* 32px */
    }
    
    .counter-container .text-5xl {
        font-size: 2.5rem; /* 40px */
    }
    
    .counter-container .text-6xl {
        font-size: 3rem; /* 48px */
    }
    
    .logo-container img {
        width: 2.5rem !important;
        height: 2.5rem !important;
    }
}

/* Hover Effects for Counters */
.counter-container:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.counter-container:hover .counter {
    animation: bounce 0.5s ease;
}

/* Loading State for Counters */
.counter.loading {
    opacity: 0.5;
    animation: pulse 1s ease-in-out infinite;
}

/* Success State for Completed Counters */
.counter-container.completed .counter {
    color: #10b981;
    animation: checkmark 0.6s ease;
}

/* Animation Keyframes */
@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0, -10px, 0);
    }
    70% {
        transform: translate3d(0, -5px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

@keyframes checkmark {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Urgency Styling */
.text-urgent {
    color: #FF6B6B !important;
    animation: urgent-pulse 2s ease-in-out infinite;
}

@keyframes urgent-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* Mobile-First Grid Adjustments */
@media (max-width: 768px) {
    .grid-cols-2.lg\\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .grid-cols-2.sm\\:grid-cols-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 640px) {
    .grid-cols-2.lg\\:grid-cols-4 {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .grid-cols-2.sm\\:grid-cols-3 {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
}

/* Touch-friendly hover states */
@media (hover: none) and (pointer: coarse) {
    .counter-container:hover {
        transform: none;
    }
    
    .counter-container:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

/* Performance optimizations */
.counter {
    will-change: transform;
    contain: layout style paint;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .counter {
        color: #FFFFFF !important;
    }
    
    .days-counter {
        color: #FF6666 !important;
        text-shadow: none;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .counter,
    .days-counter,
    .counter-container {
        animation: none !important;
        transition: none !important;
    }
    
    .urgent-badge {
        animation: none;
    }
}

/* Print styles */
@media print {
    .counter-container,
    .days-counter {
        break-inside: avoid;
    }
    
    .counter,
    .days-counter {
        color: black !important;
    }
}

/* Dark mode enhancements */
@media (prefers-color-scheme: dark) {
    .counter-container:hover {
        filter: brightness(1.2) contrast(1.1);
    }
}