/********** Template CSS **********/

.back-to-top {
    position: fixed;
    display: none;
    right: 30px;
    bottom: 30px;
    z-index: 99;
}

.fw-medium {
    font-weight: 600;
}

.mt-6 {
    margin-top: 5rem;
}

.mb-6 {
    margin-bottom: 5rem;
}

.pt-6 {
    padding-top: 5rem;
}

.pb-6 {
    padding-bottom: 5rem;
}


/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}


/*** Button ***/
.btn {
    transition: .5s;
    font-weight: 600;
    text-transform: uppercase;
}

.btn-primary,
.btn-outline-primary:hover {
    color: var(--bs-light);
}

.btn-secondary,
.btn-outline-secondary:hover {
    color: var(--bs-dark);
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-xl-square {
    width: 60px;
    height: 60px;
}

.btn-xxl-square {
    width: 75px;
    height: 75px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square,
.btn-xl-square,
.btn-xxl-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}

/*** Navbar ***/
.sticky-top {
    top: -100px;
    transition: .5s;
}

.navbar .navbar-nav .nav-link {
    margin-right: 35px;
    padding: 25px 0;
    color: var(--bs-dark);
    font-size: 16px;
    text-transform: uppercase;
    font-weight: 600;
    outline: none;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--bs-primary);
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav .nav-link {
        margin-right: 0;
        padding: 10px 0;
    }

    .navbar .navbar-nav {
        margin-top: 15px;
        border-top: 1px solid #EEEEEE;
    }
}

@media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        border: none;
        margin-top: 0;
        top: 150%;
        opacity: 0;
        visibility: hidden;
        transition: .5s;
    }

    .navbar .nav-item:hover .dropdown-menu {
        top: 100%;
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}


/*** Header ***/
.carousel .carousel-caption {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
    text-align: left;
    background: rgba(0, 0, 0, .7);
    padding: 3rem;
    padding-left: 11rem;
    z-index: 1;
}

.carousel .carousel-indicators {
    top: 0;
    bottom: 0;
    left: 0;
    right: auto;
    width: 80px;
    flex-direction: column;
    margin: 0;
    margin-left: 3rem;
}

.carousel .carousel-indicators [data-bs-target] {
    width: 70px;
    height: 70px;
    text-indent: 0;
    margin: 5px 0;
    border: 2px solid #FFFFFF;
    overflow: hidden;
}

