:root {
    --primary-color: #755ea3;
    --secondary-color: #002e54;
    --text-color: #1f2937;
    --light-text: #6b7280;
    --background-light: #f9fafb;
    --white: #ffffff;
    --border-radius: 8px;
    --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

.jobs-section {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
    background-color: white;
    margin-top: 100px;
}

.container {
    max-width: 1300px;
    width: 90%;
    margin: auto;
}

.jobs-header {
    margin-bottom: 2rem;
}

.jobs-header h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1.5rem;
    text-align: center;
}

.search-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 2rem;
    width: 100%;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 300px;
}

.search-box input {
    width: 100%;
    padding: 0.8rem 2.5rem 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background-color: white;
}

.search-box i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
}

.select-wrapper {
    position: relative;
    min-width: 150px;
}

.select-wrapper select {
    width: 100%;
    padding: 0.8rem 2.5rem 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.select-arrow {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    pointer-events: none;
    fill: #8a8a8b;
    color: #8a8a8b;
}

.jobs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.no-jobs-message {
    text-align: center;
    padding: 3rem 0;
    color: #666;
}

.no-jobs-message i {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 1rem;
}

.no-jobs-message h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.loading-spinner {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f8f9fa;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.job-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 8px 4px rgba(0, 0, 0, 0.1);


    transition: transform 0.3s ease;
    overflow: hidden;
    margin-bottom: 1.5rem;
    cursor: pointer;
}

.job-card:hover {
    transform: translateY(-5px);
}

.job-card-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.company-logo-wrapper {
    width: 100%;
    height: 250px;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

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

.job-title-section {
    margin: 1rem 0;
}

.job-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 0.3rem;
}

.company-name {
    font-size: 1rem;
    color: #777;
    margin-bottom: 0.5rem;
}

.job-meta-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    padding: 0.5rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    gap: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--secondary-color);
    padding: 0.5rem;
    background-color: rgba(0, 46, 84, 0.05);
    border-radius: 6px;
}

.meta-item i {
    color: var(--primary-color);
    font-size: 1rem;
}

.meta-item.job-type {
    background-color: rgba(117, 94, 163, 0.1);
    color: var(--primary-color);
    width: 100%;
}

.meta-item.location {
    background-color: rgba(0, 46, 84, 0.05);
    color: var(--secondary-color);
    width: 100%;
}

.job-sections {
    margin-top: 1rem;
}

.section {
    margin-bottom: 1rem;
}

.section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.3rem;
}

.section p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}

.job-footer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.job-info {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.salary, .deadline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #555;
}

.salary i,.deadline i {
    color: var(--primary-color);
}

.job-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    width: 100%;
    margin-top: auto;
}

.apply-btn, .save-btn, .edit-btn, .delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.apply-btn {
    background-color: var(--primary-color);
    color: white;
}

.apply-btn:hover {
    background-color: var(--hover);
    transform: translateY(-2px);
}

.save-btn {
    background-color: var(--secondary-color);
    color: white;
}

.save-btn:hover {
    background-color: #001f3d;
    transform: translateY(-2px);
}

.edit-btn {
    background-color: #2196f3;
    color: white;
}

.edit-btn:hover {
    background-color: #1976d2;
    transform: translateY(-2px);
}

.delete-btn {
    background-color: #f44336;
    color: white;
}

.delete-btn:hover {
    background-color: #d32f2f;
    transform: translateY(-2px);
}

.edit-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
}

