/**
 * Profesea-Style Jobs Page V2.1
 * Maritime Job Portal UI - All Feedback Fixed
 */

/* ========================================
   RESET & BASE
======================================== */
.profesea-jobs-page {
    background: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.profesea-jobs-page .site-main {
    padding: 0 !important;
    max-width: none !important;
}

/* ========================================
   CRITICAL: Override BuddyBoss Theme Max-Width
   Only for job listing pages
======================================== */
.profesea-jobs-page .container,
.profesea-jobs-page .bb-grid,
.single-job_listing .container,
.single-job_listing .bb-grid {
    max-width: none !important;
    width: 100% !important;
}

/* ========================================
   HERO SECTION
======================================== */
.jobs-hero {
    background: linear-gradient(135deg, #0b253c 0%, #3b82f6 100%);
    padding: 80px 20px 100px;
    position: relative;
    overflow: hidden;
}

.jobs-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"><circle cx="50" cy="50" r="40" fill="%23ffffff" opacity="0.03"/></svg>');
    background-size: 100px 100px;
    opacity: 0.5;
}

.hero-content {
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 42px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 16px 0;
    line-height: 1.2;
    letter-spacing: -0.5px;
    text-align: left;
}

.hero-subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-weight: 400;
    line-height: 1.5;
}

/* ========================================
   SEARCH SECTION
======================================== */
.jobs-search-section {
    margin-top: -50px;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.search-container {
    margin: 0 auto;
}

.jobs-search-form {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 30px;
}

.search-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.search-field {
    position: relative;
}

.search-field label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #9ca3af;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.search-field input[type="text"],
.search-field select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    color: #111827;
    background: #ffffff;
    transition: all 0.3s ease;
}

.search-field input[type="text"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}
.search-field select:focus {
    outline: none;
    color: #111827;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.search-field input[type="text"]::placeholder {
    color: #9ca3af;
}

/* ========================================
   TABS SECTION
======================================== */
.jobs-tabs-section {
    padding: 0 20px 30px;
    background: #f8f9fa;
}

.tabs-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.job-type-tabs {
    display: flex;
    padding: 12px;
    gap: 12px;
}

.tab-btn {
    padding: 12px 28px;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.tab-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

.remote-filter {
    display: flex;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
    color: #4b5563;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #3b82f6;
}

/* ========================================
   JOB LISTINGS SECTION
======================================== */
.jobs-listings-section {
    padding: 0 20px 60px;
    background: #f8f9fa;
    position: relative;
    min-height: 500px;
}

.listings-container {
    margin: 0 auto;
    position: relative;
}

/* ========================================
   LOADING STATE - HIDE CARDS DURING FILTER
======================================== */
.jobs-listings-section.is-loading .job-cards-grid {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.jobs-listings-section.is-loading .see-more-wrapper {
    display: none;
}

.search-loading-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 100;
    display: none;
}

.jobs-listings-section.is-loading .search-loading-overlay {
    display: block;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.search-loading-overlay p {
    font-size: 16px;
    font-weight: 600;
    color: #6b7280;
    margin: 0;
}

/* ========================================
   JOB CARDS GRID
======================================== */
.job-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
    transition: opacity 0.3s ease;
}

/* ========================================
   JOB CARD - PROFESEA STYLE
======================================== */
.job-card-profesea {
    background: #ffffff;
    border-radius: 12px;
    padding: 35px 20px 20px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 2px solid rgb(238, 238, 238);
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
}

.job-card-profesea:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: #3b82f6;
}

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

/* ========================================
   CONTRACT BADGE (TOP RIGHT) - PROFESEA STYLE
======================================== */
.contract-badge {
    position: absolute;
    top: -8px;
    right: 12px;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    border-radius: 12px;
    padding: 8px 12px;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 5;
}

