/* Hamburger */
.menu-toggle {
    display: none;
    font-size: 26px;
    color: white;
    background: none;
    border: none;
    /* position: absolute; */
    left: 20px;
    cursor: pointer;
}

/* ================= TABLET ================= */
@media (max-width: 1024px) {
    header {
        justify-content: end !important;
    }

    .headerfirst {
        padding: 10px 5%;
    }

    nav ul {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .contact-image {
        display: none !important;
    }
}

/* ================= MOBILE ================= */
@media (max-width: 768px) {

    /* Top */
    .headerfirst {
        flex-direction: row !important;
        gap: 10px;
        padding: 10px 20px;
    }

    .logo img {
        height: 35px;
    }

    /* Buttons */
    .header-buttons {
        width: 100%;
        max-width: 300px;
    }

    /* Navbar */
    .nav-container {
        justify-content: flex-end !important;
    }

    .menu-toggle {
        display: block;
        /* margin-left: auto!important;
    margin-right: 0!important; */
    }

    nav {
        width: 100%;
    }

    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        /* background: #B54614; */
        margin-top: 10px;
    }

    nav ul.active {
        display: flex;
    }

    nav ul li {
        text-align: center;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }

    nav ul li a {
        display: block;
        padding: 12px;
    }
}

/* ================= MOBILE ================= */
@media (max-width: 768px) {

    .intro {
        flex-direction: column;
        height: auto;
        padding: 20px;
        gap: 20px;
        text-align: center;
    }

    /* Ẩn phần hình để nhẹ */
    .img-content {
        display: none;
    }

    /* Content full width */
    .search-content {
        width: 100%;
        font-size: 16px;
        gap: 15px;
    }

    .content-intro {
        font-size: 20px;
        line-height: 1.4;
    }

    /* SEARCH BOX */
    .search {
        flex-direction: column;
        width: 100%;
        height: auto;
        border-radius: 20px;
        padding: 15px;
        gap: 10px;
    }

    .search-text {
        width: 100%;
        background: #f5f5f5;
        border-radius: 10px;
    }

    .input-box {
        width: 100%;
    }

    /* Dropdown */
    .dropdown {
        width: 100%;
        background: #f5f5f5;
        border-radius: 10px;
        padding: 5px 10px;
    }

    .dropdown select {
        width: 100%;
    }

    /* Ẩn line */
    .line {
        display: none;
    }

    /* Button */
    .btn-search {
        width: 100%;
        padding: 12px;
        border-radius: 12px;
    }

    /* Social */
    .social-media {
        flex-direction: column;
        gap: 10px;
        margin-top: 20px;
    }
}

@media (max-width: 768px) {

    .job-list {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
    }

    .headerfirst,
    .intro,
    .search-content,
    .news-content {
        padding-left: 5%;
        padding-right: 5%;
        width: 100%;
        overflow-x: hidden;
        /* tránh scroll ngang */
    }

    .news-item {
        /* flex: 0 0 90%; */
        /* mỗi item chiếm 90% màn hình mobile */
        max-width: 90%;
    }

    .search-content {
        width: 100%;
        /* full width */
    }
}

body {
    overflow-x: hidden;
}


/* Responsive mobile */
@media (max-width: 1024px) {
    .news-item {
        flex: 0 0 45%;
        max-width: 45%;
    }
}

