/* ==========================================================================
   JobOoro — Public Job Details
   File:
       /assets/css/job-details.css

   Purpose:
       Styling for /job/{slug}/

   Requirements:
       - External CSS only
       - No Bootstrap
       - No Bootstrap Icons
       - No jQuery
       - Responsive
       - Accessible
       - SEO-friendly markup
       - JobOoro blue/white visual style
   ========================================================================== */


/* ==========================================================================
   Base
   ========================================================================== */

.job-details-page,
.job-details-page *,
.job-details-page *::before,
.job-details-page *::after {
    box-sizing: border-box;
}

.job-details-page {
    width: 100%;
    min-height: 100vh;
    color: #172033;
    background:
        linear-gradient(
            180deg,
            #f7fbff 0%,
            #eef6fd 42%,
            #ffffff 100%
        );
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
    line-height: 1.65;
}

.job-details-page a {
    color: #075fc5;
    text-decoration: none;
}

.job-details-page a:hover {
    color: #064b9c;
}

.job-details-page img {
    max-width: 100%;
    height: auto;
}


/* ==========================================================================
   Container
   ========================================================================== */

.job-container {
    width: min(1180px, calc(100% - 32px));
    margin-right: auto;
    margin-left: auto;
}


/* ==========================================================================
   Breadcrumb
   ========================================================================== */

.job-breadcrumb {
    padding: 20px 0 10px;
}

.job-breadcrumb nav {
    width: 100%;
}

.job-breadcrumb__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: #64748b;
    font-size: 0.9rem;
}

.job-breadcrumb__list li {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.job-breadcrumb__list li:not(:last-child)::after {
    margin-left: 7px;
    color: #94a3b8;
    content: "/";
}

.job-breadcrumb__list a {
    color: #475569;
    font-weight: 600;
}

.job-breadcrumb__list a:hover {
    color: #075fc5;
    text-decoration: underline;
}

.job-breadcrumb__current {
    max-width: 460px;
    overflow: hidden;
    color: #64748b;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ==========================================================================
   Job Header
   ========================================================================== */

.job-header {
    position: relative;
    overflow: hidden;
    padding: 16px 0 28px;
}

.job-header::before {
    position: absolute;
    right: -130px;
    bottom: -180px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: rgba(30, 115, 210, 0.07);
    content: "";
    pointer-events: none;
}

.job-header__grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 30px;
    align-items: stretch;
    padding: 34px;
    border: 1px solid #d8e5f2;
    border-radius: 16px;
    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #f8fbff 65%,
            #edf6ff 100%
        );
    box-shadow:
        0 10px 30px rgba(15, 23, 42, 0.08);
}

.job-header__main {
    min-width: 0;
}


/* ==========================================================================
   Job Badges
   ========================================================================== */

.job-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.job-badge {
    display: inline-flex;
    min-height: 29px;
    align-items: center;
    padding: 5px 11px;
    border: 1px solid #cbd8e6;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.2;
}

.job-badge--featured {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.job-badge--urgent {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #b45309;
}


/* ==========================================================================
   Job Title
   ========================================================================== */

.job-title {
    max-width: 900px;
    margin: 0;
    color: #0f172a;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.15;
}


/* ==========================================================================
   Company / Employer
   ========================================================================== */

.job-company {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin: 13px 0 0;
    color: #475569;
    font-size: 1.08rem;
    font-weight: 650;
}

.job-company a {
    font-weight: 750;
}

.job-verified {
    display: inline-flex;
    width: 21px;
    height: 21px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #15803d;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}


/* ==========================================================================
   Job Summary
   ========================================================================== */

.job-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 9px 20px;
    margin-top: 22px;
    color: #475569;
    font-size: 0.9rem;
    font-weight: 600;
}

.job-summary > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}


/* ==========================================================================
   Apply Panel
   ========================================================================== */

