/* --------------------------------Programs Section------------------------------------- */
.programs {
  padding: 2rem;
  position: relative;
}

.programs .section-title {
  font-size: 2rem;
  position: relative;
  display: inline-block;
}

.programs .section-title::after {
  content: "";
  display: block;
  width: 60%;
  height: 4px;
  background: #b2186d;
  /* accent color */
  margin: 0.5rem auto;
  border-radius: 2px;
}

.programs-container {
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
  
}


.programs-grid {
  display: grid;
  align-items: end;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  padding: 40px 15px 10px;
  
}

.program-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  padding: 15px;
  align-items: center;
  text-align: center;
  max-width: 300px;
  min-width: 150px;
  width: 100%;
}

.program-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.program-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: top;
  cursor: pointer;
}

/* Program Modal */
#program-modal-details {
  list-style: none;
  padding-left: 0;
}


.program-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  /* Semi-transparent background */
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.program-modal-content {
  position: relative;
  /* Makes the close button anchor inside the modal */
  background: #ffffff;
  padding: 2.5rem;
  border-radius: 12px;
  text-align: left;
  /* Align text to the left for readability */
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  /* Enable scrolling for long content */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  /* Add a subtle shadow */
}

.program-modal-content h3 {
  font-size: 2rem;
  color: #2e2c42;
  margin-bottom: 1rem;
  font-weight: 700;
}

.program-modal-content p {
  font-size: 1rem;
  color: #4a4a4a;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.program-modal-content .program-details {
  font-size: 1rem;
  color: #4a4a4a;
  line-height: 1.6;
}

.program-modal-content .program-details span {
  display: block;
  /* Ensure each detail starts on a new line */
  margin-bottom: 0.8rem;
  /* Add spacing between lines */
  font-size: 1rem;
  color: #4a4a4a;
  line-height: 1.6;
}

.modal-close {
  position: absolute;
  background: #fff;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #333;
  transition: color 0.3s ease;
  cursor: default;
  /* keeps normal arrow, not pointer hand */
}

.modal-close:hover {
  color: #b2186d;
  /* Add a hover effect for the close button */
}

@media (max-width: 480px) {
  .programs {
    padding: 1rem;
    position: relative;
  }

  .programs .section-title {
    font-size: 1.75rem;
  }

  .programs p {
    font-size: 1rem;
    line-height: 1.3;
  }

  .programs-grid {
          gap: 40px;
        padding: 1rem;
        display: grid;
        align-items: end;
        justify-content: center;
        justify-items: center;
    }

    .programs-bottom-row {
        display: contents;
    }
    
    .program-card {
    padding: 1rem;
    width: 250px;
  }

  .program-modal-content h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    line-height: 1;
  }

  .program-modal-content p {
    font-size: 1rem;
    color: #4a4a4a;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

  .program-modal-content {
    margin-top: 6rem;
    background: #ffffff;
    padding: 2.5rem;
    text-align: left;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
  }
  }

  @media (min-width: 481px) {
      .programs {
    padding: 1rem;
    position: relative;
  }

  .programs .section-title {
    font-size: 1.75rem;
  }

  .programs p {
    font-size: 1rem;
    line-height: 1.3;
  }

  .programs-grid {
          gap: 40px;
        padding: 1rem;
        display: grid;
        align-items: end;
        justify-content: center;
        justify-items: center;
    }

        .programs-bottom-row {
        display: contents;
    }
    
    .program-card {
    padding: 1rem;
    width: 250px;
  }

  .program-modal-content h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    line-height: 1;
  }

  .program-modal-content p {
    font-size: 1rem;
    color: #4a4a4a;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

  .program-modal-content {
    margin-top: 6rem;
    background: #ffffff;
    padding: 2.5rem;
    text-align: left;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
  }
  }

  @media (min-width: 1044px) and (max-width: 1500px) {
  .programs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
  }

  /* make wrapper fill the whole row */
  .programs-bottom-row {
    grid-column: 1 / -1;        /* span all 3 columns */
    display: flex;
    justify-content: center;    /* center the two cards as a group */
    gap: 175px;                  /* space between 4 & 5 */
  }

  /* ensure program-cards inside wrapper keep their sizes */
  .programs-bottom-row .program-card {
    width: 250px; /* or keep your existing .program-card sizing */
    max-width: 300px;
  }
}




/*my pc*/
@media (min-width: 1501px) and (max-width: 1920px) {
        .programs {
    padding: 1rem;
    position: relative;
  }

  .programs .section-title {
    font-size: 1.75rem;
  }

  .programs p {
    font-size: 1rem;
    line-height: 1.3;
  }

  .section-subtitle {
    max-width: 800px;
    margin: 0 auto;
    padding: 5px;
  }

  .programs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* force 3 columns */
    gap: 40px; /* keep same gap as top row */
    justify-items: center;
    padding: 1rem;
  }

  /* make wrapper fill the whole row */
  .programs-bottom-row {
    grid-column: 1 / -1;        /* span all 3 columns */
    display: flex;
    justify-content: center;    /* center the two cards as a group */
    gap: 375px;                  /* space between 4 & 5 */
  }
    
    .program-card {
    padding: 1rem;
    width: 250px;
  }

  .program-modal-content h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    line-height: 1;
  }

  .program-modal-content p {
    font-size: 1rem;
    color: #4a4a4a;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

  .program-modal-content {
    margin-top: 6rem;
    background: #ffffff;
    padding: 2.5rem;
    text-align: left;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
  }
}