.project-section {
  position: relative;
  width: 100%;
  height: 700px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 100px; /* smaller padding for responsiveness */
  box-sizing: border-box;
}
/* @media screen and (max-width: 1800px) {
  .project-section {
    height: 80%;
  }
} */
@media (max-width: 1400px) {
  .project-section {
    height: 100%;
  }
}
.project-container {
  overflow: hidden;
  height: 80%;
}
.project-slider {
  display: flex;
  transition: transform 0.6s ease-in-out;
  height: 100%;
  width: 100%; /* let flex handle total width */
}

.project {
  flex: 0 0 100%; /* each slide takes 100% width */
  display: flex;
  /* height: 100%; */
  background: #fff;
  padding: 20px;

  box-sizing: border-box;
}

/* Image container with fixed aspect ratio */
.project-image-container {
  flex: 0.5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-image {
  width: 90%;
  /* height: 100%; */
  /* max-width: 500px; */

  background-size: cover;
  background-position: center;
  /* border-radius: 10px; */
  /* box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); */
}

.project-content {
  flex: 1;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  max-width: 600px;
}
@media screen and (min-width: 1900px) {
  .project-content {
    max-width: 750px;
  }
}

.project-content h2 {
  color: #a2342c;
  font-weight: 700;
  margin-bottom: 20px;
  font-size: 32px;
}

.project-content p {
  font-size: 18px;
  line-height: 1.6;
  text-align: lef;
}

.meta-box {
  display: flex;
  background: #a2342c;
  color: #fff;
  min-height: 120px;
  width: 100%;
  align-items: stretch; /* 🔑 make all children full height */
  justify-content: space-between;
  gap: 20px;
  padding: 20px;
  box-sizing: border-box;
}

.meta-item {
  flex: 1;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%; /* 🔑 force full height */
  padding-right: 10px;
}

.meta-item strong {
  display: block;
  font-size: 14px;
  margin-bottom: 5px;
}

/* Divider between meta items */
.meta-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 1px;
  background: #fff;
}

/* Arrows */
.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  color: #a2342c;
  border: none;
  padding: 15px;
  cursor: pointer;
  border-radius: 50%;
  font-size: 38px;
  z-index: 0;
}

.arrow-left {
  left: 50px;
}
.arrow-right {
  right: 50px;
}

@media (max-width: 1199px) {
  .project-section {
    padding: 0 60px;
  }
  .project-content h2 {
    font-size: 28px;
  }
  .project-content p {
    font-size: 16px;
    text-align: left;
  }
  .arrow {
    font-size: 34px;
    padding: 12px;
  }
}

/* Tablet landscape (768px – 991px) */
@media (max-width: 991px) {
  .project-section {
    padding: 0 40px;
  }
  .project-container {
    height: 100%;
  }
  .project {
    flex-direction: column; /* stack image + content */
    text-align: center;
  }
  .project-image-container {
    width: 100%;
    margin-bottom: 20px;
  }
  .project-image {
    width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: cover;
  }
  .project-content {
    max-width: 100%;
    padding: 20px;
  }

  .arrow {
    font-size: 32px;
    padding: 10px;
  }
  .arrow-left {
    left: 20px;
  }
  .arrow-right {
    right: 20px;
  }
}

/* Mobile landscape (576px – 767px) */
@media (max-width: 767px) {
  .project-section {
    padding: 10px 20px;
    height: auto; /* remove full height */
  }
  .project-container {
    height: auto;
  }
  .project {
    flex-direction: column;
    padding: 15px;
  }
  .project-content h2 {
    font-size: 22px;
    margin-bottom: 15px;
  }
  .project-content p {
    font-size: 15px;
    line-height: 1.5;
    text-align: justify;
  }

  .arrow {
    font-size: 28px;
    padding: 8px;
  }
}

/* Mobile portrait (max-width: 575px) */
@media (max-width: 575px) {
  .project-section {
    padding: 0 10px;
  }
  .project-image {
    max-height: 250px;
  }
  .project-content {
    padding: 15px;
  }
  .project-content h2 {
    font-size: 20px;
  }
  .project-content p {
    font-size: 14px;
  }

  .arrow {
    font-size: 24px;
    padding: 6px;
  }
  .arrow-left {
    left: 10px;
  }
  .arrow-right {
    right: 10px;
  }
}

/* ✅ Large screens */
@media (min-width: 1200px) {
  .meta-box {
    min-height: 120px;
    gap: 20px;
    padding: 20px;
  }
  .meta-item strong {
    font-size: 16px;
  }
}

@media (max-width: 1200px) {
  .meta-box {
    min-height: 120px;
    gap: 8px;
    padding: 12px;
  }
} /* ✅ Tablet (991px ↓) */
@media (max-width: 991px) {
  .meta-box {
    min-height: 100px;
    gap: 8px;
    padding: 12px;
  }
  .meta-item strong {
    font-size: 13px;
  }
  .meta-item {
    padding: 0 3px;
  }
}

/* ✅ Mobile (767px ↓) */
@media (max-width: 767px) {
  .meta-box {
    min-height: 80px;
    gap: 5px;
    padding: 10px;
  }
  .meta-item strong {
    font-size: 12px;
  }
  .meta-item {
    padding: 0 2px;
  }
}

/* ✅ Mobile portrait (575px ↓) */
@media (max-width: 575px) {
  .meta-box {
    min-height: 70px;
    gap: 4px;
    padding: 8px;
  }
  .meta-item strong {
    font-size: 11px;
  }
  .meta-item {
    font-size: 12px;
  }
}

@keyframes fadeSlideUp {
  0% {
    opacity: 0;
    transform: translateY(60px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Initial hidden state */
.project-section {
  opacity: 0;
  transform: translateY(60px);
  transition: none;
}

/* When visible */
.project-section.visible {
  animation: fadeSlideUp 0.8s ease-out forwards;
}

/* Read more functionality */

.read-more-btn {
  display: none;
  background: none;
  border: none;
  color: #a2342c;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 0;
  margin-top: 2px;
  text-decoration: underline;
}

/* Show read more button only on mobile */
@media (max-width: 991px) {
  .read-more-btn {
    display: block;
  }
  .project-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.3s ease;
  }
  .project-text.expanded {
    -webkit-line-clamp: unset;
    display: block;
  }
}

.read-more-btn:hover {
  color: #8a2b24;
}
