/* 
 * Hirecode - Premium Job Board CSS
 * This file can be linked for better organization
 */

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.slide-up {
    animation: slideUp 0.4s ease-out;
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(79, 70, 229, 0); }
    100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Print Styles */
@media print {
    .header,
    .filters,
    .footer,
    .apply-button,
    .cta-button {
        display: none !important;
    }
    
    .job-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        margin-bottom: 1rem !important;
    }
    
    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    :root {
        --light: #1a1a1a;
        --dark: #f3f4f6;
        --gray: #9ca3af;
        --gray-light: #374151;
        --card: #2d2d2d;
        --border: #4b5563;
    }
    
    body {
        background-color: var(--light);
        color: var(--dark);
        background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    }
    
    .job-card,
    .filter-card,
    .modal-container,
    .apply-form,
    .stat-card,
    .filters,
    .empty-state,
    .modal {
        background-color: var(--card);
        border-color: var(--border);
    }
    
    .form-input,
    .form-select,
    .form-file,
    .sort-select,
    .search-input {
        background-color: #374151;
        border-color: var(--border);
        color: var(--dark);
    }
    
    .search-input::placeholder {
        color: #9ca3af;
    }
    
    .toast {
        background-color: var(--card);
        color: var(--dark);
    }
    
    .footer {
        background: #111827;
    }
    
    .modal-overlay {
        background: rgba(0, 0, 0, 0.85);
    }
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem !important;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem !important;
        padding: 0.5rem 0;
    }
    
    .search-wrapper {
        max-width: 100% !important;
        width: 100%;
    }
    
    .hero {
        padding: 5rem 0 2rem !important;
    }
    
    .hero-title {
        font-size: 2.25rem !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
        margin-bottom: 2rem !important;
    }
    
    .stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
        margin: 2rem 0 !important;
    }
    
    .stat-card {
        padding: 1rem !important;
    }
    
    .stat-value {
        font-size: 2rem !important;
    }
    
    .jobs-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .modal-header {
        padding: 1.25rem 1.5rem !important;
    }
    
    .modal-title {
        font-size: 1.5rem !important;
    }
    
    .modal-body {
        padding: 1.5rem !important;
    }
    
    .modal-meta-grid {
        grid-template-columns: 1fr !important;
    }
    
    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 1rem !important;
    }
    
    .hero-title {
        font-size: 1.75rem !important;
        line-height: 1.2 !important;
    }
    
    .stats {
        grid-template-columns: 1fr !important;
    }
    
    .filters {
        overflow-x: auto;
        padding: 0.75rem !important;
        margin-bottom: 1.5rem !important;
        -webkit-overflow-scrolling: touch;
    }
    
    .filter-btn {
        white-space: nowrap;
    }
    
    .job-card {
        padding: 1.25rem !important;
    }
    
    .job-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem !important;
    }
    
    .company-logo {
        width: 48px !important;
        height: 48px !important;
        font-size: 1.125rem !important;
    }
    
    .modal {
        max-height: 95vh !important;
        margin: 0.5rem !important;
    }
    
    .modal-company {
        flex-direction: column;
        text-align: center;
        gap: 1rem !important;
    }
    
    .apply-section {
        padding: 1.5rem !important;
    }
    
    .btn-apply {
        width: 100%;
        justify-content: center;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .filter-btn,
    .page-btn,
    .btn-view,
    .btn-apply {
        min-height: 44px;
        min-width: 44px;
    }
    
    .search-input {
        font-size: 16px; /* Prevents iOS zoom */
    }
    
    .modal-close {
        width: 44px;
        height: 44px;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .job-card {
        border: 2px solid currentColor;
    }
    
    .btn-view,
    .btn-apply {
        border: 2px solid currentColor;
    }
    
    .modal-overlay {
        background: rgba(0, 0, 0, 0.9);
    }
}

/* 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;
        scroll-behavior: auto !important;
    }
    
    .fade-in,
    .slide-up,
    .pulse {
        animation: none;
    }
    
    .modal-overlay,
    .modal {
        transition: none;
    }
}