/* Enhanced Job Portal Styles with Tailwind */

/* Animation for fade in */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out;
}

/* 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;
}

/* Quick filter buttons */
.quick-filter-btn {
    @apply px-4 py-2 rounded-lg text-sm font-medium transition-all duration-200;
    @apply bg-white text-gray-700 border border-gray-300;
    @apply hover:bg-gray-50 hover:border-gray-400;
}

.quick-filter-btn.active {
    @apply bg-primary text-white border-primary;
    @apply shadow-md;
}

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

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

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

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

/* Card hover effects */
.jobs > div {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.jobs > div:hover {
    transform: translateY(-4px);
}

/* Loading spinner animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.fa-spin {
    animation: spin 1s linear infinite;
}

/* Badge animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

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

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Statistics cards animation */
.statistics-card {
    animation: fadeIn 0.6s ease-out;
}

.statistics-card:nth-child(1) { animation-delay: 0.1s; }
.statistics-card:nth-child(2) { animation-delay: 0.2s; }
.statistics-card:nth-child(3) { animation-delay: 0.3s; }
.statistics-card:nth-child(4) { animation-delay: 0.4s; }

/* Mobile responsiveness */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem !important;
    }
    
    .hero-section p {
        font-size: 1rem !important;
    }
    
    .quick-filter-btn {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
    }
}

/* Smooth transitions for all interactive elements */
button, a, select, input {
    transition: all 0.2s ease-in-out;
}

/* Focus states for accessibility */
button:focus, 
a:focus, 
select:focus, 
input:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Modal backdrop animation */
#quick_view_modal {
    animation: fadeIn 0.3s ease-out;
}

#quick_view_modal > div {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Job card grid layout */
.jobs {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
}

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

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

/* Badge styles */
.badge-new {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.badge-closing {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Pagination custom styles */
.paginationjs-pages ul {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.paginationjs-pages li {
    margin: 0 !important;
}

.paginationjs-pages a {
    padding: 0.5rem 1rem !important;
    border-radius: 0.5rem !important;
    border: 1px solid #e5e7eb !important;
    background: white !important;
    color: #374151 !important;
    font-weight: 500 !important;
    transition: all 0.2s !important;
}

.paginationjs-pages a:hover {
    background: #f3f4f6 !important;
    border-color: #3b82f6 !important;
    color: #3b82f6 !important;
}

.paginationjs-pages .active a {
    background: #3b82f6 !important;
    border-color: #3b82f6 !important;
    color: white !important;
}

.paginationjs-pages .disabled a {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* Size changer styles */
.paginationjs-size-changer {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.paginationjs-size-changer select {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    background: white;
    color: #374151;
    font-weight: 500;
}

/* Filter sidebar sticky behavior */
@media (min-width: 1024px) {
    .sticky {
        position: sticky;
        top: 6rem;
    }
}

/* Empty state illustration */
#no_results i {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Hero gradient overlay */
.hero-gradient {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #8b5cf6 100%);
}

/* Dropdown menu animation */
.group:hover .group-hover\:block {
    animation: fadeIn 0.2s ease-out;
}

/* Button ripple effect */
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

button.ripple {
    position: relative;
    overflow: hidden;
}

button.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

button.ripple:active::after {
    animation: ripple 0.6s ease-out;
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Utility classes */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.shadow-elegant {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
}
