/* =========================================
   THIẾT LẬP CHUNG (GENERAL STYLES)
   ========================================= */
html,
body {
  margin: 0;
  padding: 0;
  font-family: 'Noto Sans', sans-serif;
  font-size: 16px;
  background-color: rgb(240, 240, 240);
}

/* =========================================
      PHẦN HEADER (HEADER CSS)
      ========================================= */
header {
  background-color: rgb(31, 31, 31);
  color: #fff;
  position: sticky;
  /* Cố định menu khi cuộn */
  top: 0;
  z-index: 1000;
  transition: transform 0.3s ease;
  white-space: nowrap;
}

/* Hiệu ứng ẩn header khi cuộn xuống (thường dùng với JS) */
header.hide {
  transform: translateY(-100%);
}

/* Container bên trong header để giới hạn độ rộng */
header .container {
  display: flex;
  max-width: 1250px;
  margin: 0 auto;
  position: relative;
  padding: 1rem;
}

/* Logo trang web */
/* Chọn trực tiếp thẻ a có class logo-link */
.logo-link {
  text-decoration: none;
  /* Xóa gạch chân */
  color: inherit;
  /* Lấy màu chữ từ thẻ cha hoặc màu đen mặc định */
  display: inline-block;
  /* Giúp căn chỉnh dễ hơn nếu cần */
  outline: none;
  /* Xóa đường viền khi click vào */
}

/* Xóa hiệu ứng đổi màu khi đã click vào (visited) */
.logo-link:visited {
  color: inherit;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  padding: 0rem 1rem;
  border-left: 2px solid rgba(255, 255, 255, 0.7);
  border-right: 2px solid rgba(255, 255, 255, 0.7);
  cursor: pointer;
}

/* Nút bấm mở menu trên mobile */
.menu-toggle {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
}

/* Thanh điều hướng (Navigation) */
header nav {
  display: flex;
  align-items: center;
  /* căn giữa theo chiều dọc */
  gap: 1.5rem;
  padding: 0rem 1rem;
}

/* Định dạng các liên kết trong menu */
header nav a,
header nav a:visited,
header nav a:hover,
header nav a:active {
  text-decoration: none;
  color: white;
  font-size: 1.2rem;
  display: inline-block;
}

/* =========================================
      RESPONSIVE - MOBILE (MAX-WIDTH: 800PX)
      ========================================= */
@media (max-width:860px) {
  .container {
    justify-content: space-between;
    gap: 1rem;
  }

  /* Biến menu ngang thành menu dọc trên mobile */
  .menu {
    display: none;
    flex-direction: column;
    background: #1f1f1f;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    padding: 0 0 0.5rem 0;
    box-sizing: border-box;
    gap: 0;
    border-top: 1px solid #333;
  }

  .menu a {
    padding: 10px 0;
    border-bottom: 1px solid #333;
  }

  .menu-toggle {
    display: flex;
    align-items: center;
    height: 28.4px;
  }

  /* Hiển thị menu khi có class .active (kích hoạt bằng JS) */
  .menu.active {
    display: flex;
  }
}

/* Chỉnh lại bố cục tin tức trên mobile */
@media (max-width:800px) {
  .top-news {
    grid-template-columns: 1fr !important;
  }
}

/* Thêm hiệu ứng cho header */
/* =========================================
   HIỆU ỨNG BỔ SUNG CHO HEADER
   ========================================= */

/* 1. Hiệu ứng Hover cho các liên kết Menu */
header nav a {
  position: relative;
  /* Để làm đường gạch chân */
  transition: color 0.3s ease;
  padding: 5px 0;
}

/* Tạo đường gạch chân chạy từ giữa ra khi hover */
header nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: #ff0000;
  /* Màu đỏ đặc trưng thể thao, bạn có thể đổi thành trắng #fff */
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

header nav a:hover {
  color: #ff0000;
  /* Đổi màu chữ khi hover */
}

header nav a:hover::after {
  width: 100%;
  /* Đường kẻ dài ra 100% khi hover */
}

/* 2. Hiệu ứng cho Logo */
.logo {
  transition: all 0.3s ease;
  user-select: none;
}

.logo:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #ff0000;
  /* Đổi màu viền trái sang đỏ */
  border-right-color: #ff0000;
  /* Đổi màu viền phải sang đỏ */
  letter-spacing: 1px;
  /* Chữ hơi giãn ra một chút cho ngầu */
}

/* 3. Hiệu ứng cho nút Menu Toggle (Mobile) */
.menu-toggle:hover {
  color: #ff0000;
  transform: scale(1.1);
  transition: all 0.2s ease;
}