.edit-popup {
    position: relative;
    background: white;
    width: 90%;
    max-width: 800px;
    margin: 2rem auto;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

.edit-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.edit-popup-header h2 {
    font-size: 1.5rem;
    color: #333;
    margin: 0;
}

.close-popup {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.close-popup:hover {
    color: #333;
}

.edit-job-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #2196f3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
    outline: none;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.cancel-btn,
.save-btn {
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn {
    background: #f5f5f5;
    color: #666;
    border: none;
}

.cancel-btn:hover {
    background: #e0e0e0;
}

.save-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
}

.save-btn:hover {
    background: #00213c;
}

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

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

@media (max-width: 768px) {
    .jobs-grid {
        grid-template-columns: 1fr;
    }
    .search-filters {
        flex-direction: column;
    }
    .search-box {
        width: 100%;
        min-width: unset;
    }
    .filters {
        flex-direction: column;
    }
    .select-wrapper {
        width: 100%;
    }
    .edit-job-form {
        grid-template-columns: 1fr;
    }
    .edit-popup {
        width: 95%;
        margin: 1rem auto;
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .job-actions {
        flex-direction: column;
    }
}

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

.apply-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.apply-modal {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.apply-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.apply-modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 5px;
}

.close-modal:hover {
    color: #333;
}

.apply-modal-content {
    padding: 20px;
}

.apply-modal-content .form-group {
    margin-bottom: 20px;
}

.apply-modal-content label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.apply-modal-content input,
.apply-modal-content textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.apply-modal-content textarea {
    resize: vertical;
}

.apply-modal-content small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.85rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.submit-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: var(--hover);
}

.cancel-btn {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.cancel-btn:hover {
    background-color: #d32f2f;
}

.job-card .application-status {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    background-color: #fff3cd;
    color: #856404;
}

.job-card .application-status.status-approved {
    color: #155724;
    background-color: #d4edda;
}

.job-card .application-status.status-rejected {
    color: #721c24;
    background-color:#f8d7da;
}

.job-card .application-status[title]:not([title=""]) {
    position: relative;
}

.job-card .application-status[title]:not([title=""]):hover::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: normal;
    min-width: 200px;
    max-width: 90vw;
    width: fit-content;
    text-align: left;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    word-break: break-word;
    overflow-wrap: break-word;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.job-card .application-status[title]:not([title=""]):hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.job-card .application-status[title]:not([title=""]):hover::after,
.job-card .application-status[title]:not([title=""]):hover::before {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .job-card .application-status[title]:not([title=""]):hover::after {
        min-width: 150px;
        max-width: 85vw;
        padding: 10px;
    }
}

.job-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}

.job-status.closed {
    background-color: #ff4444;
    color: white;
}

.job-card.closed {
    opacity: 0.8;
    border-left: 4px solid #ff4444;
}

.job-card.closed .job-title {
    color: #666;
}

.job-card.closed .apply-btn.disabled {
    background-color: #999;
    cursor: not-allowed;
    pointer-events: none;
}

.job-card.closed .apply-btn.disabled:hover {
    transform: none;
    background-color: #999;
}

/* Your Job button styling */
.apply-btn.disabled[data-translate="your-job"] {
    background-color: #6c757d;
    color: #fff;
    cursor: not-allowed;
    pointer-events: none;
}

.apply-btn.disabled[data-translate="your-job"]:hover {
    transform: none;
    background-color: #6c757d;
}

.apply-btn.disabled[data-translate="your-job"] i {
    color: #fff;
}

.success-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #4CAF50;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    transform: translateX(120%);
    transition: transform 0.3s ease-in-out;
}

.success-notification.show {
    transform: translateX(0);
}

.success-notification i {
    font-size: 1.2rem;
}

.success-notification .message {
    font-weight: 500;
}

.success-notification .close-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
    font-size: 1.2rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.success-notification .close-btn:hover {
    opacity: 1;
}

.job-card.hot-job {
    border: 2px solid var(--primary-color);
    position: relative;
}

.hot-job-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 1;
}

.hot-job-badge i {
    color: #ffd700;
}

.job-card.hot-job:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Notification styling */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 4px;
    background-color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 1001;
    animation: slideIn 0.3s ease;
}

.notification.success {
    border-left: 4px solid #4caf50;
}

.notification.error {
    border-left: 4px solid #f44336;
}

.notification.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

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

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