* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
:root {
  --primary-color: #ff6b6b;
  --secondary-color: #4facfe;
}
body {
  font-family: "Quicksand", sans-serif;
  margin: 0;
  background: linear-gradient(180deg, #6666ff 0%, #ffccff 50%, #99ccff 100%);
  color: #2d3436;
  scroll-behavior: smooth;
  font-family: "Quicksand", sans-serif;
  flex-direction: column;
  align-items: center;
}

/* ============ NAVBAR ============ */
.main-nav {
  background: rgba(255, 255, 255, 0.95);
  padding: 10px 30px;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--primary-color);
}
/* Logo container - nằm trong nav */
.nav-logo-container {
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
  transition: transform 0.3s;
}
.nav-logo-container:hover {
  transform: scale(1.05);
}
.main-nav ul li a:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}
.nav-logo-img {
  height: 50px;
  width: 50px;
  border-radius: 50%;
  border: 3px solid var(--primary-color);
  padding: 2px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(255, 107, 107, 0.3);
}
.nav-logo-text {
  display: flex;
  flex-direction: column;
}
.nav-logo-main {
  font-family: "Dancing Script", cursive;
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1;
}
.nav-logo-sub {
  font-size: 12px;
  color: #666;
  font-style: italic;
  margin-top: 2px;
}
/* Menu - nằm trong nav */
.nav-menu {
  display: flex;
  list-style: none;
  gap: 25px;
  margin: 0;
  padding: 0;
}
.nav-menu li {
  position: relative;
}
.nav-menu a {
  text-decoration: none;
  color: #333;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 25px;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-menu a:hover {
  color: var(--primary-color);
  background: rgba(255, 107, 107, 0.1);
}
.nav-menu a.active {
  background: linear-gradient(to right, #ff6b6b, #ff8e8e);
  color: white;
  box-shadow: 0 4px 10px rgba(255, 107, 107, 0.3);
}
/* Mobile menu toggle - nằm trong nav - ĐÃ SỬA THIẾU } */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--primary-color);
  cursor: pointer;
}
/* ============ HERO SECTION ============ */
header {
  height: 100dvh;
  background:
    linear-gradient(45deg, rgba(255, 107, 107, 0.6), rgba(79, 172, 254, 0.6)),
    url("bia-lop.jpg");
  background-size: cover;
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
  padding-top: 80px;
  background-position: center;
}
header h1 {
  font-family: "Dancing Script", cursive;
  font-size: 5rem;
  margin: 0;
  animation: fadeIn 2s;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}
/* Countdown Timer */
.countdown-container {
  /* 1. Nền trắng cực mỏng để tạo cảm giác kính */
  background: rgba(255, 255, 255, 0.15) !important;

  /* 2. Hiệu ứng làm mờ ảnh phía sau (QUAN TRỌNG) */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); /* Hỗ trợ Safari */

  /* 3. Viền mỏng để định hình khối kính */
  border: 1px solid rgba(255, 255, 255, 0.2);

  /* 4. Các thuộc tính bạn đã có */
  border-radius: 15px;
  padding: 20px;
  display: flex;
  justify-content: center;
  gap: 15px;
}
.time-box {
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
  min-width: 80px;
}
.time-box span {
  display: block;
  font-size: 2.5rem;
  margin-bottom: 5px;
  font-weight: bold;
  color: white;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 1); /* Giúp số dễ đọc trên mọi nền ảnh */
}
/* ============ CONTENT SECTIONS ============ */
.content-section {
  max-width: 1100px;
  margin: 100px auto;
  padding: 40px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
}
h2.section-title {
  text-align: center;
  font-size: 2.5rem;
  background: linear-gradient(to right, #ff6b6b, #4facfe);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 40px;
}
/* Gallery Masonry */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 15px;
}
.gallery img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  filter: grayscale(30%);
  transition: 0.5s;
  cursor: pointer;
}
/* Achievements / Timeline */
.timeline {
  border-left: 3px solid var(--secondary-color);
  padding-left: 20px;
  margin-left: 20px;
}
.event {
  margin-bottom: 30px;
  position: relative;
}
.event::before {
  content: "";
  position: absolute;
  left: -31px;
  top: 5px;
  width: 15px;
  height: 15px;
  background: var(--primary-color);
  border-radius: 50%;
}
/* Guestbook Form */
.guestbook textarea {
  width: 100%;
  padding: 15px;
  border-radius: 10px;
  border: 1px solid #ddd;
  margin-bottom: 10px;
  font-family: inherit;
}
.btn-submit,
.btn-delete {
  background: linear-gradient(to right, #ff6b6b, #ff8e8e);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
}
.btn-submit:hover,
.btn-delete:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
footer {
  background: #2d3436;
  color: white;
  text-align: center;
  padding: 50px 0;
  margin-top: 100px;
}
/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .main-nav {
    padding: 10px 20px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    display: none;
    gap: 15px;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-logo-main {
    font-size: 22px;
  }

  .nav-logo-img {
    height: 40px;
    width: 40px;
  }
}
/* ============ ĐỒNG HỒ ĐẾM NGƯỢC (TRONG SUỐT CÒN VIỀN) ============ */
.countdown-container {
  /* Nền trắng siêu mỏng (0.05) */
  background: rgba(255, 255, 255, 0.2) !important;

  /* Làm mờ ảnh phía sau vừa phải (8px) để không che mặt nhưng vẫn làm nổi số */
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;

  /* Viền trắng mỏng tạo cảm giác cao cấp */
  border: 1px solid rgba(255, 255, 255, 0.3) !important;

  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.time-box span {
  display: block;
  font-size: 3rem;
  font-weight: 800;
  color: white;
  /* Đổ bóng chữ đen đậm để đọc rõ số trên nền ảnh sáng */
  text-shadow: 2px 2px 12px rgba(0, 0, 0, 0.9) !important;
}

.time-box small {
  font-size: 1rem;
  text-transform: uppercase;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.8);
}
/* Lưới bài viết */
.grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  max-width: 1000px;
  margin: 0 auto;
}
/* Item bài viết */
.card {
  position: relative;
  overflow: hidden;
  border-radius: 5px;
  aspect-ratio: 16 / 9;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}
