/* Section Container */
.certificates-section {
  background-color: #F9F9F9;
  display: grid;
  grid-template-columns: 520px auto;
  position: relative;
  min-height: 100dvh;
}

.information-section {
  width: 100%;
  background-color: #FFFFFF;
  position: relative;
}

.certificates-intro {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: fixed;
  top: 120px;
  width: 520px;
  padding: 65px 68px;
  transition: transform 0.1s ease-out;
}

.icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #e3f2fd 0%, #f0f7ff 100%);
  border-radius: 16px;
}

.certificates-title {
  font-weight: 700;
  font-size: 32px;
  line-height: 120%;
  color: #4A4A49;
}

.certificates-description {
  color: #171717;
  font-weight: 500;
  font-size: 16px;
  line-height: 120%;
}

.grid-certificates-section {
  padding-top: 65px;
  padding-bottom: 111px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

/* Certificates Grid */
.certificates-grid {
  width: 660px;
  display: grid;
  justify-content: center;
  grid-template-columns: repeat(3, 204px);
  gap: 24px;
}

/* ============================================
   CERTIFICATE CARD STYLES
   ============================================ */

/* Card Container */
.certificate-card {
  height: 257px;
  border-radius: 16px;
  background-color: white;
  border: .89px solid #CFCFCF;
  transition: all 0.3s ease;
  position: relative;
  display: grid;
  place-content: center;
  overflow: hidden;
  cursor: pointer;
}

.certificate-card.noFile {
  cursor: default;
}

.certificate-card:hover,
.certificate-card:has(.download-btn.active) {
  border: .89px solid #F2FAFE;
  background-color: #F2FAFE;
  box-shadow: 0px 0px 15px -2px #00000033;
}

.icon-certificate {
  max-width: 91px;
  transition: all 0.8s ease;
}

.certificate-card:hover .icon-certificate  {
  transform: scale(0.9);
  transition: all 0.8s ease;
}

/* Download Button */
.download-btn {
  width: 30px;
  height: 30px;
  border-radius: 37.35px;
  border: 1px solid #006DB2;
  background-color: #FFFFFF;
  position: absolute;
  top: 6px;
  right: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.8s ease;
  overflow: hidden;
}

.download-btn img {
  width: 11px;
  height: auto;
}
.certificate-card:hover .download-btn,
.download-btn.active {
  background-color: #006DB2;
  transition: all 0.8s ease;
}
.download-btn .icon-download-white {
  position: absolute;
  top: -32px;
  color: #FFFFFF;
}

.certificate-card:hover .download-btn .icon-download-white {
  top: 6px;
  transition: all 0.8s ease;
}
.download-btn .icon-download {
  color: #006DB2;
  transition: all 0.8s ease;
}
.certificate-card:hover .download-btn .icon-download {
  margin-top: 46px;
  transition: all 0.8s ease;
}

.download-btn .icon-check {
  position: absolute;
  top: -64px;
  transition: all .8s ease;
  animation-delay: 0.8s;
}

.download-btn.active .icon-check {
  top: 10px;
  transition: all .8s ease;
  animation-delay: 0.8s;
  color: #FFFFFF;
}

.download-btn.active .icon-download-white,
.download-btn.active .icon-download {
  position: absolute;
  top: 34px !important;
  transition: all 0.8s ease;
}

/* Certificate Code */
.certificate-code {
  width: 100%;
  height: 46px;
  gap: 10px;
  padding: 10px;
  background-color: #F2FAFE;
  text-align: center;
  position: absolute;
  bottom: 0;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  border-bottom-right-radius: 8px;
  border-bottom-left-radius: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.certificate-code span {
  font-size: 20px;
  line-height: 100%;
  font-weight: 400;
  color: #000;
 }
/* ============================================
  RESPONSIVE STYLES
============================================ */
@media screen and (min-width: 1800px) {
  .certificates-grid {
    grid-template-columns: repeat(4, 204px);
  }
}


@media screen and (max-width: 1250px) {
  .grid-certificates-section {
    padding: 40px 0px;
  }

  .certificates-grid {
    width: 100%;
    grid-template-columns: repeat(3, 165px);
    gap: 20px;
  }
}

/* Mobile: 2 columnas más compactas */
@media screen and (max-width: 1100px) {
  .certificates-grid {
    width: 100%;
    grid-template-columns: repeat(2, 165px);
    gap: 20px;
  }
}

@media screen and (max-width: 900px) {
  .certificates-section {
    grid-template-columns: 1fr;
  }

  .certificate-icon {
    display: grid;
    place-content: center;
  }

  .certificates-intro {
    position: static !important;
    width: 100%;
  }
}

@media screen and (max-width: 767px) {
  .certificate-icon svg {
    width: 97px;
    height: 97px;
  }

  .information-section {
    padding: 40px 43px;
  }
  .certificates-intro {
    gap: 8px;
  }

  .icon-wrapper {
    width: 60px;
    height: 60px;
  }

  .certificates-title {
    font-size: 22px;
    margin-bottom: 4px;
  }

  .certificates-description {
    line-height: 140%;
    font-size: 16px;
  }

  .certificates-intro {
    padding: 0;
  }

  .grid-certificates-section {
    padding: 33px 15px 64px 15px;
  }

  .certificates-grid {
    row-gap: 16px;
    column-gap: 12px;
  }

  .certificate-card {
    height: 234px;
  }

  .certificate-code span {
    font-size: 16px;
    line-height: 140%;
  }

  .certificate-card:hover {
    border: 1px solid #006DB2;
    background-color: #FFFFFF;
    box-shadow: none;
  }
  .certificate-card:hover .download-btn {
    background-color: transparent;
  }
  .download-btn .icon-download-white {
    display: none;
  }

  .certificate-card:hover .download-btn .icon-download {
    margin-top: 0px;
    transition: all 0.8s ease;
  }

  .certificate-card:has(.download-btn.active) {
    border: .89px solid #F2FAFE;
    background-color: #F2FAFE;
    box-shadow: 0px 0px 15px -2px #00000033;
  }
  
  .certificate-card:hover .download-btn.active {
    background-color: #006DB2;
    transition: all 0.8s ease;
  }
}