.contract-badge .badge-months {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

.contract-badge .badge-number {
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
    display: block;
}

.contract-badge .badge-label {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.contract-badge .badge-icon {
    font-size: 18px;
    line-height: 1;
}

/* ========================================
   CARD CONTENT
======================================== */
.job-card-profesea .card-content {
    display: flex;
    gap: 16px;
    padding-top: 8px;
}

/* Company Logo */
.company-logo-wrapper {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.company-logo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

/* Job Info */
.job-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.job-title-profesea {
    font-size: 17px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.job-card-profesea:hover .job-title-profesea {
    color: #3b82f6;
}

/* Meta Line */
.job-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.job-meta-line .company-name,
.job-meta-line .job-location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
}

.job-meta-line svg {
    flex-shrink: 0;
    opacity: 0.7;
}

/* Posted Date */
.job-posted-date {
    font-size: 13px;
    color: #9ca3af;
    font-weight: 500;
    margin-top: 4px;
}

/* ========================================
   SEE MORE BUTTON
======================================== */
.see-more-wrapper {
    text-align: center;
    padding: 20px 0;
}

.btn-see-more {
    display: inline-block;
    padding: 16px 48px;
    background: #ffffff;
    border: 2px solid #3b82f6;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    color: #3b82f6;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.btn-see-more:hover {
    background: #3b82f6;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

/* ========================================
   NO JOBS FOUND
======================================== */
.no-jobs-found {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.no-jobs-found p {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
}

/* ========================================
   TABLET RESPONSIVE (768px - 1023px)
======================================== */
@media (max-width: 1023px) {
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 17px;
    }
    
    .search-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .job-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tabs-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .job-type-tabs {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ========================================
   MOBILE RESPONSIVE (max 767px)
======================================== */
@media (max-width: 767px) {
    .jobs-hero {
        padding: 60px 15px 80px;
    }
    
    .hero-title {
        font-size: 26px;
    }
    
    .hero-subtitle {
        font-size: 15px;
    }
    
    .jobs-search-section {
        padding: 0 15px 30px;
        margin-top: -40px;
    }
    
    .jobs-search-form {
        padding: 20px 16px;
    }
    
    .search-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .search-field label {
        font-size: 10px;
        margin-bottom: 6px;
    }
    
    .search-field input[type="text"],
    .search-field select {
        padding: 12px 14px;
        font-size: 16px;
    }
    
    .jobs-tabs-section {
        padding: 0 15px 20px;
    }
    
    .job-type-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .job-type-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .tab-btn {
        padding: 10px 20px;
        font-size: 14px;
        white-space: nowrap;
    }
    
    .jobs-listings-section {
        padding: 0 15px 40px;
    }
    
    .job-cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .job-card-profesea {
        padding: 16px;
    }
    
    .contract-badge {
        top: -6px;
        right: 10px;
        padding: 6px 10px;
    }
    
    .contract-badge .badge-number {
        font-size: 14px;
    }
    
    .contract-badge .badge-label {
        font-size: 9px;
    }
    
    .contract-badge .badge-icon {
        font-size: 16px;
    }
    
    .company-logo-wrapper {
        width: 48px;
        height: 48px;
    }
    
    .job-title-profesea {
        font-size: 16px;
    }
    
    .job-meta-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .btn-see-more {
        width: 100%;
        padding: 14px 32px;
    }
}

/* ========================================
   ANIMATIONS
======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.job-card-profesea {
    animation: fadeInUp 0.4s ease-out;
}

/* ========================================
   ACCESSIBILITY
======================================== */
.job-card-profesea:focus-within {
    outline: 3px solid #3b82f6;
    outline-offset: 3px;
}

/* ========================================
   DARK MODE SUPPORT
======================================== */
@media (prefers-color-scheme: dark) {
    /*.profesea-jobs-page {*/
    /*    background: #111827;*/
    /*}*/
    
    .jobs-search-form,
    .job-card-profesea {
        /*background: #1f2937;*/
        border-color: 2px solid rgb(238, 238, 238);
    }
    
    .search-field input[type="text"],
    .search-field select,
    .tab-btn {
        /*background: #374151;*/
        border-color: #0b253c;
        color: #9ca3af;
    }
    
    .job-title-profesea {
        color: rgb(66, 66, 66);
    }
    
    .job-meta-line .company-name,
    .job-meta-line .job-location,
    .job-posted-date {
        color: rgb(66, 66, 66);
    }
    
    .btn-see-more {
        background: #0b253c;
        border-color: #60a5fa;
        color: #60a5fa;
    }
}

/* ========================================
   PRINT STYLES
======================================== */
@media print {
    .jobs-hero,
    .jobs-search-section,
    .jobs-tabs-section,
    .see-more-wrapper {
        display: none;
    }
    
    .job-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .job-card-profesea {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
}
   CONFIDENTIAL BADGE & RESTRICTIONS
======================================== */
.confidential-badge {
    display: inline-block;
    margin-left: 6px;
    font-size: 12px;
    opacity: 0.8;
}

.company-logo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #9ca3af;
    border-radius: 10px;
}

.company-logo-placeholder svg {
    width: 48px;
    height: 48px;
}

/* Premium notice in job cards (optional) */
.job-card-profesea.has-restrictions .company-name {
    position: relative;
}

.job-card-profesea.has-restrictions .company-name::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.8) 100%);
    pointer-events: none;
}

/* ========================================
