/* Custom CSS for Johnstown Economic Development */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

/* Line clamp utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Glass morphism effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Image hover zoom container */
.img-zoom-container {
    overflow: hidden;
}

.img-zoom-container img {
    transition: transform 0.5s ease;
}

.img-zoom-container:hover img {
    transform: scale(1.05);
}

/* Custom button styles */
.btn-primary {
    @apply inline-flex items-center justify-center px-6 py-3 bg-primary-600 hover:bg-primary-700 text-white font-medium rounded-lg transition-all duration-200;
}

.btn-secondary {
    @apply inline-flex items-center justify-center px-6 py-3 bg-secondary-500 hover:bg-secondary-600 text-white font-medium rounded-lg transition-all duration-200;
}

.btn-outline {
    @apply inline-flex items-center justify-center px-6 py-3 border-2 border-primary-600 text-primary-600 hover:bg-primary-600 hover:text-white font-medium rounded-lg transition-all duration-200;
}

/* Card hover effects */
.card-hover {
    @apply transition-all duration-300 hover:shadow-xl hover:-translate-y-1;
}

/* Section dividers */
.section-divider {
    @apply w-24 h-1 bg-gradient-to-r from-primary-500 to-secondary-500 rounded-full;
}

/* Focus styles for accessibility */
*:focus-visible {
    @apply outline-none ring-2 ring-primary-500 ring-offset-2;
}

/* Mobile menu animation */
.mobile-menu {
    @apply transform transition-transform duration-300 ease-in-out;
}

.mobile-menu.hidden {
    @apply translate-x-full;
}

.mobile-menu:not(.hidden) {
    @apply translate-x-0;
}

/* Dropdown animation */
.dropdown-menu {
    @apply opacity-0 invisible transform -translate-y-2 transition-all duration-200;
}

.dropdown:hover .dropdown-menu,
.dropdown.active .dropdown-menu {
    @apply opacity-100 visible translate-y-0;
}

/* Stats counter animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-item {
    animation: countUp 0.6s ease-out forwards;
}

/* Map placeholder style */
.map-placeholder {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    position: relative;
}

.map-placeholder::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: #ef4444;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0.3);
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        color: black !important;
        background: white !important;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}