@media (max-width: 768px) {
    .news-item {
        flex: 0 0 80%;
        max-width: 80%;
    }

    .type-news {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .headerfirst {
        flex-direction: row !important;
    }
.cate-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 25px;
}
    /* Container tổng */
    .hot-news {
        position: relative;
        background: linear-gradient(180deg, #F6EEDA 0%, #F6CEAE 37.74%, #FFFFFF 67.38%);
        width: 100%;
        padding: 60px 10% 40px 10%;
        display: flex;
        flex-direction: column;
        align-items: center;
        border-top-left-radius: 60px;
        border-top-right-radius: 60px;
        box-sizing: border-box;
    }
    .content-intro{
        font-size: 5vw;
    }
    .search{
        width:100% !important;
    }
    /* Tab chọn loại tin */
    .type-news {
        display: flex;
        /* gap: 15px; */
        /* margin-bottom: 24px; */
        overflow-x: auto;
        scrollbar-width: none;
        /* Firefox */
    }

    .type-news::-webkit-scrollbar {
        display: none;
    }

    /* Chrome/Safari */
    .type-news1 img {
        /* display: none; */
        width: 200px !important;
    }

    .type-news1 {
        width: 100% !important;
        position: relative;
        border: none;
        outline: none;
        background: transparent;
        padding: 0;
        /* flex: 0 0 auto; */
        /* tránh bị co lại */
    }

    /* 
    .type-news1 img {
        width: 100%;
        display: block;
    } */

    .name-type {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        font-weight: 600;
        font-size: 12px;
        line-height: 24px;
    }

    /* Container tin tức */
    .news-content {
        width: 100%;
        display: flex;
        /* gap: 16px; */
        overflow-x: auto;
        border-radius: 0;
        scroll-behavior: smooth;
        padding-bottom: 10px;
    }

    .news-content::-webkit-scrollbar {
        display: none;
    }

    /* ẩn scroll bar */

    /* Item tin */
    .news-item {
        flex: 0 0 23%;
        /* Desktop: 4 item */
        max-width: 23%;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
        box-sizing: border-box;
    }

    .news-item1 {
        background: #FCEFD3;
        border-radius: 20px 20px 0 0;
        padding: 10px;
    }

    .news-header {
        display: flex;
        gap: 10px;
        margin-bottom: 10px;
    }

    .news-image {
        width: 100%;
        border-radius: 8px;
        object-fit: cover;
    }

    .news-header h3 {
        color: #782106;
        font-weight: 600;
        font-size: 17px;
        text-transform: capitalize;
    }

    .job,
    .location {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px;
    }

    .news-item {
        flex: 0 0 90%;
        max-width: 90%;
    }

    .news-header h3 {
        font-size: 15px;
        line-height: 20px;
    }
    .job-card__save span{
        display: none !important;
    }
    .latest-jobs{
        padding: 20px 5% !important;
    }
    .header-buttons{
        width: 50%;
    }
    .header-buttons button{
        font-size: 3vw;
    }
    
}

.news-content::-webkit-scrollbar {
    display: none;
}




/* === TABLET (768px - 1024px) === */
@media (max-width: 1024px) {
    .contact-box {
        width: 80%;
        flex-direction: column;
        padding: 20px;
    }

    .contact-form {
        padding: 20px;
    }

    .contact-row {
        flex-direction: column;
    }

    .navbar {
        padding: 15px 30px;
        gap: 30px;
    }

    .nav-links {
        gap: 15px;
    }

    .info-bar {
        gap: 20px;
        padding: 10px;
    }
}

/* === MOBILE (≤768px) === */
@media (max-width: 768px) {
    .contact-section {
        padding: 50px 15px;
    }

    .contact-title {
        font-size: 24px;
    }

    .contact-desc {
        font-size: 14px;
    }

    .contact-box {
        width: 95%;
        flex-direction: column;
        padding: 15px;
        margin-top: 20px;
    }

    .contact-form {
        padding: 15px;
        gap: 10px;
    }

    .contact-row {
        flex-direction: column;
        gap: 10px;
    }

    .contact-input,
    .contact-textarea {
        font-size: 14px;
        padding: 10px;
    }

    .contact-btn {
        font-size: 14px;
        padding: 10px;
    }

    .contact-image {
        margin-top: 15px;
        height: auto;
    }

    /* Navbar */
    .navbar {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 15px;
        gap: 15px;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .nav-links li a {
        font-size: 14px;
    }

    .info-bar {
        flex-direction: column;
        gap: 10px;
        padding: 10px 5px;
        text-align: center;
    }

}

@media (max-width: 1380px) {
    .img-content {
        /* display: none !important; */
        flex: 1 !important;
    }

    /* SEARCH BOX */
    .search {
        flex-direction: column;
        width: 70%;
        height: auto;
        border-radius: 20px;
        padding: 15px;
        gap: 10px;
    }

    .search-text {
        width: 100%;
        background: #f5f5f5;
        border-radius: 10px;
    }

    .input-box {
        width: 100%;
    }

    /* Dropdown */
    .dropdown {
        width: 100%;
        background: #f5f5f5;
        border-radius: 10px;
        padding: 5px 10px;
    }

    .dropdown select {
        width: 100%;
    }

    /* Ẩn line */
    .line {
        display: none;
    }

    /* Button */
    .btn-search {
        width: 100%;
        padding: 12px;
        border-radius: 12px;
    }

    /* Social */
    .social-media {
        flex-direction: column;
        gap: 10px;
        margin-top: 20px;
    }
}

@media (max-width: 768px) {
    .search-content {
        align-items: center !important;
    }

    nav ul {
        display: none;
        /* ẩn mặc định */
        position: absolute;
        /* cho dropdown */
        top: 14%;
        /* điều chỉnh vị trí dưới hamburger */
        right: 10px;
        /* canh phải */
        width: 200px;
        /* chiều rộng bảng */
        background-color: #B54614;
        /* nền nâu */
        border-radius: 6px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        flex-direction: column;
        padding: 0;
        z-index: 1000;
    }

    nav ul.active {
        display: flex;
    }

    nav ul li {
        list-style: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
        /* đường phân cách */
        text-align: center;
    }

    nav ul li:last-child {
        border-bottom: none;
    }

    nav ul li a {
        display: block;
        padding: 12px 15px;
        color: white;
        text-decoration: none;
        font-size: 15px;
        cursor: pointer;
    }

    nav ul li a:hover {
        background-color: #9e3f0a;
    }
}

@media (max-width: 1150px) {
    .img-content{
        display: none !important;
    }
    .search-content{
        align-items: center !important;
    }
}