.job-apply-panel {
    align-self: start;
    padding: 23px;
    border: 1px solid #d7e3ef;
    border-radius: 13px;
    background: #ffffff;
    box-shadow:
        0 8px 24px rgba(15, 23, 42, 0.07);
}

.job-button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 10px 17px;
    border: 1px solid #cbd8e6;
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.job-button:hover {
    border-color: #a9c4df;
    background: #f5f9fd;
    color: #064b9c;
    transform: translateY(-1px);
}

.job-button--primary {
    width: 100%;
    border-color: #075fc5;
    background:
        linear-gradient(
            135deg,
            #075fc5,
            #1674d3
        );
    color: #ffffff !important;
    box-shadow:
        0 7px 18px rgba(7, 95, 197, 0.2);
}

.job-button--primary:hover {
    border-color: #064b9c;
    background:
        linear-gradient(
            135deg,
            #064b9c,
            #075fc5
        );
    color: #ffffff !important;
    box-shadow:
        0 10px 24px rgba(7, 95, 197, 0.27);
}

.job-button--large {
    min-height: 50px;
    font-size: 1rem;
}

.job-button--outline {
    width: 100%;
    margin-top: 15px;
    border-color: #bcd2e8;
    background: #ffffff;
    color: #075fc5;
}

.job-button--outline:hover {
    border-color: #075fc5;
    background: #eff6ff;
    color: #064b9c;
}

.job-apply-note {
    margin: 12px 0 0;
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.5;
    text-align: center;
}

.job-meta-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 16px;
    padding-top: 15px;
    border-top: 1px solid #e7edf4;
}

.job-meta-block strong {
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 750;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.job-meta-block span {
    color: #334155;
    font-size: 0.87rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}


/* ==========================================================================
   Main Content
   ========================================================================== */

.job-content-section {
    padding: 0 0 48px;
}

.job-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    align-items: start;
}

.job-main-content {
    min-width: 0;
}


/* ==========================================================================
   Job Content Sections
   ========================================================================== */

.job-section {
    margin-bottom: 22px;
    padding: 28px;
    border: 1px solid #dbe5ef;
    border-radius: 14px;
    background: #ffffff;
    box-shadow:
        0 7px 22px rgba(15, 23, 42, 0.06);
}

.job-section h2,
.job-application-card h2,
.job-sidebar-card h2 {
    margin: 0 0 18px;
    color: #0f172a;
    font-size: 1.3rem;
    font-weight: 750;
    letter-spacing: -0.015em;
    line-height: 1.3;
}

.job-section h2::after,
.job-application-card h2::after,
.job-sidebar-card h2::after {
    display: block;
    width: 40px;
    height: 3px;
    margin-top: 9px;
    border-radius: 999px;
    background: #075fc5;
    content: "";
}

.job-rich-text {
    color: #334155;
    font-size: 0.97rem;
    overflow-wrap: anywhere;
}

.job-rich-text p {
    margin: 0 0 15px;
}

.job-rich-text p:last-child {
    margin-bottom: 0;
}

.job-rich-text ul,
.job-rich-text ol {
    margin: 0 0 17px;
    padding-left: 24px;
}

.job-rich-text li {
    margin-bottom: 7px;
}

.job-rich-text li:last-child {
    margin-bottom: 0;
}

.job-rich-text strong,
.job-rich-text b {
    color: #172033;
    font-weight: 700;
}


/* ==========================================================================
   Application Card
   ========================================================================== */

.job-application-section {
    margin-bottom: 22px;
}

.job-application-card {
    padding: 28px;
    border: 1px solid #cfe0f0;
    border-radius: 14px;
    background:
        linear-gradient(
            135deg,
            #f8fbff 0%,
            #ffffff 100%
        );
    box-shadow:
        0 7px 22px rgba(15, 23, 42, 0.06);
}

.job-application-card .job-button {
    width: auto;
    min-width: 220px;
    margin-top: 20px;
}


/* ==========================================================================
   Source Card
   ========================================================================== */

