/* =========================================
   PAGE HERO — CERTIFICATIONS
   ========================================= */
.cert-hero {
  position: relative;
  min-height: 42vh;
  padding: 120px 24px 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-image: url('../images/gallery/certi1.png');
  background-size: cover;
  background-position: center;
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,15,20,0.65) 0%, rgba(10,15,20,0.80) 100%);
}

.page-hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.page-hero-title {
  color: #ffffff;
  font-size: 2.8rem;
  font-weight: 800;
  margin: 10px 0 16px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.page-hero-subtitle {
  color: #e0e0e0;
  font-size: 1rem;
  line-height: 1.65;
}

/* =========================================
   TRUST STRIP
   ========================================= */
.trust-strip {
  background-color: #ffffff;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  padding: 22px 32px;
}

.trust-strip-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #3a3a3a;
}

/* =========================================
   CERTIFICATIONS SECTION
   ========================================= */
.certs-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 70px 32px 100px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.cert-category {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cert-category-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 2px solid #f0f0f0;
}

.cert-category-header::after {
  content: '';
  display: block;
  width: 48px;
  height: 2px;
  background-color: #c0202f;
  position: absolute;
  margin-top: 58px;
  left: 32px;
}

.cert-category-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background-color: rgba(192, 32, 47, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c0202f;
  flex-shrink: 0;
}

.cert-category-header h2 {
  font-size: 1.3rem;
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 3px;
}

.cert-category-header p {
  font-size: 0.85rem;
  color: #7a7a7a;
}

/* =========================================
   CERT CARDS GRID
   ========================================= */
.cert-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.cert-card {
  background-color: #ffffff;
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 16px;
  padding: 26px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}

.cert-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(0,0,0,0.1);
  border-color: rgba(192, 32, 47, 0.25);
}

.cert-card-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background-color: rgba(192, 32, 47, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-card-body {
  flex: 1;
}

.cert-card-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 6px;
  line-height: 1.3;
}

.cert-issuer {
  font-size: 0.82rem;
  color: #7a7a7a;
  line-height: 1.45;
  margin-bottom: 12px;
}

.cert-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #c0202f;
  background-color: rgba(192, 32, 47, 0.08);
  padding: 4px 10px;
  border-radius: 999px;
}

.cert-view-btn {
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  color: #c0202f;
  background: none;
  border: 1.5px solid rgba(192, 32, 47, 0.3);
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
  width: 100%;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.cert-view-btn:hover {
  background-color: #c0202f;
  color: #ffffff;
  border-color: #c0202f;
}

.cert-placeholder {
  cursor: default;
  background-color: #fafafa;
  border-style: dashed;
}

.cert-placeholder:hover {
  transform: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.07);
}

/* =========================================
   PDF VIEWER MODAL
   ========================================= */
.cert-modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(10, 15, 20, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cert-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.cert-modal-box {
  background-color: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 860px;
  height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.3s ease;
}

.cert-modal-overlay.open .cert-modal-box {
  transform: translateY(0) scale(1);
}

.cert-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 26px 18px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  flex-shrink: 0;
  gap: 16px;
}

.cert-modal-category {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #c0202f;
  background-color: rgba(192, 32, 47, 0.08);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.cert-modal-title-wrap h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 4px;
}

.cert-modal-title-wrap p {
  font-size: 0.82rem;
  color: #7a7a7a;
}

.cert-modal-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.cert-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  background-color: #c0202f;
  border-radius: 999px;
  padding: 9px 18px;
  transition: background-color 0.2s ease, transform 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.cert-download-btn:hover {
  background-color: #a31b28;
  transform: translateY(-1px);
}

.cert-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #f7f9fa;
  border: none;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.cert-modal-close:hover {
  background-color: #c0202f;
  color: #ffffff;
  transform: rotate(90deg);
}

.cert-modal-body {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.cert-pdf-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background-color: #f7f9fa;
  color: #7a7a7a;
  font-size: 0.9rem;
  z-index: 1;
}

.cert-pdf-loading.hidden {
  display: none;
}

.cert-spinner {
  animation: certSpin 1s linear infinite;
}

@keyframes certSpin {
  to { transform: rotate(360deg); }
}

#certPdfFrame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* =========================================
   HOW TO ADD CERTIFICATES NOTE
   (Visible only in page source for your reference)
   =========================================
   To add a new certificate:
   1. Upload the PDF to: public_html/certificates/your-cert.pdf
   2. Copy any .cert-card block in certifications.html
   3. Update: data-pdf, data-title, data-issuer, data-category, data-valid
   4. Save and re-upload the HTML file
   ========================================= */

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 900px) {
  .cert-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust-strip-inner {
    gap: 28px;
    justify-content: flex-start;
  }

  .cert-modal-box {
    height: 92vh;
  }

  .cert-modal-header {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .page-hero-title {
    font-size: 2rem;
  }

  .certs-section {
    padding: 50px 20px 80px;
    gap: 40px;
  }

  .cert-cards-grid {
    grid-template-columns: 1fr;
  }

  .trust-strip {
    padding: 18px 20px;
  }

  .trust-item span {
    font-size: 0.8rem;
  }

  .cert-modal-header {
    padding: 16px 18px;
  }

  .cert-modal-actions {
    width: 100%;
    justify-content: space-between;
  }

  .cert-category-header::after {
    left: 20px;
  }
}
