/**
 * Job Board Enhancements CSS
 * Modern design improvements for the job board theme
 */

/* ========================================
   Job Search Hero Section
   ======================================== */

.job-search-hero {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 40px 0;
    position: relative;
    overflow: hidden;
}

.job-search-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.job-search-title {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    color: #ffffff;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.job-search-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    text-align: center;
    margin-bottom: 2.5rem;
}

/* ========================================
   Home Country Jobs Section
   ======================================== */

.home-country-jobs-section {
    padding: 2rem 0;
    background: #ffffff;
}

.country-selector-wrapper {
    min-width: 250px;
}

.country-select {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    color: #2d3748;
    background-color: #f8fafc;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.country-select:focus {
    border-color: #7b1fa2;
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
    outline: none;
}

#home-country-jobs-results {
    min-height: 400px;
    transition: opacity 0.3s ease;
}

#home-country-jobs-results.loading {
    opacity: 0.5;
    pointer-events: none;
}

.country-selector-wrapper .country-select {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    color: #2d3748;
    background-color: #f8fafc;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.country-selector-wrapper .country-select:focus {
    border-color: #7b1fa2;
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
    outline: none;
}

#view-all-country-jobs {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border: none;
    color: #ffffff !important;
    padding: 1rem 3rem;
    font-weight: 700;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(30, 60, 114, 0.3);
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

#view-all-country-jobs:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(30, 60, 114, 0.4);
    color: #ffffff !important;
}


/* ========================================
   Job Search Form
   ======================================== */

.job-search-form-container {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.job-search-form-container:hover {
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.job-search-form .form-label {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.job-search-form .form-control,
.job-search-form .form-select {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.job-search-form .form-control:focus,
.job-search-form .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.job-search-form .btn-primary {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border: none;
    border-radius: 8px;
    padding: 1rem 2rem;
    font-weight: 600;
    font-size: 1.125rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.job-search-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

/* ========================================
   Job Listings Grid
   ======================================== */

.jobs-listing-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 2rem;
}

.jobs-listing-grid .job-listing-item {
    flex: 1 1 calc(33.333% - 1rem);
    min-width: 300px;
    max-width: calc(33.333% - 1rem);
}

@media (max-width: 768px) {
    .jobs-listing-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Job Listing Item Card
   ======================================== */

.job-listing-item {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out;
}

.job-listing-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    transition: height 0.3s ease;
}

.job-listing-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.job-listing-item:hover::before {
    height: 100%;
}

.job-category-badge {
    margin-bottom: 1rem;
}

.job-category-badge .badge {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%) !important;
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.job-listing-item .job-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.job-listing-item .job-title a {
    color: #2d3748;
    text-decoration: none;
    transition: color 0.3s ease;
}

.job-listing-item .job-title a:hover {
    color: #667eea;
}

/* ========================================
   Job Meta Information
   ======================================== */

.job-meta-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.job-meta-item-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #718096;
}

.job-meta-icon {
    font-size: 1rem;
}

.job-company-link {
    color: #4a5568;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.job-company-link:hover {
    color: #667eea;
}

/* ========================================
   Job Excerpt & Actions
   ======================================== */

.job-excerpt {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

.job-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.job-actions .btn {
    border-radius: 6px;
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.job-actions .btn-outline-primary {
    border: 2px solid #667eea;
    color: #667eea;
}

.job-actions .btn-outline-primary:hover {
    background: #667eea;
    color: #ffffff;
    transform: translateX(3px);
}

/* Save Job Button */
.btn-save-job {
    background: transparent;
    border: 2px solid #e2e8f0;
    color: #718096;
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-save-job:hover {
    border-color: #f56565;
    color: #f56565;
}

.btn-save-job.saved {
    background: #f56565;
    border-color: #f56565;
    color: #ffffff;
}

/* ========================================
   Latest Jobs Section
   ======================================== */

.latest-jobs-section {
    padding: 4rem 0;
    background: #f7fafc;
}

.section-header {
    margin-bottom: 2.5rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-radius: 2px;
}

/* ========================================
   Job Categories Section
   ======================================== */

.job-categories-section {
    padding: 2rem 0;
    background: #ffffff;
}

.job-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.category-card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.category-card:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.category-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.category-count {
    color: #718096;
    font-size: 0.875rem;
}

/* ========================================
   Single Job Page Enhancements
   ======================================== */

.single-job {
    padding: 2rem 0;
}

.job-header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #e2e8f0;
}

.job-title-single {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.job-content {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.job-description h2,
.job-dates h3 {
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.job-description ul,
.job-description ol {
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.job-description li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Job Apply Section */
.job-apply-section {
    background: linear-gradient(135deg, rgba(30, 60, 114, 0.1) 0%, rgba(42, 82, 152, 0.1) 100%);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.job-apply-section .btn-apply {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border: none;
    color: #ffffff;
    padding: 1rem 3rem;
    font-size: 1.25rem;
    font-weight: 700;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.job-apply-section .btn-apply:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
}

/* Job Sidebar */
.job-sidebar .card {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.job-sidebar .card:hover {
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.job-sidebar .widget-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e2e8f0;
}

.company-logo img {
    border-radius: 8px;
    max-width: 100%;
    height: auto;
}

/* ========================================
   Loading States
   ======================================== */

.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;
    }
}

.job-listing-skeleton {
    height: 200px;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

/* ========================================
   Animations
   ======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Stagger animation for job listings */
.job-listing-item:nth-child(1) {
    animation-delay: 0.1s;
}

.job-listing-item:nth-child(2) {
    animation-delay: 0.2s;
}

.job-listing-item:nth-child(3) {
    animation-delay: 0.3s;
}

.job-listing-item:nth-child(4) {
    animation-delay: 0.4s;
}

.job-listing-item:nth-child(5) {
    animation-delay: 0.5s;
}

.job-listing-item:nth-child(6) {
    animation-delay: 0.6s;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 992px) {
    .job-search-title {
        font-size: 2.5rem;
    }

    .job-title-single {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .job-search-hero {
        padding: 60px 0;
    }

    .job-search-title {
        font-size: 2rem;
    }

    .job-search-subtitle {
        font-size: 1rem;
    }

    .job-search-form-container {
        padding: 1.5rem;
    }

    .job-title-single {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.5rem;
    }
}

/* ========================================
   Utility Classes
   ======================================== */
/* ========================================
   Browse Other Countries Grid
   ======================================== */

.country-buttons-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-country-pill {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    color: #2d3748;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-country-pill:hover {
    border-color: #7b1fa2;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(123, 31, 162, 0.15);
    color: #7b1fa2;
}

.country-flag {
    font-size: 1.25rem;
}

.country-name {
    font-size: 1rem;
}

/* Ensure consistent card sizing */
.jobs-listing-grid .job-listing-item {
    height: 100%;
    margin-bottom: 0;
}

.text-gradient {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-soft {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.shadow-medium {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.shadow-hard {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* ========================================
   Category Icons
   ======================================== */

.category-icon-wrapper {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(30, 60, 114, 0.1) 0%, rgba(42, 82, 152, 0.1) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: #667eea;
    transition: all 0.3s ease;
}

.category-card:hover .category-icon-wrapper {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #ffffff;
    transform: scale(1.1) rotate(5deg);
}