
body {
  font-family: Arial, sans-serif;
  margin: 0;
  background-color: #f9f9f9;
}

header {
  background-color: #d32f2f;
  display: flex;
  align-items: center; 
  padding: 2rem;
  position: relative;
  font-size: 1.3rem;
  font-weight: 300;
}
header img {
  position: absolute;
  top: 0;
  margin: 0;
  height: 70px; /* Kiểm soát kích thước */
}


header ul{
  right: 20px;
  margin: 0 8px;
  justify-content: space-between;
  position:absolute;
  top: 20px;
  list-style: none;
}
header ul li{
  display: inline-block;
}
header ul li:hover{
  color: rgba(0,0,0,0.3);
}
header ul img{
  margin-left: -100px;
  margin-bottom: 10px;
  width: 40px;
  height: 30px;
  margin-top: 14px;
  object-fit: cover;
  transition: all 0.3s ease;
}

/*Điều chỉnh css của trang*/
h1 {
  position: relative;
  
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
}
input[type="text"] {
  margin-top: 1rem;
  padding: 0.5rem;
  width: 50%;
  max-width: 400px;
  font-size: 1rem;
}

nav {
  padding: 0.5rem;
  text-align: center;
  border-bottom: 1px solid #ccc;
}

nav a {
  margin: 0 1rem;
  color: #d32f2f;
  text-decoration: none;
  font-weight: bold;
}
main {
  padding: 1rem;
}
nav input[type="text"]{
  display: inline;
  margin-left: auto;
}
section {
  margin-bottom: 2rem;
}

h2 {
  color: #d32f2f;
  border-bottom: 2px solid #ccc;
  padding-bottom: 0.25rem;
}

ul {
  list-style-type: none;
  padding: 0;
}

li a {
  text-decoration: none;
  color: #000080;
}

li a:hover {
  text-decoration: underline;
}
h1 a{
  text-decoration: none;
  color: #fff;
}
/*Button*/
.btn{
  min-width: 142px;
  min-height: 36px;
  text-decoration: none;
  border: none;
  border-radius: 3px;
  font-size: 1.4rem;
  background-color: rgba(0,0,0,0.1);
  padding: 0;
  outline: none;
  cursor: pointer;
}
.btn:hover{
  background-color: rgba(0,0,0,0.3);
}
.btn.btn--primary{
  background-color: #d32f2f;
  color: #fff;
}
.btn.btn--primary:hover{
  background-color: #000080;
}
.btn.btn--disable{
  cursor: default;
  background-color: #999;
  color:#ccc
}
/*Modal - log - reg*/
.modal{
  display: flex;
  position: fixed;
  inset: 0;
  animation: fadeIn ease-in 0.3s;
}
.modal__overlay{
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.4);
}
.modal__body{
  background-color: #fff;
  margin: auto;
  position: relative;
  z-index: 1;
  border-radius: 5px;
}

/*Authen modal*/
.auth-form{
  width: 500px;
  height: 60%;
}
.auth-form__container{
  padding: 0 32px;
}
.auth-form__header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  margin-top: 12px;
}
.auth-form__heading{
  font-size: 2.2rem;
  font-weight: 400;
}

.auth-form__switch-btn{
  font-size: 1.6rem;
  font-weight: 400;
  color: #EE4D2D;
  cursor: pointer;
}
.auth-form__group{

  margin-bottom: 12px;
}
.auth-form__group input{
  width: 100%;
  max-width: 500px;
  padding: 0rem;
}
.auth-form__input{
  height: 40px;
  margin-top: 12px;
  padding: 0 12px;
  font-size: 1.4rem;
  border-radius: 2px;
  border: 2px solid #000;
}
.auth-form__input:focus{
  border-color: #888;
}
.auth-form__controls{
  margin-top: 80px;
  display: flex;
  justify-content: flex-end;
}
.auth-form__controls-back{
  margin-right: 16px;
}
 
/*Xử lý user*/

.user-menu {
  margin-top: 18px;
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  padding: 8px 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
  border-radius: 6px;
  min-width: 120px;
  z-index: 999;
  
}
/* Khi hover vào li chứa avatar -> hiện menu */
header ul li:hover .user-menu {
  display: block;
}

.user-avatar {
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.user-menu li {
    display: block; /* Mỗi item 1 hàng */
    padding: 8px 10px;
    cursor: pointer;
    border-bottom: 1px solid #888;
}
.user-menu li:hover{
  color: #007aff;
}
.container {
  max-width: 1100px;
  margin: 20px auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding: 0 15px;
}

.card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}

.card:hover {
  transform: scale(1.02);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card-content {
  padding: 15px;
}

.card-content h3 {
  margin: 0 0 10px;
  color: #d32f2f;
}

.card-content p {
  font-size: 14px;
  color: #555;
  line-height: 1.4;
}
.container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card-content {
  padding: 15px;
  flex: 1;
}

.card-content h3 {
  font-size: 1.1rem;
  margin: 0 0 10px;
  color: #222;
  line-height: 1.3;
}

.card-content p {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.4;
}

/* ====== TIÊU ĐỀ CHUYÊN MỤC ====== */
section h2 {
  margin: 30px 0 15px;
  font-size: 1.4rem;
  color: #d32f2f;
  border-left: 5px solid #d32f2f;
  padding-left: 10px;
}
