/* page/jobs.php styles */

* {
    font-family: 'Tajawal', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #f1f5f9;
    color: #414042;
}

.section-header {
    text-align: center;
    padding: 60px 0;
    background: #00aeef;
    color: white;
    margin-bottom: 40px;
    border-radius: 16px 16px 0 0;
}

.section-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.section-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

.search-card {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin-top: -30px;
    margin-bottom: 40px;
    position: relative;
    z-index: 10;
    animation: fadeIn 0.8s ease-out forwards;
}

.unified-search-container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    padding: 8px;
    border-radius: 60px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    border: 1px solid #f7941e;
    transition: all 0.3s ease;
}

.unified-search-container:focus-within {
    box-shadow: 0 20px 45px rgba(0, 174, 239, 0.2);
    border-color: #00aeef;
    transform: translateY(-2px);
}

.search-input-section {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 25px;
}

.unified-search-container i {
    color: #00aeef;
    font-size: 1.1rem;
}

[dir="rtl"] .unified-search-container i {
    margin-left: 12px;
}

[dir="ltr"] .unified-search-container i {
    margin-right: 12px;
}

.unified-search-container input,
.unified-search-container select {
    border: none;
    width: 100%;
    padding: 12px 0;
    font-size: 1rem;
    color: #414042;
    outline: none;
    background: transparent;
}

.unified-search-container select {
    cursor: pointer;
    color: #00aeef;
}

.btn-unified-search {
    background: #00aeef;
    color: white;
    border: none;
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.btn-unified-search:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 20px rgba(0, 174, 239, 0.3);
    color: white;
}

@media (max-width: 768px) {
    .unified-search-container {
        flex-direction: column;
        border-radius: 20px;
        padding: 15px;
    }

    .search-input-section,
    .search-location-section {
        width: 100%;
        border-bottom: 1px solid #eee;
        padding: 10px 0;
    }

    [dir="rtl"] .search-input-section,
    [dir="rtl"] .search-location-section {
        border-left: none;
    }

    [dir="ltr"] .search-input-section,
    [dir="ltr"] .search-location-section {
        border-right: none;
    }

    .btn-unified-search {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }
}

.filter-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    padding: 25px;
    margin-bottom: 24px;
    transition: all 0.3s;
    border: 1px solid #f7941e;
    position: sticky;
    top: 100px;
}

.filter-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.15);
}

.filter-title {
    font-weight: 700;
    margin-bottom: 20px;
    color: #414042;
    font-size: 1.3rem;
    padding-bottom: 10px;
    border-bottom: 1px solid #f7941e;
}

.filter-group {
    margin-bottom: 20px;
    color: #00aeef;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #414042;
}

.job-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    margin-bottom: 25px;
    border: 1px solid #f7941e;
    height: 100%;
    animation: fadeIn 0.6s ease-out forwards;
    position: relative;
}

.job-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.15);
    border-color: #f7941e;
}

.job-badge {
    position: absolute;
    top: 15px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    z-index: 1;
}

[dir="rtl"] .job-badge {
    right: 15px;
}

[dir="ltr"] .job-badge {
    left: 15px;
}

.company-logo-container {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #00aeef 0%, #009bd5 100%);
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
    margin-left: 15px;
    flex-shrink: 0;
}

.job-header {
    padding: 20px;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
}

.job-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #414042;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.company-name {
    font-weight: 600;
    color: #00aeef;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
    color: #6c757d;
    font-size: 0.95rem;
}

.job-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.job-meta-item i {
    color: #00aeef;
    font-size: 0.9rem;
}

.job-body {
    padding: 20px;
}

