/* =====================================================
   RESPONSIVE CSS - ViettelPost
   Breakpoints:
   - Mobile:  < 576px
   - Mobile L: 576px - 767px
   - Tablet:  768px - 1024px
   - Desktop: 1025px - 1199px
   - Wide:    >= 1200px
===================================================== */

/* ===================== GLOBAL ===================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    max-width: 100%;
}

img {
    max-width: 100%;
    height: auto;
}

iframe {
    max-width: 100%;
}

/* ===================== BANNER ===================== */
#bn img {
    width: 100%;
    height: auto;
    display: block;
}

/* ===================== HEADER ===================== */
header {
    position: relative;
    z-index: 1000;
}

.top-hd .container,
header .container {
    width: 100%;
    max-width: 1400px;
    padding-left: 15px;
    padding-right: 15px;
}

/* ===================== SECTION 1 (Tra cứu) ===================== */
#s1 .u1 {
    min-width: unset;
    width: 100%;
    max-width: 100%;
}

#s1 .ct-tracuu .ct-u2 {
    overflow-x: hidden;
}

/* ===================== SECTION 3 (Thống kê) ===================== */
#s3 .col-md-4,
#s3 .col-md-8 {
    width: 100%;
}

/* ===================== SECTION 4 (Khách hàng) ===================== */
#s4 {
    overflow: hidden;
}

/* ===================== FOOTER ===================== */
#fbot .col-md-5,
#fbot .col-md-7 {
    width: 100%;
}

footer .container {
    width: 100%;
    max-width: 1300px;
    padding-left: 15px;
    padding-right: 15px;
}

/* ===================== BTN TOMATO ===================== */
.btn-create-tomato img {
    max-width: 100%;
    min-width: unset;
    width: auto;
    height: auto;
}

/* ===================================================
   DESKTOP LARGE: max-width 1400px
=================================================== */
@media screen and (max-width: 1400px) {
    .container {
        width: 95%;
    }

    header .container {
        width: 95%;
    }
}

/* ===================================================
   DESKTOP: max-width 1199px
=================================================== */
@media screen and (max-width: 1199px) {
    #s1 .ct-tracuu .ct-u2 {
        padding: 25px 30px;
    }

    #s4 .info-kh h3 {
        font-size: 28px;
        padding-left: 50px;
        width: 85%;
    }

    #s4 .slide-ct-kh h5 {
        padding-left: 60px;
    }

    #fbot .col-md-5 {
        padding-right: 20px;
    }
}

/* ===================================================
   TABLET + NARROW DESKTOP: max-width 1145px
   (Already handled in style.css / home.css, but fixes below)
=================================================== */
@media screen and (max-width: 1145px) {
    /* Header fixes */
    .top-hd {
        padding: 12px 0;
    }

    .top-hd .row {
        align-items: center;
    }

    .logo img {
        height: 35px;
    }

    /* Navigation - hidden on mobile */
    .menu {
        display: none !important;
    }

    /* Section 1 */
    #s1 {
        padding: 20px 0 0;
    }

    #s1 .u1 {
        min-width: unset !important;
        max-width: 100% !important;
        width: 100%;
        margin-bottom: 10px;
    }

    #s1 .u1 li {
        font-size: 18px;
        line-height: 44px;
        height: 46px;
    }

    #s1 .ct-tracuu .ct-u2 {
        padding: 20px 15px;
    }

    #s1 .ct-tracuu .ct-u2 iframe {
        min-height: 350px;
    }

    /* Section 2 */
    #s2 {
        padding: 15px 0 30px;
    }

    /* Section 3 */
    #s3 .col-md-4 {
        padding: 20px 15px;
    }

    #s3 .col-md-8 {
        padding: 20px 15px;
    }

    #s3 ul {
        padding: 0;
        display: flex;
        flex-wrap: wrap;
    }

    /* Section 4 */
    #s4 {
        padding: 40px 0;
    }

    /* Footer */
    #fbot {
        padding: 30px 0 20px;
    }

    #fbot .col-md-5,
    #fbot .col-md-7 {
        flex: 0 0 100%;
        max-width: 100%;
        padding-right: 15px;
    }
}

