* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial,sans-serif;
    line-height: 1.6;
    color: #333;
}

header {
    background: url("images/fabric-texture.png") repeat;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    gap: 20px;
}

.logo-wrapper {
    flex-shrink: 0;
}

.logo {
    height: 60px;

    /* điều chỉnh kích thước logo */
    width: auto;
    background: transparent;
    mix-blend-mode: multiply;
}

.company-logo {
    text-align: center;
    flex-grow: 1;
}

.company-logo .line-black {
    font-size: 16px;
    font-weight: bold;
    color: #222;
}

.company-logo .line-red {
    font-size: 22px;
    font-weight: bold;
    color: red;
    margin-top: 4px;
}

nav {
    flex-shrink: 0;
}

.logo {
    height: 80px;
}

.company-logo {
    text-align: center;
    font-family: Arial, sans-serif;
    font-weight: bold;
}

.company-logo .line-black {
    font-size: 22px;
    color: #222;

    /* đen */
}

.company-logo .line-red {
    font-size: 28px;
    color: red;

    /* đỏ */
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: #333;
    text-decoration: none;
    font-weight: bold;
    transition: color .3s;
}

.nav-links a:hover {
    color: #920202;
}

.lang-switch {
    margin-left: 15px;
}

.hamburger {
    display: none;
    font-size: 24px;
    cursor: pointer;
    margin-left: 15px;
}

.hero {
    position: relative;
    background: url("images/ad1.jpg") no-repeat center/cover;
    height: 80vh;
    min-height: 400px;

    /* mobile không bị thấp */
    max-height: 900px;

    /* tránh quá lớn */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
}

.ad-image {
    width: 100%;
    height: 100%;
    object-fit: cover;

    /* giữ tỷ lệ, phủ kín */
    border-radius: 8px;
}

.hero .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(1.8rem, 4vw, 3rem);

    /* responsive */
    margin-bottom: 10px;
}

.hero .btn {
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    padding: 10px 20px;
}

.btn {
    background: #8B0000;
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    transition: .3s;
}

.btn:hover {
    background: #600000;
}

.section {
    padding: 60px 20px;
}

h2 {
    margin-bottom: 20px;
    color: #ff0000;
    text-align: center;
}

.about-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.about-img {
    flex: 1 ;
}

.about-img img {
    max-width: 100%;

    /* bạn thay 400px thành size mong muốn */
    height: auto;

    /* giữ tỉ lệ */
    width: 100;
    border-radius: 10px;
}

.about-text {
    flex: 1;
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
    gap: 20px;
}

.solution-card {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: .3s;
    text-align: center;
}

.solution-card:hover {
    transform: translateY(-5px);
    background: #fff;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
    gap: 20px;
}

.card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    text-align: center;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card img {
    max-height: 180px;

    /* mobile nhỏ gọn */
}

@media (min-width: 992px) {
    .card img {
        max-height: 220px;

        /* desktop */
    }
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.contact-info,
.contact-form {
    flex: 1;
    min-width: 250px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

#contact {
    position: relative;
    color: rgb(8, 0, 0);
    z-index: 1;
    overflow: hidden;
}

#contact::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("images/contact.jpg") no-repeat center/cover;
    opacity: 0.4;

    /* 40% */
    z-index: -1;

    /* để nằm dưới chữ */
}

footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 15px 0;
    margin-top: 20px;
}

#backToTop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #8B0000;
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: none;
}