.job-description {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.job-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.job-tag {
    background: rgba(37, 99, 235, 0.1);
    color: #00aeef;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.job-footer {
    padding: 15px 20px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.job-salary {
    font-weight: 700;
    font-size: 1.2rem;
    color: #10b981;
}

.btn-action {
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-outline-primary:hover {
    background: #00aeef;
    color: white;
    transform: translateY(-2px);
}

.pagination-container {
    margin-top: 40px;
}

.pagination .page-item .page-link {
    color: #00aeef;
    font-weight: 500;
    border-radius: 10px;
    margin: 0 3px;
    border: none;
    min-width: 40px;
    text-align: center;
}

.pagination .page-item.active .page-link {
    background: #00aeef;
    color: white;
    border-color: #00aeef;
}

.pagination .page-item:hover .page-link {
    background: rgba(37, 99, 235, 0.1);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.custom-modal {
    background: white;
    border-radius: 24px;
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.4s ease;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.modal-overlay.active .custom-modal {
    transform: scale(1);
}

.modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid #00aeef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #00aeef;
    color: white;
    border-radius: 24px 24px 0 0;
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0;
}

.modal-close {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
}

.job-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.detail-item {
    text-align: center;
    padding: 15px;
    border-radius: 16px;
    background: #f8fafc;
    border-right: 4px solid #00aeef;
}

.detail-icon {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 174, 239, 0.1);
    margin: 0 auto 10px;
    color: #00aeef;
    font-size: 1.3rem;
}

.detail-value {
    font-weight: 700;
    font-size: 1.2rem;
    color: #414042;
    margin: 5px 0;
}

.detail-label {
    color: #00aeef;
    font-size: 0.9rem;
}

.modal-body h5 {
    color: #414042;
    font-weight: 700;
}

.text-primary {
    color: var(--primary) !important;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.skill-badge {
    background: rgba(37, 99, 235, 0.1);
    color: #00aeef;
    padding: 6px 15px;
    border-radius: 20px;
    font-weight: 500;
}

.skill-badge.required {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.apply-section {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(100, 116, 139, 0.1) 100%);
    border-radius: 16px;
    padding: 25px;
    margin-top: 20px;
    text-align: center;
}

.btn-apply {
    background: linear-gradient(135deg, #00aeef 0%, #009bd5 100%);
    color: white;
    border: none;
    padding: 14px 40px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    transition: all 0.4s ease;
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.4);
}

.btn-apply:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.6);
}

.filter-badge {
    background: #00aeef;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    display: inline-block;
    margin: 5px;
    font-weight: 500;
}

.filter-badge i {
    margin-left: 5px;
    cursor: pointer;
}

.filter-badge i:hover {
    color: #f7941e;
}

.form-control,
.form-select {
    border-radius: 12px;
    padding: 12px 18px;
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
    transition: all 0.3s;
}

.form-control:focus,
.form-select:focus {
    background-color: #fff;
    border-color: #f7941e;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    outline: none;
}

.btn-search {
    background: linear-gradient(135deg, #00aeef 0%, #009bd5 100%);
    border: none;
    padding: 12px 25px;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s;
    color: white;
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(11, 63, 175, 0.4);
    color: white;
}

.btn-clear-filters {
    background: #f7941e;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-clear-filters:hover {
    background: #f7941e;
    transform: translateY(-2px);
    color: white;
}

.loading-spinner {
    display: none;
    text-align: center;
    padding: 40px;
}

.loading-spinner.active {
    display: block;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(37, 99, 235, 0.2);
    border-top: 5px solid #00aeef;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-card {
    animation-delay: 0.1s;
}

.filter-card {
    animation-delay: 0.2s;
}

.job-card:nth-child(1) {
    animation-delay: 0.3s;
}

.job-card:nth-child(2) {
    animation-delay: 0.4s;
}

.job-card:nth-child(3) {
    animation-delay: 0.5s;
}

@media (max-width: 991px) {
    .filter-card {
        position: static;
        margin-top: 30px;
    }

    .job-meta {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 768px) {
    .section-header {
        padding: 40px 0;
    }

    .section-header h1 {
        font-size: 1.8rem;
    }

    .search-card,
    .filter-card {
        padding: 20px;
    }

    .job-header {
        padding: 15px;
    }

    .job-title {
        font-size: 1.2rem;
    }

    .job-detail-grid {
        grid-template-columns: 1fr;
    }
}