* {
  box-sizing: border-box; /*tránh lỗi tràn layout*/
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Arial, sans-serif;
}

body {
  background: #f5f5f5; /*màu xám nhẹ*/
}

.container {
  /* Website không full màn hình, luôn căn giữa */
  width: 90%;
  margin: auto;
}

/* Banner */
.banner img {
  width: 100%;
  display: block;
  border-radius: 10px;
}

/* Menu */
.menu {
  background: #c62828;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: relative;
}

.menu ul {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center; /* thêm dòng này */
  margin: 0;
  padding: 0;
}

.menu li {
  padding: 0 20px;
  display: flex;
  align-items: center;
  height: 50px;
  position: relative; /* QUAN TRỌNG để dropdown không bị lệch */
}

.menu a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: 0.3s;
}

.menu a:hover {
  color: #ffc107;
}

/* Dropdown menu */
.menu ul ul {
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  background: #eee;
  min-width: 250px; /* QUAN TRỌNG */
  z-index: 1000;

  padding: 10px 0;
}

/* Hiện menu */
.menu ul li:hover ul {
  opacity: 1;
  visibility: visible;
}

/* Menu con */
.menu ul ul li {
  display: block;
  width: 100%;
}

/* Link menu con */
.menu ul ul li a {
  display: block;
  padding: 10px 15px;
  color: black;

  white-space: nowrap; /* QUAN TRỌNG: không xuống dòng */
}

/* Hover */
.menu ul ul li a:hover {
  background: #ddd;
}
.menu {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.menu ul {
  display: flex;
}

.menu .search {
  display: flex;
  align-items: center;
  height: 50px; /* QUAN TRỌNG: khớp menu */
}

.menu .search input {
  height: 30px;
  border: none;
  padding: 0 10px;
  outline: none;
  border-radius: 15px 0 0 15px;
}

.menu .search button {
  height: 30px;
  border: none;
  padding: 0 12px;
  background: #ff9800;
  color: white;
  border-radius: 0 15px 15px 0;
  cursor: pointer;
}

.menu .search button:hover {
  background: #e68900;
}
/* MARQUEE */
.marquee {
  width: 100%;
  overflow: hidden;
  background: #fffacd;
  height: 40px;
  line-height: 40px;
  position: relative;
}

.marquee-text {
  position: absolute;
  white-space: nowrap;
  animation: chaychu 20s linear infinite;
  font-weight: bold;
  color: #d71920;
}

@keyframes chaychu {
  0% {
    left: 100%;
  }
  100% {
    left: -100%;
  }
}

/* Main layout */
.main {
  display: flex;
  gap: 20px;
  margin: 20px auto;
}

/* Left */
.left {
  width: 70%;
}
/* NEWS CARD (nâng cấp mạnh) */
.news {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  background: white;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: 0.3s;
}

.news:hover {
  transform: translateY(-4px);
}

.news img {
  width: 220px;
  height: 140px;
  object-fit: cover;
}
.news a:hover {
  color: #c62828;
  display: flex;
}

a {
  text-decoration: none;
  color: black;
}

a:hover {
  text-decoration: none;
}

/* Line */
hr {
  margin: 25px 0;
  border: none;
  height: 1px;
  background: #ddd;
}
.news-explore {
  justify-content: center;
  padding: 10px 0;
  background: #f5f5f5;
  border-radius: 0 0 12px 12px;
  margin-left: 30px;
}
/* Right */
.right {
  width: 30%;
}

/* Sidebar box */
.box {
  margin-bottom: 20px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Title */
.title {
  background: #c62828;
  color: white;
  padding: 12px;
  font-weight: bold;
}

/* List */
.box ul {
  background: white;
  list-style: none;
  padding: 10px 15px;
}

.box li {
  line-height: 30px;
  border-bottom: 1px solid #eee;
  transition: 0.3s;
}

.box li:hover {
  background: #f5f5f5;
  padding-left: 5px;
}
.box img {
  width: 120px;
  margin-right: 20px;
  display: flex;
}

/* Footer */
.footer {
  background: #fff8dc;
  margin-top: 30px;
}

.menu-footer {
  background: #c62828;
}

.menu-footer ul {
  display: flex;
  justify-content: center;
  list-style: none;
}

.menu-footer li {
  padding: 0 20px;
  line-height: 40px;
}

.menu-footer a {
  color: white;
  text-decoration: none;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  padding: 20px 0;
  color: #c62828;
  font-size: 14px;
}

.right-text {
  text-align: right;
}

/* Responsive */

@media (max-width: 768px) {
  /* Layout chuyển 1 cột */
  .main {
    flex-direction: column;
  }

  .left,
  .right {
    width: 100%;
  }

  /* Menu dọc */
  .menu ul {
    flex-direction: column;
    align-items: flex-start;
  }

  .menu li {
    width: 100%;
    padding: 10px;
  }

  /* News co lại */
  .news {
    flex-direction: column;
  }

  .news img {
    width: 100%;
    height: auto;
  }

  /* Ảnh toàn site */
  img {
    max-width: 100%;
    height: auto;
  }

  /* Footer xuống dòng */
  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .right-text {
    text-align: center;
    margin-top: 10px;
  }
}