.job-source-card {
    margin-bottom: 22px;
    padding: 22px 24px;
    border: 1px solid #dce6ef;
    border-radius: 13px;
    background: #ffffff;
}

.job-source-card > strong {
    display: block;
    margin-bottom: 7px;
    color: #0f172a;
    font-size: 0.98rem;
    font-weight: 750;
}

.job-source-card p {
    margin: 0;
    color: #64748b;
    font-size: 0.86rem;
    line-height: 1.6;
}

.job-source-card a {
    font-weight: 650;
}


/* ==========================================================================
   Sidebar
   ========================================================================== */

.job-sidebar {
    min-width: 0;
}

.job-sidebar-card {
    margin-bottom: 20px;
    padding: 24px;
    border: 1px solid #dbe5ef;
    border-radius: 14px;
    background: #ffffff;
    box-shadow:
        0 7px 22px rgba(15, 23, 42, 0.06);
}

.job-sidebar-card h2 {
    font-size: 1.12rem;
}


/* ==========================================================================
   Job Information
   ========================================================================== */

.job-information-list {
    display: grid;
    gap: 14px;
    margin: 0;
}

.job-information-list > div {
    padding-bottom: 13px;
    border-bottom: 1px solid #e8eef4;
}

.job-information-list > div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.job-information-list dt {
    margin: 0 0 3px;
    color: #64748b;
    font-size: 0.73rem;
    font-weight: 750;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.job-information-list dd {
    margin: 0;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}


/* ==========================================================================
   Company Profile
   ========================================================================== */

.job-company-profile {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 16px;
}

.job-company-profile img,
.job-company-initial {
    flex: 0 0 auto;
    width: 58px;
    height: 58px;
    border-radius: 11px;
}

.job-company-profile img {
    border: 1px solid #dbe5ef;
    background: #ffffff;
    object-fit: contain;
    padding: 5px;
}

.job-company-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(
            135deg,
            #eaf4ff,
            #dbeafe
        );
    color: #064b9c;
    font-size: 1.25rem;
    font-weight: 800;
}

