/* Reset cơ bản */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: var(--site-bg);
  color: var(--site-text);
  padding-top: 60px;
  /* Để tránh bị che header cố định */
  padding-bottom: 71px;
}

/* I. Header */
#header {
  width: 100%;
  height: 60px;
  background-color: var(--header-bg);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 10px;
}

.header-content {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 0 10px;
}

.logo img {
  max-height: 100%;
  max-width: 120px; /* giúp logo co lại ở màn nhỏ */
  height: auto;
}

.header-img {
  display: flex;
  flex-direction: column;
  /* Sắp xếp theo cột: icon ở trên, text bên dưới */
  align-items: center;
}

.header-img img {
  width: 30px;
  height: 30px;
  object-fit: cover;
}

.header-icon-text {
  margin-top: 2px;
  /* Khoảng cách giữa icon và text */
  font-size: 12px;
  /* Kích thước chữ có thể điều chỉnh */
  color: var(--secondary-color);
}

/* II. Banner */
#banner {
  width: 90%;
  max-width: 800px;
  /* Giá trị tối đa tuỳ ý */
  margin: 15px auto;
  position: relative;
  overflow: hidden;
  /* Sử dụng aspect-ratio để giữ tỉ lệ 407: 120 */
  aspect-ratio: 407 / 120;
}

.slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.slide.active {
  opacity: 1;
}

#banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider-dots {
  position: absolute;
  bottom: 5px;
  width: 100%;
  text-align: center;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 4px;
  background-color: #ccc;
  border-radius: 50%;
}

.dot.active {
  background-color: var(--primary-color);
}

/* III. Marquee */
#marquee {
  width: 90%;
  max-width: 800px;
  overflow: hidden;
  white-space: nowrap;
  margin: 8px auto;
  background-color: transparent;
  padding: 3px;
}

.marquee-content {
  display: inline-block;
  padding-left: 100%;
  animation: marquee 20s linear infinite;
}

@keyframes marquee {
  from { transform: translateX(0);
}

to {
  transform: translateX(-100%);
}

}

/* IV. Quảng cáo thu hút (Advertisement) */
#ad {
  width: 95%;
  max-width: 1000px;
  margin: 5px auto;
  /* Giữ tỉ lệ 407: 94 */
  aspect-ratio: 407 / 94;
  background-image: url('qc1.avif');
  /* Thay bằng ảnh nền thực tế */
  background-size: cover;
  background-position: center;
  position: relative;
  /* Để có thể định vị phần counter tuyệt đối bên trong */
  overflow: hidden;
}

/* Phần số đếm (counter) với các biến để tùy chỉnh kích thước, màu sắc và vị trí */
#ad #counter {
  position: absolute;
  /* Vị trí có thể điều chỉnh qua biến CSS, mặc định nằm ở giữa */
  top: var(--counter-top, 90%);
  left: var(--counter-left, 50%);
  transform: translate(-50%, -50%);
  /* Kích thước và màu sắc */
  font-size: var(--counter-font-size, 20px);
  font-weight: var(--counter-font-weight, bold);
  color: var(--counter-color, var(--secondary-color));
}

/* V. Phần hiển thị các nút */
#buttons-section {
  width: 90%;
  max-width: 800px;
  margin: 10px auto;
  display: flex;
}

.btn-left {
  margin-left: auto;        /* đẩy nhóm nút sang phải */
  display: flex;
  gap: 8px;                 /* khoảng cách giữa nút Registro và Login */
}

.btn-left .action-btn {
  padding: 6px 14px;
  font-size: 16px;
  background-color: var(--btn-bg, #ffcc00);
  border-radius: 7px;
  color: var(--btn-text-color, #fff);
  border: 2px solid var(--btn-border-color, #ffcc00);
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

/* VI. Phần hiển thị ảnh */
#image-section {
  width: 90%;
  max-width: 800px;
  margin: 10px auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.square-img {
  width: 100%;
  /* Để giữ tỷ lệ vuông, sử dụng padding-top hoặc thuộc tính aspect-ratio */
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* VII. Thông tin trang */
#page-info {
  width: 90%;
  max-width: 800px;
  margin: 10px auto;
  font-size: 18px;
  line-height: 1.5;
  text-align: justify;
}

/* VIII. Footer */
#footer {
  width: 100%;
  height: 65px;
  background-color: var(--footer-bg);
  position: fixed;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

/* Các mục trong Footer */
.footer-item {
  display: flex;
  flex-direction: column;
  /* Sắp xếp theo cột: icon ở trên, text bên dưới */
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 12px;
}

.footer-item img {
  width: 30px;
  height: 30px;
  object-fit: cover;
  margin-bottom: 2px;
}

/* Container cho slider icon */
#icon-slider {
  width: 100%;
  max-width: 800px;
  /* bạn có thể điều chỉnh phù hợp */
  margin: 10px auto;
  overflow: hidden;
}

/* Sử dụng flex để xếp icon theo hàng ngang */
.icon-container {
  display: flex;
  gap: 20px;
  transition: transform 0.3s ease;
  font-size: 16px;
}

/* Đặt kích thước cố định cho mỗi icon */
.icon-item {
  min-width: 100px;
  text-align: center;
  cursor: pointer;
}

.icon-item img {
  width: 40px;
  height: 30px;
  object-fit: cover;
  display: block;
  margin: 0 auto;
  /* Kích thước icon */
  height: 30px;
}

/* Phần ảnh gallery */
#gallery {
  width: 100%;
  max-width: 800px;
  margin: 20px auto;
  text-align: center;
}

#gallery img {
  width: 100%;
  max-width: 800px;
  height: auto;
}

/* Đảm bảo body tràn đầy màn hình */
body {
  font-family: sans-serif;
}

/* Khu vực slider icon */
#icon-slider {
  width: 100%;
  max-width: 600px;
  /* Để chỉ hiển thị khoảng 5 icon, bạn điều chỉnh phù hợp */
  margin: 10px auto;
  overflow-x: auto;
  /* Cho phép cuộn ngang */
  -webkit-overflow-scrolling: touch;
}

.icon-container {
  display: flex;
  gap: 10px;
  /* Nếu muốn animation trượt, có thể dùng transition transform */
  transition: transform 0.3s ease;
}

.icon-item {
  min-width: 80px;
  text-align: center;
  cursor: pointer;
}

.icon-link {
  display: inline-block;
  text-decoration: none;
  color: #333;
}

/* Cấu hình cho section ảnh */
section[id^="image"] {
  width: 90%;
  margin: 10px auto;
  /* Giảm khoảng cách trên dưới */
  text-align: center;
}

/* Cấu hình cho các ảnh bên trong section */
section[id^="image"] img {
  width: 100%;
  /* Ảnh co giãn theo chiều rộng container */
  height: auto;
  /* Giữ tỷ lệ tự nhiên của ảnh */
  margin-bottom: 10px;
  border: none;
}

.image-with-label {
  display: flex;
  align-items: center;
  margin-left: 10px;
}

.image-with-label img {
  width: 40px;
  height: 30px;
  object-fit: cover;
}

.image-with-label span {
  margin-left: 10px;
  /* Khoảng cách giữa ảnh và văn bản */
  font-size: 18px;
  /* Có thể điều chỉnh kích thước chữ */
  color: var(--site-text);
}


/* Đồng bộ lại icon-item để tránh lệch */
.icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 80px;
}

.icon-item img {
  width: 40px;
  height: 30px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.icon-item span {
  margin-top: 4px;
  font-size: 16px;
  line-height: 1.2;
}
