/* Global Styles */
:root {
    --primary-color: #2563eb;
    --secondary-color: #475569;
    --success-color: #22c55e;
    --background-color: #f8fafc;
    --border-color: #e2e8f0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    background-color: var(--background-color);
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.post-job-btn {
    background: linear-gradient(135deg, #0d6efd 0%, #0099ff 100%);
    border: none;
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
}

.post-job-btn:hover {
    background: linear-gradient(135deg, #0b5ed7 0%, #007bff 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4);
}

.post-job-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #0d6efd 0%, #0099ff 100%);
    padding: 3rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.hero-section h1 {
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Job Cards */
.job-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    background: white;
    margin-bottom: 1rem;
    cursor: pointer;
}

.job-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Category Cards */
.category-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s ease;
    background: white;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.category-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.category-card .card-text {
    font-size: 0.875rem;
}

.category-card:hover .card-title {
    color: var(--primary-color);
}

.job-card .card-body {
    padding: 1.5rem;
}

.job-card .card-title {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.job-card .card-title a {
    color: inherit;
    text-decoration: none;
}

.job-card .card-title a:hover {
    color: #1d4ed8;
}

.job-card .company-info {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.job-card .company-logo {
    width: 48px;
    height: 48px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0d6efd;
    flex-shrink: 0;
}

.job-card .company-logo i {
    font-size: 1.5rem;
}

.job-card .badge {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
}

.job-card .badge.job-type {
    background-color: #0d6efd;
    color: white;
}

.job-card .badge.category {
    background-color: #e9ecef;
    color: #344767;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Filters */
.filters-card {
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: none;
    margin-bottom: 1.5rem;
}

.filters-card .card-header {
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 1rem;
    border-radius: 12px 12px 0 0;
}

.filters-card .card-body {
    padding: 1.5rem;
}

.filter-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.filter-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.filter-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #344767;
    margin-bottom: 0.75rem;
}

/* Search and Sort */
.search-and-sort {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}

.search-and-sort .input-group {
    position: relative;
}

.btn-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    padding: 0.375rem;
    cursor: pointer;
    z-index: 5;
}

#searchInput {
    padding-right: 2.5rem;
}

/* Forms */
.form-select, .form-control {
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.625rem 1rem;
    font-size: 0.9rem;
}

.form-select:focus, .form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.1);
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
}

#loadMoreButton {
    padding: 0.75rem 2rem;
}

#loadingSpinner {
    padding: 2rem 0;
}

/* Modal */
.modal-content {
    border-radius: 12px;
    border: none;
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
}

.modal-header .modal-title {
    font-weight: 600;
    color: var(--primary-color);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
}

.description {
    white-space: pre-wrap;
    line-height: 1.6;
    margin-top: 0;
    padding-top: 0;
}

.requirements-list {
    padding-left: 1.5rem;
    margin-bottom: 0;
}