/* ===================================================
   TABLET: 768px - 1024px
=================================================== */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    /* Header */
    .top-hd .col-md-3 {
        flex: 0 0 20%;
        max-width: 20%;
    }

    .top-hd .col-md-6.logo {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .top-hd .col-md-3.col-right {
        flex: 0 0 30%;
        max-width: 30%;
    }

    /* Section 1 */
    #s1 .u2 li {
        font-size: 14px;
        min-width: 180px;
    }

    #s1 form.phieu input {
        width: 100% !important;
    }

    /* Section 3 */
    #s3 h4 {
        font-size: 22px;
        line-height: 30px;
    }

    /* Section 4 */
    #s4 .col-md-5 {
        flex: 0 0 40%;
        max-width: 40%;
    }

    #s4 .col-md-7 {
        flex: 0 0 60%;
        max-width: 60%;
    }

    #s4 .ct-kh {
        left: -30px;
        max-width: 400px;
    }

    #s4 .info-kh h3 {
        font-size: 26px;
        padding-left: 20px;
        width: 100%;
    }

    /* Footer */
    #fbot .col-md-5,
    #fbot .col-md-7 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    #fbot .col-md-7 div.l4 {
        flex-direction: column;
    }

    /* Tracking table */
    #trackingContent table {
        font-size: 12px;
    }
}

/* ===================================================
   MOBILE LARGE: 576px - 767px
=================================================== */
@media screen and (min-width: 576px) and (max-width: 767px) {
    /* Header */
    .top-hd {
        padding: 10px 0;
    }

    .top-hd .col-md-3.cot1 {
        flex: 0 0 15%;
        max-width: 15%;
    }

    .top-hd .col-md-6.logo {
        flex: 0 0 60%;
        max-width: 60%;
        justify-content: center;
    }

    .top-hd .col-md-3.col-right {
        flex: 0 0 25%;
        max-width: 25%;
    }

    .logo img {
        height: 30px;
    }

    /* Banner */
    #bn img {
        min-height: 120px;
        object-fit: cover;
    }

    /* Section 1 */
    #s1 {
        padding: 15px 0 0;
    }

    #s1 .u1 {
        width: 100% !important;
        max-width: 100% !important;
        min-width: unset !important;
    }

    #s1 .u1 li {
        font-size: 16px;
        line-height: 40px;
        height: 42px;
    }

    #s1 .ct-tracuu .ct-u2 {
        padding: 15px 10px;
    }

    #s1 .ct-tracuu .ct-u2 iframe {
        min-height: 300px;
    }

    /* Section 2 */
    #s2 .tit-tt {
        font-size: 22px;
        line-height: 28px;
    }

    #s2 .ct-tt img {
        height: auto;
    }

    /* Section 3 */
    #s3 .row {
        flex-direction: column;
    }

    #s3 .col-md-4,
    #s3 .col-md-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    #s3 h4 {
        font-size: 20px;
        width: 100%;
    }

    #s3 ul {
        padding-left: 0;
    }

    #s3 ul li {
        width: 100%;
        float: none;
        padding-left: 80px !important;
        transform: none;
    }

    /* Section 4 */
    #s4 {
        padding: 30px 0;
    }

    #s4 .col-md-5 {
        display: none;
    }

    #s4 .col-md-7 {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0 15px;
    }

    #s4 .ct-kh {
        left: auto;
        position: relative;
        bottom: auto;
        max-width: 100%;
        padding: 20px 15px;
    }

    #s4 .info-kh h3 {
        font-size: 22px;
        padding-left: 0;
        width: 100%;
        line-height: 130%;
    }

    #s4 .slide-ct-kh h5 {
        padding-left: 0;
    }

    /* Footer */
    #fbot {
        padding: 25px 0 15px;
    }

    #fbot p.hotline {
        font-size: 24px;
    }

    #fbot .col-md-5,
    #fbot .col-md-7 {
        flex: 0 0 100%;
        max-width: 100%;
        padding-right: 15px;
    }

    #fbot .col-md-7 div.l4 {
        flex-direction: column;
    }

    /* Tracking */
    #trackingContent .trackingItem {
        flex-direction: column;
    }

    #trackingContent .trackingItem #headerTracking {
        width: 100%;
        margin-bottom: 15px;
    }
}

