/*===============================================================
  GTR — Certificaciones (certificaciones.html)
  Hereda tokens de main.css
===============================================================*/

/*=============== CERT HERO ===============*/
.cert-hero {
  position: relative;
  padding: 9rem 0 var(--s-7);
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  isolation: isolate;
}

.cert-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(245, 248, 252, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 248, 252, 0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 30% 50%, black 30%, transparent 80%);
          mask-image: radial-gradient(ellipse 80% 60% at 30% 50%, black 30%, transparent 80%);
  pointer-events: none;
}

.cert-hero::after {
  content: 'ISO';
  position: absolute;
  right: -2vw;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(14rem, 32vw, 32rem);
  line-height: 0.8;
  color: rgba(245, 248, 252, 0.035);
  letter-spacing: -0.06em;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

.cert-hero .container { position: relative; z-index: 1; }

.cert-hero__content {
  max-width: 860px;
}

.cert-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1rem;
  background: rgba(245, 248, 252, 0.08);
  border: 1px solid rgba(245, 248, 252, 0.18);
  color: var(--accent-400);
  border-radius: 999px;
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: var(--s-3);
}

.cert-hero__badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(200, 22, 43, 0.22);
  animation: blink 2.6s ease-in-out infinite;
}

.cert-hero__title {
  color: var(--paper);
  font-size: clamp(2.25rem, 5.5vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin-bottom: var(--s-3);
  max-width: 18ch;
}

.cert-hero__description {
  font-size: 1.175rem;
  line-height: 1.75;
  color: rgba(245, 248, 252, 0.78);
  max-width: 640px;
}

/*=============== ISO CERTIFICATIONS ===============*/
.iso-certifications {
  padding: var(--s-7) 0;
  background: var(--paper);
  position: relative;
}

.iso-cards-grid {
  display: grid;
  gap: var(--s-3);
  counter-reset: iso;
}

.iso-main-card {
  position: relative;
  background: var(--paper-soft);
  padding: var(--s-5);
  border: 1px solid var(--paper-line);
  border-radius: var(--r-lg);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  overflow: hidden;
  counter-increment: iso;
}

.iso-main-card::before {
  content: '0' counter(iso);
  position: absolute;
  top: var(--s-3);
  right: var(--s-4);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(5rem, 12vw, 9rem);
  line-height: 0.85;
  color: var(--paper-alt);
  letter-spacing: -0.05em;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  transition: color var(--dur) var(--ease);
}

.iso-main-card:hover {
  border-color: var(--ink);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.iso-main-card:hover::before {
  color: var(--accent-100);
}

.iso-main-card__header {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
  position: relative;
  z-index: 1;
}

.iso-main-card__icon {
  width: 60px;
  height: 60px;
  background: var(--ink);
  color: var(--accent);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.iso-main-card__title {
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.2rem;
  letter-spacing: -0.02em;
}

.iso-main-card__subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.iso-main-card__description {
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: var(--s-3);
  position: relative;
  z-index: 1;
  max-width: 70ch;
}

.iso-main-card__benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.5rem 1.25rem;
  position: relative;
  z-index: 1;
}

.iso-main-card__benefits li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  color: var(--ink-800);
  font-size: var(--fs-sm);
  line-height: 1.5;
  padding: 0.35rem 0;
}

.iso-main-card__benefits li::before {
  content: '';
  display: block;
  width: 16px;
  height: 8px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg) translateY(-2px);
  flex-shrink: 0;
  margin-top: 5px;
}

/*=============== OTHER CERTIFICATIONS ===============*/
.other-certifications {
  padding: var(--s-6) 0 var(--s-7);
  background: var(--paper-alt);
}

.other-certifications h2 {
  text-align: center;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-bottom: var(--s-5);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  color: var(--ink);
}

.other-certifications h2::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--accent);
  margin: 1rem auto 0;
}

.other-cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--s-3);
  max-width: 900px;
  margin: 0 auto;
}

.other-cert-card {
  position: relative;
  background: var(--paper-soft);
  padding: var(--s-4);
  border-radius: var(--r-md);
  border: 1px solid var(--paper-line);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.other-cert-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1.5rem;
  bottom: 1.5rem;
  width: 4px;
  background: var(--accent);
}

.other-cert-card:hover {
  border-color: var(--ink);
  transform: translateY(-3px);
}

