.job-detail-container {
    max-width: 1200px;
    margin: 0 auto;
}

.job-card {
    border: none;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    overflow: hidden;
    background: var(--white);
    backdrop-filter: blur(10px);
}

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

.job-header {
    background: var(--primary-gradient);
    color: var(--white);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

/* Remove complex pseudo-element that caused rendering issues on some mobile browsers
   and simplified shimmer animation to avoid broken background declarations. */
.job-header::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -30%;
    width: 160%;
    height: 160%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
    opacity: 0.9;
}

.company-logo {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.badge-custom {
    border-radius: 25px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.badge-remote {
    background: var(--success-gradient);
    border: none;
}

.badge-job-type {
    background: var(--secondary-gradient);
    border: none;
}

.badge-experience {
    background: var(--warning-bg);
    color: var(--warning);
}

.badge-expired {
    background: var(--error-bg);
    color: var(--error);
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: 12px;
    background: var(--primary-blue-50);
    transition: all 0.3s ease;
}

.info-item:hover {
    background: var(--primary-blue-100);
    transform: translateX(5px);
}

.info-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    margin-right: 1rem;
    font-size: 1.1rem;
}

.salary-range {
    background: var(--success-gradient);
    color: var(--white);
    padding: 1rem;
    border-radius: 15px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.quick-job-card {
    border-left: 5px solid;
    border-image: var(--primary-gradient) 1;
    background: var(--white);
    border-radius: 0 15px 15px 0;
    transition: all 0.3s ease;
}

.quick-job-card:hover {
    transform: translateX(10px);
    box-shadow: var(--card-shadow);
}

.btn-apply {
    background: var(--primary-gradient);
    border: none;
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    color: var(--white);
    text-decoration: none;
    display: inline-block;
    margin: 0.5rem;
}

.btn-apply:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--primary-blue-200);
    color: var(--white);
    text-decoration: none;
}

.btn-secondary-custom {
    /* simplified background gradient to avoid invalid syntax */
    background: linear-gradient(90deg, #6c757d 0%, var(--gray-100) 100%);
    border: 1px solid var(--gray-200);
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    margin: 0.5rem;
}

.btn-secondary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--shadow-sm);
    color: var(--text-secondary);
    text-decoration: none;
    background: linear-gradient(90deg, #6c757d 0%, var(--gray-200) 100%);
}

.section-title {
    color: var(--primary-blue);
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

.skills-tag {
    display: inline-block;
    background: var(--primary-blue-100);
    color: var(--primary-blue);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    margin: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 2px solid var(--primary-blue-200);
    transition: all 0.3s ease;
}

.skills-tag:hover {
    background: var(--primary-blue-200, #e2e8f0);
    color: var(--primary-blue, #1e40af) !important;
    transform: scale(1.05);
}

.deadline-warning {
    background: var(--error-bg);
    border: none;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.back-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: var(--primary-blue);
    text-decoration: none;
    transform: translateX(-5px);
}

.job-content {
    position: relative;
    z-index: 2;
}

.job-header h1 {
    font-size: clamp(1.25rem, 2.5vw + 1rem, 1.8rem);
    margin: 0 0 0.5rem 0;
    word-break: break-word;
}

.company-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.action-buttons {
    background: var(--white);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    text-align: center;
    margin-bottom: 2rem;
}

.card-modern {
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 4px 20px var(--shadow-sm);
    border: none;
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--white);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

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

.job-description-content {
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.7;
}

.job-description-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.job-description-content p {
    margin-bottom: 1rem;
}

/* job description formatting */
.job-description-content strong {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .job-header {
        padding: 1.5rem !important;
    }

    .action-buttons {
        padding: 1rem;
    }

    .btn-apply,
    .btn-secondary-custom {
        display: block;
        width: 100%;
        margin: 0.25rem 0;
    }

    .salary-range {
        margin-top: 1rem;
    }

    .job-card {
        margin-bottom: 1rem;
    }
}

/* Additional small-screen tweaks */
@media (max-width: 480px) {
    .job-detail-container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .job-card {
        border-radius: 12px;
        margin: 0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        /* Softer shadow on mobile */
    }

    .job-content {
        padding: 1rem !important;
        border-radius: 12px;
    }

    .job-header h1 {
        font-size: 1.25rem;
        line-height: 1.3;
        margin-bottom: 0.5rem;
    }

    .job-header h4 {
        font-size: 0.95rem;
    }

    .company-logo {
        width: 48px;
        height: 48px;
        margin-right: 0.75rem;
        font-size: 1.25rem;
    }

    .badge-custom {
        font-size: 0.7rem;
        padding: 0.35rem 0.6rem;
    }

    .p-4 {
        padding: 1rem !important;
        /* Override standard padding for mobile content area */
    }
}

/* Card Layout Updates */
.content-card {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    /* Softer shadow */
    transition: transform 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.content-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.section-title {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Skills Scroll Container */
.skills-scroll-container {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.skills-scroll-container::-webkit-scrollbar {
    height: 6px;
}

.skills-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.skills-scroll-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.skills-tag {
    flex: 0 0 auto;
    /* Prevent shrinking */
    white-space: nowrap;
}

/* Company Description Card */
.company-description-card {
    background: linear-gradient(to right bottom, #ffffff, #f8f9fa);
}

/* Responsive adjustments for cards */
@media (max-width: 768px) {
    .content-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
        border-radius: 12px;
    }
}

/* Print Styles */
@media print {

    .navbar-custom,
    .footer,
    .action-buttons,
    .back-link {
        display: none !important;
    }

    .job-header,
    .job-card {
        box-shadow: none !important;
        border: 1px solid var(--gray-200) !important;
    }

    body {
        background: var(--white) !important;
        padding-top: 0 !important;
    }
}