/* ===================================================
   MOBILE: max-width 575px
=================================================== */
@media screen and (max-width: 575px) {
    /* Container */
    .container {
        width: 100%;
        padding-left: 12px;
        padding-right: 12px;
    }

    /* Header */
    .top-hd {
        padding: 8px 0;
    }

    .top-hd .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .top-hd .col-md-3.cot1 {
        flex: 0 0 15%;
        max-width: 15%;
        display: flex;
        align-items: center;
    }

    .top-hd .col-md-6.logo {
        flex: 0 0 65%;
        max-width: 65%;
    }

    .top-hd .col-md-3.col-right {
        flex: 0 0 20%;
        max-width: 20%;
        justify-content: flex-end;
    }

    .logo img {
        height: 28px;
    }

    header .col-right .nn {
        margin-left: 8px;
    }

    header .col-right .nn img {
        width: 22px;
    }

    /* Banner */
    #bn img {
        min-height: 100px;
        object-fit: cover;
    }

    #bn:after {
        height: 3px;
    }

    /* Section 1 */
    #s1 {
        padding: 12px 0 0;
    }

    #s1 .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    #s1 .u1 {
        width: 100% !important;
        max-width: 100% !important;
        min-width: unset !important;
        margin: 0 0 10px !important;
    }

    #s1 .u1 li {
        font-size: 14px;
        line-height: 36px;
        height: 38px;
    }

    .btn-create-tomato {
        min-width: unset !important;
        max-width: 100%;
        width: 100%;
    }

    .btn-create-tomato img {
        max-width: 100%;
        min-width: unset !important;
        width: 100%;
        height: auto;
        margin: 0 !important;
    }

    #s1 .ct-tracuu .ct-u2 {
        padding: 12px 8px;
    }

    #s1 .ct-tracuu .ct-u2 iframe {
        min-height: 280px;
    }

    #s1 .u2 {
        margin-top: 15px;
        margin-bottom: -25px;
        padding-bottom: 18px;
    }

    #s1 .u2 li {
        font-size: 13px;
        line-height: 25px;
        padding-left: 50px !important;
        min-width: 170px;
    }

    #s1 .u2 li:before {
        width: 22px !important;
        height: 22px !important;
        background-size: 100% !important;
        top: 10px;
        left: 18px;
    }

    /* Section 2 */
    #s2 {
        padding: 10px 0 20px;
    }

    #s2 .tit-tt {
        font-size: 20px;
        line-height: 26px;
        text-align: center;
    }

    #s2 .view-all {
        display: none;
    }

    #s2 ul.ul-tt {
        overflow-x: auto;
        flex-wrap: nowrap;
        white-space: nowrap;
        justify-content: flex-start !important;
    }

    #s2 ul.ul-tt li {
        width: auto;
        font-size: 14px;
        line-height: 40px;
        margin-right: 10px;
    }

    #s2 .ct-tt {
        margin-top: 8px;
    }

    #s2 .ct-tt img {
        height: auto;
    }

    #s2 .des-tt h4 {
        max-width: 100%;
    }

    #s2 .box-two img {
        height: 90px;
        width: 100%;
        object-fit: cover;
    }

    /* Section 3 */
    #s3 {
        overflow: hidden;
    }

    #s3 .row {
        flex-direction: column;
    }

    #s3 .col-md-4,
    #s3 .col-md-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    #s3 h4 {
        font-size: 18px;
        line-height: 26px;
        width: 100%;
        text-align: center;
        margin: 0 auto;
        padding: 15px 0 10px;
    }

    #s3 ul {
        padding: 15px 0;
        display: flex;
        flex-wrap: wrap;
    }

    #s3 ul li {
        width: 50%;
        float: none;
        transform: none !important;
        padding: 15px 5px 15px 60px !important;
        font-size: 14px;
    }

    #s3 ul li:before {
        width: 50px !important;
        height: 40px !important;
        background-size: 45px !important;
        left: 5px !important;
        top: 30px !important;
    }

    #s3 ul li:nth-child(2):before {
        top: 22px !important;
        background-size: 45px !important;
    }

    #s3 h5 {
        font-size: 24px;
        line-height: 32px;
    }

    /* Section 4 */
    #s4 {
        padding: 20px 0;
    }

    #s4 .col-md-5 {
        display: none !important;
    }

    #s4 .col-md-7 {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0 10px;
    }

    #s4 .ct-kh {
        left: auto;
        position: relative;
        bottom: auto;
        max-width: 100%;
        padding: 15px 10px 10px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    }

    #s4 .ct-kh h4 {
        font-size: 16px;
        line-height: 150%;
    }

    #s4 .ct-kh p {
        font-size: 14px;
        line-height: 150%;
    }

    #s4 .info-kh h3 {
        font-size: 20px;
        padding-left: 0;
        width: 100%;
        line-height: 130%;
    }

    #s4 .slide-ct-kh h5 {
        padding-left: 0;
        font-size: 14px;
    }

    #s4 .img-kh-mb {
        max-width: 80px;
        max-height: 80px;
    }

    #s4 .box-kh {
        width: 100%;
        clear: both;
        display: inline-block;
        margin: 10px 0 0;
    }

    #s4 .box-kh h4 {
        font-size: 15px;
    }

    /* Footer */
    footer {
        overflow: hidden;
    }

    #ftop {
        padding: 8px 0;
    }

    #ftop img {
        max-width: 100px;
    }

    #fbot {
        padding: 20px 0 10px;
    }

    #fbot:before {
        display: none;
    }

    #fbot h3 {
        font-size: 14px;
        line-height: 20px;
    }

    #fbot h4 {
        font-size: 16px;
        margin-bottom: 8px;
    }

    #fbot p {
        font-size: 13px;
        line-height: 18px;
    }

    #fbot p.hotline {
        font-size: 22px;
    }

    #fbot .col-md-5,
    #fbot .col-md-7 {
        flex: 0 0 100%;
        max-width: 100%;
        padding-right: 12px;
    }

    #fbot .col-md-7 div.l4 {
        flex-direction: column;
    }

    #fbot ul li {
        font-size: 13px;
        line-height: 24px;
    }

    #fbot ul.soical a {
        margin-right: 12px;
    }

    #fbot ul.soical a img {
        height: 25px;
    }

    #copyight {
        font-size: 11px;
        padding: 10px;
    }

    /* Mobile menu */
    .menu_mb {
        width: 100%;
        height: auto;
        top: 68px;
    }

    .divmm {
        padding: 15px;
    }

    .menu_mb li a {
        font-size: 18px;
        line-height: 34px;
    }

    .menu_mb .hotline {
        font-size: 18px;
        line-height: 32px;
    }

    /* Tracking */
    #trackingContent {
        padding-top: 5px;
        padding-bottom: 5px;
    }

    #trackingContent .PaneTop {
        width: 100%;
    }

    #trackingContent .trackingItem {
        display: block;
    }

    #trackingContent .trackingItem #headerTracking {
        width: 100%;
        margin-bottom: 15px;
    }

    #trackingContent .trackingItem.active {
        padding: 10px;
    }

    #trackingContent table {
        font-size: 11px;
        width: 600px;
    }

    /* Estimate fee form */
    #s1 .ct-tracuu .ct2 .uoctinh-container .form-domestic select,
    #s1 .ct-tracuu .ct2 .uoctinh-container .form-domestic input {
        width: 100% !important;
    }

    #s1 .ct-tracuu .ct2 .form-group label {
        display: block;
        width: 100%;
        font-size: 13px;
    }

    /* Service items */
    #s1 .ct-tracuu.two .list-item.service > .item {
        width: 100%;
    }

    #s1 .ct-tracuu.two .list-item.service > .item > div {
        padding: 12px;
        border-radius: 12px;
    }

    /* Form buttons */
    #s1 form button,
    #s1 .ct1 #btnSearch {
        width: 100%;
        text-align: center;
        padding: 0 15px;
    }

    /* Fix for .d-block d-md-flex */
    .d-block.d-md-flex {
        flex-direction: column;
        align-items: flex-start !important;
    }

    /* Go to top button */
    .go_top {
        bottom: 80px;
        right: 15px;
    }

    .go_top img {
        width: 45px;
        height: 45px;
    }
}

