/* Certifications page — scoped styles (override global white links) */

.certificates-section {
  padding: 3.5rem 0 5rem;
  background: linear-gradient(180deg, #f4f9f5 0%, #ffffff 45%, #f8fbf9 100%);
  position: relative;
  overflow: hidden;
}

.certificates-section::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -80px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(145, 194, 99, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.certificates-section::after {
  content: "";
  position: absolute;
  bottom: -100px;
  left: -60px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(13, 57, 46, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.cert-section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem;
  position: relative;
  z-index: 1;
}

.cert-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #91c263;
  background: rgba(145, 194, 99, 0.15);
  padding: 0.35rem 1rem;
  border-radius: 50px;
  margin-bottom: 1rem;
}

.cert-section-head h2 {
  font-size: 2rem;
  font-weight: 800;
  color: #0d392e;
  margin-bottom: 0.75rem;
}

.cert-intro {
  text-align: center;
  line-height: 1.85;
  color: #5a6b63;
  font-size: 1.05rem;
  margin: 0;
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  position: relative;
  z-index: 1;
}

.cert-card {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid rgba(13, 57, 46, 0.08);
  box-shadow: 0 4px 24px rgba(13, 57, 46, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.35s ease, border-color 0.35s ease;
  height: 100%;
}

.cert-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 50px rgba(13, 57, 46, 0.14);
  border-color: rgba(201, 147, 81, 0.35);
}

.cert-card-visual {
  position: relative;
  background: linear-gradient(145deg, #0d392e 0%, #164a3d 50%, #1a5a4a 100%);
  padding: 2rem 1.5rem 1.75rem;
  text-align: center;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.cert-card-visual::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #c99351, #ffc107, #c99351);
}

.cert-pdf-preview {
  width: 72px;
  height: 88px;
  background: #fff;
  border-radius: 8px 8px 4px 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  position: relative;
}

.cert-pdf-preview::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, transparent 50%, #e8ece9 50%);
  border-radius: 0 8px 0 0;
}

.cert-pdf-preview i {
  font-size: 2rem;
  color: #c0392b;
}

.cert-pdf-preview span {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #0d392e;
}

.cert-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0d392e;
  background: #ffc107;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.cert-card-content {
  padding: 1.5rem 1.5rem 1.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.cert-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0d392e;
  line-height: 1.45;
  margin: 0 0 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 4.35em;
}

.cert-card-desc {
  font-size: 0.9rem;
  color: #6b7c74;
  line-height: 1.65;
  margin: 0 0 1.25rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cert-card-desc:empty,
.cert-card-desc.cert-no-desc {
  display: none;
}

.cert-card-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: auto;
}

.certificates-section .cert-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none !important;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  line-height: 1.2;
}

.certificates-section .cert-action-primary {
  background: linear-gradient(135deg, #91c263 0%, #7aad4f 100%);
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(145, 194, 99, 0.4);
}

.certificates-section .cert-action-primary:hover {
  background: linear-gradient(135deg, #7aad4f 0%, #6a9a42 100%);
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(145, 194, 99, 0.5);
}

.certificates-section .cert-action-secondary {
  background: #ffffff;
  color: #0d392e !important;
  border: 2px solid #0d392e !important;
}

.certificates-section .cert-action-secondary:hover {
  background: #0d392e;
  color: #ffffff !important;
  border-color: #0d392e !important;
}

.certificates-section .cert-action-secondary i,
.certificates-section .cert-action-primary i {
  font-size: 1rem;
}

.cert-empty {
  text-align: center;
  padding: 5rem 2rem;
  background: #fff;
  border-radius: 24px;
  border: 2px dashed rgba(13, 57, 46, 0.15);
  box-shadow: 0 8px 32px rgba(13, 57, 46, 0.06);
  position: relative;
  z-index: 1;
}

.cert-empty-icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, rgba(145, 194, 99, 0.2), rgba(13, 57, 46, 0.08));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-empty-icon i {
  font-size: 2.5rem;
  color: #91c263;
}

.cert-empty h5 {
  color: #0d392e;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.cert-empty p {
  color: #6b7c74;
  margin: 0;
}

/* Modal */
.cert-modal .modal-content {
  border-radius: 20px;
  overflow: hidden;
  border: none;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
}

.cert-modal .modal-header {
  background: linear-gradient(135deg, #0d392e, #1a5a4a);
  color: #fff;
  padding: 1rem 1.5rem;
  border: none;
}

.cert-modal .modal-title {
  font-weight: 600;
  font-size: 1.05rem;
}

.cert-modal .modal-header .btn-close {
  filter: invert(1);
  opacity: 0.9;
}

.cert-modal iframe {
  width: 100%;
  height: 78vh;
  border: none;
  background: #f0f0f0;
}

/* Banner — inherit about-page-top */
.certifications-page-top {
  height: 300px;
  background-size: cover;
  background-position: center;
}

.certifications-page-top .overlay {
  background-color: #000000ad;
  height: 300px;
}

@media (max-width: 1199px) {
  .cert-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 767px) {
  .certificates-section {
    padding: 2.5rem 0 3.5rem;
  }

  .cert-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .cert-section-head h2 {
    font-size: 1.6rem;
  }

  .cert-card-title {
    min-height: auto;
    -webkit-line-clamp: 4;
  }

  .certifications-page-top,
  .certifications-page-top .overlay {
    height: 220px;
    min-height: 220px;
  }
}
