/**
 * 365 Jobs - Job Details Widget Styles
 * Modern, clean layout for Vietnamese Industrial Zone recruitment sites
 * Updated to use dynamic theme color variables (--vtc-*)
 */

/* ==========================================================================
   Job Details Wrapper
   ========================================================================== */
.jobs365-job-details-wrapper {
    background: var(--vtc-bg-bg-white, #ffffff);
    border-radius: 8px;
    overflow: hidden;
}

/* ==========================================================================
   Job Header
   ========================================================================== */
.jobs365-job-header {
    background: var(--vtc-bg-common-bg10, #5957E5);
    padding: 40px 30px;
    position: relative;
    color: var(--vtc-text-text-white-text-1, #ffffff);
}

.jobs365-header-content {
    max-width: 1200px;
    margin: 0 auto;
}

.jobs365-badges {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.job-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.badge-urgent {
    background: var(--vtc-text-common-color-2, #FC253F);
    opacity: 0.9;
    animation: pulse 2s infinite;
}

.badge-featured {
    background: var(--vtc-text-common-color-9, #F6AA32);
    opacity: 0.9;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.jobs365-job-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 20px 0;
    line-height: 1.3;
    color: var(--vtc-text-text-white-text-1, #ffffff);
}

/* Company Meta */
.jobs365-company-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.company-logo {
    flex-shrink: 0;
}

.company-logo img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    background: var(--vtc-bg-bg-white, #ffffff);
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.company-info {
    flex: 1;
}

.company-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--vtc-text-text-white-text-1, #ffffff);
    text-decoration: none;
    display: block;
    margin-bottom: 5px;
    transition: opacity 0.3s;
}

.company-name:hover {
    opacity: 0.8;
}

.company-location {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.company-location i {
    color: rgba(255, 255, 255, 0.8);
}

/* ==========================================================================
   Quick Info Box
   ========================================================================== */
.jobs365-quick-info {
    background: var(--vtc-bg-common-bg9, #F2F4F7);
    border: 1px solid var(--vtc-border-border-1, #f0f0f0);
    border-radius: 8px;
    padding: 30px;
    margin: -30px 30px 30px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.info-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding: 15px;
    background: var(--vtc-bg-bg-white, #ffffff);
    border-radius: 6px;
    border: 1px solid var(--vtc-border-border-1, #f0f0f0);
    transition: all 0.3s;
}

.info-item:hover {
    border-color: var(--vtc-bg-common-bg10, #5957E5);
    box-shadow: 0 4px 12px rgba(89, 87, 229, 0.15);
    transform: translateY(-2px);
}

.info-item-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--vtc-bg-common-bg10, #5957E5);
    border-radius: 8px;
    color: var(--vtc-text-text-white-text-1, #ffffff);
    font-size: 18px;
}

.info-item-content {
    flex: 1;
}

.info-item-label {
    font-size: 13px;
    color: var(--vtc-text-pera-text-1, #77787B);
    margin-bottom: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item-value {
    font-size: 16px;
    color: var(--vtc-text-heading-text-1, #081120);
    font-weight: 600;
    line-height: 1.4;
}

/* ==========================================================================
   Job Content
   ========================================================================== */
.jobs365-job-content {
    padding: 40px 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Job Sections */
.job-section {
    margin-bottom: 35px;
    padding: 25px;
    background: var(--vtc-bg-bg-white, #ffffff);
    border: 1px solid var(--vtc-border-border-1, #f0f0f0);
    border-radius: 8px;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--vtc-text-heading-text-1, #081120);
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--vtc-bg-common-bg10, #5957E5);
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title i {
    color: var(--vtc-bg-common-bg10, #5957E5);
    font-size: 24px;
}

/* Info Table Style */
.job-info-table {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* Single column for specific sections */
.job-info-table.single-column {
    grid-template-columns: 1fr;
}

.info-row {
    display: flex;
    padding: 14px 18px;
    background: var(--vtc-bg-common-bg9, #F2F4F7);
    border-radius: 6px;
    border-left: 4px solid var(--vtc-bg-common-bg10, #5957E5);
    align-items: flex-start;
    gap: 15px;
    min-height: 60px;
}

.info-row.highlight {
    background: var(--vtc-bg-common-bg4, #FFFAEC);
    border-left-color: var(--vtc-bg-common-bg13, #F6AA32);
    grid-column: span 2;
}

/* Make certain rows span full width */
.info-row.full-width {
    grid-column: span 2;
}

.info-label {
    flex-shrink: 0;
    font-weight: 600;
    color: var(--vtc-text-pera-text-3, #5A5F6A);
    min-width: 140px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.info-label i {
    color: var(--vtc-bg-common-bg10, #5957E5);
    width: 18px;
}

.info-value {
    flex: 1;
    color: var(--vtc-text-heading-text-1, #081120);
    font-weight: 500;
}

.info-value strong {
    font-weight: 700;
}

.text-danger {
    color: var(--vtc-text-common-color-2, #FC253F) !important;
}

.text-success {
    color: var(--vtc-text-common-color-8, #2A9134) !important;
}

/* WYSIWYG Content */
.job-wysiwyg-content {
    line-height: 1.8;
    color: var(--vtc-text-pera-text-1, #77787B);
}

.job-wysiwyg-content h2,
.job-wysiwyg-content h3 {
    color: var(--vtc-text-heading-text-1, #081120);
    margin-top: 20px;
    margin-bottom: 12px;
    font-weight: 600;
}

.job-wysiwyg-content h2 {
    font-size: 20px;
}

.job-wysiwyg-content h3 {
    font-size: 18px;
}

.job-wysiwyg-content p {
    margin-bottom: 15px;
}

.job-wysiwyg-content ul,
.job-wysiwyg-content ol {
    margin: 15px 0 15px 20px;
    padding-left: 20px;
}

.job-wysiwyg-content li {
    margin-bottom: 10px;
    padding-left: 5px;
}

.job-wysiwyg-content ul li::marker {
    color: var(--vtc-bg-common-bg10, #5957E5);
}

.job-wysiwyg-content strong {
    color: var(--vtc-text-heading-text-1, #081120);
    font-weight: 600;
}

/* Contact Section */
.contact-section .contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: var(--vtc-bg-common-bg10, #5957E5);
    border-radius: 12px;
    color: var(--vtc-text-text-white-text-1, #ffffff);
    transition: transform 0.3s, box-shadow 0.3s;
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(89, 87, 229, 0.3);
}

.contact-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 22px;
}

.contact-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 4px;
    font-weight: 500;
}

.contact-value {
    font-size: 18px;
    font-weight: 700;
}

.contact-value a {
    color: var(--vtc-text-text-white-text-1, #ffffff);
    text-decoration: none;
    transition: opacity 0.3s;
}

.contact-value a:hover {
    opacity: 0.8;
}

/* ==========================================================================
   Apply Button Section
   ========================================================================== */
.jobs365-apply-section {
    padding: 30px;
    background: var(--vtc-bg-common-bg9, #F2F4F7);
    border-top: 1px solid var(--vtc-border-border-1, #f0f0f0);
    text-align: center;
}

.jobs365-apply-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 40px;
    background: var(--vtc-bg-common-bg10, #5957E5);
    color: var(--vtc-text-text-white-text-1, #ffffff);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(89, 87, 229, 0.4);
    border: none;
    cursor: pointer;
}

.jobs365-apply-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(89, 87, 229, 0.5);
    color: var(--vtc-text-text-white-text-1, #ffffff);
    background: var(--vtc-bg-common-bg11, #FA6444);
}

.jobs365-apply-btn i {
    font-size: 18px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Tablet */
@media (max-width: 991px) {
    .jobs365-job-title {
        font-size: 28px;
    }
    
    .info-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
    
    .job-info-table {
        grid-template-columns: 1fr;
    }
    
    .info-row.highlight,
    .info-row.full-width {
        grid-column: span 1;
    }
    
    .jobs365-quick-info {
        margin: -20px 20px 20px 20px;
        padding: 20px;
    }
    
    .jobs365-job-header {
        padding: 30px 20px;
    }
    
    .jobs365-job-content {
        padding: 30px 20px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .jobs365-job-title {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .jobs365-badges {
        margin-bottom: 15px;
    }
    
    .job-badge {
        font-size: 12px;
        padding: 5px 12px;
    }
    
    .company-logo img {
        width: 50px;
        height: 50px;
    }
    
    .company-name {
        font-size: 16px;
    }
    
    .company-location {
        font-size: 13px;
    }
    
    .jobs365-quick-info {
        margin: -15px 15px 15px 15px;
        padding: 15px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .info-item {
        padding: 12px;
    }
    
    .info-item-icon {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .info-item-label {
        font-size: 12px;
    }
    
    .info-item-value {
        font-size: 14px;
    }
    
    .job-section {
        padding: 20px;
        margin-bottom: 25px;
    }
    
    .section-title {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .section-title i {
        font-size: 20px;
    }
    
    .job-info-table {
        grid-template-columns: 1fr;
    }
    
    .info-row.highlight,
    .info-row.full-width {
        grid-column: span 1;
    }
    
    .info-label {
        min-width: auto;
        width: 100%;
        margin-bottom: 5px;
    }
    
    .info-row {
        flex-direction: column;
        padding: 12px 15px;
        min-height: auto;
    }
    
    .job-wysiwyg-content {
        font-size: 15px;
    }
    
    .job-wysiwyg-content h2 {
        font-size: 18px;
    }
    
    .job-wysiwyg-content h3 {
        font-size: 16px;
    }
    
    .contact-cards {
        grid-template-columns: 1fr;
    }
    
    .contact-card {
        padding: 15px;
    }
    
    .contact-icon {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .contact-value {
        font-size: 16px;
    }
    
    .jobs365-apply-btn {
        padding: 14px 30px;
        font-size: 15px;
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   Layout Variations
   ========================================================================== */

/* Layout Style 2 - Sidebar */
.jobs365-job-details-wrapper.layout-style-2 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    background: transparent;
}

.layout-style-2 .jobs365-job-header {
    grid-column: 1 / -1;
}

.layout-style-2 .jobs365-quick-info {
    margin: 0;
    position: sticky;
    top: 20px;
}

.layout-style-2 .info-grid {
    grid-template-columns: 1fr;
}

@media (max-width: 991px) {
    .jobs365-job-details-wrapper.layout-style-2 {
        grid-template-columns: 1fr;
    }
    
    .layout-style-2 .jobs365-quick-info {
        position: static;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
    .jobs365-badges,
    .jobs365-apply-section {
        display: none;
    }
    
    .jobs365-job-header {
        background: var(--vtc-bg-common-bg9, #F2F4F7);
        color: var(--vtc-text-heading-text-1, #081120);
    }
    
    .company-name,
    .company-location {
        color: var(--vtc-text-heading-text-1, #081120);
    }
    
    .jobs365-quick-info {
        box-shadow: none;
        border: 1px solid var(--vtc-border-border-2, #dfdcdc);
    }
}