html, body {
    overflow-x: hidden;
}

.container{
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 15px;
}

.text-center {
    text-align: center;
}
/* Search Filters Form */
.search-filters {
    background-color: var(--color-bg-white);
    padding: 15px 20px;
    border-radius: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 50px;
    box-shadow: var(--shadow-lg);
    margin-top: 50px;
}

.search-filters .search-btn img {
    width: 24px;
    height: 24px;
}

.filter-group {
    flex: 1;
    display: flex;
    align-items: center;
    position: relative;
}

.filter-group select {
    width: 100%;
    padding: 12px 35px 12px 15px;
    border: none;
    background: transparent;
    font-size: 16px;
    cursor: pointer;
    color: var(--color-text-dark);
    appearance: none;
    font-weight: 400;
}

.filter-arrow {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.filter-group:not(:last-child) {
    border-right: 1px solid var(--color-border-light);
}

.search-btn {
    background-color: var(--color-primary);
    color: var(--color-bg-white);
    padding: 11px 34px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    transition: background-color 0.3s;
}

.search-btn:hover {
    background-color: var(--color-primary-hover);
}

.search-btn svg {
    width: 18px;
    height: 18px;
    fill: var(--color-bg-white);
}

/* Custom Select Dropdown */
.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 35px 12px 15px;
    border: none;
    background: transparent;
    font-size: 16px;
    cursor: pointer;
    color: var(--color-text-dark);
    font-weight: 400;
    text-align: left;
}

.custom-select-trigger .arrow {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    transition: transform 0.3s ease;
}

.custom-select-wrapper.open .custom-select-trigger .arrow {
    transform: translateY(-50%) rotate(180deg);
}

.custom-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg-white);
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: 5px;
}

.custom-select-wrapper.open .custom-select-options {
    display: block;
}

.custom-select-option {
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
    color: var(--color-text-dark);
    transition: background-color 0.2s;
    word-wrap: break-word;
    white-space: normal;
}

.custom-select-option:hover {
    background-color: var(--color-bg-light);
}

.custom-select-option.selected {
    background-color: var(--color-primary);
    color: var(--color-bg-white);
}

/* Hide native select when using custom */
.filter-group .native-select {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 100%;
    height: 100%;
}

/* Custom scrollbar for options */
.custom-select-options::-webkit-scrollbar {
    width: 6px;
}

.custom-select-options::-webkit-scrollbar-track {
    background: transparent;
}

.custom-select-options::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
}

.custom-select-options::-webkit-scrollbar-thumb:hover {
    background-color: #aaa;
}

/* Job Table */
.job-table {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-x: hidden;
}

.job-table-header {
    display: flex;
    align-items: center;
    background-color: var(--color-primary);
    color: var(--color-bg-white);
    font-weight: 700;
    font-size: 17px;
    padding: 13px 30px;
    border-radius: 10px;
    line-height: 38px;
    text-transform: uppercase;
}

.job-table-header .col-position {
    color: var(--color-bg-white);
}

.job-table-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.job-row {
    display: flex;
    align-items: center;
    padding: 14px 26px;
    font-size: 17px;
    background-color: var(--color-bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border-card);
    line-height: 100%;
    color: var(--color-primary);
}

