/* --- VARIABLES & BASE STYLES --- */
:root {
    /* Colors */
    --color-primary: #004acc;
    --color-text-primary: #1a202c;
    --color-text-dim: #808999;
    --color-background-faint: #f7fafc;
    --color-white: #ffffff;
    --color-border: #808999;

    /* Typography */
    font-size: 10px;
    /* Base font size for easy rem calculations */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    color: var(--color-text-primary);
    font-size: 1.6rem;
    /* Default font size */
    line-height: 1.6;
}

h1,
h2,
h3 {
    margin: 0;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- JOB DETAILS PAGE --- */
.job-details__header {
    background-color: var(--color-faint);
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2.4rem;
    height: 12.2rem;
    box-sizing: border-box;
}

.job-details__breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.6rem;
}

.breadcrumb__link {
    color: var(--color-primary);
    font-weight: 700;
}

.breadcrumb__separator,
.breadcrumb__current {
    font-weight: 400;
}

.job-details__title {
    font-size: 2.4rem;
    /* h5 equivalent */
    color: var(--color-text-primary);
}

.job-details__container {
    padding: 4rem 2.4rem;
}

.job-details__section {
    max-width: 1152px;
    /* A common container width */
    margin: 0 auto;
}

.job-details__layout {
    display: flex;
    flex-direction: column-reverse;
    gap: 3.8rem;
}

/* --- JOB DESCRIPTION (LEFT COLUMN) --- */
.job-description {
    width: 100%;
    overflow: hidden;
}

.job-description__meta {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    margin-bottom: 2.4rem;
}

.job-description__location {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.job-description__location-icon {
    flex-shrink: 0;
}

.job-description__heading {
    font-size: 2.4rem;
    /* h5 equivalent */
    padding-bottom: 2.4rem;
}

.job-description__content {
    /* Add styling for content from WYSIWYG editor if needed */
    line-height: 1.7;
}

.job-description__content p {
    margin-bottom: 1.5rem;
}

.job-description__content ul {
    list-style-position: inside;
    padding-left: 1rem;
}

/* --- JOB SUMMARY (RIGHT COLUMN) --- */
.job-summary {
    width: 100%;
    flex-shrink: 0;
}

.job-summary__card {
    padding: 2.4rem 2rem;
    border-radius: 1.6rem;
    /* border: 0.2rem solid var(--color-border); */
    background-color: var(--color-subdued);
}

.job-summary__title {
    font-size: 2rem;
    /* h6 equivalent */
    margin-bottom: 1.2rem;
}

.job-summary__list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1.2rem;
}

.job-summary__item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.job-summary__label {
    margin: 0;
    font-weight: 700;
    font-size: 1.4rem;
}

.job-summary__value {
    margin: 0;
    color: var(--color-black);
}

.job-summary__actions {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.job-summary__preview {
    width: 100%;
    height: 18rem;
    border-radius: 0.8rem;
    margin-top: 2.8rem;
}

/* --- BUTTONS --- */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;
    padding: 1.2rem 2.4rem;
    border-radius: 9999px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: 2px solid transparent;
}

.btn--primary {
    background-color: var(--color-primary);
    color: var(--color-white);
    font-size: 1.6rem;
}

.btn--primary:hover {
    background-color: #003da5;
}

.btn--outline {
    background-color: transparent;
    border-color: var(--color-primary);
    color: var(--color-primary);
    /* margin-bottom: 1.4rem; */
}

.btn--outline:hover {
    background-color: #e6f0ff;
}

.btn__icon {
    width: 2.4rem;
    height: 2.4rem;
    fill: currentColor;
}

.btn--mobile-only {
    margin-top: 1.6rem;
    font-size: 1.8rem;
}

/* Hide desktop buttons on mobile */
.job-summary .btn {
    display: none;
}

/* --- SHARE OVERLAY --- */
.share-overlay {
    width: 100%;
    min-width: 20rem;
    position: absolute;
    bottom: 100%;
    left: 0;
    z-index: 10;
    background-color: var(--color-white);
    border-radius: 0.8rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: none;
    /* Hidden by default */
}

.share-overlay--visible {
    display: block;
}

.share-overlay__link {
    display: block;
    padding: 1rem 1.5rem;
    font-size: 1.4rem;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out;
}

.share-overlay__link:hover {
    background-color: var(--color-background-faint);
}


/* --- RESPONSIVE STYLES (TABLET AND UP) --- */
@media (min-width: 768px) {
    .job-details__header .job-details__title {
        font-size: 3rem;
        /* h4 equivalent */
    }

    .job-details__container {
        padding: 6rem 1.6rem;
    }

    .job-details__layout {
        flex-direction: row;
    }

    .job-description {
        padding-bottom: 4.4rem;
    }

    /* Hide mobile-only button on desktop */
    .btn--mobile-only {
        display: none;
    }

    /* Show desktop buttons */
    .job-summary .btn {
        display: flex;
    }

    .job-summary {
        width: 27.5rem;
    }

    .job-summary__card {
        position: sticky;
        top: 10rem;
        padding-left: 2.4rem;
        padding-right: 2.4rem;
    }
}

/* --- RESPONSIVE STYLES (LARGE DESKTOP AND UP) --- */
@media (min-width: 1024px) {
    .job-details__header {
        height: 28.8rem;
        padding: 6.6rem 0;
    }

    .job-details__container {
        padding: 8rem 6.4rem;
    }

    .job-description {
        margin-bottom: 0;
        padding-bottom: 7.5rem;
    }

    .job-description__meta {
        margin-bottom: 4.7rem;
    }

    .job-summary {
        width: 30rem;
    }

    .job-summary__card {
        padding: 2.4rem 3.2rem;
    }

    .job-summary__title {
        margin-bottom: 2.4rem;
    }

    .job-summary__list {
        margin-bottom: 2.4rem;
    }
}

.job-summary__item:has(.job-summary__value:empty) {
    display: none;
}

.job-summary__contact {
    margin-top: 4rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    text-align: center;
}

.job-summary__share {
    margin-top: 2.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.job-summary__share-title {
    font-size: 2rem;
    /* h6 equivalent */
    margin-bottom: 1.2rem;
}

.job-summary__share-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.job-summary__share-links a svg {
    width: 2.8rem;
    height: 2.8rem;
}

.job-summary__share-links a.btn-facebook svg {
    color: #0866FF
}

.job-summary__share-links a.btn-linkedin svg {
    color: #0077B5
}
