/**
 * World Business Network (WBN) - Custom Styles
 * Minimal custom overrides for Tailwind CSS
 */

/* Custom focus styles for better accessibility */
.nav-link:focus,
.mobile-nav-link:focus {
    outline: 2px solid #003F9A;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Navigation link hover effects */
.nav-link {
    @apply text-gray-700 hover:text-wbn-primary px-3 py-2 rounded-md text-sm font-semibold transition-colors duration-200 uppercase tracking-wide;
}

.mobile-nav-link {
    @apply text-gray-700 hover:text-wbn-primary hover:bg-gray-50 block px-3 py-2 rounded-md text-base font-semibold transition-colors duration-200 uppercase tracking-wide;
}

/* Form input focus states */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

/* Skip to content link positioning */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.focus\:not-sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 0.5rem 1rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Loading animation for dynamic content */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Lazy loading image styles */
img.lazy {
    opacity: 0;
    transition: opacity 0.3s;
}

img.lazy.loaded {
    opacity: 1;
}

/* Custom button hover effects */
.btn-primary {
    @apply bg-wbn-primary text-white px-8 py-4 rounded-md font-bold hover:bg-wbn-primary-light focus:outline-none focus:ring-2 focus:ring-wbn-accent focus:ring-offset-2 transition-all duration-200 transform hover:scale-105 uppercase tracking-wide shadow-lg;
}

.btn-secondary {
    @apply bg-white text-wbn-primary border-2 border-wbn-primary px-8 py-4 rounded-md font-bold hover:bg-wbn-primary hover:text-white focus:outline-none focus:ring-2 focus:ring-wbn-accent focus:ring-offset-2 transition-all duration-200 transform hover:scale-105 uppercase tracking-wide;
}

/* Card hover effects */
.card-hover {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Form validation styles */
.error-message {
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Success banner styles */
#success-banner {
    border-left: 4px solid #10B981;
}

/* Mobile menu transitions */
#mobile-menu {
    transition: all 0.3s ease-in-out;
}

/* Responsive text sizing */
@media (max-width: 640px) {
    h1 {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    h2 {
        font-size: 2rem;
        line-height: 1.2;
    }
}

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

/* High contrast mode support */
@media (prefers-contrast: high) {
    .nav-link,
    .mobile-nav-link {
        border: 1px solid transparent;
    }
    
    .nav-link:hover,
    .mobile-nav-link:hover {
        border-color: currentColor;
    }
}

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

/* Dark mode support (for future implementation) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles would go here */
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