.requirements-list li {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.requirements-list li:last-child {
    margin-bottom: 0;
}

/* Modal styles moved to modal.css */

/* Newsletter */
.newsletter-bar-cta {
    background: rgba(20, 30, 48, 0.95);
    border-radius: 1rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    padding: 1rem 0.5rem;
    max-width: 600px;
    left: 50%;
    transform: translateX(-50%);
}

.newsletter-bar-cta .newsletter-msg {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0;
}

.newsletter-bar-cta .form-control {
    border-radius: 8px;
    border: 1px solid #2d3a4a;
    font-size: 1rem;
    min-width: 220px;
    box-shadow: none;
    background: rgba(255,255,255,0.08);
    color: #fff;
    min-height: 48px;
}

.newsletter-bar-cta .form-control::placeholder {
    color: #cbd5e1;
}

.newsletter-bar-cta .form-control:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 0.1rem rgba(37,99,235,0.15);
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.newsletter-bar-cta .btn-primary {
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    background: #2563eb;
    border: none;
    transition: background 0.2s;
    color: #fff;
    min-height: 48px;
    padding: 0.75rem 1.5rem;
}

.newsletter-bar-cta .btn-primary:hover {
    background: #1746a2;
}

/* Footer */
footer {
    margin-top: 4rem;
    border-top: 2px solid var(--border-color);
    padding: 2rem 0;
}

footer h5 {
    font-weight: 600;
    margin-bottom: 1rem;
}

footer a {
    text-decoration: none;
    transition: opacity 0.2s ease;
}

footer a:hover {
    opacity: 0.8;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .hero-section {
        padding: 2rem 0;
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    /* Stack filters and content - filters first */
    .col-md-3 {
        order: 1;
        margin-bottom: 1.5rem;
    }
    
    .col-md-9 {
        order: 2;
    }
    
    .filters-card {
        position: static;
        margin-bottom: 1.5rem;
    }
    
    .filters-card .card-body {
        padding: 1rem;
    }
    
    .filter-section {
        margin-bottom: 1rem;
        padding-bottom: 1rem;
    }
    
    /* Search and sort */
    .search-and-sort .row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-and-sort .col-md-8,
    .search-and-sort .col-md-4 {
        width: 100%;
    }
    
    /* Job cards */
    .job-card .card-body {
        padding: 1rem;
    }
    
    .job-card .company-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .job-card .company-logo {
        width: 40px;
        height: 40px;
    }
    
    .job-card .company-logo i {
        font-size: 1.25rem;
    }
    
    .job-card .card-title {
        font-size: 1rem;
        line-height: 1.3;
    }
    
    /* Buttons and forms */
    .btn {
        min-height: 44px;
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
    
    .form-control,
    .form-select {
        min-height: 44px;
        font-size: 0.9rem;
    }
    
    .badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
    
    /* Mobile Modal Improvements */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100vw - 1rem);
    }
    
    .modal-content {
        margin: 0;
        border-radius: 12px;
        max-height: calc(100vh - 1rem);
        display: flex;
        flex-direction: column;
    }
    
    .modal-header {
        padding: 1rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        flex-shrink: 0;
    }
    
    .modal-header .modal-title {
        font-size: 1.1rem;
        line-height: 1.3;
        margin-right: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
        overflow-y: auto;
        flex: 1;
        -webkit-overflow-scrolling: touch;
    }
    
    .modal-footer {
        padding: 1rem;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        flex-shrink: 0;
    }
    
    /* Modal content improvements */
    .modal-body .company-logo {
        width: 40px;
        height: 40px;
        margin-right: 0.75rem;
    }
    
    .modal-body .company-logo i {
        font-size: 1.25rem;
    }
    
    .modal-body h6 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .modal-body .description {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .modal-body .requirements-list {
        padding-left: 1rem;
    }
    
    .modal-body .requirements-list li {
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .modal-body .badge.category {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
        margin-right: 0.4rem;
        margin-bottom: 0.4rem;
    }
    
    /* Modal footer improvements */
    .modal-footer .d-flex {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .modal-footer .share-buttons {
        display: flex;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .modal-footer .share-buttons .btn {
        flex: 1;
        min-height: 44px;
        font-size: 0.85rem;
    }
    
    .modal-footer .btn {
        width: 100%;
        min-height: 48px;
        font-size: 1rem;
        padding: 0.75rem 1rem;
    }
    
    /* Modal metadata improvements */
    .modal-body .d-flex.flex-wrap.gap-4 {
        flex-direction: column;
        gap: 0.75rem !important;
    }
    
    .modal-body .d-flex.flex-wrap.gap-4 > div {
        width: 100%;
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        font-size: 0.9rem;
    }
    
    .modal-body .d-flex.flex-wrap.gap-4 > div:last-child {
        border-bottom: none;
    }
    
    .modal-body .d-flex.align-items-center.gap-2.small.text-muted {
        flex-wrap: wrap;
        gap: 0.5rem !important;
    }
    
    .modal-body .d-flex.align-items-center.gap-2.small.text-muted > span {
        font-size: 0.8rem;
    }
    
    /* Newsletter */
    .newsletter-bar-cta {
        position: relative !important;
        bottom: 0 !important;
        transform: none !important;
        margin-top: 1rem;
        left: 0 !important;
        width: auto !important;
        max-width: calc(100vw - 2rem);
        padding: 1rem;
        margin: 0 1rem;
    }
    
    .newsletter-bar-cta .container {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 1rem;
    }
    
    .newsletter-bar-cta .newsletter-msg {
        text-align: center;
        font-size: 1rem;
    }
    
    .newsletter-bar-cta .newsletter-form {
        width: 100%;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .newsletter-bar-cta .form-control {
        min-width: auto;
        width: 100%;
        margin-right: 0;
    }
    
    .newsletter-bar-cta .btn-primary {
        width: 100%;
        margin-top: 0;
    }
    
    /* Job detail page */
    .col-lg-8.mx-auto {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .d-flex.flex-wrap.gap-4 {
        flex-direction: column;
        gap: 0.75rem !important;
    }
    
    .d-flex.flex-wrap.gap-4 > div {
        width: 100%;
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .d-flex.flex-wrap.gap-4 > div:last-child {
        border-bottom: none;
    }
    
    .d-flex.justify-content-between.align-items-center {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .share-buttons {
        display: flex;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .share-buttons .btn {
        flex: 1;
        min-height: 44px;
    }
    
    .d-flex.justify-content-between.align-items-center .btn-primary {
        width: 100%;
        min-height: 48px;
        font-size: 1rem;
        padding: 0.75rem 1rem;
    }
    
    .d-flex.align-items-center.mb-3 {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .company-logo.me-3 {
        margin-right: 0 !important;
        margin-bottom: 0.5rem;
    }
    
    .flex-grow-1 {
        width: 100%;
    }
    
    .d-flex.align-items-center.gap-2.small.text-muted {
        flex-wrap: wrap;
        gap: 0.5rem !important;
    }
    
    .d-flex.align-items-center.gap-2.small.text-muted > span {
        font-size: 0.8rem;
    }
    
    .description {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .requirements-list {
        padding-left: 1rem;
    }
    
    .requirements-list li {
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
    }
    
    .d-flex.flex-wrap.gap-2 {
        gap: 0.5rem !important;
    }
    
    .badge.category {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
    
    h1.h2.mb-3 {
        font-size: 1.5rem;
        line-height: 1.3;
        margin-bottom: 1rem !important;
    }
    
    h2.h5.mb-1 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem !important;
    }

    .post-job-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .post-job-btn i {
        margin-right: 0.5rem !important;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .py-5 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    
    .job-card .card-body {
        padding: 0.75rem;
    }
    
    .job-card .company-info {
        gap: 0.5rem;
    }
    
    .job-card .company-logo {
        width: 36px;
        height: 36px;
    }
    
    .job-card .company-logo i {
        font-size: 1rem;
    }
    
    .job-card .card-title {
        font-size: 0.95rem;
    }
    
    .filters-card .card-body {
        padding: 0.75rem;
    }
    
    .filter-section {
        margin-bottom: 0.75rem;
        padding-bottom: 0.75rem;
    }
    
    .btn {
        min-height: 40px;
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
    
    .form-control,
    .form-select {
        min-height: 40px;
        font-size: 0.85rem;
    }
    
    .badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
    
    /* Small mobile modal improvements */
    .modal-dialog {
        margin: 0.25rem;
        max-width: calc(100vw - 0.5rem);
    }
    
    .modal-content {
        max-height: calc(100vh - 0.5rem);
        border-radius: 8px;
    }
    
    .modal-header {
        padding: 0.75rem;
    }
    
    .modal-header .modal-title {
        font-size: 1rem;
        line-height: 1.2;
    }
    
    .modal-body {
        padding: 0.75rem;
    }
    
    .modal-footer {
        padding: 0.75rem;
    }
    
    /* Small mobile modal content */
    .modal-body .company-logo {
        width: 36px;
        height: 36px;
        margin-right: 0.5rem;
    }
    
    .modal-body .company-logo i {
        font-size: 1rem;
    }
    
    .modal-body h6 {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .modal-body .description {
        font-size: 0.85rem;
        line-height: 1.5;
    }
    
    .modal-body .requirements-list {
        padding-left: 0.75rem;
    }
    
    .modal-body .requirements-list li {
        margin-bottom: 0.4rem;
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .modal-body .badge.category {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
        margin-right: 0.3rem;
        margin-bottom: 0.3rem;
    }
    
    /* Small mobile modal footer */
    .modal-footer .share-buttons .btn {
        min-height: 40px;
        font-size: 0.8rem;
    }
    
    .modal-footer .btn {
        min-height: 44px;
        font-size: 0.9rem;
        padding: 0.625rem 1rem;
    }
    
    /* Small mobile modal metadata */
    .modal-body .d-flex.flex-wrap.gap-4 > div {
        padding: 0.4rem 0;
        font-size: 0.85rem;
    }
    
    .modal-body .d-flex.align-items-center.gap-2.small.text-muted > span {
        font-size: 0.75rem;
    }
    
    .search-and-sort {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .newsletter-bar-cta {
        max-width: calc(100vw - 1rem);
        margin: 0 0.5rem;
        padding: 0.75rem;
    }
    
    .newsletter-bar-cta .newsletter-msg {
        font-size: 0.9rem;
    }
    
    .newsletter-bar-cta .form-control {
        font-size: 0.9rem;
        min-height: 40px;
    }
    
    .newsletter-bar-cta .btn-primary {
        font-size: 0.9rem;
        min-height: 40px;
        padding: 0.4rem 0.8rem;
    }
    
    /* Job detail small mobile */
    .col-lg-8.mx-auto {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .d-flex.flex-wrap.gap-4 > div {
        padding: 0.4rem 0;
    }
    
    .share-buttons .btn {
        min-height: 40px;
        font-size: 0.85rem;
    }
    
    .d-flex.justify-content-between.align-items-center .btn-primary {
        min-height: 44px;
        font-size: 0.9rem;
        padding: 0.625rem 1rem;
    }
    
    .d-flex.align-items-center.mb-3 {
        gap: 0.5rem;
    }
    
    .company-logo.me-3 {
        width: 40px;
        height: 40px;
    }
    
    .company-logo.me-3 i {
        font-size: 1.25rem;
    }
    
    .d-flex.align-items-center.gap-2.small.text-muted > span {
        font-size: 0.75rem;
    }
    
    .description {
        font-size: 0.85rem;
    }
    
    .requirements-list li {
        font-size: 0.85rem;
    }
    
    .badge.category {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
    
    h1.h2.mb-3 {
        font-size: 1.25rem;
    }
    
    h2.h5.mb-1 {
        font-size: 1rem;
    }

    .post-job-btn {
        padding: 0.75rem 0.75rem;
        font-size: 0.9rem;
    }

    .post-job-btn i {
        margin-right: 0.25rem !important;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .job-card:hover {
        transform: none;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    }
    
    .btn,
    .form-control,
    .form-select {
        min-height: 48px;
    }
    
    .modal-body {
        -webkit-overflow-scrolling: touch;
    }
}

/* Prevent buttons inside job card from triggering card click */
.job-card .btn,
.job-card .preview-btn {
    cursor: pointer;
    position: relative;
    z-index: 10;
}

/* Related Jobs Section */
.related-jobs-section {
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.related-jobs-section h3 {
    color: #1e293b;
    font-weight: 600;
}

.related-jobs-section .job-card {
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.related-jobs-section .job-card:hover {
    border-color: #0d6efd;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.related-jobs-section .job-card .card-title {
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.related-jobs-section .job-card .card-body {
    padding: 1.25rem;
}

.related-jobs-section .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.related-jobs-section .row.g-4 {
    gap: 1rem !important;
}

.related-jobs-section .col-md-6 {
    margin-bottom: 1rem;
}

.related-jobs-section .job-card .card-body {
    padding: 1rem;
}

.related-jobs-section .job-card .card-title {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.related-jobs-section .d-flex.align-items-center.gap-2.small.text-muted {
    flex-wrap: wrap;
    gap: 0.5rem !important;
}

.related-jobs-section .d-flex.align-items-center.gap-2.small.text-muted > span {
    font-size: 0.75rem;
}

.related-jobs-section .d-flex.align-items-center.justify-content-between {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.5rem;
}

.related-jobs-section .d-flex.align-items-center.justify-content-between > div {
    font-size: 0.75rem;
}

.related-jobs-section .btn-outline-primary {
    width: 100%;
    margin-top: 1rem;
}

@media (max-width: 576px) {
    .related-jobs-section {
        padding: 2rem 0;
    }

    .related-jobs-section .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .related-jobs-section h3 {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }

    .related-jobs-section .col-md-6 {
        width: 100%;
    }

    .related-jobs-section .job-card .card-body {
        padding: 0.875rem;
    }

    .related-jobs-section .job-card .card-title {
        font-size: 0.875rem;
        line-height: 1.3;
    }

    .related-jobs-section .d-flex.align-items-center.gap-2.small.text-muted > span {
        font-size: 0.7rem;
    }

    .related-jobs-section .d-flex.align-items-center.justify-content-between > div {
        font-size: 0.7rem;
    }

    .related-jobs-section .badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }
}

/* NEW Job Badge Animation */
@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-pulse {
    animation: pulse 2s infinite;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.badge.bg-success.animate-pulse {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
    border: none;
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
} 
/* Location Cards */
.location-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s ease;
    background: white;
}

.location-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.location-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0;
}

.location-card:hover .card-title {
    color: var(--primary-color);
}

.location-card i {
    transition: transform 0.2s ease;
}

.location-card:hover i {
    transform: scale(1.1);
}

.location-flag {
    font-size: 3rem;
    line-height: 1;
    animation: fadeInScale 0.3s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Filters Row - Horizontal Layout */
.filters-row {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.filters-row .form-label {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.filters-row .form-select-sm {
    font-size: 0.875rem;
}

/* Improved Job Card Styles */
.job-card {
    border: 1px solid var(--border-color) !important;
    border-left: 4px solid var(--primary-color) !important;
    transition: all 0.3s ease;
}

.job-card:hover {
    border-left-color: #0b5ed7 !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12) !important;
}

.job-card-header {
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.job-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    line-height: 1.3;
}

.job-title:hover {
    color: var(--primary-color);
}

.new-badge {
    font-size: 0.65rem;
    padding: 0.25rem 0.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.company-name {
    font-size: 0.95rem;
}

.company-link {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}

.company-link:hover {
    color: var(--primary-color);
}

.company-logo {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #e2e8f0;
}

.job-meta-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.job-type-badge {
    background: #e2e8f0;
    color: #475569;
    font-weight: 500;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
}

.location-type-badge {
    font-weight: 500;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
}

.location-type-badge.remote {
    background: #dcfce7;
    color: #166534;
}

.location-type-badge.hybrid {
    background: #fef3c7;
    color: #92400e;
}

.location-type-badge.onsite {
    background: #dbeafe;
    color: #1e40af;
}

.job-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    padding: 1rem 0;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.info-item i {
    font-size: 1rem;
    width: 18px;
    text-align: center;
}

.info-text {
    color: #475569;
}

.salary-text {
    font-weight: 600;
    color: #059669;
}

.job-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
}

.categories-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex-grow: 1;
}

.category-badge {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    font-weight: 500;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.category-badge:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.apply-btn {
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s;
}

.apply-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .job-info-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .job-card-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-buttons {
        width: 100%;
    }
    
    .apply-btn {
        width: 100%;
    }
    
    .job-meta-badges {
        flex-direction: row;
        justify-content: flex-start;
    }
}

/* Compact Job Card Updates */
.job-card .card-body {
    padding: 1rem !important;
}

.job-card {
    margin-bottom: 0.75rem !important;
}

.job-card-header {
    padding-bottom: 0.75rem !important;
    margin-bottom: 0.75rem !important;
}

.company-logo {
    width: 48px !important;
    height: 48px !important;
    font-size: 1.1rem;
}

.job-title {
    font-size: 1.1rem !important;
    line-height: 1.3 !important;
}

.company-name {
    font-size: 0.875rem !important;
}

.job-description-preview {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.4;
    margin-top: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.job-info-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
    gap: 0.75rem !important;
    padding: 0.75rem 0 !important;
}

.info-item {
    font-size: 0.85rem !important;
    gap: 0.4rem !important;
}

.info-item i {
    font-size: 0.9rem !important;
    color: #94a3b8 !important;
}

.job-card-footer {
    padding-top: 0.75rem !important;
    margin-top: 0 !important;
}

.category-badge {
    padding: 0.25rem 0.6rem !important;
    font-size: 0.75rem !important;
}

.job-type-badge,
.location-type-badge {
    padding: 0.3rem 0.65rem !important;
    font-size: 0.75rem !important;
}

.apply-btn {
    padding: 0.4rem 1rem !important;
    font-size: 0.875rem !important;
}

.new-badge {
    font-size: 0.6rem !important;
    padding: 0.2rem 0.4rem !important;
}

/* Adjust spacing */
.job-meta-badges {
    gap: 0.4rem !important;
}
