/* Custom Styles for Earnimize Website */

/* CSS Reset and Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Properties for Colors */
:root {
    --primary-blue: #3B82F6;
    --primary-teal: #06B6D4;
    --primary-purple: #8B5CF6;
    --gradient-primary: linear-gradient(135deg, var(--primary-blue), var(--primary-teal), var(--primary-purple));
    --gradient-secondary: linear-gradient(135deg, var(--primary-purple), var(--primary-teal), var(--primary-blue));
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Typography */
.font-inter {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Gradient Text */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Button Styles */
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary {
    background: transparent;
    border: 2px solid #e5e7eb;
    color: #374151;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Dark mode button styles */
.dark .btn-secondary {
    color: #d1d5db;
    border-color: #4b5563;
}

.dark .btn-secondary:hover {
    color: var(--primary-teal);
    border-color: var(--primary-teal);
}

/* Card Styles */
.benefit-card,
.job-card,
.job-detail-card,
.feedback-item {
    transition: all 0.3s ease;
    border: 1px solid rgba(229, 231, 235, 0.5);
    backdrop-filter: blur(10px);
}

.benefit-card:hover,
.job-card:hover,
.job-detail-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.dark .benefit-card,
.dark .job-card,
.dark .job-detail-card,
.dark .feedback-item {
    border-color: rgba(75, 85, 99, 0.5);
}

/* Navigation Styles */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Hero Section */
.hero-bg {
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.1) 0%, 
        rgba(6, 182, 212, 0.1) 50%, 
        rgba(139, 92, 246, 0.1) 100%);
    position: relative;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23000000" fill-opacity="0.03"><path d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/></g></g></svg>') repeat;
    opacity: 0.1;
    pointer-events: none;
}

/* Feedback Carousel */
.feedback-carousel {
    position: relative;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, white 10%, white 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, white 10%, white 90%, transparent);
}

.feedback-track {
    display: flex;
    animation: scroll 30s linear infinite;
    will-change: transform;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.feedback-item {
    flex-shrink: 0;
    width: 20rem; /* 320px */
    margin-right: 1.5rem;
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Form Styles */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dark .form-input {
    background: #374151;
    border-color: #4b5563;
    color: white;
}

.dark .form-input:focus {
    border-color: var(--primary-teal);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

/* Modal Styles */
.modal-backdrop {
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
}

/* Notification Styles */
.notification {
    animation: slideIn 0.3s ease-out;
    z-index: 9999;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-bg h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-bg p {
        font-size: 1.125rem;
    }
    
    .feedback-item {
        width: 16rem; /* 256px on mobile */
    }
}

@media (max-width: 640px) {
    .hero-bg h1 {
        font-size: 2rem;
    }
    
    .hero-bg p {
        font-size: 1rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.slide-up {
    transform: translateY(30px);
    opacity: 0;
    animation: slideUp 0.6s ease-out forwards;
}

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

.scale-in {
    transform: scale(0.9);
    opacity: 0;
    animation: scaleIn 0.6s ease-out forwards;
}

@keyframes scaleIn {
    to {
        transform: scale(1);
        opacity: 1;
    }
}

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

/* Focus styles for accessibility */
.focus-visible:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .gradient-text {
        background: none;
        -webkit-background-clip: unset;
        -webkit-text-fill-color: unset;
        color: var(--primary-blue);
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .benefit-card,
    .job-card,
    .job-detail-card {
        break-inside: avoid;
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-secondary);
}

.dark ::-webkit-scrollbar-track {
    background: #1e293b;
}

/* Job category section styles */
.job-category-header {
    position: relative;
    padding-left: 3rem;
}

.job-category-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 2rem;
    height: 2px;
    background: var(--gradient-primary);
    transform: translateY(-50%);
}

/* Skill tags */
.skill-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    transform: scale(1.05);
}

/* Admin section styles */
.admin-table {
    overflow-x: auto;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
}

.dark .admin-table {
    border-color: #374151;
}

.admin-table table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.dark .admin-table th,
.dark .admin-table td {
    border-color: #374151;
}

.admin-table th {
    background: #f9fafb;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
}

.dark .admin-table th {
    background: #1f2937;
    color: #9ca3af;
}

.admin-table tbody tr:hover {
    background: #f3f4f6;
}

.dark .admin-table tbody tr:hover {
    background: #374151;
}