/* Section Projects */
#section5 {
  padding: 50px 20px;
  font-family: Arial, sans-serif;
  color: #333;
  display: flex;
  justify-content: center;
  padding-top: 80px;
  height: auto;
}

/* Container */
.projects-container {
  display: flex;
  gap: 20px;
}

/* Sidebar trái */
.projects-sidebar {
  width: 20%;
  padding: 20px;
  border-right: 2px solid #145A32;
}

.projects-sidebar h2 {
  font-size: 28px;
  margin-bottom: 10px;
  color: #222;
  font-family: 'Bebas Neue', cursive;
}

/* Nội dung phải */
.projects-content {
  width: 80%;
  padding: 10px 20px;
}

/* Category */
.project-category {
  margin-bottom: 40px;
}

.project-category h3 {
  font-size: 22px;
  margin-bottom: 15px;
  color: #444;
  border-left: 4px solid #145A32;
  padding-left: 10px;
  font-family: 'Bebas Neue', cursive;
}

/* Danh sách project */
.project-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ============================= */
/* Card đẹp kiểu anchor (.card) */
/* ============================= */
.card {
  position: relative;
  display: block;
  /* background: #1E3D34; */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 5px 10px 12px rgba(0,0,0,0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.card__img {
  width: 100%;
  height: 160px; /* giảm chiều cao */
  object-fit: cover;
  display: block;
}

.card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  font-size: 14px;
  font-weight: bold;
  color: #D4B07A;
  background: #1E3D34;
  /* backdrop-filter: blur(6px); */
}

.card__footer span:first-child {
  opacity: 0.6;               /* mờ mặc định */
  transform: translateY(5px); /* hơi tụt xuống */
  transition: all 0.3s ease;
}

.card__footer span:last-child {
  font-size: 12px;
}

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

.card:hover .card__footer span:first-child {
  opacity: 1;                 /* sáng rõ hơn */
  transform: translateY(0);   /* đưa về vị trí chuẩn */
}

/* Bỏ hoàn toàn .card__action */
.card__action {
  display: none;
}

.popup {
  display: none; 
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.popup-content {
  background: #fff;
  width: 80%;
  max-width: 900px;
  border-radius: 10px;
  position: relative;
  padding: 20px;
  animation: fadeIn 0.3s ease-in-out;
}

.popup-content .close {
  position: absolute;
  top: 10px; right: 15px;
  font-size: 24px;
  cursor: pointer;
}

.popup-body {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.popup-left {
  flex: 1 1 45%;
}

.popup-left img,
.popup-left video {
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
}

.popup-right {
  flex: 1 1 50%;
}

.popup-right h2 {
   font-family: 'Bebas Neue', cursive;
   color: #145A32;
}

.popup-right p {
  margin-bottom: 5px;
  font-family: "Roboto", sans-serif;
}
.popup-right span {
  opacity: 0.6;
}

.popup-right strong {
  color: black;
}

@keyframes fadeIn {
  from {opacity: 0; transform: scale(0.8);}
  to {opacity: 1; transform: scale(1);}
}

.popup-content {
  display: flex;
  gap: 20px;
  max-width: 900px;
  width: 90%;
}

.popup-left, .popup-right {
  flex: 1;
}

.popup-left img, .popup-left video {
  width: 100%;
  border-radius: 10px;
}

/* =========================== */
/* Responsive cho tablet/mobiles */
/* =========================== */
@media (max-width: 1024px) {
    .projects-container {
        flex-direction: column;
    }

    .projects-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 2px solid #145A32;
        margin-bottom: 20px;
    }

    .projects-content {
        width: 100%;
        padding: 10px 0;
    }

    .project-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .popup-content {
        flex-wrap: wrap;
    }

    .popup-left, .popup-right {
        flex: 1 1 100%;
    }
}

@media (max-width: 768px) {
    .project-list {
        grid-template-columns: 1fr;
    }

    .card__img {
        height: 140px;
    }

    .card__footer {
        font-size: 13px;
        padding: 10px;
    }

    .popup-content {
        width: 95%;
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    #section5 {
        padding: 20px 10px;
    }

    .projects-sidebar {
        display: none;
    }

    .card__img {
        height: 120px;
    }

    .card__footer {
        font-size: 12px;
        padding: 8px;
    }

    .popup-content {
        width: 100%;
        padding: 15px;
    }

    .popup-left, .popup-right {
        flex: 1 1 100%;
    }

    .popup-left img, .popup-left video {
        height: auto;
    }
}
