/* ===== Loan Products / Credit Section ===== */

/* Credit Grid Styles */
:root {
  --color-bg: transparent;
  --color-primary: #188FED;
}

/* Section Title Styles */
.features .section-title + .section-description + .feature-grid .section-title,
.credit-section-title {
  text-align: center;
  margin-top: 2.5rem;
  font-size: 2.5rem;
  color: #1e40af;
  margin-bottom: 3rem;
  font-weight: 700;
}

/* Credit Grid Layout */
.credit {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  padding: 0.8rem 0.4rem;
  background: #fff;
  border-radius: 24px;
  max-width: 1180px;
  margin: 0.5rem auto 1.5rem auto; /* Adjusted top and bottom margins */
  position: relative;
  justify-items: center;
}

.creditList {
  background: #fff;
  border-radius: 30px;
  box-shadow: 2px 10px 6px #9393932f;
  padding: 20px;
  width: 252px;
  height: 313px;
  text-align: center;
  margin: 10px 2px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all .4s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.creditList .name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #333;
  font-family: 'GmarketSansMedium', sans-serif;
}

.creditList .main-title {
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
  color: #333;
  font-family: 'GmarketSansMedium', sans-serif;
  font-weight: 500;
}

.creditList .sub-title {
  font-size: 0.85rem;
  line-height: 1.4;
  color: #333;
  font-family: 'GmarketSansMedium', sans-serif;
  font-weight: 500;
}

.creditList img {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  transition: bottom .6s ease;
  bottom: 5px;
  z-index: 3;
  width: 105px;
  height: 105px;
  object-fit: contain;
  border-radius: 12px;
  background: transparent;
  will-change: transform, bottom;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateX(-50%) translateZ(0);
  opacity: 0.9;
  filter: brightness(1.05) contrast(1.05);
}

.creditList:hover {
  transform: scale(1.05);
  z-index: 10;
}

.creditList:hover img {
  bottom: -20px;
}

.creditList .hoverBox {
  padding: 30px 18px 18px 18px;
  text-align: center;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  transition: opacity .3s ease-in-out;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  border-radius: 30px;
  pointer-events: none;
  box-sizing: border-box;
  margin: 0;
}

.creditList .hoverBox .name {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  width: 100%;
  padding: 0;
  text-align: center;
  transform: scale(1);
  transition: transform 0.3s ease;
  color: #333;
  font-family: 'GmarketSansMedium', sans-serif;
}

.creditList .hoverBox .main-title {
  font-size: 0.95rem;
  line-height: 1.35;
  margin: 0 0 1rem 0;
  text-align: center;
  width: 100%;
  padding: 0;
  transform: scale(1);
  transition: transform 0.3s ease;
  color: #00BF73; /* Changed to green */
  font-family: 'GmarketSansMedium', sans-serif;
  font-weight: 500;
}

.creditList .hoverBox .sub-title {
  font-size: 0.85rem;
  line-height: 1.4;
  margin: 0 0 1.2rem 0;
  text-align: center;
  width: 100%;
  padding: 0;
  transform: scale(1);
  transition: transform 0.3s ease;
  color: #333;
  font-family: 'GmarketSansMedium', sans-serif;
  font-weight: 500;
}

.creditList:hover .hoverBox .name,
.creditList:hover .hoverBox .main-title {
  transform: scale(1.15);
}

.creditList:hover .hoverBox .sub-title {
  transform: scale(1.1);
}

.creditList:hover .hoverBox {
  opacity: 1;
  pointer-events: auto;
  animation: zoomInEffect 0.3s forwards;
}

@keyframes zoomInEffect {
  0% {
    transform: scale(0.95) translateY(-10px);
  }
  100% {
    transform: scale(1) translateY(0);
  }
}

.hoverBox .main-title span {
  color: #00BF73; /* Changed to green */
  font-weight: 700; /* Adjusted for consistency, can be 900 if very bold is needed */
  font-family: 'GmarketSansMedium', sans-serif;
}

.hoverBox label {
  cursor: pointer;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  margin: auto 0 10px 0;
  transition: all 0.3s;
  align-self: center;
  padding: 0.5rem 1rem;
  width: auto;
  text-align: center;
  transform: scale(1);
  transition: transform 0.3s ease, color 0.3s;
  position: relative;
}

.creditList:hover .hoverBox label {
  transform: scale(1.08);
}

.hoverBox label:hover {
  color: #188FED;
  transform: scale(1.1);
}

@media (max-width: 1200px) {
  .credit {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 900px) {
  .credit {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
  }
}

@media (max-width: 600px) {
  .credit {
    grid-template-columns: 1fr;
  }
}
