* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: rgb(0, 102, 255);
    font-family: 'Times New Roman', Times, serif;
    line-height: 1.6;
}

header {
  background-image: url('z6976777946340_a043ddec5a8721fe8cc14c2c4da82bdd.jpg');
  background-size: cover;
    background-position: center;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: row;
    text-align: center;
    color: white;
    font-size: 12px;
    font-family: 'Times New Roman', Times, serif;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.main-menu {
    background-color: #f8da4a;
    padding: 12px 0;
}

.main-menu ul {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-menu li {
    margin: 0 10px;
}

.main-menu li a {
    text-decoration: none;
    color: black;
    font-size: 16px;
    font-weight: bold;
    padding: 10px 16px;
    border-radius: 8px;
    background-color: #fff176;
    transition: background-color 0.3s;
}

.main-menu li a:hover {
    background-color: #ffee58;
}


nav ul {
    list-style: none;
    padding: 1rem;
}

nav ul li {
    display: inline;
    margin: 0 1rem;
}

nav ul li a {
  color: white;
  text-decoration: none;
  border: 2px solid rgb(0, 132, 255);
  padding: 0.5rem 1.2rem;
  border-radius: 6px;
  margin: 0 0.5rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
  display: inline-block;
  user-select: none; /* Ngăn chọn chữ khi click */
}

nav ul li a:hover {
  background-color: rgb(0, 132, 255);
  color: #f9f9f9;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2),
  0 0 8px rgba(255,255,255,0.6);
}

/* Khi nhấn giữ chuột */
nav ul li a:active {
  transform: translateY(1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

section {
    font-size: 18px;
    margin-bottom: 3rem;
    border-radius:12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 2rem;
    border: 1px solid #e0e0e0;
}

h1 {
    color: violet;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h2 {
    color: #004d40;
    font-size: 30px;
    text-align: center;
    margin-bottom: 2rem;
}

.textbox {
    background-color: white;
    padding: 2rem;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tin-tuc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.tin-tuc-grid article {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.tin-tuc-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
}

footer {
    background-color:#9e9c9cab ;
    color: white;
    padding: 2rem;
    text-align: center;
}

footer h3 {
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    nav ul li {
        display: block;
        margin: 0.5rem 0;
    }
    
    .tin-tuc-grid {
        grid-template-columns: 1fr;
    }
}
section h2 {
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    color: #004d40;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background-color: #004d40;
}
.hinh-anh-grid article:hover {
    transform: translateY(-5px);
}
html {
  scroll-behavior: smooth;
}
/* 🌞 Chế độ sáng (mặc định) */
body {
  background-color: #f5f5f5;
  color: #009CFF;;
  transition: background-color 0.4s, color 0.4s;
}

/* 🌙 Chế độ tối */
body.dark-mode {
  background-color: #0f172a;
  color: #009CFF;;
}

/* Làm sáng chữ trong các phần tử nội dung khi bật dark mode */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode p,
body.dark-mode li,
body.dark-mode a {
  color: #ffffff !important;
}

/* Giữ nền trắng của khung nội dung, nhưng làm nhẹ hơn để dễ đọc */
body.dark-mode section,
body.dark-mode .tin-tuc-grid,
body.dark-mode div {
  background-color: #1e293b !important;
}

/* Riêng vùng footer (nếu có) */
body.dark-mode footer {
  background-color: #2c2c2c;
  color: #eee;
}
/* --- Dark Mode cho phần Tin tức - Sự kiện --- */
body.dark-mode #tin-tuc {
  background-color: #1e293b !important; /* nền khối tin tức */
}

body.dark-mode .tin-tuc-grid article {
  background-color: #334155 !important; /* nền cho từng bài */
  border-radius: 10px;
  padding: 10px;
}

body.dark-mode .tin-tuc-grid h3,
body.dark-mode .tin-tuc-grid h4 {
  color: #f8fafc !important; /* chữ sáng dễ đọc */
}

body.dark-mode .tin-tuc-grid img {
  border: 2px solid #475569; /* viền nhẹ cho ảnh */
  border-radius: 6px;
}
body {
  background-color: #f8fafc;
  color: #1e293b;
  transition: background-color 0.3s, color 0.3s;
}

body.dark-mode {
  background-color: #0f172a;
  color: #f1f5f9;
}

#toggle-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: #444;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: 0.3s;
}

#toggle-btn:hover {
  background-color: #666;
}
/* Giữ vị trí slideshow trong trang */
.slideshow-wrapper {
  max-width: 800px;
  width: 100%;
  height: 400px;
}
.slideshow-container img {
  width: 81%;
  height: 65%;
}
.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background-color: #e0e0e0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.slide.active {
  opacity: 1;
}

/* Nội dung dưới slideshow */
.content {
  max-width: 800px;
  margin: 20px auto;
  padding: 10px;
}
video {
      max-width: 100%;
      border: 2px solid #2c3e50;
      border-radius: 8px;
    }


