* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: sans-serif;
}

/* --- HEADER & NAVIGATION --- */
header {
  background: #0077b6;
  color: #fff;
  text-align: center;
  padding: 20px;
}
nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  background: #023e8a;
  flex-wrap: wrap;
}
nav a {
  color: #fff;
  text-decoration: none;
  padding: 10px 15px;
}
nav a:hover {
  background: #0096c7;
  border-radius: 5px;
}

/* --- HERO SECTION --- */
.hero {
  background-image: url("./img/anhbiendep.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
  font-size: 2.5em;
  font-weight: bold;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.35);
  z-index: 0;
}
.hero h2 {
  position: relative;
  z-index: 1;
}

/* --- CARD CONTAINER (Quan trọng) --- */
.content {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px; /* Khoảng cách giữa các card */
  padding: 40px 20px;
  box-sizing: border-box;
}

/* --- CARD STYLE (Đã sửa width) --- */
.card {
  /* 1. Công thức chính xác cho 3 card/hàng trên màn hình lớn */
  width: calc(33.333% - 13.333px);
  min-width: 280px;

  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  color: inherit;
  text-align: left;
}
.card:hover {
  /* Hiệu ứng hover được giữ lại */
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}
.card img {
  width: 100%;
  height: 200px; /* Chiều cao ảnh */
  object-fit: cover;
  display: block;
}
.card h3 {
  padding: 10px;
  color: #0077b6;
}
.card p {
  padding: 0 10px 15px;
  color: #333;
}

/* --- RESPONSIVE --- */
/* 2. Điều chỉnh kích thước card theo màn hình */
@media (max-width: 900px) {
  .card {
    /* 2 card / hàng */
    width: calc(50% - 10px);
  }
}
@media (max-width: 600px) {
  .hero h2 {
    font-size: 1.8em;
  }
  .card {
    /* 1 card / hàng */
    width: 100%;
    min-width: auto;
  }
}

/* --- FOOTER --- */
footer {
  background: #023e8a;
  color: #fff;
  text-align: center;
  padding: 15px;
}