.col-position {
    flex: 4.5;
    font-weight: 700;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.col-position a {
    color: var(--color-primary);
    text-decoration: none;
}

.col-position a:hover {
    text-decoration: underline;
}

.col-salary {
    flex: 2;
    text-align: left;
    font-weight: 700;
}

.col-deadline {
    flex: 1;
    text-align: center;
    font-weight: 700;
}

.col-action {
    flex: 1;
    text-align: right;
}

.btn-apply {
    display: inline-block;
    padding: 10px 12px;
    border: 1px solid var(--color-primary);
    border-radius: 10px;
    color: var(--color-primary);
    font-size: 17px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-apply:hover {
    background-color: var(--color-primary);
    color: var(--color-bg-white);
}

.badge-hot {
    display: inline-block;
    background-color: #dc3545;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
    text-transform: uppercase;
}

/* Workplace Section */
.workplace-section {
    background-color: var(--color-bg-light);
    padding: 70px 0;
    overflow-x: hidden;
}

.workplace-section .container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

.workplace-row {
    display: flex;
    align-items: center;
    gap: 92px;
}

.workplace-text {
    flex: 1;
}

.workplace-text h2 {
    font-size: 38px;
    font-weight: 700;
    color: var(--color-primary);
    font-family: "Inter";
    line-height: 52px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.workplace-text p {
    font-size: 18px;
    line-height: 27px;
    color: var(--color-primary);
    font-family: "Inter";
    font-weight: 600;
    text-align: justify;
}

.workplace-video {
    flex: 1.2;
    display: flex;
    align-items: center;
    gap: 17px;
}

.video-placeholder {
    flex: 1;
    border-radius: 10px;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 616px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #333;
    cursor: pointer;
}

.play-btn {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.slider-arrow {
    border: none;
    background: none;
    font-size: 24px;
    color: var(--color-primary);
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}

.slider-arrow:hover {
    opacity: 0.7;
}

.video-slider {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.video-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

.video-slide.active {
    position: relative;
    opacity: 1;
    visibility: visible;
}

.video-slider:not(:has(.active)) .video-slide:first-child {
    position: relative;
    opacity: 1;
    visibility: visible;
}

/* ========== RESPONSIVE ========== */

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }

    /* Search Filters */
    .search-filters {
        flex-wrap: wrap;
        gap: 10px;
        padding: 15px;
        margin-top: 30px;
        margin-bottom: 30px;
    }

    .filter-group {
        flex: 1 1 calc(50% - 10px);
        min-width: 150px;
    }

    .filter-group:not(:last-child) {
        border-right: none;
    }

    .filter-group select {
        padding: 10px 30px 10px 12px;
        font-size: 14px;
    }

    .search-btn {
        flex: 1 1 100%;
        justify-content: center;
        padding: 12px 20px;
    }

    /* Job Table */
    .job-table-header {
        display: none;
    }

    .job-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 15px;
    }

    .col-position,
    .col-salary,
    .col-deadline,
    .col-action {
        flex: none;
        width: 100%;
        text-align: left !important;
    }

    .col-salary::before {
        content: "Lương: ";
        font-weight: 400;
    }

    .col-deadline::before {
        content: "Hạn nộp: ";
        font-weight: 400;
    }

    .col-action {
        margin-top: 5px;
    }

    .btn-apply {
        width: 100%;
        text-align: center;
    }

    /* Workplace Section */
    .workplace-row {
        flex-direction: column;
        gap: 40px;
    }

    .workplace-text h2 {
        font-size: 28px;
        line-height: 38px;
    }

    .workplace-text p {
        font-size: 16px;
        line-height: 24px;
    }

    .workplace-video {
        order: 2;
        width: 100%;
        max-width: 100%;
        justify-content: center;
        gap: 10px;
    }

    .video-placeholder {
        width: 100%;
        max-width: 100%;
    }

    .video-slider {
        max-width: 100%;
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    .search-filters {
        flex-direction: column;
        border-radius: 15px;
        margin-top: 20px;
        margin-bottom: 20px;
    }

    .filter-group {
        flex: 1 1 100%;
        width: 100%;
        border-bottom: 1px solid var(--color-border-light);
        padding-bottom: 10px;
    }

    .filter-group:last-of-type {
        border-bottom: none;
        padding-bottom: 0;
    }

    .job-row {
        font-size: 15px;
    }

    .col-position a {
        font-size: 16px;
        line-height: 1.4;
    }

    .btn-apply {
        font-size: 15px;
        padding: 12px 15px;
    }

    /* Workplace Section */
    .workplace-section {
        padding: 40px 0;
    }

    .workplace-text {
        text-align: center;
    }

    .workplace-text h2 {
        font-size: 24px;
        line-height: 32px;
    }

    .workplace-text p {
        font-size: 15px;
        text-align: center;
    }

    .slider-arrow {
        display: flex;
        padding: 5px;
    }

    .slider-arrow img {
        width: 10px;
        height: 20px;
    }

    .play-btn {
        width: 50px;
        height: 50px;
    }

    .play-btn img {
        width: 40px;
        height: 40px;
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .search-filters {
        padding: 12px;
    }

    .filter-group select {
        font-size: 13px;
        padding: 8px 25px 8px 10px;
    }

    .search-btn {
        font-size: 14px;
        padding: 10px 15px;
    }

    .job-row {
        padding: 12px;
        font-size: 14px;
    }

    .badge-hot {
        font-size: 10px;
        padding: 2px 6px;
    }

    .btn-apply {
        font-size: 14px;
        padding: 10px 12px;
    }

    .workplace-text h2 {
        font-size: 20px;
        line-height: 28px;
    }

    .workplace-text p {
        font-size: 14px;
        line-height: 22px;
    }
}