.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Lớp phủ văn bản bên dưới hình ảnh */
.card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(28, 58, 105, 0.75); /* Màu xanh Navy trong suốt */
  color: white;
  text-align: left;
  font-size: 40px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.card-overlay p {
  display: inline-block; /* Quan trọng: Để lấy được độ dài thực của chữ */
  padding-left: 100%; /* Đẩy chữ bắt đầu từ cạnh phải của card */
  letter-spacing: 3px;
  font-weight: 600;
  font-size: 40px;
  text-transform: uppercase;
  transition: 0.5s;
  padding: 0 10px;
}
.card:hover .card-overlay p {
  animation: marquee 5s linear infinite; /* Chạy trong 5 giây, lặp vô tận */
  text-align: left; /* Chuyển về bên trái để bắt đầu chạy từ đầu dòng */
  padding-left: 100%; /* Bắt đầu chạy từ mép phải vào */
}

@keyframes marquee {
  0% {
    transform: translate(11%);
  }
  100% {
    transform: translateX(-100%);
  }
}
.main-content {
  display: block;
  text-align: center;
  width: 100%;
}
.grid-container-1 {
  display: inline-block;
  flex-wrap: wrap; /* Tự động xuống hàng nếu hết chỗ */
  gap: 20px;
  justify-content: center;
  max-width: 1000px;
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: flex-start;
  width: 100%;
}
.title-gmtb {
  display: inline-block; /* Ép tiêu đề thành một khối riêng chiếm hết hàng */
  width: auto; /* Đảm bảo độ rộng phủ hết trang */
  font-size: 18px;
  font-weight: bold;
  color: #333;
  text-transform: uppercase;
  border-bottom: 4px solid #c02e2e;
  margin: 20px 0;
  line-height: 1.2;
  text-align: center;
}

/* Từng ô cá nhân */
.member-card {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  width: 200px;
  padding: 20px;
  text-align: center;
  transition: 0.3s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  flex: 0 0 calc((100% - 40px) / 3);
  box-sizing: border-box;
}
/* Hiệu ứng khi di chuột vào */
.member-card:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-color: #0056b3;
}
/* Ảnh đại diện */
.member-card img {
  display: inline;
  width: 125px;
  height: 125px; /* Tỉ lệ ảnh thẻ */
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 15px;
  border: 1px solid #eee;
  object-position: center 20%;
  color: #666;
  margin-bottom: 5px;
  text-transform: uppercase;
}
.member-card:hover img {
  transform: scale(1.2); /* Ảnh to lên một chút khi hover */
}
.role {
  font-size: 14px;
  color: #888;
  margin-bottom: 15px;
  font-weight: 500;
  display: block;
}

/* Tên thành viên */
.name {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  text-transform: uppercase; /* Viết hoa tên cho mạnh mẽ */
  letter-spacing: 1px;
}
.an {
  object-position: center 25%;
}
.wrapper {
  width: 90%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.grid-container-1 a {
  text-decoration: none;
  display: inline-block;
}
#home,
#about,
#gallery,
#achievements,
#contact {
  scroll-margin-top: 80px;
}
