/**
 * ---------------------------Projects---------------------------
 *
 * @format
 */

.project-content {
  padding: 90px 0;
}

.project-title {
  margin-bottom: 60px;
  text-align: center;
}

.project-title h4 {
  text-transform: uppercase;
  font-size: 40px;
  line-height: 40px;
  color: var(--royal-yellow-base); /* primary accent for titles */
  margin-bottom: 20px;
}

.project-title p {
  color: var(--soft-gray-base); /* muted text */
}

.projects {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* BASE CARD STYLE + overlay behavior combined */
.project {
  color: var(--soft-gray-base);
  border: 2px solid var(--soft-gray-dark);
  border-radius: 10px;
  width: 100%;
  position: relative;
  padding: 25px;
  text-align: center;
  flex-basis: 32%;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease;
  overflow: hidden;
  background: var(--deep-navy-base);
}

/* Icon / heading / text */
.project i,
.project h4,
.project p {
  z-index: 1;
  position: relative;
  transition: opacity 0.3s ease;
}

.project i {
  background-color: var(--trust-blue-base);
  width: 60px;
  height: 60px;
  color: var(--off-white-light);
  font-size: 26px;
  line-height: 60px;
  border-radius: 50%;
}

.project h4 {
  font-size: 26px;
  text-transform: capitalize;
  margin: 20px 0;
  color: var(--off-white-light);
}

.project p {
  text-align: justify;
  color: var(--soft-gray-light);
}

/* Overlay */
.project .overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--deep-navy-dark);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  filter: blur(5px);
}

/* Hover effects */
.project:hover {
  transform: translateY(-6px);
  border-color: var(--royal-yellow-base);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.95);
  transform: scale(1.05);
}

.project:hover i,
.project:hover h4,
.project:hover p {
  opacity: 0;
}

.project:hover .overlay {
  opacity: 1;
  filter: blur(0px);
  cursor: pointer;
}

/* Project Link */
.project .project-link {
  color: var(--off-white-light);
  background: linear-gradient(
    135deg,
    var(--trust-blue-base),
    var(--deep-navy-light)
  );
  padding: 10px 20px;
  border-bottom-right-radius: 40px;
  border-top-left-radius: 20px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);

  z-index: 2;
  cursor: pointer;
}

.project .project-link:hover {
  transform: translateY(-4px);
  background: linear-gradient(
    135deg,
    var(--royal-yellow-base),
    var(--deep-saffron-base)
  );
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

/* ===================== PROJECTS SECTION RESPONSIVE ===================== */

/* Large tablets / medium screens (up to 992px) */
@media (max-width: 992px) {
  .project-content {
    padding: 80px 0;
  }
  .project-title h4 {
    font-size: 34px;
    line-height: 36px;
  }
  .projects {
    gap: 1.8rem;
  }
  .project {
    flex-basis: 48%;
    padding: 22px 20px;
  }
  .project h4 {
    font-size: 22px;
    margin: 16px 0;
  }
  .project p {
    font-size: 14px;
  }
  .project i {
    width: 58px;
    height: 58px;
    line-height: 58px;
    font-size: 24px;
  }
  .project .project-link {
    padding: 9px 18px;
    font-size: 0.85rem;
  }
}

/* Tablets & normal phones (up to 768px) */
@media (max-width: 768px) {
  .project-content {
    padding: 70px 0;
  }
  .project-title {
    margin-bottom: 40px;
  }
  .project-title h4 {
    font-size: 30px;
    line-height: 32px;
  }
  .project-title p {
    font-size: 14px;
  }
  .projects {
    flex-direction: column;
    gap: 1.6rem;
  }
  .project {
    flex-basis: 100%;
    padding: 20px 18px;
    transform: none; /* remove scale for small screens */
  }
  .project:hover {
    transform: translateY(-4px); /* softer hover */
  }
  .project i {
    width: 54px;
    height: 54px;
    line-height: 54px;
    font-size: 22px;
  }
  .project h4 {
    font-size: 21px;
  }
  .project p {
    font-size: 13.5px;
  }
  .project .project-link {
    padding: 8px 16px;
    font-size: 0.8rem;
  }
}

/* Small phones (up to 480px) */
@media (max-width: 480px) {
  .project-content {
    padding: 60px 0;
  }
  .project-title h4 {
    font-size: 26px;
    margin-bottom: 14px;
  }
  .project-title p {
    font-size: 13px;
  }
  .project {
    padding: 18px 14px;
    border-radius: 8px;
  }
  .project h4 {
    font-size: 19px;
  }
  .project p {
    font-size: 13px;
    text-align: left;
  }
  .project .project-link {
    padding: 8px 16px;
    font-size: 13px;
  }
  .project i {
    width: 50px;
    height: 50px;
    line-height: 50px;
    font-size: 20px;
  }
}

/* Ultra-small devices (up to 360px) */
@media (max-width: 360px) {
  .project {
    padding: 16px 12px;
  }
  .project h4 {
    font-size: 18px;
  }
  .project p {
    font-size: 12.5px;
  }
  .project i {
    width: 48px;
    height: 48px;
    line-height: 48px;
    font-size: 18px;
  }
  .project .project-link {
    padding: 6px 12px;
    font-size: 12px;
  }
}
