body {
    font-family: 'Inter', sans-serif; /* Using Inter for a modern look */
    background-color: #f6f6f6;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.enmaa-carousel {
  position: relative;
  overflow: hidden;
}

.enmaa-carousel-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 40px) / 3); /* 3 cards + 2 gaps */
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.enmaa-carousel-track::-webkit-scrollbar {
  display: none;
}

.enmaa-card {
  width: 100%;
  height: 440px;
}

.enmaa-zoom-btn {
    position: absolute;
    z-index: 10; /* Higher than .enmaa-slide */
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent */
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 20px;     /* Move to top-right */
    right: 20px;
    transition: all 0.3s ease;
    pointer-events: auto;
}

.enmaa-zoom-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.enmaa-carousel-btn.prev {
 	position: absolute;
    z-index: 10;
    left: 10px;
    top: 50%;
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    padding: 8px;
    align-items: center;
    justify-content: center;
}

.enmaa-carousel-btn.next {
  position: absolute;
    z-index: 10;
    right: 10px;
    top: 50%;
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    padding: 8px;
    align-items: center;
    justify-content: center;  
}

@media (max-width: 768px) {
  .enmaa-carousel-track {
    grid-auto-columns: 85%;
  }
}


/* ---------- Portfolio Filters and Wrap (No significant changes needed for modal design) ---------- */
.enmaa-portfolio-wrap {
  margin: 40px auto;
  padding: 0 16px;
  max-width: 1200px;
}

/* When fewer than 3 items are visible */
.enmaa-portfolio-grid.few-items {
  justify-content: center; /* Center them horizontally */
  display: flex; /* switch from grid to flex for easier width control */
  flex-wrap: wrap;
  gap: 20px;
}

.enmaa-portfolio-grid.few-items .enmaa-card {
  flex: 0 0 30%;
  max-width: 30%;
}

/* card */
.enmaa-card {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  background: #f6f6f6;
  display: flex;
  align-items: flex-end;
  height: 440px;
  transition: transform 0.36s, box-shadow 0.36s;
}

.enmaa-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 30px rgba(12, 20, 30, .12);
}

.enmaa-card img {
  width: 100%;
  height: 100% !important;
  object-fit: cover !important;
  display: block;
  position: absolute;
  inset: 0;
}

.enmaa-card .enmaa-overlay {
  position: relative;
  padding: 20px;
  background: linear-gradient(42deg, transparent, rgb(0 0 0 / 68%));
  width: 100%;
  color: #fff;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}

.enmaa-card h3 {
  margin: 0;
  font-size: 26px;
  font-weight: 600;
  color: #fff;
}

/* ---------- Modal (NEW Design) ---------- */
.enmaa-portfolio-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(3, 8, 15, 0.8); /* Slightly less opaque overlay */
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.enmaa-portfolio-modal[aria-hidden="false"] {
  display: flex;
}

.enmaa-modal-inner {
  width: 100%;
  max-width: 85%;
  height: 720px;
  background-color: #222933;
  border-radius: 16px;
  display: flex;
  color: #fff;
  position: relative;
  overflow: hidden;
  padding: 0;
  box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

.enmaa-modal-close {
  position: absolute;
  right: 10px;
  top: 10px;
  background: transparent;
  border: 0;
  font-size: 28px; 
  cursor: pointer !important;
  z-index: 100;
  opacity: 1;
  transition: opacity 0.2s ease;
  padding: 4px 9px 4px 9px;
  border-radius: 17px;
}

/* LEFT SIDE (Image Carousel) */
.enmaa-modal-left {
  position: relative;
  flex: 0 0 60%; /* Fixed width for the image section */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden; /* For image radius */
  border-top-left-radius: 16px; /* Match modal radius */
  border-bottom-left-radius: 16px;
}

.enmaa-modal-image-wrap {
  position: relative;
  width: 100%;
  height: 100%; /* Fill the left side */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 0;
}

.enmaa-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content:center;
  align-items:center;
  pointer-events: none;

}

.enmaa-slide.active {
  opacity: 1;
  z-index: 1;
}

.enmaa-slide img {
  width: 100%;
  height: 100% !important;
  object-fit: contain !important;
  display: block;
}

/* Image Gradient Overlay */
.enmaa-modal-image-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20,27,44,0) 50%, rgba(20,27,44,0.3) 100%); /* Subtle dark gradient from bottom */
  z-index: 2;
  pointer-events: none; /* Allows clicks on elements below */
}