/* ===================================================
   VERY SMALL MOBILE: max-width 375px
=================================================== */
@media screen and (max-width: 375px) {
    .logo img {
        height: 24px;
    }

    #s1 .u1 li {
        font-size: 12px;
        line-height: 32px;
        height: 34px;
    }

    #s1 .u2 li {
        font-size: 11px;
        min-width: 140px;
        padding-left: 42px !important;
    }

    #s3 ul li {
        font-size: 12px;
        padding-left: 48px !important;
    }

    #fbot p.hotline {
        font-size: 18px;
    }

    #fbot h4 {
        font-size: 14px;
    }

    .menu_mb li a {
        font-size: 16px;
    }
}

/* ===================================================
   FIX: Prevent horizontal scroll
=================================================== */
@media screen and (max-width: 1145px) {
    body {
        overflow-x: hidden;
    }

    .row {
        margin-left: -10px;
        margin-right: -10px;
    }

    [class*="col-"] {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* ===================================================
   FIX: Table overflow on small screens
=================================================== */
@media screen and (max-width: 767px) {
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }
}

/* ===================================================
   FIX: News section grid on mobile
=================================================== */
@media screen and (max-width: 575px) {
    #s2 .col-md-8,
    #s2 .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0;
    }

    #s2 .box-two .col-md-4 {
        flex: 0 0 35%;
        max-width: 35%;
        padding: 0;
    }

    #s2 .box-two .col-md-8 {
        flex: 0 0 65%;
        max-width: 65%;
        padding-left: 8px;
    }

    #s2 .ct-tt .box-two .des-tt {
        padding: 8px;
        height: 100%;
    }

    #s2 .box-two .img-tt img {
        height: 80px;
        object-fit: cover;
    }
}