.other-cert-card h3 {
  color: var(--ink);
  margin-bottom: var(--s-2);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.other-cert-card p {
  color: var(--muted);
  font-size: var(--fs-sm);
  margin: 0;
  line-height: 1.65;
}

/*=============== CERT PROCESS (timeline) ===============*/
.cert-process {
  padding: var(--s-7) 0;
  background: var(--paper);
}

.process-timeline {
  max-width: 820px;
  margin: 0 auto;
  position: relative;
}

.process-timeline::before {
  content: '';
  position: absolute;
  left: 31px;
  top: 32px;
  bottom: 32px;
  width: 2px;
  background:
    repeating-linear-gradient(
      to bottom,
      var(--paper-line) 0 6px,
      transparent 6px 10px
    );
}

.timeline-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
  position: relative;
  align-items: flex-start;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-item__number {
  width: 64px;
  height: 64px;
  background: var(--ink);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 6px var(--paper);
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}

.timeline-item:hover .timeline-item__number {
  transform: rotate(-8deg) scale(1.05);
  background: var(--accent);
  color: var(--ink);
}

.timeline-item__content {
  background: var(--paper-soft);
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--paper-line);
  border-radius: var(--r-md);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.timeline-item:hover .timeline-item__content {
  border-color: var(--primary-400);
  transform: translateX(4px);
}

.timeline-item__content h3 {
  color: var(--ink);
  margin-bottom: 0.35rem;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.timeline-item__content p {
  color: var(--muted);
  margin: 0;
  line-height: 1.65;
  font-size: 0.9375rem;
}

/*=============== CERT CTA ===============*/
.cert-cta {
  padding: var(--s-6) 0 var(--s-7);
  background: var(--paper-alt);
}

.cert-cta__card {
  position: relative;
  background: var(--ink);
  color: var(--paper);
  padding: var(--s-7) var(--s-6);
  border-radius: var(--r-lg);
  text-align: center;
  box-shadow: var(--shadow-lg);
  max-width: 860px;
  margin: 0 auto;
  overflow: hidden;
  isolation: isolate;
}

.cert-cta__card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent);
}

.cert-cta__card::after {
  content: '';
  position: absolute;
  inset: -1px;
  background:
    radial-gradient(500px 260px at 10% 110%, rgba(200, 22, 43, 0.18), transparent 60%),
    radial-gradient(500px 260px at 90% -10%, rgba(56, 163, 214, 0.18), transparent 60%);
  z-index: -1;
  pointer-events: none;
}

.cert-cta__card h2 {
  color: var(--paper);
  font-size: clamp(1.875rem, 4.2vw, 2.875rem);
  margin-bottom: var(--s-3);
  line-height: 1.08;
  max-width: 18ch;
  margin-left: auto;
  margin-right: auto;
}

.cert-cta__card p {
  color: rgba(245, 248, 252, 0.78);
  font-size: 1.0625rem;
  line-height: 1.75;
  margin: 0 auto var(--s-4);
  max-width: 600px;
}

.cert-cta__card .btn--light {
  background: var(--accent);
  color: var(--ink);
}

.cert-cta__card .btn--light::before { background: var(--paper); }
.cert-cta__card .btn--light:hover { color: var(--ink); }

/*=============== RESPONSIVE ===============*/
@media screen and (max-width: 768px) {
  .cert-hero {
    padding: 7rem 0 var(--s-6);
  }

  .cert-hero__title { font-size: 2.25rem; }

  .iso-main-card { padding: var(--s-4); }
  .iso-main-card::before { font-size: 5rem; top: var(--s-2); right: var(--s-3); }

  .iso-main-card__header { flex-direction: column; align-items: flex-start; gap: var(--s-2); }

  .iso-main-card__benefits { grid-template-columns: 1fr; }

  .process-timeline::before { left: 23px; }

  .timeline-item {
    grid-template-columns: 48px 1fr;
    gap: var(--s-2);
  }

  .timeline-item__number {
    width: 48px;
    height: 48px;
    font-size: 1.15rem;
    box-shadow: 0 0 0 4px var(--paper);
  }

  .cert-cta__card {
    padding: var(--s-5) var(--s-4);
  }
}

@media screen and (max-width: 480px) {
  .iso-main-card { padding: var(--s-3); }
  .other-cert-card { padding: var(--s-3); }
  .timeline-item__content { padding: var(--s-2) var(--s-3); }
}
