*{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    text-align: justify;
  }
  body {
    width: 100%;
    margin: 0 auto;
    font-family: 'Open Sans', sans-serif;
    color: #333;
    background-color: #fff;
  }
  
  .container {
    margin: auto;
  }
  
  header {
    position: relative;
    text-align: center;
    color: white;
  }
  
  .header-image {
    width: 100%;
    height: auto;
    object-fit: cover;
  }
  header h1 {
    position: absolute;
    top: 45%;
    left: 70%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    font-weight: bold;
    color: #fff;
    border-bottom: 5px solid #fff;
    display: inline-block;
    padding: 5px 5px;
  }
  .title-document{
    background-color: rgb(13,127,64);
    display: flex;
    padding: 15px;
    justify-content: center;
  }
  .title-document a {
    text-decoration: none;
  }
  .title-document a h2:hover {
    color: green;
  }
  .title-document h2{
    font-size: 20px;
    font-weight: bold;
    color: #ffffff;
    padding: 5px;
  }
.main-content{
    width: 80%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    flex-wrap: wrap;
}
.main-content .main{
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 31%;
  min-height: 430px;  /* ✅ Chiều cao tối thiểu giống nhau */
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #fff;
  border: none;
}
.main-content .main a{
    text-decoration: none;
    color: black;
}
.main-content .main .text {
  padding: 10px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.text h3 {
  min-height: 40px; /* 2 dòng, tương đương 2 * 24px */
}
.text p {
  min-height: 76px;
  max-height: 76px;
  margin-top: 8px;
  flex-grow: 1;
}
.text .new-btn {
  align-self: start;
  margin-top: 10px;;

}
.main-content .main img{
    width: 100%;
    height: 220px;
    object-fit: cover;
    
}
.text h3 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: bold;
  font-size: 18px;
}

.text p {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
}
.new-btn{
  padding: 5px 10px;
  margin-top: 10px;
  border: 1px solid rgb(13,127,64);
  background-color: rgb(13,127,64);
  border-radius: 5px;
  color: white;
}
.new-btn:hover{
  background-color: #0cc036;
  color: white;
  border: 1px solid #0cc036;
  border-radius: 5px;
}
.new-more{
  text-align: center; 
  margin: 20px;
}
.new-more-btn{
  padding: 10px 20px;
  font-size: 20px;
  border: 1px solid #0cc036;
  border-radius: 3px;
  transition: all 0.2s ease-in-out 0.2s;
}
.new-more-btn:hover{
  background-color: #0cc036;
  color: white;
  border: 1px solid #0cc036;
  border-radius: 30px;
  cursor: pointer;
}
@media (max-width: 850px) {
  .main-content {
    justify-content: space-between;
  }

  .main-content .main {
    width: 48%; /* 2 tin mỗi hàng, có khoảng cách */
    margin-bottom: 20px;
  }
}

/* Dưới 400px: 1 tin tức mỗi hàng */
@media (max-width: 480px) {
  .main-content {
    flex-direction: column;
    align-items: center;
  }

  .main-content .main {
    width: 100%;
  }
}
