/**
 * Certificaciones Page Styles
 * 
 * @package ASAMAR
 * @version 1.0.0
 */

/* ==================== HERO SECTION ==================== */
.cert-hero {
  position: relative;
  padding: 8rem 0 4rem;
  background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
  overflow: hidden;
}

.cert-hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.cert-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 500;
  color: white;
  margin-bottom: 1.5rem;
}

.cert-hero__badge i {
  color: #d4a437;
}

.cert-hero__title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: white;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.cert-hero__title .highlight {
  color: #d4a437;
}

.cert-hero__description {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.7;
}

.cert-hero__decoration {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.decoration-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

.decoration-circle--1 {
  width: 400px;
  height: 400px;
  top: -100px;
  right: -100px;
}

.decoration-circle--2 {
  width: 300px;
  height: 300px;
  bottom: -50px;
  left: -50px;
}

/* ==================== CERTIFICATIONS GRID ==================== */
.certifications-section {
  padding: 5rem 0;
  background: var(--bg-light);
}

.cert-category-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(46, 125, 50, 0.1);
}

.cert-category-header:not(:first-child) {
  margin-top: 5rem;
}

.cert-category-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1b5e20;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cert-category-description {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.certifications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.cert-category-empty {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  border-left: 4px solid var(--primary-green, #2e7d32);
  color: var(--text-color);
  font-size: 1.05rem;
  line-height: 1.6;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

/* ==================== CERT CARD ==================== */
.cert-card {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transition: all 0.3s ease;
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.cert-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.cert-card__icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, #2e7d32, #1b5e20);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: white;
  flex-shrink: 0;
}

.cert-card__content {
  flex: 1;
}

.cert-card__year {
  display: inline-block;
  background: #f5f5f5;
  color: #2e7d32;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 0.75rem;
}

.cert-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1b5e20;
  margin-bottom: 0.5rem;
}

.cert-card__description {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.cert-card__actions {
  display: flex;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--bg-light);
}

.cert-card__btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.cert-card__btn--preview {
  background: #f5f5f5;
  color: #1b5e20;
}

.cert-card__btn--preview:hover {
  background: #2e7d32;
  color: white;
}

.cert-card__btn--download {
  background: #2e7d32;
  color: white;
}

.cert-card__btn--download:hover {
  background: #1b5e20;
  color: white;
}

.cert-card__pending {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.875rem 1rem;
  background: #f8f8f8;
  color: #999;
  font-size: 0.875rem;
  border-radius: 10px;
}

/* ==================== TRUST SECTION ==================== */
.cert-trust {
  padding: 5rem 0;
  background: white;
}

.cert-trust__content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.cert-trust__title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1b5e20;
  margin-bottom: 1rem;
}

.cert-trust__text {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.cert-trust__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: #2e7d32;
  background: var(--primary-green, #2e7d32);
  color: #ffffff !important;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.cert-trust__btn:hover {
  background: #1b5e20;
  background: var(--dark-green, #1b5e20);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(46, 125, 50, 0.3);
  color: #ffffff !important;
}

/* ==================== PDF MODAL ==================== */
.pdf-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.pdf-modal.active {
  opacity: 1;
  visibility: visible;
}

.pdf-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.pdf-modal__container {
  position: relative;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  background: white;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.pdf-modal.active .pdf-modal__container {
  transform: scale(1);
}

.pdf-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--bg-light);
  background: var(--primary-green);
}

.pdf-modal__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: white;
  margin: 0;
}

.pdf-modal__close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 1.125rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pdf-modal__close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.pdf-modal__body {
  flex: 1;
  min-height: 60vh;
  background: #f5f5f5;
}

.pdf-modal__iframe {
  width: 100%;
  height: 100%;
  min-height: 60vh;
}

.pdf-modal__footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--bg-light);
  text-align: center;
}

.pdf-modal__download {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--primary-green);
  color: white;
  padding: 0.875rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.pdf-modal__download:hover {
  background: var(--dark-green);
  color: white;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .cert-hero {
    padding: 6rem 0 3rem;
  }

  .cert-hero__title {
    font-size: 2rem;
  }

  .cert-hero__description {
    font-size: 1rem;
  }

  .certifications-section {
    padding: 3rem 0;
  }

  .certifications-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .cert-card {
    padding: 1.5rem;
  }

  .cert-card__icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  .cert-card__actions {
    flex-direction: column;
  }

  .cert-trust {
    padding: 3rem 0;
  }

  .cert-trust__title {
    font-size: 1.5rem;
  }

  .pdf-modal__container {
    max-height: 85vh;
  }

  .pdf-modal__body {
    min-height: 50vh;
  }

  .pdf-modal__iframe {
    min-height: 50vh;
  }
}

@media (max-width: 480px) {
  .cert-hero {
    padding: 5rem 0 2.5rem;
  }

  .cert-hero__badge {
    font-size: 0.75rem;
    padding: 0.4rem 1rem;
  }

  .cert-hero__title {
    font-size: 1.75rem;
  }

  .cert-card {
    padding: 1.25rem;
    border-radius: 16px;
  }

  .cert-card__icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
    border-radius: 12px;
  }

  .cert-card__title {
    font-size: 1.1rem;
  }

  .cert-card__description {
    font-size: 0.85rem;
  }

  .cert-card__btn {
    padding: 0.75rem;
    font-size: 0.8rem;
  }

  .pdf-modal {
    padding: 0.5rem;
  }

  .pdf-modal__container {
    border-radius: 16px;
  }

  .pdf-modal__header {
    padding: 1rem;
  }

  .pdf-modal__title {
    font-size: 1rem;
  }

  .pdf-modal__close {
    width: 36px;
    height: 36px;
  }
}