@media (max-width: 600px) {
    .back-to-top {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}

.map {
    margin-top: 30px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.map iframe {
    width: 100% !important;
    height: 300px;
}

@media (min-width: 992px) {
    .map iframe {
        height: 450px;
    }
}

.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 44px;
    height: 44px;
    border-radius: 6px;
    background: rgb(247, 6, 6);
    color: #fff;
    display: none;

    /* hiện khi cuộn xuống */
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    z-index: 2000;
}

.back-to-top.show {
    display: flex;
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: 1s;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width:768px){
    .nav-links {
        display: none;
        flex-direction: column;
        background: #fff;
        position: absolute;
        top: 100%;
        right: 0;
        width: 100%;

        /* chiếm toàn màn hình ngang */
        padding: 15px;
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    .about-container {
        flex-direction: column;
    }
}

/* Fix anchor links bị che bởi header sticky */
section {
    scroll-margin-top: 80px;

    /* tương ứng chiều cao header */
}

html {
    scroll-behavior: smooth;

    /* cuộn mượt */
}

/* Banner quảng cáo slideshow */
.ad-banner {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    transform: translateY(-50%);
    z-index: 2;
}

.ad-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;

    /* đảm bảo ảnh che kín, không méo */
    transition: opacity 0.5s ease-in-out;
}

/* Nút điều hướng nổi trên banner */
.ad-banner button {
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 22px;
}

.ad-banner .ad-prev {
    left: 20px;
}

.ad-banner .ad-next {
    right: 20px;
}

.ad-banner button:hover {
    background: rgba(0,0,0,0.8);
}

/* Dots điều hướng */
.ad-dots span {
    width: 12px;
    height: 12px;
    background: #ccc;
    border-radius: 50%;
    cursor: pointer;
}

.ad-dots span.active {
    background: #f00;
}

.ad-dots span.active {
    background: #f00;
}

.social-links {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

.social-links .social-icon {
    width: 32px;
    height: 32px;
    transition: transform 0.3s;
}

.social-links .social-icon:hover {
    transform: scale(1.1);
}

.facebook-page {
    margin-top: 15px;
}

.facebook-page iframe {
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.solution-card {
    background: #fff8dc;

    /* vàng nhạt (Cornsilk) */
    border: 1px solid #f0e68c;

    /* viền vàng nhẹ */
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.solution-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    background: #fffacd;

    /* vàng sáng hơn khi hover */
}

@media (max-width:768px) {
    .logo {
        height: 50px;
    }

    .company-logo .line-black {
        font-size: 10px;
    }

    .company-logo .line-red {
        font-size: 18px;
    }
}

@media (max-width:768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        right: 20px;
        background: #fff;
        padding: 15px;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }

    .nav-links.active {
        display: flex;
    }
}

@media (max-width:768px) {
    .hero {
        height: 60vh;

        /* ngắn lại */
        padding: 20px;
    }

    .hero-content p {
        font-size: 14px;
        padding: 8px 12px;
    }
}

@media (max-width:768px) {
    .solutions-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width:768px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width:768px) {
    .contact-container {
        flex-direction: column;
    }

    .map iframe {
        width: 100% !important;
        height: 250px;
    }
}

@media (max-width:768px) {
    .ad-banner {
        top: auto;
        bottom: 20px;

        /* đẩy nút xuống dưới */
        transform: none;
        justify-content: center;
        gap: 40px;

        /* khoảng cách giữa 2 nút */
    }

    .ad-banner button {
        font-size: 18px;
        padding: 6px 10px;
    }
}

@media (max-width: 768px) {
    .about-img img {
        max-width: 120px;

        /* nhỏ hơn */
    }
}

@media (max-width: 480px) {
    .about-img img {
        max-width: 100px;

        /* trên màn siêu nhỏ */
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        background: #fff;
        position: absolute;
        top: 60px;
        right: 20px;
        width: 200px;

        /* Giới hạn chiều rộng */
        padding: 10px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        border-radius: 8px;
    }

    .nav-links li {
        margin: 8px 0;
        text-align: center;

        /* căn chữ giữa */
    }

    .nav-links a {
        white-space: nowrap;

        /* chống xuống dòng lung tung */
        display: block;
        padding: 8px 12px;
    }
}

.mobile-break {
    display: none;
}

@media (max-width: 768px) {
    .mobile-break {
        display: inline;
    }
}