/* 4. Đổ bóng nhẹ cho Header để tạo chiều sâu khi cuộn */
header {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* 5. Hiệu ứng cho các mục menu trên Mobile (khi xổ xuống) */
@media (max-width: 800px) {
  .menu a {
    transition: all 0.4s ease;
    /* Chỉnh thời gian mượt hơn một chút */
    position: relative;
    overflow: hidden;
    border-left: 0 solid #fff;
    /* Chuẩn bị cho hiệu ứng vạch trắng */
  }

  .menu a:hover {
    /* Nền trắng mờ tỏa ra */
    background-color: rgba(255, 255, 255, 0.08);

    /* Hiệu ứng tỏa sáng (Glow) màu trắng */
    box-shadow: inset 5px 0 15px rgba(255, 255, 255, 0.1);

    /* Chữ đổi sang trắng sáng */
    color: #ffffff !important;

    /* Dịch chữ sang phải một chút */
    padding: 1rem 2rem !important;
  }

  /* Xóa gạch chân sau trên mobile */
  .menu a::after {
    display: none;
  }
}

/* =========================================
      PHẦN NỘI DUNG CHÍNH (MAIN CONTENT)
      ========================================= */
main {
  max-width: 1250px;
  margin: 0px auto;
  padding: 1rem;
}

main a {
  text-decoration: none;
  color: inherit;
  /* Lấy màu chữ từ thẻ cha (thường là đen hoặc xám) */
  display: block;
  /* Giúp bao phủ toàn bộ vùng chứa */
}

/* Đảm bảo khi di chuột vào (hover) màu sắc không bị đổi sang xanh */
main a:hover,
main a:visited,
main a:active {
  color: inherit;
  text-decoration: none;
}

/* Nếu bạn muốn tiêu đề có gạch chân khi di chuột vào (giống các trang báo) */
.hot-news h2 a:hover,
.latest-news p a:hover,
.card-content h3 a:hover,
.box h3 a:hover {
  text-decoration: underline;
  color: #000000;
}

/* Tin tức tiêu điểm */
.headline-news {
  max-width: 1250px;
  margin: auto;
  background-color: white;
  border-radius: 1rem;
  padding: 1rem;
  border: 1px solid rgba(200, 200, 200, 0.7);
}



/* Khu vực tin hàng đầu (Grid layout) */
.top-news {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  max-width: 1250px;
  margin: 20px auto;
}

/* Khối tin nóng (Hot news) */
.hot-news {
  background-color: white;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(200, 200, 200, 0.7);
}

.hot-news h2 {
  margin: 0;
  padding: 1rem;
  font-size: 1.5rem;
}

.hot-news h2:hover {
  text-decoration: underline;
  cursor: pointer;
}

/* Chỉ tập trung vào hiệu ứng khi hover */
.hot-news:hover img {
  transform: scale(1.05);
  /* Ảnh phóng to nhẹ */
  filter: brightness(0.9);
  /* Ảnh tối lại để tạo lớp mờ */
}

.hot-news img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.3s ease, filter 0.3s ease;
}

/* làm card-content cho đẹp */
.card-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

/* Thông tin bổ sung (Tác giả, ngày tháng) */
.additional-info {
  display: flex;
  padding: 1rem;
  font-size: 0.9rem;
  gap: 0.5rem;
  align-items: center;
}

.author {
  font-weight: bold;
}

.date {
  font-size: 0.8rem;
  color: rgba(0, 0, 0, 0.6);
  font-weight: 600;
  white-space: nowrap;
}

.dot {
  font-size: 1.5rem;
  color: rgba(0, 0, 0, 0.6);
}

/* Danh sách tin mới nhất bên cạnh tin nóng */
.latest-news {
  background-color: white;
  border-radius: 1rem;
  padding: 1rem;
  border: 1px solid rgba(200, 200, 200, 0.7);
}

/* Tiêu đề phân mục có đường kẻ ngang */
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title>* {
  white-space: nowrap;
}

.section-title>a {
  white-space: nowrap;
  text-decoration: underline;
}

/* Đường kẻ trang trí */
.line {
  height: 3px;
  width: 80%;
  margin: 0 1rem;
  background-color: rgba(0, 0, 0, 0.2);
}

.next-icon {
  height: 1rem;
  width: auto;
}

.title-icon {
  height: 2.5rem;
  width: auto;
  margin: 0 1rem 0 0;
}

.section-content {
  display: block;
}

.section-content .line {
  box-sizing: border-box;
  height: 1px;
  margin: 1rem 0 !important;
  width: 100%;
}

.section-content p {
  font-size: 1rem;
  margin: 0;
}

.section-content p:hover {
  text-decoration: underline;
  cursor: pointer;
}

/* Khu vực nhiều tin tức khác (Responsive grid) */
.more-news {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  max-width: 1250px;
  margin: 20px auto;
}

/* Thẻ tin tức (Card) dạng nằm ngang */
.card {
  background-color: white;
  border-radius: 1rem;
  border: 1px solid rgba(200, 200, 200, 0.7);
  overflow: hidden;
  display: flex;
  height: 120px;
}

