/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Căn chỉnh toàn bộ trang */
body {
    height: 2000px;
    font-family: Arial, sans-serif;
    background-color: #f4f5f7; /* Nền xám nhạt chuyên nghiệp */
    text-align: center;
    color: #333; /* Màu chữ chính */
}

/* Nút back to top */
#backToTop {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #ffffff;
    color: #0070c0; /* Xanh đậm IO DATA */
    padding: 15px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    width: 50px;
    height: 50px;
    text-align: center;
    line-height: 20px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
}
#backToTop:hover {
    background: #0070c0;
    color: white;
}

/* Header */
header {
    background-color: #003366;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

/* Footer */
footer {
    text-align: center;
    background-color: #003366;
    padding: 15px;
    color: white;
}

/* Logo */
.logo img {
    max-width: 40%;
    height: auto;
    max-height: 40px;
}

/* Navigation */
nav ul {
    list-style: none;
    display: flex;
    gap: 15px;
}

nav a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    margin: 20px auto;
}

.banner {
  width: 100%;
  max-width: 950px;
  height: 300px;
  overflow: hidden;
  position: relative;
  margin: 0 auto;
  border-radius: 5px;
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

.banner-slide {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  display: none;
  border-radius: 5px;
  animation: fade 3s ease-in-out;
}

.banner-slide.active {
  display: block;
}

/* Đảm bảo hình ảnh giữ đúng tỉ lệ */
.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* hoặc object-fit: contain nếu muốn giữ nguyên tỉ lệ ảnh */
  border-radius: 5px;
}


@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Danh sách sản phẩm */
.products {
    max-width: 90%;
    margin: 20px auto;
}

/* Container sản phẩm */
.product-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

/* Box sản phẩm */
.product-box {
    background: #ffffff;
    border-radius: 10px;
    padding: 20px;
    width: 80%;
    max-width: 90%;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}
.product-box:hover img {
    transform: translateX(10px);
    transition: transform 0.55s ease-in-out;
}

/* Kích thước ảnh sản phẩm */
.product-box img {
    width: 300px;
    height: auto;
    border-radius: 5px;
    margin-bottom: 10px;
}

/* Tiêu đề sản phẩm */
.product-box h3 {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: bold;
}

/* Mô tả sản phẩm */
.product-description {
    background-color: #e6f0fa; /* xanh nhạt sạch sẽ */
    padding: 10px;
    border-radius: 8px;
    max-width: 90%;
    margin: 0 auto;
    line-height: 1.6;
}

/* Mô tả trang chủ */
.home-description {
    background-color: #e6f0fa;
    padding: 10px;
    border-radius: 8px;
    max-width: 90%;
    margin: 0 auto;
    line-height: 1.6;
    position: relative;
}

/* Đường phân cách */
.separator {
    width: 80%;
    height: 5px;
    background-color: #cccccc;
    margin: 30px auto;
    border-radius: 2px;
}

/* Section chung */
section {
    padding: 40px 20px;
    margin: 20px auto;
    max-width: 90%;
    border-radius: 10px;
}

/* Màu nền section */
#home,
#products,
#contact {
    background-color: #f0f4f8;
}
/* Tiêu đề section */
h2 {
    text-align: center;
    font-size: 28px;
    color: black;
    margin-bottom: 20px;
}

/* Container hình ảnh trang chủ */
.home-container {
    display: inline-flex;
    align-items: center;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    padding: 20px;
    max-width: 80%;
    margin: 0 auto;
    justify-content: space-between;
    gap: 20px;
}

/* Tiêu đề trang chủ */
.home-title {
    font-size: 28px;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    color: black;
}

/* Container phần liên hệ */
.contact {
    background-color: #f0f4f8;
    max-width: 90%;
    margin: 20px auto;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

/* Tiêu đề liên hệ */
.contact-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
    color: black;
}

/* Container hình + nội dung */
.contact-container {
    display: inline-flex;
    align-items: center;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    padding: 20px;
    max-width: 80%;
    margin: 0 auto;
    justify-content: space-between;
    gap: 20px;
}

/* Hình liên hệ */
.contact-image {
    width: 15%;
    height: auto;
    border-radius: 10px;
    padding: 20px;
}

/* Nội dung liên hệ */
.contact-content {
    flex: 1;
    padding: 10px;
    text-align: left;
    border-radius: 10px;
}
.contact-content p {
    font-size: 16px;
    margin: 5px 0;
}

/* Responsive cho mobile */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    nav ul {
        flex-direction: column;
        padding: 0;
        margin: 0;
    }

    nav ul li {
        margin: 10px 0;
    }

    .home-container,
    .product-container,
    .contact-container {
        flex-direction: column;
        align-items: center;
        padding: 10px;
    }

    .home-image,
    .contact-image {
        width: 100%;
        height: auto;
        padding: 10px;
    }

    .home-content,
    .contact-content {
        padding: 0 10px;
        text-align: center;
    }

    .product-box {
        width: 100%;
        margin-bottom: 20px;
    }

    .product-box img {
        width: 90%;
        max-width: 250px;
        margin: 0 auto;
    }

    .product-description {
        padding: 15px;
        font-size: 14px;
    }

    .contact-container {
        flex-direction: column;
    }

    .contact-image {
        width: 60%;
        padding: 10px;
    }

    .contact-content {
        text-align: center;
    }

    #backToTop {
        right: 10px;
        bottom: 10px;
        font-size: 18px;
        padding: 10px;
    }

    footer {
        text-align: center;
        font-size: 14px;
        padding: 15px;
    }
}
#penguin {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  animation: float 3s ease-in-out infinite;
}

#penguin img {
  width: 100px;
  height: auto;
}

/* Sóng nhẹ nhàng như trang gốc */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}
#contact-popup {
  position: fixed;
  bottom: 100px;
  right: 40px;
  background: white;
  border: 2px solid #ccc;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 0 15px rgba(0,0,0,0.2);
  z-index: 10000;
  width: 220px;
  display: none;
  animation: fadeIn 0.3s ease;
}

.popup-content h3 {
  margin-top: 0;
  font-size: 18px;
  color: #333;
}

.popup-content p {
  margin: 8px 0;
  font-size: 14px;
  color: #555;
}

.popup-content .close-btn {
  position: absolute;
  top: 5px;
  right: 10px;
  cursor: pointer;
  font-size: 18px;
  color: #999;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
