/**
 * Custom CSS for Vacancy Templates
 */

/* Back to All Vacancies link */
.vacancy-back-container {
    text-align: right;
    margin-bottom: 20px;
}

.vacancy-back-link {
    display: inline-block;
    width: auto;
    font-family: Arial;
    font-weight: 700;
    font-style: normal;
    font-size: 16px;
    line-height: 27px;
    letter-spacing: 0%;
    color: #333333;
    transition: color 0.3s ease;
    text-decoration: none;
}

.vacancy-back-link:hover {
    color: #148bbe;
    text-decoration: underline;
}

/* Sidebar buttons */
.vacancy-sidebar__buttons {
    text-align: left;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.vacancy-sidebar__buttons .archive-button {
    display: inline-block;
    width: auto;
}

/* Position the top navigation link */
.vacancy-top-nav {
    text-align: right;
    margin-bottom: 15px;
    padding-right: 20px;
}

.vacancy-nav__back.top-position {
    display: inline-block;
    font-family: Arial;
    font-weight: 700;
    font-style: normal;
    font-size: 16px;
    line-height: 27px;
    letter-spacing: 0;
    color: #000000;
    text-decoration: none;
    transition: color 0.2s ease;
}

.vacancy-nav__back.top-position:hover {
    text-decoration: underline;
}

/* Style the buttons outside the sidebar */
.vacancy-sidebar__buttons.outside-sidebar {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.vacancy-sidebar__buttons.outside-sidebar .archive-button {
    display: inline-block;
    padding: 12px 25px;
    text-align: center;
    font-weight: 500;
    border-radius: 40px;
    text-decoration: none;
    transition: all 0.3s ease;
    width: auto;
    max-width: 80%;
}

/* Add these styles to your theme's style.css or custom stylesheet */

/* Disclaimer section width */
.vacancy-disclaimer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* General layout alignments */
.vacancy-content__grid,
.vacancy-bottom-tiles__container,
.vacancy-disclaimer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Align sidebar to start at the same level as the white box */
.vacancy-content__sidebar {
    margin-top: 48px; /* Adjust this value to match the height of the back link + spacing */
}

/* Ensure the disclaimer text doesn't wrap inappropriately */
.vacancy-disclaimer__content {
    width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Responsive styles */
@media (max-width: 1024px) {
    .vacancy-content__grid,
    .vacancy-bottom-tiles__container,
    .vacancy-disclaimer .container {
        max-width: 100%;
        padding: 0 15px;
    }
}

/* Responsive styles */
@media (max-width: 1024px) {
    .vacancy-content__grid,
    .vacancy-bottom-tiles__container,
    .vacancy-disclaimer .container {
        max-width: 100%;
        padding: 0 15px;
    }
}

@media (max-width: 768px) {
    .vacancy-content__grid {
        display: flex;
        flex-direction: column;
    }

    .vacancy-content__main,
    .vacancy-content__sidebar {
        width: 100%;
    }

    .vacancy-sidebar__buttons.outside-sidebar .archive-button {
        max-width: 100%;
        width: 100%;
    }

    .vacancy-top-nav {
        text-align: left;
        padding-left: 15px;
    }

    .st-tiles-grid {
        display: flex;
        flex-direction: column;
    }

    .st-tile-card {
        width: 100%;
        margin-bottom: 20px;
    }
}

/* Make sure the bottom tiles align properly */
.st-tiles-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
}

.st-tile-card {
    flex-basis: calc(33.333% - 20px);
    margin-bottom: 20px;
}

/* Improve disclaimer text display */
.vacancy-disclaimer {
    width: 100%;
}

.vacancy-disclaimer .container {
    width: 100%;
    box-sizing: border-box;
}

.vacancy-disclaimer__content {
    hyphens: auto;
    white-space: normal;
    word-break: normal;
}
