/* === LAYOUT CHUNG & BOXES === */
.p-detail-8 {
    padding: 40px 0;
    background-color: #f7f7f7; /* Nền nhẹ nhàng cho cả section */
}
.p-detail-8 .detail-main {
    /* Sử dụng Flexbox để đặt Main và Sidebar cạnh nhau */
    display: flex;
    gap: 30px;
}
.p-detail-8 .ht-page__main {
    flex: 2; /* Phần chính rộng hơn */
}
.p-detail-8 .ht-page__sidebar {
    flex: 1; /* Sidebar hẹp hơn */
}
.p_box-shadow {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); /* Đổ bóng nhẹ nhàng */
}

/* === HEADER VỊ TRÍ & META === */
.box-content.job-header {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eee; /* Đường kẻ dưới tiêu đề */
    padding-bottom: 15px;
    margin-bottom: 20px;
}
.p_date.job-meta {
    background-color: var(--primary-color);
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
}
.p_date.job-meta .day {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
}
.p_date.job-meta .month-year {
    display: block;
    margin-top: 2px;
}
.p_tag {
    margin-left: 15px;
}
.p_tag a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border: 2px solid var(--primary-color);
    padding: 10px;
    border-radius: 4px;
}

.p_tag a:hover {
    background-color: var(--primary-color);
    color: #fff;
}
/* Tiêu đề chính */
.p_title {
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    margin-top: 15px;
    margin-bottom: 25px;
    line-height: 1.3;
}

/* Thông tin tóm tắt (Địa điểm, Lương) */
.job-info-brief {
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 15px 0;
    margin-bottom: 30px;
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}
.job-info-brief p {
    margin: 0;
    font-size: 16px;
    color: #555;
}
.job-info-brief i {
    color: var(--primary-color);
    margin-right: 5px;
}

/* === NỘI DUNG CHI TIẾT === */
.ht-format-detail h2 {
    font-size: 20px;
    font-weight: 700;
    color: black;
    margin-top: 30px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 5px;
    margin-bottom: 15px;
}
.ht-format-detail p {
    color: black;
    line-height: 1.6;
    margin-bottom: 20px;
}
.ht-format-detail ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 20px;
}
.ht-format-detail ul li {
    margin-bottom: 8px;
    color: black;
    line-height: 1.5;
}
blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 10px 15px;
    color: black;
    font-style: italic;
    background-color: #f9f9ff;
    border-radius: 4px;
    margin: 25px 0;
}

/* === BÀI VIẾT LIÊN QUAN === */
.p_other h2 {
    font-size: 20px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-top: 30px;
    margin-bottom: 15px;
}
.p_other ul {
    list-style: none;
    padding: 0;
}
.p_other ul li {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}
.p_other ul li a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}
.p_other ul li a:hover {
    color: var(--primary-color);
}

/* === FORM ỨNG TUYỂN (SIDEBAR) === */

.job-detail-form {
    background-color: #fff; /* Nền trắng */
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    position: sticky; /* Giữ form ở vị trí cố định khi cuộn */
    top: 20px; /* Khoảng cách từ đỉnh viewport */
}
.job-detail-form h3 {
    text-align: center;
    color: black;
    font-size: 20px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}
.job-detail-form .form-group {
    margin-bottom: 15px;
}
.job-detail-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
    color: black;
}
.job-detail-form input[type="text"],
.job-detail-form input[type="email"],
.job-detail-form input[type="tel"],
.job-detail-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
    transition: border-color 0.2s;
}
.job-detail-form input:focus,
.job-detail-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 5px rgba(5, 85, 170, 0.2);
}
.job-detail-form input[type="file"] {
    padding-top: 5px;
}
.job-detail-form small {
    display: block;
    color: #888;
    font-size: 12px;
    margin-top: 3px;
}
.btn-submit-app {
    width: 100%;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px 0;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
}
.btn-submit-app:hover {
    background-color: #8688ea;
}
.form-note {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    text-align: center;
}
.form-note p {
    font-size: 13px;
    color: #777;
}

.s-breadcrumb-1 {
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 0;
}
.s-breadcrumb-1 li:not(:first-child)::before {
    content: "\f101";
    font-family: FontAwesome;
    font-size: 12px;
    margin: 0 10px;
    color: #ccc;
}
.s-breadcrumb-1 li a {
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}
.s-breadcrumb-1 li a:hover {
    color: var(--primary-color);
}