/* ===================================================
   FIX: mega menu should not overflow
=================================================== */
@media screen and (max-width: 1145px) {
    .main-mn .w-100,
    .megaparent > .sub-menu {
        display: none !important;
    }
}

/* ===================================================
   FIX: Support fixed widget
=================================================== */
@media screen and (max-width: 575px) {
    #ml-menu-fixed {
        zoom: 0.75;
        right: 0 !important;
    }
}

/* ===================================================
   FIX: FAQ section (ct5)
=================================================== */
@media screen and (max-width: 767px) {
    #s1 .ct-u2.ct5 .d-flex {
        flex-direction: column;
    }

    #s1 .ct-u2.ct5 img {
        max-width: 200px;
        margin: 15px auto 0;
        display: block;
    }

    #s1 .ct-u2.ct5 h2 {
        font-size: 20px;
    }
}

/* ===================================================
   FIX: Uoc tinh cuoc phi form on mobile
=================================================== */
@media screen and (max-width: 767px) {
    .uoctinh-tabs {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .uoctinh-tabs .tab-button {
        flex: 1 1 45%;
        font-size: 13px;
        padding: 8px 10px;
        white-space: normal;
        text-align: center;
    }

    .form-domestic .form-group {
        margin-bottom: 12px;
    }

    .form-domestic select,
    .form-domestic input[type="text"],
    .form-domestic input[type="number"] {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* ===================================================
   FIX: Autocomplete list on mobile
=================================================== */
@media screen and (max-width: 767px) {
    #suggestions_reciever_city {
        max-height: 200px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ===================================================
   FIX: News/Blog section on tablet
=================================================== */
@media screen and (min-width: 768px) and (max-width: 1145px) {
    #s2 .row > [class*="col-"] {
        margin-bottom: 20px;
    }

    #s2 .box-two .img-tt img {
        height: 130px;
        object-fit: cover;
    }

    #s2 .ct-tt .box-two .des-tt {
        padding: 12px;
    }
}

/* ===================================================
   FIX: Logo and header centering
=================================================== */
@media screen and (max-width: 767px) {
    .top-hd .row {
        position: relative;
        align-items: center;
        flex-wrap: nowrap;
    }

    .cot1 {
        order: 1;
    }

    .logo {
        order: 2;
        text-align: center;
    }

    .col-right {
        order: 3;
    }
}

/* ===================================================
   FIX: Menu mobile overlay on small screens
=================================================== */
@media screen and (max-width: 480px) {
    .menu_mb {
        width: 100%;
    }

    .menu_mb li a {
        font-size: 16px;
        line-height: 30px;
    }

    .menu_mb .hotline {
        font-size: 16px;
        line-height: 28px;
    }

    .divmm {
        padding: 10px 12px;
    }
}

/* ===================================================
   FIX: Section 3 statistics on all mobile
=================================================== */
@media screen and (max-width: 767px) {
    #s3 .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 20px 15px;
    }

    #s3 .col-md-8 {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 20px 15px;
    }
}

/* ===================================================
   FIX: Prevent banner overflow
=================================================== */
#bn .owl-carousel {
    overflow: hidden;
}

#bn .owl-carousel .item img {
    width: 100%;
    height: auto;
    min-height: 80px;
    object-fit: cover;
}

@media screen and (max-width: 575px) {
    #bn .owl-carousel .item img {
        min-height: 100px;
        max-height: 200px;
    }

    #bn .owl-dots {
        bottom: 8px;
        left: 40%;
    }
}

/* ===================================================
   FIX: Iframe responsive
=================================================== */
iframe {
    max-width: 100%;
}

@media screen and (max-width: 767px) {
    #s1 .ct-tracuu .ct-u2 iframe {
        min-height: 300px;
        height: auto;
    }

    #s1 .ct-tracuu .ct3 iframe {
        height: 400px;
    }
}
