/* Enhanced Job Details Page Styles */

/* ====== MAIN JOB DETAILS SECTION ====== */
.enhanced-job-details {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

.enhanced-job-details::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, rgba(247, 115, 41, 0.08) 0%, rgba(247, 115, 41, 0.03) 100%);
    z-index: 1;
}

.enhanced-job-details .container {
    position: relative;
    z-index: 2;
}

/* ====== JOB HEADER SECTION ====== */
.job-details-header {
    background: white;
    border-radius: 25px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 
        0 15px 50px rgba(0, 0, 0, 0.08),
        0 5px 15px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(247, 115, 41, 0.1);
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.job-details-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(135deg, #f77329 0%, #e55a1f 100%);
}

.job-header-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.job-company-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f77329 0%, #e55a1f 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: 700;
    box-shadow: 0 8px 25px rgba(247, 115, 41, 0.3);
    position: relative;
    overflow: hidden;
}

.job-company-logo::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.job-main-info h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
}

.job-company-name {
    color: #f77329;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.job-location-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6c757d;
    font-size: 1rem;
    font-weight: 500;
}

.job-location-info i {
    color: #f77329;
}

/* ====== JOB STATUS BADGES ====== */
.job-status-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 300ms ease;
    opacity: 0;
    animation: slideInRight 0.6s ease forwards;
}