.carousel .carousel-indicators [data-bs-target] img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 992px) {
    .carousel .carousel-item {
        position: relative;
        min-height: 600px;
    }

    .carousel .carousel-item img {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .carousel .carousel-indicators [data-bs-target] {
        width: 60px;
        height: 60px;
    }

    .carousel .carousel-caption {
        padding-left: 10rem;
    }
}

@media (max-width: 768px) {
    .carousel .carousel-item {
        min-height: 500px;
    }

    .carousel .carousel-indicators [data-bs-target] {
        width: 50px;
        height: 50px;
    }

    .carousel .carousel-caption {
        padding-left: 9rem;
    }
}

@media (min-width: 1200px) {
    .carousel .carousel-item .display-1 {
        font-size: 7rem;
    }
}

.page-header {
    background: linear-gradient(rgba(0, 0, 0, .7), rgba(0, 0, 0, .7)), url(../img/45.jpg) center center no-repeat;
    background-size: cover;
    height: 450px;
}

.page-header1 {
    background: linear-gradient(rgba(0, 0, 0, .7), rgba(0, 0, 0, .7)), url(../img/2.jpg) center center no-repeat;
    background-size: cover;
    height: 450px;
}

.page-header2 {
    background: linear-gradient(rgba(0, 0, 0, .7), rgba(0, 0, 0, .7)), url(../img/cokhi.jpg) center center no-repeat;
    background-size: cover;
    height: 450px;
}

.page-header-contact {
    background: linear-gradient(rgba(0, 0, 0, .7), rgba(0, 0, 0, .7)), url(../img/contactus.jpg) center center no-repeat;
    background-size: cover;
    height: 450px;
}


/*** About ***/
.about-img {
    position: relative;
    padding-left: 45px;
}

.about-img::before {
    position: absolute;
    content: "";
    width: 200px;
    height: 300px;
    top: 0;
    left: 0;
    border: 5px solid var(--bs-primary);
    animation: animateUpDown 3s ease-in-out infinite;
    z-index: -1;
}

@keyframes animateUpDown {
    0% {
        top: -25px;
    }

    50% {
        top: -45px;
    }

    100% {
        top: -25px;
    }
}


/*** Service ***/
.service .service-item {
    position: relative;
    margin-top: 45px;
}

.service .service-inner {
    position: relative;
    height: 100%;
    margin-top: 45px;
    background: var(--bs-white);
    box-shadow: 0 0 45px rgba(0, 0, 0, .05);
}

.service .service-inner::before {
    position: absolute;
    content: "";
    width: 100%;
    height: 0;
    left: 0;
    bottom: 0;
    transition: 1s;
    background: var(--bs-primary);
}

.service .service-inner:hover::before {
    height: 100%;
    top: 0;
}

.service .service-item img {
    margin-top: -45px;
    padding-left: 45px;
}

.service .service-item * {
    position: relative;
    transition: .5s;
    z-index: 1;
}

.service .service-item:hover h5,
.service .service-item:hover p {
    color: var(--bs-white);
}

.service .service-item:hover a {
    padding-left: 45px !important;
}


/*** Team ***/
.team .team-item {
    background: var(--bs-white);
    box-shadow: 0 0 45px rgba(0, 0, 0, .05);
}

.team .team-item .team-social {
    position: absolute;
    width: 0;
    height: 100%;
    top: 0;
    right: 0;
    transition: .5s;
    background: var(--bs-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.team .team-item:hover .team-social {
    width: 100%;
    left: 0;
}

.team .team-item .team-social .btn {
    opacity: 0;
    transition: .5s;
}

.team .team-item:hover .team-social .btn {
    opacity: 1;
}


/*** Testimonial ***/
.testimonial-img {
    position: relative;
    min-height: 400px;
    overflow: hidden;
}

.testimonial-img div {
    position: absolute;
    width: 100px;
    height: 100px;
    animation-duration: 5s;
}

.testimonial-img div:nth-child(1) {
    top: 10%;
    left: 10%;
    animation-delay: .1s;
}

.testimonial-img div:nth-child(2) {
    top: 60%;
    left: 20%;
    animation-delay: .4s;
}

.testimonial-img div:nth-child(3) {
    top: 20%;
    left: 60%;
    animation-delay: .7s;
}

.testimonial-img div:nth-child(4) {
    bottom: 10%;
    right: 10%;
    animation-delay: 1s;
}

.testimonial-img div::after {
    position: absolute;
    content: "";
    top: -1px;
    right: -1px;
    bottom: -1px;
    left: -1px;
    box-shadow: 0 0 10px 10px var(--bs-white) inset;
    z-index: 1;
}

.testimonial-carousel .owl-item img {
    width: 100px;
    height: 100px;
}

.testimonial-carousel .owl-nav {
    margin-top: 15px;
    display: flex;
}

.testimonial-carousel .owl-nav .owl-prev,
.testimonial-carousel .owl-nav .owl-next {
    margin-right: 15px;
    color: var(--bs-primary);
    font-size: 45px;
    transition: .5s;
}

.testimonial-carousel .owl-nav .owl-prev:hover,
.testimonial-carousel .owl-nav .owl-next:hover {
    color: var(--bs-dark);
}


/*** Contact ***/
.contact {
    background: linear-gradient(rgba(0, 0, 0, .7), rgba(0, 0, 0, .7)), url(../img/MAT\ TIEN.jpg) left center no-repeat;
    background-size: cover;
}

@media (min-width: 992px) {
    .contact-info::after {
        position: absolute;
        content: "";
        width: 0px;
        height: 100%;
        top: 0;
        left: 50%;
        border-left: 1px dashed rgba(255, 255, 255, .2);
    }
}

@media (max-width: 991.98px) {
    .contact-info::after {
        position: absolute;
        content: "";
        width: 100%;
        height: 0px;
        top: 50%;
        left: 0;
        border-top: 1px dashed rgba(255, 255, 255, .2);
    }
}


/*** Newsletter ***/
.newsletter {
    background: linear-gradient(rgba(0, 0, 0, .7), rgba(0, 0, 0, .7)), url(../img/GID-411.jpg) left center no-repeat;
    background-size: cover;
}


/*** Footer ***/
.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: var(--bs-secondary);
    font-weight: normal;
    text-transform: capitalize;
    transition: .3s;
}

.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: var(--bs-primary);
    margin-right: 10px;
}

.footer .btn.btn-link:hover {
    color: var(--bs-primary);
    letter-spacing: 1px;
    box-shadow: none;
}

.copyright {
    background: #010314;
}

.copyright a {
    color: var(--bs-white);
}

.copyright a:hover {
    color: var(--bs-primary);
}



/* Container chính chứa cả Logo và Marquee */
.d-flex.align-items-center {
    position: relative;
    overflow: hidden;

}

/* Fix cứng logo ở bên trái không cho chữ chạy đè lên */
.d-flex.align-items-center a {
    position: relative;
    z-index: 2;
    /* Luôn nằm trên chữ chạy */
    padding-right: 20px;
    /* Tạo khoảng cách giữa logo và chữ */
}

/* Vùng chứa chữ chạy */
.marquee-wrapper {
    flex-grow: 1;
    overflow: hidden;
    white-space: nowrap;
    z-index: 1;
}

/* Nội dung chữ chạy */
.marquee-content {
    display: inline-block;
    padding-left: 50px;
    /* Khoảng cách ban đầu khi chữ bắt đầu xuất hiện */
    animation: marquee-run 15s linear infinite;
}

/* Hiệu ứng di chuyển */
@keyframes marquee-run {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }

    /* Chạy một nửa vì nội dung đã được lặp lại 2 lần */
}

