/* Custom CSS for Saveies Tools */

/* Base styles */
* {
    box-sizing: border-box;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Animation for loading states */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

/* File upload drag and drop styles */
.drag-over {
    border-color: #3B82F6 !important;
    background-color: #EBF8FF !important;
}

.file-upload-area {
    transition: all 0.3s ease;
}

.file-upload-area:hover {
    border-color: #3B82F6;
    background-color: #F9FAFB;
}

/* Button hover effects */
.btn-primary {
    background-color: #3B82F6;
    color: white;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: #2563EB;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background-color: #6B7280;
    color: white;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background-color: #4B5563;
    transform: translateY(-1px);
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

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

/* Navigation dropdown animation */
.dropdown-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Progress indicators */
.progress-bar {
    height: 4px;
    background-color: #E5E7EB;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #3B82F6;
    transition: width 0.3s ease;
}

/* Loading spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #E5E7EB;
    border-top: 2px solid #3B82F6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Tool page specific styles */
.tool-card {
    transition: all 0.3s ease;
    border: 1px solid #E5E7EB;
}

.tool-card:hover {
    border-color: #3B82F6;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

.tool-icon {
    transition: all 0.3s ease;
}

.tool-card:hover .tool-icon {
    transform: scale(1.1);
}

/* Form improvements */
.form-input {
    transition: all 0.2s ease;
}

.form-input:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Code blocks */
.code-block {
    background-color: #1F2937;
    color: #F9FAFB;
    padding: 1rem;
    border-radius: 0.5rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    overflow-x: auto;
}

.code-inline {
    background-color: #F3F4F6;
    color: #1F2937;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
}

/* Alert styles */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #ECFDF5;
    border: 1px solid #A7F3D0;
    color: #065F46;
}

.alert-error {
    background-color: #FEF2F2;
    border: 1px solid #FECACA;
    color: #991B1B;
}

.alert-warning {
    background-color: #FFFBEB;
    border: 1px solid #FDE68A;
    color: #92400E;
}

.alert-info {
    background-color: #EFF6FF;
    border: 1px solid #BFDBFE;
    color: #1E40AF;
}

/* Blog post styles */
.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4,
.blog-content h5,
.blog-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.25;
}

.blog-content h1 {
    font-size: 2.25rem;
}

.blog-content h2 {
    font-size: 1.875rem;
}

.blog-content h3 {
    font-size: 1.5rem;
}

.blog-content p {
    margin-bottom: 1rem;
    line-height: 1.75;
}

.blog-content ul,
.blog-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.blog-content li {
    margin-bottom: 0.5rem;
}

.blog-content blockquote {
    border-left: 4px solid #3B82F6;
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #6B7280;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

/* Mobile menu animation */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-menu.active {
    max-height: 500px;
}

/* Footer improvements */
.footer-link {
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #3B82F6;
}

/* Social media icons */
.social-icon {
    transition: all 0.2s ease;
}

.social-icon:hover {
    transform: translateY(-2px);
}

/* Feature grid improvements */
.feature-grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 768px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .feature-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Table improvements */
.table-responsive {
    overflow-x: auto;
}

.table-striped tbody tr:nth-child(odd) {
    background-color: #F9FAFB;
}

/* Image gallery for blog posts */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.image-gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0.5rem;
    transition: transform 0.3s ease;
}

.image-gallery img:hover {
    transform: scale(1.05);
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-break {
        page-break-before: always;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: black !important;
        background: white !important;
    }
}

/* Accessibility improvements */
.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 styles for better accessibility */
button:focus,
input:focus,
textarea:focus,
select:focus,
a:focus {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #3B82F6;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 100;
}

.skip-link:focus {
    top: 6px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .border-gray-300 {
        border-color: #000;
    }
    
    .text-gray-600 {
        color: #000;
    }
    
    .bg-gray-50 {
        background-color: #fff;
    }
}

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

/* Dark mode styles (for future implementation) */
@media (prefers-color-scheme: dark) {
    .dark-mode {
        background-color: #1F2937;
        color: #F9FAFB;
    }
    
    .dark-mode .bg-white {
        background-color: #374151;
    }
    
    .dark-mode .text-gray-900 {
        color: #F9FAFB;
    }
    
    .dark-mode .border-gray-300 {
        border-color: #4B5563;
    }
}