.status-badge:nth-child(1) { animation-delay: 0.2s; }
.status-badge:nth-child(2) { animation-delay: 0.4s; }
.status-badge:nth-child(3) { animation-delay: 0.6s; }

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.status-badge.active {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.status-badge.new {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: #212529;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.status-badge.remote {
    background: linear-gradient(135deg, #6f42c1, #e83e8c);
    color: white;
    box-shadow: 0 4px 15px rgba(111, 66, 193, 0.3);
}

.status-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* ====== JOB DETAILS GRID ====== */
.job-details-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .job-details-grid {
        grid-template-columns: 1fr;
    }
}

/* ====== MAIN CONTENT CARD ====== */
.job-main-content {
    background: white;
    border-radius: 25px;
    padding: 2.5rem;
    box-shadow: 
        0 15px 50px rgba(0, 0, 0, 0.08),
        0 5px 15px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(247, 115, 41, 0.1);
    height: fit-content;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards 0.3s;
}

.job-description {
    line-height: 1.8;
    color: #495057;
    font-size: 1rem;
}

.job-description h1, .job-description h2, .job-description h3,
.job-description h4, .job-description h5, .job-description h6 {
    color: #2c3e50;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.job-description p {
    margin-bottom: 1rem;
}

.job-description ul, .job-description ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.job-description li {
    margin-bottom: 0.5rem;
}

.section-title {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title i {
    color: #f77329;
    font-size: 1.25rem;
}

/* ====== SIDEBAR CONTENT ====== */
.job-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.job-info-card, .job-actions-card {
    background: white;
    border-radius: 25px;
    padding: 2rem;
    box-shadow: 
        0 15px 50px rgba(0, 0, 0, 0.08),
        0 5px 15px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(247, 115, 41, 0.1);
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.job-info-card {
    animation-delay: 0.5s;
}

.job-actions-card {
    animation-delay: 0.7s;
}

.job-info-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid #f8f9fa;
    transition: all 200ms ease;
}

.job-info-item:last-child {
    border-bottom: none;
}

.job-info-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #6c757d;
    font-weight: 600;
    font-size: 0.9rem;
}

.job-info-label i {
    color: #f77329;
    width: 20px;
    text-align: center;
}

.job-info-value {
    color: #2c3e50;
    font-weight: 600;
    text-align: right;
}

/* ====== ACTION BUTTONS ====== */
.job-apply-btn {
    background: linear-gradient(135deg, #f77329 0%, #e55a1f 100%);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 300ms ease;
    box-shadow: 0 8px 25px rgba(247, 115, 41, 0.3);
    width: 100%;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.job-apply-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.job-apply-btn:hover::before {
    left: 100%;
}

.job-apply-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(247, 115, 41, 0.4);
    color: white;
    text-decoration: none;
}

.job-apply-btn:active {
    transform: translateY(-1px);
}

.job-apply-btn.disabled {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    cursor: not-allowed;
    box-shadow: none;
}

.job-apply-btn.disabled:hover {
    transform: none;
    box-shadow: none;
}

.job-apply-btn.disabled::before {
    display: none;
}

.job-secondary-actions {
    display: flex;
    gap: 0.75rem;
}

.job-action-btn {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #e9ecef;
    border-radius: 15px;
    padding: 0.75rem;
    font-size: 1rem;
    transition: all 300ms ease;
    cursor: pointer;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.job-action-btn:hover {
    background: linear-gradient(135deg, #f77329 0%, #e55a1f 100%);
    color: white;
    border-color: #f77329;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(247, 115, 41, 0.3);
}

/* ====== ENHANCED MODAL STYLES ====== */
.modal-content {
    border-radius: 25px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #f77329 0%, #e55a1f 100%);
    color: white;
    border-radius: 25px 25px 0 0;
    padding: 1.5rem 2rem;
    border-bottom: none;
}

.modal-header .btn-close {
    filter: invert(1);
    opacity: 0.8;
}

.modal-header .btn-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 2rem;
}

.modal .form-label {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.modal .form-control, .modal .form-select {
    border-radius: 15px;
    border: 2px solid #e9ecef;
    padding: 0.875rem 1rem;
    transition: all 300ms ease;
    font-size: 1rem;
}

.modal .form-control:focus, .modal .form-select:focus {
    border-color: #f77329;
    box-shadow: 0 0 0 0.2rem rgba(247, 115, 41, 0.25);
}

.modal .form-control::placeholder {
    color: #adb5bd;
    font-style: italic;
}

/* ====== ENHANCED ALERTS ====== */
.alert {
    border-radius: 15px;
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

/* ====== RESPONSIVE DESIGN ====== */
@media (max-width: 768px) {
    .job-details-header {
        padding: 1.5rem;
    }
    
    .job-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .job-company-logo {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .job-main-content, .job-info-card, .job-actions-card {
        padding: 1.5rem;
    }
    
    .job-status-badges {
        justify-content: center;
    }
    
    .job-secondary-actions {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .job-details-header {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .job-main-content, .job-info-card, .job-actions-card {
        padding: 1rem;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
}

/* ====== LOADING STATES ====== */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ====== ACCESSIBILITY IMPROVEMENTS ====== */
.job-apply-btn:focus,
.job-action-btn:focus {
    outline: 3px solid rgba(247, 115, 41, 0.5);
    outline-offset: 2px;
}

/* ====== PRINT STYLES ====== */
@media print {
    .enhanced-job-details::before,
    .job-actions-card,
    .job-secondary-actions {
        display: none;
    }
    
    .job-details-grid {
        grid-template-columns: 1fr;
    }
    
    .job-details-header,
    .job-main-content,
    .job-info-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ====== HOVER EFFECTS AND ANIMATIONS ====== */
.job-info-card:hover,
.job-main-content:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.12),
        0 8px 20px rgba(0, 0, 0, 0.06);
    transition: all 300ms ease;
}

.job-info-item:hover {
    background: rgba(247, 115, 41, 0.05);
    border-radius: 10px;
    margin: 0 -0.5rem;
    padding: 1rem 1.5rem;
    transition: all 200ms ease;
}

/* ====== ERROR STATES ====== */
.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-message i {
    font-size: 0.75rem;
}

/* ====== SUCCESS STATES ====== */
.success-message {
    color: #28a745;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.success-message i {
    font-size: 0.75rem;
}

/* ====== PULSE ANIMATION FOR NEW JOBS ====== */
.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(247, 115, 41, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(247, 115, 41, 0); }
    100% { box-shadow: 0 0 0 0 rgba(247, 115, 41, 0); }
}

/* ====== SMOOTH SCROLL BEHAVIOR ====== */
html {
    scroll-behavior: smooth;
}

/* ====== ENHANCED TYPOGRAPHY ====== */
.job-description strong {
    color: #2c3e50;
    font-weight: 700;
}

.job-description em {
    color: #f77329;
    font-style: italic;
}

.job-description blockquote {
    border-left: 4px solid #f77329;
    padding-left: 1rem;
    margin: 1.5rem 0;
    background: rgba(247, 115, 41, 0.05);
    border-radius: 0 10px 10px 0;
    padding: 1rem 1rem 1rem 1.5rem;
}

/* ====== ADVANCED INTERACTIONS ====== */
.job-info-item:last-child {
    position: relative;
    overflow: hidden;
}

.job-info-item:last-child::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #f77329 0%, #e55a1f 100%);
    transition: all 300ms ease;
    transform: translateX(-50%);
}

.job-info-item:last-child:hover::after {
    width: 100%;
}

/* ====== FLOATING ACTION EFFECT ====== */
.job-apply-btn {
    position: relative;
    z-index: 1;
}

.job-apply-btn:hover {
    animation: float 0.3s ease-in-out;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(-3px); }
}

/* ====== ROLE CRITERIA STYLES ====== */
.role-criteria-info {
    border-left: 4px solid #17a2b8;
    margin-bottom: 0;
}

.role-criteria-info h6 {
    color: #17a2b8;
    margin-bottom: 8px;
    font-weight: 600;
}

#eligibilityStatus .alert {
    margin-bottom: 0;
    padding: 10px 15px;
    border-radius: 8px;
}

#eligibilityStatus .alert-success {
    border-left: 4px solid #28a745;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

#eligibilityStatus .alert-danger {
    border-left: 4px solid #dc3545;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

#eligibilityStatus .alert-warning {
    border-left: 4px solid #ffc107;
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #212529;
}

.badge.bg-info {
    background-color: #17a2b8 !important;
    color: white;
}

.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Smooth transitions */
#roleCriteriaDisplay, #eligibilityStatus {
    transition: all 0.3s ease;
}