/* Navigation Arrows and Counter */
.enmaa-gallery-nav {
  position: absolute;
    z-index: 6;
    width: 37px;
    height: 27px;
    color: rgb(255, 255, 255);
    background: rgb(0 0 0 / 21%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 22px;
    padding: 25px;
    align-items: center;
    justify-content: center;
    display: inline-flex !important;
}


.enmaa-prev {
 top: 50%;
    left: 10px;
    transform: translateY(-50%);
}
.enmaa-next {
  top: 50%;
    right: 10px;
    transform: translateY(-50%);
}


/* RIGHT SIDE (Content) */
.enmaa-modal-right {
  flex: 1 1 40%; /* Remaining width for content */
      padding: 60px 30px 30px 30px;
  display: flex;
  flex-direction: column;
  gap: 20px; /* Gap between sections */
}

.enmaa-modal-right h2 {
  margin: 0;
  font-size: 26px; /* Adjusted title size */
  color: #fff;
  font-weight: 700;
  line-height: 1.3;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e6f1;
}

/* Info Section Styling */
.enmaa-info-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.enmaa-section-title {
  margin: 0;
  font-size: 15px;
  color: #fff;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Project Info Grid (2x2 layout) */
.enmaa-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px 10px;
}

.enmaa-info-item {
  display: flex;
  flex-direction: column;
  gap: 2px; /* Tighter spacing between label/value */
  color: #fff;
}

.enmaa-info-label {
  font-size: 13px;
  color: #fff;
  font-weight: 400;
}

.enmaa-info-value {
  font-size: 15px;
  color: #fff;
  font-weight: 600;
  line-height: 1.4;
}

.enmaa-modal-right p {
  font-weight: 400;
  margin: 0;
  line-height: 1.6;
  color: #fff;
  font-size: 14px;
}

/* Consultant Section */
.enmaa-consultant-section {
    margin-top: auto; /* Push to the bottom */
    padding-top: 20px;
    border-top: 1px solid #e0e6f1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.enmaa-consultant-label {
    font-size: 13px;
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
}
.enmaa-consultant-value {
    font-size: 14px;
    color: #fff;
    font-weight: 500;
}

/* responsive */
@media (max-width: 980px) {
  .enmaa-modal-inner {
    flex-direction: column;
    max-height: 95vh;
    height: auto; /* Allow height to adjust */
    overflow-y: auto;
    border-radius: 16px;
  }
  .enmaa-modal-left {
    flex: unset;
    width: 100%;
    height: 300px; /* Fixed height for image on mobile */
    border-bottom-left-radius: 0;
    border-top-right-radius: 16px;
  }
  .enmaa-modal-right {
    flex: unset;
    width: 100%;
    padding: 20px;
  }
  .enmaa-modal-right h2 {
    font-size: 24px;
    padding-bottom: 15px;
  }
  .enmaa-prev,
  .enmaa-next {
    top: 50%;
    transform: translateY(-50%);
  }
  .enmaa-modal-close {
    right: 15px;
    top: 15px;
  }
}


.enmaa-zoom-btn {
    position: absolute;
    z-index: 6;
    width: 37px;
    height: 27px;
    background: rgb(0 0 0 / 21%);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    padding: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 50%;
    right: 50%;
    transform: translate(50%, -50%);
    pointer-events: auto;
}


@media (max-width: 768px) {
  .enmaa-portfolio-wrap {
    padding: 0 12px;
  }
  .enmaa-modal-left {
    height: 300px !important;
  }
  .enmaa-modal-right h2 {
    font-size: 20px;
    padding-bottom: 10px;
  }
  .enmaa-info-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .enmaa-modal-inner {
    border-radius: 10px;
  }
  .enmaa-modal-left {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
  }
  
  .enmaa-zoom-btn{
   position: absolute;
    z-index: 6;
    width: 37px;
    height: 27px;
    background: rgb(0 0 0 / 21%);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    padding: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 50%;
    right: 50%;
    transform: translate(50%, -50%);
}
}

/* ---------- ZOOM FEATURE (ADDITIVE ONLY) ---------- */


.enmaa-zoom {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999999;
}

.enmaa-zoom.active {
  display: flex;
}

.enmaa-zoom img {
  max-width: 90%;
  max-height: 85%;
  object-fit: contain;
}

.enmaa-zoom-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 36px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
}

.enmaa-zoom-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
}

.enmaa-zoom-nav.prev { left: 30px; }
.enmaa-zoom-nav.next { right: 30px; }

#enmaaZoomCounter {
  position: absolute;
  bottom: 25px;
  color: #fff;
  font-size: 14px;
}

.enmaa-load-more{
    display: inline-block;
    font-family: 'Bai Jamjuree';
    font-weight: 700;
    border-radius: 6px;
}