/* Styling chung cho footer */
.main-footer {
  background: #333; /* Nền tối */
  color: #fff; /* Chữ trắng */
  padding: 40px 20px; /* Khoảng đệm trên dưới và hai bên */
  font-family: Arial, sans-serif;
}

.footer-content {
  display: flex; /* Sử dụng Flexbox cho các phần của footer */
  justify-content: space-around; /* Phân bổ không gian đều giữa các mục */
  flex-wrap: wrap; /* Cho phép các mục xuống dòng nếu không đủ chỗ */
  max-width: 1200px; /* Chiều rộng tối đa của nội dung footer */
  margin: 0 auto; /* Căn giữa nội dung footer */
}

.footer-section {
  flex: 1; /* Mỗi phần chiếm ít nhất 1 phần không gian */
  min-width: 250px; /* Chiều rộng tối thiểu cho mỗi phần trước khi xuống dòng */
  margin: 20px; /* Khoảng cách giữa các phần */
}

.footer-section h3 {
  color: #00bcd4; /* Màu tiêu đề */
  margin-bottom: 15px;
  font-size: 1.2rem;
}

.footer-section p {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 10px;
}

/* Phần liên hệ và mạng xã hội */
.footer-section .contact span {
  display: block; /* Mỗi mục liên hệ trên một dòng mới */
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.footer-section .contact i {
  margin-right: 10px;
  color: #00bcd4;
}

.footer-section .socials a {
  color: #fff;
  font-size: 1.5rem;
  margin-right: 15px;
  transition: color 0.3s ease;
}

.footer-section .socials a:hover {
  color: #00bcd4;
}

/* Phần liên kết nhanh */
.footer-section.links ul {
  list-style: none; /* Bỏ dấu chấm của list */
}

.footer-section.links ul li {
  margin-bottom: 10px;
}

.footer-section.links ul li a {
  color: #fff;
  text-decoration: none; /* Bỏ gạch chân */
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.footer-section.links ul li a:hover {
  color: #00bcd4;
}

/* Phần đăng ký nhận tin */
.footer-section.newsletter .text-input {
  width: calc(100% - 90px); /* Chiều rộng input, trừ đi nút đăng ký */
  padding: 10px;
  border: none;
  border-radius: 5px;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.footer-section.newsletter .btn-subscribe {
  padding: 10px 15px;
  background: #00bcd4;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.3s ease;
}

.footer-section.newsletter .btn-subscribe:hover {
  background: #0097a7;
}

/* Phần bản quyền */
.footer-bottom {
  text-align: center;
  padding-top: 20px;
  margin-top: 30px;
  border-top: 1px solid #555; /* Đường kẻ phân cách */
  font-size: 0.85rem;
  color: #aaa;
}

.footer-section.legal ul {
  list-style: none; /* Bỏ dấu chấm của list */
}

.footer-section.legal ul li {
  margin-bottom: 10px;
}

.footer-section.legal ul li a {
  color: #fff;
  text-decoration: none; /* Bỏ gạch chân */
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.footer-section.legal ul li a:hover {
  color: #00bcd4;
}

/* --- Media Queries cho Responsive --- */

/* Trên màn hình vừa (tablet, khoảng 768px trở xuống) */
@media (max-width: 768px) {
  .footer-content {
    flex-direction: column; /* Xếp chồng các mục theo chiều dọc */
    align-items: center; /* Căn giữa các mục khi xếp chồng */
  }

  .footer-section {
    width: 90%; /* Mỗi phần chiếm gần hết chiều rộng */
    max-width: 400px; /* Giới hạn chiều rộng để không quá lớn trên tablet */
    margin: 20px 0; /* Khoảng cách giữa các phần khi xếp chồng */
    text-align: center; /* Căn giữa nội dung trong mỗi phần */
  }

  .footer-section h3 {
    margin-bottom: 10px;
  }

  .footer-section .contact span {
    display: inline-block; /* Hiển thị inline để tiết kiệm không gian */
    margin: 0 10px 10px 10px;
  }

  .footer-section .socials {
    margin-top: 15px;
  }

  .footer-section.newsletter .text-input {
    width: 80%; /* Giảm chiều rộng input */
    max-width: 300px;
  }
}

/* Trên màn hình nhỏ (điện thoại, khoảng 480px trở xuống) */
@media (max-width: 480px) {
  .main-footer {
    padding: 30px 15px; /* Giảm khoảng đệm */
  }

  .footer-section {
    margin: 15px 0; /* Giảm khoảng cách giữa các phần */
    min-width: unset; /* Bỏ giới hạn min-width */
    width: 100%; /* Đảm bảo chiếm đủ chiều rộng */
  }

  .footer-section h3 {
    font-size: 1.1rem;
  }

  .footer-section p,
  .footer-section a,
  .footer-section span {
    font-size: 0.9rem;
  }

  .footer-section .socials a {
    font-size: 1.3rem;
    margin: 0 8px; /* Giảm khoảng cách giữa các icon mạng xã hội */
  }

  .footer-section.newsletter .text-input,
  .footer-section.newsletter .btn-subscribe {
    width: 100%; /* Cho input và button chiếm hết chiều rộng */
    display: block; /* Mỗi cái trên một dòng */
    margin-bottom: 10px; /* Khoảng cách giữa input và button */
  }
}