/* Base Variables */
:root {
    --primary: #1a365d;
    --primary-light: #234681;
    --primary-dark: #132849;
    --secondary: #f7f7f7;
    --accent: #2c5282;
    --accent-light: #3b69a5;
    --text: #2d3748;
    --text-light: #4a5568;
    --border: #e2e8f0;
    --background: #f8fafc;
    --success: #22c55e;
    --info: #3b82f6;
    --warning: #f59e0b;
    --danger: #ef4444;
}

/* Reset & Base Styles */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background-color: var(--background);
}

/* Page Layout */
.job-detail-page {
    min-height: 100vh;
    padding: 2rem 1rem;
}

/* Breadcrumbs */
.breadcrumbs {
    background: white;
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.breadcrumbs-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.breadcrumbs a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumbs a:hover {
    color: var(--accent-light);
}

.breadcrumbs i {
    color: var(--text-light);
    font-size: 0.75rem;
}

/* Back to Jobs Link */
.back-to-jobs {
    max-width: 1400px;
    margin: 0 auto 2rem;
    padding: 0 2rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.back-link:hover {
    color: var(--accent-light);
    transform: translateX(-4px);
}

/* Main Container */
.job-detail-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Grid Layout */
.job-detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

/* Job Header */
.job-header {
    margin-bottom: 2rem;
}

.job-title {
    color: var(--primary);
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.job-title i {
    color: var(--accent);
    font-size: 2rem;
}

/* Meta Information */
.meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1.5rem 0;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: var(--secondary);
    border-radius: 8px;
    color: var(--text);
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.meta-item:hover {
    background: #f0f9ff;
    transform: translateY(-2px);
}

.meta-item i {
    color: var(--accent);
}

/* Salary Display */
.salary {
    color: var(--accent);
    font-size: 20px;
    font-weight: 700;
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: var(--secondary);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}

.salary:hover {
    background: #f0f9ff;
    transform: translateY(-2px);
}

.salary i {
    font-size: 1.75rem;
}

/* Section Titles */
.section-title {
    color: var(--primary);
    font-size: 30px;
    font-weight: 600;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--secondary);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-title i {
    color: var(--accent);
}

.subsection-title {
    color: var(--primary);
    font-size: 1.4rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.subsection-title i {
    color: var(--accent);
}

/* List Items */
.list-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 8px;
    background: var(--secondary);
    font-size: 1.1rem;
    line-height: 1.6;
    transition: all 0.2s ease;
}

.list-item:hover {
    transform: translateX(4px);
    background: #f0f9ff;
}

.list-item i {
    color: var(--accent);
    margin-top: 0.25rem;
}

/* Tags */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1rem 0;
}

.tag {
    background: var(--secondary);
    padding: 0.75rem 1.5rem;
    border-radius: 20px;
    font-size: 1.1rem;
    display: inline-block;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.tag:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
}

/* Requirements Section */
.requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.requirement-item {
    background: var(--secondary);
    padding: 1.5rem;
    border-radius: 12px;
}

/* Company Information */
.company-info {
    line-height: 1.8;
}

.company-header {
    margin-bottom: 2rem;
}

.company-name {
    font-size: 1.75rem !important;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
}

.company-description {
    color: var(--text);
    font-size: 1.1rem;
}

.company-meta {
    margin: 1.5rem 0;
}

.company-meta-item {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--secondary);
    border-radius: 8px;
    display: flex;
    gap: 0.75rem;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.company-meta-item:hover {
    transform: translateX(4px);
    background: #f0f9ff;
}

/* Unique Aspects */
.unique-aspects {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.unique-aspect {
    padding: 0.5rem;
    background: var(--secondary);
    border-radius: 8px;
    font-size: 1.1rem;
    color: var(--text);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: all 0.2s ease;
}

.unique-aspect:hover {
    transform: translateX(4px);
    background: #f0f9ff;
}

.unique-aspect::before {
    content: "✦";
    color: var(--accent);
}

/* Ad Containers */
.ad-container {
    background: white;
    border-radius: 8px;
    margin: 2rem auto;
    padding: 1rem;
    position: relative;
    border: 2px dashed var(--border);
}

.ad-label {
    text-align: center;
    color: var(--text-light);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding-bottom: 0.5rem;
    text-transform: uppercase;
}

.ad-space {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-style: italic;
    min-height: 250px;
}

.horizontal-ad .ad-space {
    min-height: 90px;
}

/* Apply Button */
.apply-button {
    position: fixed;
    bottom: 2rem;
    right: 6rem;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #2c5282 0%, #1a365d 100%);
    color: white;
    padding: 1.25rem 2.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(44, 82, 130, 0.2);
    transition: all 0.3s ease;
    z-index: 1000;
    width: 300px;
}

.apply-button:hover {
    color: white;
    box-shadow: 0 6px 16px rgba(44, 82, 130, 0.3);
    background: linear-gradient(135deg, #3b69a5 0%, #234681 100%);
}

/* Critical vs Beneficial Skills */
.skills-list.critical .tag {
    background: #F0F7FF;
    color: #0A4B8C;
    border-color: #2B85D8;
}

.skills-list.critical .tag:hover {
    background: #E1EFFF;
    color: #06315C;
}

.skills-list.beneficial .tag {
    background: #F0F9F6;
    color: #0B6B4F;
    border-color: #34A885;
}

.skills-list.beneficial .tag:hover {
    background: #E1F4EE;
    color: #085440;
}

/* Market Demand Styles */
.market-demand-info {
    padding: 1rem 0;
}

.market-demand-info .list-item {
    background: var(--secondary);
    font-weight: 500;
    transition: all 0.2s ease;
}

.market-demand-info .list-item:hover {
    transform: translateX(4px);
    background: #f0f9ff;
}

.market-demand-info .list-item i {
    color: var(--accent);
    font-size: 1.2rem;
}

/* Tablet Styles (max-width: 1024px) */
@media (max-width: 1024px) {
    /* Layout Adjustments */
    .job-detail-grid {
        grid-template-columns: 1fr;
    }

    .job-detail-container {
        padding: 0 1rem;
    }

    /* Header Adjustments */
    .job-title {
        font-size: 25px;
    }

    .meta-info {
        flex-direction: column;
    }

    .meta-item {
        width: 100%;
    }

    /* Card Adjustments */
    .card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    /* Section Title Adjustments */
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .subsection-title {
        font-size: 1.3rem;
    }

    /* Requirements Grid */
    .requirements-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Tag Containers */
    .tags-container {
        gap: 0.5rem;
    }

    .tag {
        font-size: 1rem;
        padding: 0.625rem 1rem;
    }

    /* Company Meta Items */
    .company-meta-item {
        font-size: 1rem;
    }

    /* Apply Button */
    .apply-button {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        justify-content: center;
        border-radius: 8px;
        padding: 1rem;
        width: 25%;
    }

    /* Navigation Elements */
    .breadcrumbs-container,
    .back-to-jobs {
        padding: 0 1rem;
    }

    /* Ad Containers */
    .ad-container {
        margin: 1.5rem auto;
    }
}

/* Mobile Styles (max-width: 640px) */
@media (max-width: 640px) {

    /* Apply Button */
    .apply-button {
        width: 180px;
    }

    /* Header Elements */
    .job-title {
        font-size: 20px;
    }

    .job-title i {
        font-size: 1.5rem;
    }

    /* Salary Display */
    .salary {
        font-size: 20px;
        padding: 1rem;
        width: 100%;
        justify-content: center;
    }

    /* Content Spacing */
    .card {
        padding: 1.25rem;
        margin-bottom: 1.25rem;
    }

    /* Section Headers */
    .section-title {
        font-size: 1.35rem;
    }

    .subsection-title {
        font-size: 1.2rem;
    }

    /* List Items */
    .list-item {
        padding: 0.875rem;
        font-size: 1rem;
    }

    /* Unique Aspects */
    .unique-aspect {
        font-size: 1rem;
        padding: 1rem;
    }

    /* Meta Information */
    .meta-item {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }

    /* Page Margins */
    .job-detail-page {
        padding: 1rem 0.5rem;
    }

    /* Navigation */
    .breadcrumbs {
        margin-bottom: 1rem;
    }

    .back-to-jobs {
        margin-bottom: 1rem;
    }
}

/* Dark Mode */
/*
@media (prefers-color-scheme: dark) {
    :root {
        --primary: #90cdf4;
        --primary-light: #63b3ed;
        --primary-dark: #4299e1;
        --secondary: #2d3748;
        --accent: #63b3ed;
        --accent-light: #4299e1;
        --text: #e2e8f0;
        --text-light: #a0aec0;
        --border: #4a5568;
        --background: #1a202c;
    }

    body {
        background-color: var(--background);
    }

    .card {
        background: #2d3748;
        border-color: #4a5568;
    }

    .breadcrumbs {
        background: #2d3748;
        border-color: #4a5568;
    }

    .meta-item,
    .list-item,
    .tag,
    .requirement-item,
    .unique-aspect,
    .company-meta-item {
        background: #364153;
    }

    .meta-item:hover,
    .list-item:hover,
    .company-meta-item:hover,
    .unique-aspect:hover {
        background: #404e6b;
    }

    .tag:hover {
        background: var(--accent);
    }

    .ad-container {
        background: #2d3748;
        border-color: #4a5568;
    }

    .skills-list.critical .tag {
        background: #742a2a;
        color: #feb2b2;
        border-color: #9b2c2c;
    }

    .skills-list.critical .tag:hover {
        background: #9b2c2c;
        color: #fff;
    }

    .skills-list.beneficial .tag {
        background: #22543d;
        color: #9ae6b4;
        border-color: #276749;
    }

    .skills-list.beneficial .tag:hover {
        background: #276749;
        color: #fff;
    }
}*/

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary: #000000;
        --accent: #000000;
        --text: #000000;
        --border: #000000;
        --background: #ffffff;
    }

    .card,
    .meta-item,
    .list-item,
    .tag,
    .requirement-item,
    .unique-aspect,
    .company-meta-item {
        border: 2px solid #000000;
        background: #ffffff;
    }

    .section-title {
        border-bottom: 3px solid #000000;
    }

    .apply-button {
        background: #000000;
        border: 2px solid #ffffff;
        box-shadow: none;
    }

    .tag:hover,
    .list-item:hover,
    .company-meta-item:hover,
    .unique-aspect:hover {
        background: #000000;
        color: #ffffff;
    }
}

/* Print Styles */
@media print {
    .job-detail-page {
        background: white;
        padding: 0;
    }

    .breadcrumbs,
    .back-to-jobs,
    .ad-container,
    .apply-button {
        display: none !important;
    }

    .job-detail-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .card {
        break-inside: avoid;
        page-break-inside: avoid;
        border: 1px solid #000;
        box-shadow: none;
        margin-bottom: 1rem;
    }

    .section-title {
        border-bottom: 1px solid #000;
    }

    .tag {
        border: 1px solid #000;
        page-break-inside: avoid;
    }

    a {
        text-decoration: none;
        color: #000;
    }

    .meta-item,
    .list-item,
    .company-meta-item {
        page-break-inside: avoid;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .list-item:hover,
    .tag:hover,
    .apply-button:hover,
    .company-meta-item:hover,
    .unique-aspect:hover {
        transform: none;
    }
}

/* IE11 Fallbacks */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
    .job-detail-grid {
        display: -ms-grid;
        -ms-grid-columns: 2fr 1fr;
        gap: 2rem;
    }

    .requirements-grid {
        display: -ms-grid;
        -ms-grid-columns: 1fr 1fr;
    }

    .tags-container {
        display: flex;
        flex-wrap: wrap;
    }
}

.salary-market-evaluation {
    background: #ebf4ff;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    border: 1px solid #bfdbfe;
}

.evaluation-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.evaluation-header i {
    color: var(--accent);
    font-size: 1.25rem;
}

.evaluation-header h4 {
    color: var(--text);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.evaluation-content {
    color: var(--text);
    font-size: 1.1rem;
    line-height: 1.6;
}