

/* Main Section Container */
.certification-section {
    max-width: 1240px;
    padding: 64px 20px 64px 20px;
    background-color: #FFFFFF;
    gap: 110px;
    display: flex;
    flex-direction: column;
    margin: 0 auto;   
}

.section-title {
    font-weight: 700;
    font-size: 25px;
    line-height: 140%;
    letter-spacing: 0%;
    text-transform: uppercase;
    align-self: flex-start !important;
}
  
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, 291px);
    column-gap: 12px;
    row-gap: 32px; 
}

.certification-section-container,
.award-section-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.grid-container > * {
    width: 291px;
    height: 347px;
}
  
.grid-item {
    text-align: left;
}

.grid-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    object-position: top center;
}

.img-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: auto;
  max-width: 90vw;
  position: relative;
  padding: 16px;
  min-height: 60px;
  overflow-y: auto;
  gap: 10px;
}

.img-modal-info {
  flex: 1;
  min-width: 0;
  text-align: center;
  overflow: hidden;
}
  
.item-title,
.award-item-title {
  font-weight: 700;
  font-size: 16px;
  line-height: 28px;
  letter-spacing: 0%;
  text-align: center;
  text-transform: capitalize;
  color: #5B5B5C;
  height: 28px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.item-title-detail,
.award-item-title-detail {
  font-weight: 700;
  font-size: 16px;
  line-height: 28px;
  letter-spacing: 0%;
  text-align: center;
  text-transform: capitalize;
  color: #242424;
  min-height: 28px;
  display: block;
}

.item-desc {
    font-size: 16px;
    color: #5B5B5C;
    margin: 0 0 8px 0;
    padding: 0;
}

.item-date {
    font-size: 16px;
    color: #5B5B5C;
    margin: 0;
    padding: 0;
}

.grid-item-content {
    height: 56px;
    padding: 16px;
    border-bottom: 1px solid var(--color-grey-50, #F2F3F5);
    border-left: 1px solid var(--color-grey-50, #F2F3F5);
    border-right: 1px solid var(--color-grey-50, #F2F3F5);
}

.img-wrapper {
    position: relative;
    overflow: hidden;
    width: 308.5;
    height: 308.5;
    gap: 10px;
    opacity: 1;
    padding: 20px;
    background: #F5F5F5;
}

.img-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1;
}

.img-wrapper:hover::before {
    background: #000000;
    opacity: 0.6;
}

.img-wrapper img {
    transition: filter 0.3s;
    display: block;
    width: 100%;
    border-radius: 12px;
}

.img-wrapper:hover img {
    filter: blur(3px);
}

.img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 2;
}

.img-wrapper:hover .img-overlay {
    opacity: 1;
    pointer-events: auto;
}

.search-btn {
    background: none;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.search-btn svg {
    display: block;
}

.img-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}
.img-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.7);
    z-index: 1;
}
.img-modal-content {
    position: relative;
    z-index: 2;
    background: #fff;
    box-shadow: 0 4px 32px rgba(0,0,0,0.25);
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.img-modal-content img {
    width: 100%;
    height: auto;
    max-width: 90vw;
    max-height: 70vh;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    display: block;
    margin: 0;
    border-radius: 0;
}
.img-modal-close {
    background: #fff;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    z-index: 3;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.img-modal-close:hover {
    background: #eee;
}

@media (max-width: 1439px) {
  .certification-section {
    max-width: 896px;
    padding: 56px 0px 56px 0px;
  }

  .section-title {
    font-size: 21px;
    height: 29px;
  }

  .grid-container {
    grid-template-columns: repeat(auto-fill, 215px);
    column-gap: 12px;
    row-gap: 32px;
    justify-content: center;
  }

  .grid-container > * {
    width: 215px;
    height: 271px;
  }

  .item-title,
  .award-item-title {
    height: auto;
  }

  .grid-item-content {
    padding: 16px;
  }

  .item-title,
  .award-item-title {
    font-size: 14px;
  }


}

@media (max-width: 1023px) {
  .certification-section {
    max-width: 688px;
    padding: 56px 0;
  }

  .grid-container {
    grid-template-columns: repeat(2, 332px);
    column-gap: 24px;
    row-gap: 32px;
    justify-content: center;
  }

  .grid-container > * {
    width: 332px;
    height: 388px;
  }

  .item-title,
  .award-item-title {
    height: auto;
  }

  .grid-item-content {
    padding: 16px;
  }
}

@media (max-width: 767px) {
  .certification-section {
    max-width: 343px;
    padding: 48px 0;
  }

  .certification-section-container,
  .award-section-container {
      gap: 24px;
  }

  .grid-container {
    grid-template-columns: repeat(2, 165.5px);
    column-gap: 12px;
    row-gap: 24px;
    justify-content: center;
  }

  .grid-container > * {
    width: 165.5px;
    height: 217.5px; /* keep height same as original or adjust if needed */
  }

  .section-title {
    font-size: 19px;
    line-height: 140%;
    height: 27px;
  }

  .item-title,
  .award-item-title {
    font-size: 13px;
    text-align: center;
    color: #5B5B5C;
  }

  .grid-item-content {
    height: 52px;
    padding: 16px;
  }
}