﻿
@media screen and (max-width:1400px) {
    .idx_popup {
        top: 90px !important;
        left: 0 !important;
        padding: 0 10px;
    }
}

@media screen and (max-width:620px) {
    .idx_popup {
        top: 75px !important;
        width: 100%
    }

        .idx_popup .popup_bar {
            padding: 0 5px
        }

        .idx_popup .con {
            width: 100% !important;
            height: auto !important;
        }

            .idx_popup .con img {
                width: 100% !important;
                height: auto !important;
            }
}



@media (max-width: 900px) {
    .formbox-2col {
        flex-direction: column;
        gap: 0;
    }

    .col-left, .col-right {
        width: 100%;
        gap: 12px;
    }
}

/* Responsive tab: mobile nhỏ hơn, dễ bấm, có thể cuộn ngang */


#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(1,66,152,0.10);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    width: 54px;
    height: 54px;
    border: 5px solid #eaf6fe;
    border-top: 5px solid #014298;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 2px 18px rgba(1,66,152,0.09);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}


/* Mobile & Tablet */
@media (max-width: 900px) {
    .timeline-wrapper {
        padding: 20px 0 16px 0;
    }

    .timeline-bar {
        flex-wrap: nowrap;
/*        overflow-x: auto;*/
/*        padding-bottom: 10px;*/
        /* Ẩn scrollbar nhưng vẫn cuộn được */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

        .timeline-bar::-webkit-scrollbar {
            display: none;
        }

    .timeline-item {
        min-width: 40px;
        flex: none;
    }

    .timeline-label {
        font-size: 0.95em;
        top: 28px;
    }

    .timeline-dot {
        width: 18px;
        height: 18px;
        border-width: 3px;
    }

    .timeline-track, .timeline-progress {
        height: 4px;
    }

    .event-view {
        flex-direction: column !important;
        gap: 20px;
        min-height: 0;
        margin-top: 24px;
        align-items: stretch;
        max-width: 100vw;
    }

    .event-img-wrap img {
        height: auto;
        width: 100%;
        max-width: 360px;
        min-width: 0;
        border-radius: 10px;
    }

    .event-img-wrap {
        width: 100%;
        display: block;
        text-align: center;
    }

    .event-date-onimg {
        top: 10px;
        left: 10px;
        font-size: 1em;
        padding: 5px 10px;
        border-radius: 6px;
    }

    .event-content {
        max-width: 100%;
        padding: 18px 12px;

    }

    .event-title {
        font-size: 1.4em !important;
    }

    .event-desc {
        font-size: 1.2em !important;
    }

    .sidebar-nav {
        min-width: 100%;
        margin-bottom: 1rem;
    }

    .nav-pills .nav-link {
        justify-content: flex-start;
    }
}

/* Siêu nhỏ - điện thoại dưới 400px */
@media (max-width: 400px) {
    .timeline-label {
        font-size: 0.85em;
        top: 24px;
    }

    .event-title {
        font-size: 1em;
    }

    .event-date-onimg {
        font-size: 0.95em;
        padding: 4px 8px;
    }
}


/* ✅ Responsive cho màn hình nhỏ */
@media (max-width: 768px) {
    .event-view {
        flex-direction: column !important;
        gap: 16px;
    }

    .event-img-wrap, .event-content {
        max-width: 100%;
        flex: 1 1 100%;
        padding: 0px !important;
    }

    .event-date-onimg {
        font-size: 1.5rem;
        top: 8%;
    }
}


/* Responsive cho màn hình nhỏ */
/*@media (max-width: 768px) {
    .history_area .box .cont {
        width: 100%;*/ /* Chiếm toàn bộ chiều rộng */
        /*float: none;*/ /* Bỏ float để xếp dọc */
        /*margin: 0;
        padding: 0 15px;*/ /* Padding nhỏ cho đẹp */
    /*}

    .history-hover .hover-img-new {
        width: 100%;*/ /* Đảm bảo ảnh full width */
        /*max-height: 300px;*/ /* Giới hạn chiều cao nếu cần */
        /*object-fit: cover;*/ /* Cắt ảnh cho đẹp */
    /*}
}*/


@media screen and (max-width: 768px) {
    .history_area .box {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

        .history_area .box .cont,
        .history_area .box .cont.left {
            width: 100%;
            text-align: left;
            margin-left: 0;
            margin-right: 0;
            padding-left: 20px; /* tạo khoảng cách với đường timeline */
        }

            /* Đường timeline căn giữa */
            .history_area .box .cont:after {
                left: 0.9px !important;  /* dịch sang trái */
                height: 100%;
            }


            .history_area .box .cont.active:before {
                left: -6px ;
            }

    .pg_wrap .pg a {
        display: inline-block;
        width: 1.5em; /* giảm từ 2.5em xuống 2em */
        height: 1.5em; /* giảm chiều cao */
        border-radius: 50%;
        font-size: 1rem; /* chữ nhỏ hơn một chút */
        color: #b2b2b2;
        vertical-align: middle;
        text-align: center;
        line-height: 1em; /* khớp với chiều cao */
        background: #f5f5f5; /* nền nhạt cho nút chưa active */
        margin: 0 4px; /* khoảng cách giữa các nút */
        transition: all 0.3s ease;
        text-decoration: none;
    }

    .hover-text {
        top: 17px;
        left: -10px;
       
    }

    /* Nếu .cont có class left thì canh phải */
    .history-hover.cont.left .text-item {
        text-align: left !important;
    }
    .history-hover .text-item {
        text-align: left !important;
    }
}


/* Tablet & mobile lớn: 2 cột */
@media (max-width: 768px) {
    .tab_box ul {
        grid-template-columns: repeat(2, 1fr);
        position: static;

    }


        .tab_box ul li a {
            padding: 9px 6px !important;
            letter-spacing: 0 !important;
            text-align: center !important
        }

}

.btn-close-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(var(--bs-link-color-rgb),var(--bs-link-opacity,1)); /* Xanh đậm Hyundai */
    color: #fff;
    font-size: 18px;
    text-decoration: none;
    transition: background 0.3s ease;
}

    .btn-close-circle:hover {
        background-color: #0050b3; /* Xanh sáng hơn khi hover */
        color: #fff;
    }

    .btn-close-circle i {
        font-weight: bold;
    }