.card h3 {
  margin: 0;
  padding: 0.5rem 1rem;
  max-height: 60px;
  overflow: hidden;
}

.card h3:hover {
  text-decoration: underline;
  cursor: pointer;
}

.card .additional-info {
  padding: 0.5rem 1rem;
}

.card img {
  height: 100%;
  aspect-ratio: 10/8;
  object-fit: cover;
}

/* Hiệu ứng*/
.card {
  transition: transform 0.3s ease-out, box-shadow 0.3s ease-in-out;
}

.card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transform: scale(1.03);
}

/* =========================================
      PHẦN THỂ THAO (SPORT SECTION)
      ========================================= */
.sport-section {
  background-color: white;
  border-radius: 1rem;
  padding: 1rem;
  border: 1px solid rgba(200, 200, 200, 0.7);
  margin: 1rem 0;
}

.sport-section h2 {
  margin: 0;
  padding: 0;
}

/* Hàng tin thể thao có thể cuộn ngang */
.sport-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 250px;
  gap: 1rem;
  max-width: 1250px;
  margin-top: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  /* Hiệu ứng hít khi cuộn */
}

/* Ẩn thanh cuộn trên trình duyệt Webkit (Chrome, Safari) */
.sport-row::-webkit-scrollbar {
  display: none;
}

.box {
  display: flex;
  flex-direction: column;
  background-color: white;
  border-radius: 1rem;
  border: 1px solid rgba(200, 200, 200, 0.7);
  overflow: hidden;
  scroll-snap-align: start;
}

/*Hiệu ứng*/
/* Chỉ tập trung vào hiệu ứng khi hover */
.box:hover img {
  transform: scale(1.05);
  /* Ảnh phóng to nhẹ */
  filter: brightness(0.9);
  /* Ảnh tối lại để tạo lớp mờ */
}

/*=====*/
.box h3 {
  margin: 0;
  padding: 0.5rem 1rem;
}

.box h3:hover {
  text-decoration: underline;
  cursor: pointer;
}

.box .additional-info {
  padding: 0.5rem 1rem;
}

.box img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.3s ease, filter 0.3s ease;
}

/* =========================================
      TIỆN ÍCH GIỚI HẠN DÒNG CHỮ (TEXT LIMIT)
      ========================================= */

/* Giới hạn văn bản tối đa 3 dòng */
.limit-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding-bottom: 0 !important;
}

/* Giới hạn văn bản tối đa 2 dòng */
.limit-text-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding-bottom: 0 !important;
}

/* =========================================
   FOOTER STYLES
   ========================================= */
footer {
  background-color: #1a1a1a;
  color: #ffffff;
  padding: 3rem 1rem 1rem 1rem;
  margin-top: 3rem;
  font-family: 'Noto Sans', sans-serif;
}

.footer-container {
  max-width: 1250px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  justify-content: space-between;
}

/* Cột thương hiệu */
.footer-brand {
  flex: 1;
  min-width: 250px;
}

.logo-footer {
  font-size: 1.8rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.tagline {
  font-size: 0.9rem;
  color: #aaa;
  margin-bottom: 1.5rem;
}

.social-icons {
  display: flex;
  gap: 1rem;
}

.social-icons a {
  color: white;
  font-size: 1.2rem;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: 0.3s;
}

.social-icons a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: white;
}

/* Cột liên kết */
.footer-links {
  flex: 2;
  min-width: 300px;
}

.footer-links h3 {
  font-size: 1rem;
  border-bottom: 1px solid #333;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.link-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  /* Chia 2 cột như Sporting News */
  gap: 1rem;
}

.link-grid a {
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.link-grid a:hover {
  text-decoration: underline;
}

/* Phần bản quyền dưới cùng */
.footer-divider {
  border: 0;
  border-top: 1px solid #333;
  max-width: 1250px;
  margin: 2rem auto;
}

.footer-bottom {
  max-width: 1250px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #888;
  padding-bottom: 1rem;
}

.region-select {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: #fff;
}

.region-select img {
  width: 18px;
}

/* Responsive cho điện thoại */
@media (max-width: 800px) {
  .footer-container {
    flex-direction: column;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
}

/* icon  ...........*/
.social-icons {
  display: flex;
  gap: 15px;
}

.social-icons a {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  background-color: transparent;
  padding: 8px;
  /* Giúp icon thu nhỏ lại bên trong vòng tròn */
  box-sizing: border-box;
  /* Đảm bảo padding không làm tăng kích thước 40px */
}

.social-icons a img {
  width: 100%;
  /* Chiếm hết phần diện tích sau khi trừ padding */
  height: 100%;
  object-fit: contain;
  /* Biến icon màu gốc thành màu trắng */
  filter: brightness(0) invert(1);
}

/* Hiệu ứng khi di chuột qua: Vòng tròn sáng lên và icon to lên chút xíu */
.social-icons a:hover {
  border-color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
}