@charset "utf-8";

/* CSS Document */
 
  
    .cardpop-gallery {
      display: flex;
      flex-wrap: wrap;
      gap: 1.5rem;
      justify-content: center;
    }

    .cardpop-card {
      background: #fff;
      border-radius: 12px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.38);
      overflow: hidden;
      cursor: pointer;
      text-align: center;
      max-width: 200px;
      transition: transform 0.2s ease;
    }

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

    .cardpop-card img { padding:0;
      width: 100%;
      display: block;
    }

    .cardpop-title {
      padding: 1rem;
      font-weight: 400;
      font-size: 1.2rem; color:#0A8334;
    }

    .cardpop-modal {
      display: flex;
      justify-content: center;
      align-items: center;
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      background: rgba(0, 0, 0, 0.6);
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s ease;
      z-index: 1000;
    }

    .cardpop-modal.cardpop-show {
      opacity: 1;
      pointer-events: auto;
    }

.cardpop-modal-content {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  max-width: 800px;
  width: 90%;
  max-height: 90vh; /* NEW: Limit height to viewport */
  overflow-y: auto;  /* NEW: Enable scrolling if content overflows */
  text-align: left;
  transform: translateY(-20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  position: relative;
}

    .cardpop-show .cardpop-modal-content {
      transform: translateY(0);
      opacity: 1;
    }

    .cardpop-close-btn {
      position: absolute;
      top: 10px;
      right: 15px;
      font-size: 1.5rem;
      color: #888;
      cursor: pointer;
    }

    .cardpop-close-btn:hover {
      color: #000;
    }

    .cardpop-modal-body {
      display: flex;
      gap: 1rem;
      margin-top: 1rem;
    }

.cardpop-modal-body img {
  width: 300px;
  height: auto;
  border-radius: 8px;
  flex-shrink: 0;
  object-fit: contain;
  align-self: flex-start;
}
    .cardpop-text {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }

    .cardpop-modal h2 {
      margin-top: 0; padding:0;
    }

    .cardpop-text p { 
      margin: 0 ; padding-bottom:5px;
    }

    .cardpop-text .title {
     font-weight:600; color:#0A8334; padding:0;
    }
		 
	

    /* Media Query for screens smaller than 900px */
    @media (max-width: 900px) {
      .cardpop-modal-body {
        flex-direction: column; /* Stack image and text vertically */
        align-items: left; padding:20px;
      }
		    .cardpop-card {
    
      max-width: 150px;
    
    }

      .cardpop-text {
        text-align: left; /* Center text on small screens */
      }

    .cardpop-modal-body img {
  max-width: 300px;              /* Scale image to fit container width */
  height: auto;             /* Maintain aspect ratio */
  display: block;           /* Remove inline spacing */
  margin-bottom: 1rem;      /* Space below the image */
}
    }
		 
		 
		 .cardpop-card h2 {font-weight:500; font-size:14px;}
 