.c-form-border {
    border: 1px solid #ccc;
    border-radius: 3px;
    -webkit-transition: border-color 0.3s ease-in-out;
    -o-transition: border-color 0.3s ease-in-out;
    transition: border-color 0.3s ease-in-out;
}
.c-form-border .c_input {
    padding: 1.215em 1.072em 1.215em 1.072em;
    -webkit-transition: color 0.3s ease-in-out, background-color 0.3s ease-in-out;
    -o-transition: color 0.3s ease-in-out, background-color 0.3s ease-in-out;
    transition: color 0.3s ease-in-out, background-color 0.3s ease-in-out;
}
.c-form-border .c_input:focus {
    outline: none;
    border-color: #05a;
}
.c-form-border--icon {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    flex-wrap: wrap;
}
.c-form-border--icon .c_input {
    -ms-flex: 1 1 auto;
    -webkit-box-flex: 1;
    flex: 1 1 auto;
    width: 1%;
    z-index: 2;
}
.c-form-border--icon .c_icon {
    -webkit-transition: color 0.3s ease-in-out, border-color 0.3s ease-in-out, background-color 0.3s ease-in-out;
    -o-transition: color 0.3s ease-in-out, border-color 0.3s ease-in-out, background-color 0.3s ease-in-out;
    transition: color 0.3s ease-in-out, border-color 0.3s ease-in-out, background-color 0.3s ease-in-out;
}
.c-form-border--icon .c_icon:first-child {
    padding: 0.5em 0 0.5em 1.072em;
}
.c-form-border--icon .c_icon:nth-child(2) {
    padding: 0.5em 1.072em 0.5em 0;
}
.c-form-border--icon .c_icon:not(.c_icon--top) {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
}
.c-form-border--icon .c_icon--top > i {
    position: relative;
    top: -0.142em;
}
.c-form-border--label .c_label {
    color: #999;
    background-color: #fff;
    pointer-events: none;
    padding: 0 0.358em 0 0.358em;
    z-index: 9;
    position: absolute;
    top: 0.572em;
    left: 0.715em;
    -webkit-transition: 0.3s ease all;
    -o-transition: 0.3s ease all;
    transition: 0.3s ease all;
}
.c-form-border--label:not(.is-empty) .c_label, .c-form-border--label.is-focused .c_label {
    font-size: 0.786em;
    color: #05a;
    position: absolute;
    top: -0.727em;
}
.c-form-border.is-focused {
    border-color: #05a;
}
.c-form-border.is-error {
    margin-bottom: 1.786em;
    border-color: #f55145;
}
.c-form-border.is-error .c_label {
    color: #f55145 !important;
}
.c-form-border.is-error .c_icon + .c_error {
    left: 0.143em;
    text-align: left;
}
.c-form-border.is-error .c_icon + .c_error > span {
    left: 0;
    margin: 0;
}
.c-form-border textarea.c_input + .c_error span {
    position: absolute;
    width: max-content;
    right: 0;
    top: calc(100% + 1px);
}

/* END c-form-border */
/* Style chung c-upload */
.c-upload > input {
    cursor: pointer;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    z-index: 1;
    position: absolute;
    top: 0;
    left: 0;
}

/* BEGIN c-upload-file */
.c-upload-file.c_input {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: space-between;
    justify-content: space-between;
}
.c-upload-file .c_file {
    width: calc(100% - 50px);
}
.c-upload-file .c_file > div {
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 36px;
}
.c-upload-file .c_file-filename {
    display: none;
}
.c-upload-file .c_icon {
    line-height: 0;
}
.c-upload-file .c_icon span:first-child {
    display: none;
    cursor: pointer;
    position: relative;
    z-index: 2;
}
.c-upload-file.is-active .c_file-text {
    display: none;
}
.c-upload-file.is-active .c_file-filename {
    display: block;
    color: #111;
}
.c-upload-file.is-active .c_icon span:first-child {
    display: inline-block;
}

/* ============================
   1. PC < 1200px
   ============================ */
@media (max-width: 1200px) {
    .p-detail-8 .detail-main {
        gap: 20px;
    }
    .job-detail-form {
        top: 10px;
    }
}

/* ============================
   2. 992px – 1199px
   ============================ */
@media (max-width: 1199px) {
    .ht-page__main {
        flex: 2;
    }
    .ht-page__sidebar {
        flex: 1;
    }
}

/* ============================
   3. < 992px (Tablet + Mobile)
   CHUYỂN VỀ 1 CỘT + tắt sticky
   ============================ */
@media (max-width: 992px) {

    .p-detail-8 .detail-main {
        flex-direction: column;
    }

    .ht-page__main,
    .ht-page__sidebar {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Tắt sticky để form không bị cắt */
    .job-detail-form {
        position: static !important;
        top: auto !important;
    }

    /* Giãn khoảng cách đẹp hơn */
    .ht-page__sidebar {
        margin-top: 20px;
    }
}

/* ============================
   4. < 768px (Mobile lớn)
   ============================ */
@media (max-width: 768px) {

    .p_title {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .job-info-brief {
        gap: 15px;
        font-size: 14px;
        flex-wrap: wrap;
    }

    .p_date.job-meta {
        padding: 6px 10px;
        font-size: 12px;
    }

    .box-content.job-header {
        gap: 10px;
    }

    .p_tag {
        margin-left: 0;
    }
}

/* ============================
   5. < 576px (Mobile nhỏ)
   ============================ */
@media (max-width: 576px) {

    .p-detail-8 {
        padding: 20px 0;
    }

    .p_box-shadow {
        padding: 20px;
    }

    .job-detail-form {
        padding: 20px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }

    .job-detail-form h3 {
        font-size: 18px;
    }

    input, textarea, select {
        font-size: 14px;
    }

    .job-info-brief p {
        width: 100%;
    }
}

/* ============================
   6. 375px – 475px (Mobile cực nhỏ)
   ============================ */
@media (max-width: 475px) {

    .p_title {
        font-size: 20px;
    }

    .job-info-brief {
        font-size: 13px;
    }

    .p_box-shadow {
        padding: 16px;
    }

    .job-detail-form {
        padding: 16px !important;
    }
}