/* Dừng lại khi rê chuột vào */
.marquee-wrapper:hover .marquee-content {
    animation-play-state: paused;
}


.zalo-btn {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 65px;
    height: 65px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

/* Vòng lan */
.ring {
    position: absolute;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: rgba(0, 132, 255, 0.233);
    animation: ripple 2.5s infinite;
}

.ring2 {
    animation-delay: 0.5s;
    background-color: #097ce742;
}

.ring3 {
    animation-delay: 1s;
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    70% {
        transform: scale(2);
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

/* Icon giữa */
.icon {
    width: 52px;
    height: 52px;
    background: #097ce7;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.icon img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    /* khít logo */
    animation: shakePause 1s infinite;
}



@keyframes shakePause {
    0% {
        transform: rotate(0);
    }

    10% {
        transform: rotate(20deg);
    }

    20% {
        transform: rotate(-20deg);
    }

    30% {
        transform: rotate(20deg);
    }

    40% {
        transform: rotate(-20deg);
    }

    /* Dừng lại */
    50% {
        transform: rotate(0);
    }

    100% {
        transform: rotate(0);
    }
}



.phone-btn {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 65px;
    height: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

/* Vòng lan */
.ringphone {
    position: absolute;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: rgba(255, 0, 0, 0.3);
    animation: ripple 2.5s infinite;
}

.ringphone2 {
    animation-delay: 0.5s;
    background-color: #f73b3b39;
}

.ringhone3 {
    animation-delay: 1s;
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    70% {
        transform: scale(2);
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

/* Icon giữa */
.iconphone {
    width: 52px;
    height: 52px;
    background: #fd4531;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;


}

.iconphone img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    /* khít logo */
    animation: shakePause 1s infinite;
}



@keyframes shakePause {
    0% {
        transform: rotate(0);
    }

    10% {
        transform: rotate(20deg);
    }

    20% {
        transform: rotate(-20deg);
    }

    30% {
        transform: rotate(20deg);
    }

    40% {
        transform: rotate(-20deg);
    }

    /* Dừng lại */
    50% {
        transform: rotate(0);
    }

    100% {
        transform: rotate(0);
    }
}


.skill-section {
    display: flex;
    gap: 40px;
    align-items: center;
}

.skill-text {
    flex: 1;
}

.skill-image {
    flex: 1;
    display: flex;
    justify-content: center;
    /* canh giữa ảnh */
}

.skill-image img {
    width: 100%;

    /* giới hạn size desktop */
    height: auto;
    object-fit: cover;
}

/* 📱 Mobile */
@media (max-width: 768px) {
    .skill-section {
        flex-direction: column;
        /* xếp dọc */
        gap: 20px;
    }

    .skill-image img {
        max-width: 100%;
        /* full width mobile */
    }
}


/* Product */
/* ===== PRODUCT SECTION ===== */
.product-section {
    display: flex;
    gap: 40px;
    padding: 60px 20px;
    align-items: center;
}

.product-section.gray {
    background: #f5f5f5;
}

/* TEXT */
.product-section .content {
    flex: 1;
}

.product-section .content h2 {
    font-weight: 700;
    margin-bottom: 20px;
}

.product-section .content ul {
    padding-left: 20px;
}

.product-section .content li {
    margin-bottom: 10px;
}

/* IMAGE GRID */
.product-section .images {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.product-section .images img {
    width: 100%;

    object-fit: cover;
    border-radius: 8px;
}

/* ===== TABLET ===== */
@media (max-width: 992px) {
    .product-section {
        gap: 20px;
    }

    .product-section .images {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    .product-section {
        flex-direction: column;
        text-align: center;
    }

    .product-section .images {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-section .images img {
        height: 100px;
    }
}

/* ===== SMALL MOBILE ===== */
@media (max-width: 480px) {
    .product-section .images {
        grid-template-columns: 1fr;
    }

    .product-section .images img {
        height: auto;
    }
}


/* Section */
.product-section {
    display: flex;
    justify-content: center;
    /* ⭐ đổi từ space-between */
    align-items: center;
    gap: 30px;
    /* thay vì space-between */
    padding: 60px 5%;
    background: #f5f5f5;
    position: relative;
    overflow: hidden;
}

.content,
.images {
    flex: 1;
    /* ⭐ thay vì 40% / 60% */
}

.product-section::before {
    content: "";
    position: absolute;
    width: 300px;
    height: 120%;
    background: rgba(0, 0, 0, 0.05);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) skewX(-20deg);
    /* ⭐ chuẩn giữa tuyệt đối */
    z-index: 0;
}

@media (max-width: 768px) {
    .product-section {
        flex-direction: column;
        text-align: center;
        padding: 30px 15px;
        gap: 20px;
    }

    .content,
    .images {
        width: 100%;
        flex: unset;
    }

    .images {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        justify-items: center;
        gap: 12px;
    }

    .images img {
        width: 100%;
        max-width: 180px;
        margin: 0 auto;
        display: block;
    }

    /* ⭐ nền chéo luôn cân giữa, không lệch pixel */
    .product-section::before {
        width: 200px;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%) skewX(-15deg);
    }
}



/* Blog*/
.blog-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.blog-content {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.blog-content h2 {
    margin-top: 30px;
}


.video-wrapper {
    margin-top: 30px;
}

.image-box {
    text-align: center;
    margin: 15px 0;
}

.blog-img {
    max-width: 80%;
    height: auto;
}

.caption {
    font-size: 14px;
    color: #777;
    margin-top: 6px;
    font-style: italic;
}

/*dự án thực tế services*/
.project-before {
    padding: 40px 20px;

    .image-group {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
        margin-bottom: 25px;
        width: 100%;
    }

    .image-group img {
        width: 100%;
        
        height: 260px;
        object-fit: cover;
        border-radius: 10px;
        display: block;
        transition: 0.3s;
    }

    .image-group img:hover {
        transform: scale(1.05);
        /* giảm lại cho đỡ bể layout */
    }

    @media (max-width: 1024px) {
        .image-group {
            grid-template-columns: repeat(2, 1fr);
        }
    }

    @media (max-width: 768px) {
        .image-group {
            grid-template-columns: 1fr;
        }

        .image-group img {
            height: auto;
        }
    }

    .highlight {
        margin-top: 15px;
        font-weight: bold;
        color: #d4a017;
    }
}