/* ==========================================================================
   JOB BOARD - Modern Design with Skeleton Loaders
   ========================================================================== */

.cos-job-board {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.cos-job-board-header {
    text-align: center;
    margin-bottom: 48px;
    animation: fadeInDown 0.6s ease;
}

.cos-job-board-header h2 {
    font-size: 42px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 12px 0;
    background: linear-gradient(135deg, #111827 0%, #4b5563 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cos-subtitle {
    font-size: 18px;
    color: #6b7280;
    font-weight: 400;
}

.cos-job-board-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 32px;
    align-items: start;
}

/* Filters Sidebar */
.cos-filters-sidebar {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 24px;
    animation: fadeInLeft 0.5s ease;
}

.cos-filter-section h3 {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 24px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cos-filter-group {
    margin-bottom: 24px;
}

.cos-filter-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.cos-filter-input,
.cos-filter-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
    background: #f9fafb;
}

.cos-filter-input:focus,
.cos-filter-select:focus {
    outline: none;
    border-color: #FFD700;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.cos-cert-filters {
    max-height: 300px;
    overflow-y: auto;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    margin-top: 8px;
}

.cos-cert-category {
    margin-bottom: 16px;
}

.cos-cert-category strong {
    display: block;
    font-size: 13px;
    color: #111827;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cos-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 14px;
    color: #4b5563;
    cursor: pointer;
    transition: color 0.2s;
}

.cos-checkbox-label:hover {
    color: #111827;
}

.cos-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.cos-filter-apply,
.cos-filter-reset {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 12px;
}

.cos-filter-apply {
    background: #FFD700;
    color: #111827;
}

.cos-filter-apply:hover {
    background: #FFC700;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.cos-filter-reset {
    background: #ffffff;
    color: #6b7280;
    border: 2px solid #e5e7eb;
}

.cos-filter-reset:hover {
    border-color: #d1d5db;
    color: #111827;
}

/* Jobs Container */
.cos-jobs-container {
    animation: fadeInRight 0.5s ease;
}

.cos-jobs-count {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 24px;
    font-weight: 500;
}

.cos-jobs-count span {
    font-weight: 700;
    color: #111827;
    font-size: 20px;
}

/* Loading State */
.cos-jobs-loading {
    text-align: center;
    padding: 60px 20px;
}

.cos-spinner {
    border: 4px solid #f3f4f6;
    border-top: 4px solid #FFD700;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.cos-jobs-loading p {
    color: #6b7280;
    font-size: 16px;
    font-weight: 500;
}

/* Jobs Grid */
.cos-jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

/* Skeleton Loader */
.cos-skeleton-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    animation: pulse 1.5s ease-in-out infinite;
}

.cos-skeleton-line {
    height: 16px;
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 12px;
}

.cos-skeleton-line.wide {
    width: 80%;
}

.cos-skeleton-line.medium {
    width: 60%;
}

.cos-skeleton-line.short {
    width: 40%;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Job Card */
.cos-job-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    animation: fadeInUp 0.4s ease;
    position: relative;
    overflow: hidden;
}

.cos-job-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #FFD700;
    transform: scaleY(0);
    transition: transform 0.3s ease;
    transform-origin: bottom;
}

.cos-job-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: #FFD700;
}

.cos-job-card:hover::before {
    transform: scaleY(1);
    transform-origin: top;
}

.cos-job-header {
    margin-bottom: 16px;
}

.cos-job-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.cos-job-company {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.cos-job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px 0;
    border-top: 1px solid #f3f4f6;
    border-bottom: 1px solid #f3f4f6;
}

.cos-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #4b5563;
}

.cos-icon {
    font-size: 16px;
}

.cos-meta-item.cos-posted {
    color: #9ca3af;
    font-size: 13px;
}

.cos-job-footer {
    display: flex;
    gap: 12px;
}

.cos-job-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

/* Buttons */
.cos-button {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cos-button-primary {
    background: #FFD700;
    color: #111827;
}

.cos-button-primary:hover {
    background: #FFC700;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.cos-button-secondary {
    background: #ffffff;
    color: #6b7280;
    border: 2px solid #e5e7eb;
}

.cos-button-secondary:hover {
    border-color: #d1d5db;
    color: #111827;
}

.cos-button-disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

.cos-button-small {
    padding: 8px 16px;
    font-size: 13px;
}

/* No Results */
.cos-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    font-size: 16px;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   MODAL POPUP STYLING
   ========================================================================== */
.cos-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.cos-modal {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cos-modal-header {
    padding: 28px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.cos-modal-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.cos-modal-company {
    display: block;
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
    margin-top: 4px;
}

.cos-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.cos-modal-close:hover {
    background: #f3f4f6;
    color: #111827;
}

.cos-modal-body {
    padding: 28px;
    overflow-y: auto;
    flex: 1;
}

.cos-job-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.cos-detail-item {
    background: #f9fafb;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.cos-detail-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.cos-detail-value {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.cos-modal-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f3f4f6;
}

.cos-modal-section:last-of-type {
    border-bottom: none;
}

.cos-modal-section h4 {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px 0;
}

.cos-modal-section p {
    font-size: 14px;
    line-height: 1.6;
    color: #4b5563;
    margin: 0;
}

.cos-cert-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cos-cert-badge {
    background: linear-gradient(135deg, #FFD700 0%, #FFC700 100%);
    color: #111827;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    display: inline-block;
}

.cos-modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #f3f4f6;
}

.cos-button-large {
    padding: 14px 28px;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 1024px) {
    .cos-job-board-layout {
        grid-template-columns: 280px 1fr;
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .cos-job-board-layout {
        grid-template-columns: 1fr;
    }

    .cos-filters-sidebar {
        position: static;
    }

    .cos-jobs-grid {
        grid-template-columns: 1fr;
    }

    .cos-job-board-header h2 {
        font-size: 32px;
    }
}