.job-company-name {
    display: block;
    color: #0f172a !important;
    font-size: 1rem;
    font-weight: 750;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.job-company-name:hover {
    color: #075fc5 !important;
}

.job-company-verified {
    display: block;
    margin-top: 4px;
    color: #15803d;
    font-size: 0.75rem;
    font-weight: 700;
}

.job-sidebar-card .job-muted {
    margin: 0;
    color: #64748b;
    font-size: 0.86rem;
    line-height: 1.6;
}


/* ==========================================================================
   Safety Section
   ========================================================================== */

.job-safety-section {
    padding: 0 0 50px;
}

.job-safety-content {
    padding: 21px 24px;
    border: 1px solid #f4d7ad;
    border-radius: 13px;
    background: #fffaf3;
}

.job-safety-content h2 {
    margin: 0 0 7px;
    color: #92400e;
    font-size: 0.98rem;
    font-weight: 750;
}

.job-safety-content p {
    margin: 0;
    color: #78350f;
    font-size: 0.82rem;
    line-height: 1.6;
}


/* ==========================================================================
   Not Found Page
   ========================================================================== */

.job-not-found {
    min-height: 65vh;
    padding: 70px 0 90px;
}

.job-not-found__content {
    max-width: 680px;
    margin: 0 auto;
    padding: 45px 35px;
    border: 1px solid #dbe5ef;
    border-radius: 15px;
    background: #ffffff;
    box-shadow:
        0 10px 30px rgba(15, 23, 42, 0.07);
    text-align: center;
}

.job-not-found__content h1 {
    margin: 0 0 12px;
    color: #0f172a;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.job-not-found__content p {
    max-width: 540px;
    margin: 0 auto 24px;
    color: #64748b;
    font-size: 0.95rem;
}

.job-not-found__content .job-button {
    width: auto;
    min-width: 190px;
}


/* ==========================================================================
   Accessibility
   ========================================================================== */

.job-details-page a:focus-visible,
.job-details-page button:focus-visible {
    outline: 3px solid rgba(7, 95, 197, 0.3);
    outline-offset: 3px;
}


/* ==========================================================================
   Tablet
   ========================================================================== */

@media (max-width: 1000px) {

    .job-header__grid {
        grid-template-columns: minmax(0, 1fr) 290px;
        gap: 22px;
        padding: 28px;
    }

    .job-layout {
        grid-template-columns: minmax(0, 1fr) 290px;
        gap: 22px;
    }

}


/* ==========================================================================
   Mobile / Tablet
   ========================================================================== */

@media (max-width: 820px) {

    .job-header__grid {
        grid-template-columns: 1fr;
    }

    .job-apply-panel {
        max-width: 520px;
    }

    .job-layout {
        grid-template-columns: 1fr;
    }

    .job-sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .job-sidebar-card {
        margin-bottom: 0;
    }

}


/* ==========================================================================
   Mobile
   ========================================================================== */

@media (max-width: 620px) {

    .job-container {
        width: min(100% - 22px, 1180px);
    }

    .job-breadcrumb {
        padding: 13px 0 7px;
    }

    .job-breadcrumb__list {
        font-size: 0.81rem;
    }

    .job-breadcrumb__current {
        max-width: 190px;
    }

    .job-header {
        padding-top: 10px;
    }

    .job-header__grid {
        gap: 20px;
        padding: 23px 19px;
        border-radius: 13px;
    }

    .job-title {
        font-size: clamp(
            1.75rem,
            8vw,
            2.25rem
        );
    }

    .job-company {
        font-size: 0.98rem;
    }

    .job-summary {
        display: grid;
        gap: 8px;
        margin-top: 18px;
        font-size: 0.86rem;
    }

    .job-content-section {
        padding-bottom: 30px;
    }

    .job-section,
    .job-application-card,
    .job-sidebar-card {
        padding: 21px 18px;
    }

    .job-section h2,
    .job-application-card h2 {
        font-size: 1.16rem;
    }

    .job-rich-text {
        font-size: 0.93rem;
    }

    .job-sidebar {
        display: block;
    }

    .job-sidebar-card {
        margin-bottom: 18px;
    }

    .job-application-card .job-button {
        width: 100%;
        min-width: 0;
    }

    .job-source-card {
        padding: 19px 18px;
    }

    .job-safety-section {
        padding-bottom: 35px;
    }

    .job-safety-content {
        padding: 18px;
    }

    .job-not-found {
        min-height: 60vh;
        padding: 45px 0 60px;
    }

    .job-not-found__content {
        padding: 32px 20px;
    }

    .job-not-found__content h1 {
        font-size: 1.6rem;
    }

    .job-not-found__content .job-button {
        width: 100%;
    }

}


/* ==========================================================================
   Small Mobile
   ========================================================================== */

@media (max-width: 420px) {

    .job-badges {
        gap: 6px;
    }

    .job-badge {
        padding: 5px 9px;
        font-size: 0.72rem;
    }

    .job-company-profile {
        align-items: flex-start;
    }

    .job-company-profile img,
    .job-company-initial {
        width: 50px;
        height: 50px;
    }

}


/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

    .job-details-page *,
    .job-details-page *::before,
    .job-details-page *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }

}


/* ==========================================================================
   Print
   ========================================================================== */

@media print {

    .job-details-page {
        background: #ffffff;
    }

    .job-header__grid,
    .job-section,
    .job-application-card,
    .job-sidebar-card,
    .job-source-card,
    .job-safety-content {
        box-shadow: none;
        border-color: #cbd5e1;
    }

    .job-apply-panel,
    .job-safety-section {
        display: none;
    }

    .job-layout {
        display: block;
    }

    .job-sidebar {
        display: none;
    }

    .job-details-page a {
        color: #000000;
        text-decoration: underline;
    }

}