@font-face {
  font-family: 'Neue Haas Grotesk';
  src: url('./assets/fonts/NeueHaasGroteskTextPro-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Neue Haas Grotesk';
  src: url('./assets/fonts/NeueHaasGroteskTextPro-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Neue Haas Grotesk';
  src: url('./assets/fonts/NeueHaasGroteskTextPro-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ─── Design tokens tec.nicum (light-only, canon) ──────────────── */
:root {
  /* Los 5 colores oficiales — STRICT */
  --tec-blue:            #00377B;
  --tec-turquoise:       #06B5CD;
  --tec-turquoise-light: #61C0CE;
  --tec-grey:            #C2D0D7;
  --tec-white:           #FFFFFF;

  /* Roles semánticos */
  --bg:               var(--tec-white);
  --bg-alt:           var(--tec-white);
  --bg-inverted:      var(--tec-blue);
  --bg-input:         var(--tec-white);
  --bg-card:          var(--tec-white);

  --fg:               var(--tec-blue);
  --fg-strong:        var(--tec-blue);
  --fg-muted:         #6B7B85; /* derivado de tec-grey con más contraste para texto secundario */
  --fg-on-blue:       var(--tec-white);
  --fg-on-turquoise:  var(--tec-white);

  --border:           var(--tec-grey);
  --border-strong:    var(--tec-blue);

  --accent:           var(--tec-turquoise);
  --link:             var(--tec-turquoise);
  --link-hover:       var(--tec-blue);

  /* Status colors UI (solo validación, no decoración) */
  --tec-success: #2E8540;
  --tec-success-bg: rgba(46, 133, 64, 0.10);
  --tec-warning: #E4A800;
  --tec-warning-bg: rgba(228, 168, 0, 0.10);
  --tec-danger:  #C8102E;
  --tec-danger-bg: rgba(200, 16, 46, 0.08);

  /* Spacing (base 4px) */
  --sp-0:  0;
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-7:  32px;
  --sp-8:  40px;
  --sp-9:  48px;
  --sp-10: 64px;
  --sp-11: 80px;
  --sp-12: 96px;

  /* Radii — square por defecto, pill solo botones/inputs */
  --radius-none: 0;
  --radius-sm:   2px;
  --radius-md:   4px;
  --radius-pill: 999px;

  /* Sombras blue-tinted, baja opacidad */
  --shadow-1: 0 1px 2px rgba(0, 55, 123, 0.08);
  --shadow-2: 0 4px 12px rgba(0, 55, 123, 0.10);
  --shadow-3: 0 12px 32px rgba(0, 55, 123, 0.16);

  /* Tipografía */
  --font-sans: 'Neue Haas Grotesk', "Helvetica Neue", "Inter",
               system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', "Menlo", monospace;

  --fs-xs:    12px;
  --fs-small: 14px;
  --fs-body:  16px;
  --fs-lead:  20px;
  --fs-h6:    16px;
  --fs-h5:    18px;
  --fs-h4:    22px;
  --fs-h3:    28px;
  --fs-h2:    36px;
  --fs-h1:    48px;

  --ls-tight:    -0.01em;
  --ls-normal:    0;
  --ls-eyebrow:   0.12em;

  --lh-tight:   1.10;
  --lh-snug:    1.25;
  --lh-normal:  1.45;

  /* Motion (industrial, restrained) */
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 320ms;

  /* Estados via filter, NO via nuevos hex */
  --hover-brightness: 0.92;
  --press-brightness: 0.85;
  --disabled-opacity: 0.4;

  /* Layout */
  --container-max: 1200px;
}

/* ─── Reset + base ─────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  background: var(--bg);
  color: var(--fg);
  line-height: var(--lh-normal);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--sp-5);
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-standard);
}
a:hover { color: var(--link-hover); text-decoration: underline; text-underline-offset: 3px; }

/* lowercase para nombres de marca */
.brand-name { text-transform: lowercase; }

/* tec dot oficial — caracter literal en turquesa */
.tec-dot::before {
  content: ".";
  color: var(--tec-turquoise);
}

/* eyebrow — uppercase tracked turquesa */
.eyebrow {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--ls-eyebrow);
  color: var(--tec-turquoise);
}

/* ─── Header ───────────────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 72px;
  position: relative;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  color: var(--tec-blue);
  transition: filter var(--dur-fast) var(--ease-standard);
}
.logo:hover { filter: brightness(var(--hover-brightness)); text-decoration: none; }

.logo-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
}

.logo-wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
  color: var(--tec-blue);
}
.logo-wordmark b { font-weight: 700; }
.logo-light { font-weight: 400; }
.logo-accent { font-weight: 400; color: var(--tec-turquoise); }

@media (max-width: 480px) {
  .logo-icon { width: 32px; height: 32px; }
  .logo-wordmark { font-size: 18px; gap: 6px; }
}

/* ─── Main ─────────────────────────────────────────────────────── */
.main {
  flex: 1;
  position: relative;
  padding: var(--sp-7) 0;
}

/* ─── Hero ─────────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: var(--sp-7) 0 var(--sp-5);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--tec-blue);
  color: var(--tec-white);
  margin-bottom: var(--sp-6);
}

.hero h1 {
  font-size: clamp(28px, 4vw, var(--fs-h1));
  font-weight: 700;
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-tight);
  margin-bottom: var(--sp-2);
  color: var(--tec-blue);
}

.hero h1 .gradient {
  /* Antes "gradient text-clip" — ahora simplemente acento turquesa sólido */
  color: var(--tec-turquoise);
}

.hero-subtitle {
  font-size: var(--fs-body);
  color: var(--fg-muted);
  max-width: 600px;
  margin: 0 auto var(--sp-6);
  line-height: var(--lh-normal);
}

/* ─── Search box ───────────────────────────────────────────────── */
.search-box {
  max-width: 640px;
  margin: 0 auto;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: var(--sp-5);
  color: var(--fg-muted);
  pointer-events: none;
  transition: color var(--dur-fast) var(--ease-standard);
  display: flex;
}

.search-input {
  width: 100%;
  padding: 14px var(--sp-5) 14px 52px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-input);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  outline: none;
  transition: border-color var(--dur-base) var(--ease-standard);
}
.search-input::placeholder { color: var(--fg-muted); }
.search-input:focus {
  border-color: var(--tec-turquoise);
}
.search-input:focus ~ .search-icon { color: var(--tec-turquoise); }

.search-btn {
  position: absolute;
  right: 6px;
  padding: 10px var(--sp-5);
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--tec-turquoise);
  color: var(--tec-white);
  font-family: var(--font-sans);
  font-size: var(--fs-small);
  font-weight: 700;
  cursor: pointer;
  transition: filter var(--dur-fast) var(--ease-standard);
}
.search-btn:hover  { filter: brightness(var(--hover-brightness)); }
.search-btn:active { filter: brightness(var(--press-brightness)); }

.search-hint {
  margin-top: var(--sp-3);
  font-size: var(--fs-small);
  color: var(--fg-muted);
  text-align: center;
}

/* ─── Courses section ──────────────────────────────────────────── */
.courses-section {
  margin-top: var(--sp-7);
  padding-bottom: var(--sp-3);
}

.courses-section__title {
  font-size: var(--fs-h4);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--sp-1);
  color: var(--tec-blue);
}

.courses-section__subtitle {
  text-align: center;
  color: var(--fg-muted);
  font-size: var(--fs-small);
  margin-bottom: var(--sp-5);
}

/* ─── Featured card ────────────────────────────────────────────── */
.featured-card {
  display: block;
  position: relative;
  background: var(--bg);
  border: 1.5px solid var(--tec-turquoise);
  padding: var(--sp-4) var(--sp-5);
  margin-bottom: var(--sp-5);
  text-decoration: none;
  color: inherit;
  transition: filter var(--dur-fast) var(--ease-standard);
}

.featured-card:hover {
  filter: brightness(var(--hover-brightness));
  text-decoration: none;
}

.featured-card__content {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.featured-card__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.featured-card__icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.featured-card__text { flex: 1; }

.featured-card__label {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--ls-eyebrow);
  color: var(--tec-turquoise);
  margin-bottom: 4px;
}

.featured-card__title {
  font-size: var(--fs-body);
  font-weight: 700;
  margin: 0;
  line-height: var(--lh-snug);
  color: var(--tec-blue);
}

.featured-card__desc {
  font-size: var(--fs-small);
  color: var(--fg-muted);
  line-height: var(--lh-normal);
  margin: 0;
}

.featured-card__arrow {
  flex-shrink: 0;
  font-size: 1.25rem;
  color: var(--tec-turquoise);
  font-weight: 700;
}

@media (max-width: 768px) {
  .featured-card__content { flex-direction: column; text-align: center; gap: var(--sp-3); }
  .featured-card__arrow { display: none; }
}

/* ─── Course cards grid ────────────────────────────────────────── */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-5);
}

.course-card {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: var(--sp-4) var(--sp-5);
  border-left: 4px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  transition: filter var(--dur-fast) var(--ease-standard);
}

.course-card:hover { filter: brightness(var(--hover-brightness)); }

/* Course tier — usa solo los 5 colores oficiales */
.course-card--premium  { border-left-color: var(--tec-blue); }
.course-card--inicial  { border-left-color: var(--tec-grey); }
.course-card--practico { border-left-color: var(--tec-turquoise-light); }
.course-card--pro      { border-left-color: var(--tec-turquoise); }

.course-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.course-tier {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--ls-eyebrow);
  padding: 3px 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.course-tier svg { width: 12px; height: 12px; }
.course-tier--premium  { background: rgba(0, 55, 123, 0.10); color: var(--tec-blue); }
.course-tier--inicial  { background: rgba(194, 208, 215, 0.30); color: var(--tec-blue); }
.course-tier--practico { background: rgba(97, 192, 206, 0.18); color: var(--tec-blue); }
.course-tier--pro      { background: rgba(6, 181, 205, 0.15);  color: var(--tec-blue); }

.course-cert-badge {
  font-size: var(--fs-xs);
  font-weight: 600;
  padding: 2px 8px;
  letter-spacing: 0.04em;
}
.course-cert-badge.tuv { background: rgba(0, 55, 123, 0.10); color: var(--tec-blue); border: 1px solid var(--tec-blue); }
.course-cert-badge.own { background: rgba(194, 208, 215, 0.20); color: var(--tec-blue); border: 1px solid var(--tec-grey); }

.course-card__title {
  font-size: var(--fs-body);
  font-weight: 700;
  line-height: var(--lh-snug);
  margin: 0;
  color: var(--tec-blue);
}

.course-card__logo { margin: 2px 0; }
.course-card__logo img { max-height: 24px; width: auto; object-fit: contain; }

.course-card__desc {
  font-size: var(--fs-small);
  color: var(--fg-muted);
  line-height: var(--lh-normal);
  margin: 0;
  flex: 1;
}

.course-card__tags { display: flex; flex-wrap: wrap; gap: 6px; }

.course-tag {
  font-size: var(--fs-xs);
  font-weight: 600;
  padding: 3px 8px;
  background: rgba(6, 181, 205, 0.10);
  color: var(--tec-blue);
  border: 1px solid rgba(6, 181, 205, 0.30);
}

.course-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--sp-2);
  border-top: 1px solid var(--border);
}

.course-meta { display: flex; align-items: center; gap: var(--sp-2); }

.course-meta__item {
  font-size: var(--fs-xs);
  font-weight: 600;
  padding: 2px 8px;
  background: rgba(194, 208, 215, 0.20);
  color: var(--tec-blue);
}

.course-meta__price {
  color: var(--tec-turquoise);
  background: rgba(6, 181, 205, 0.10);
}

.course-card__link {
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--tec-turquoise);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--tec-turquoise);
  transition: filter var(--dur-fast) var(--ease-standard);
  white-space: nowrap;
}
.course-card__link:hover {
  filter: brightness(var(--hover-brightness));
  background: var(--tec-turquoise);
  color: var(--tec-white);
}

.courses-section__cta { text-align: center; margin-top: var(--sp-5); }

/* ─── Buttons ──────────────────────────────────────────────────── */
.btn-academy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  background: var(--tec-turquoise);
  color: var(--tec-white);
  font-weight: 700;
  font-size: var(--fs-small);
  text-decoration: none;
  transition: filter var(--dur-fast) var(--ease-standard);
  border: 0;
  cursor: pointer;
}
.btn-academy:hover  { filter: brightness(var(--hover-brightness)); color: var(--tec-white); text-decoration: none; }
.btn-academy:active { filter: brightness(var(--press-brightness)); }
.btn-academy svg { width: 14px; height: 14px; }

.btn-academy--secondary {
  background: var(--tec-blue);
  color: var(--tec-white);
}
.btn-academy--secondary:hover { color: var(--tec-white); }

/* ─── Demo banner ──────────────────────────────────────────────── */
.demo-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  background: var(--tec-warning-bg);
  border: 1px solid var(--tec-warning);
  margin-bottom: var(--sp-7);
  font-size: var(--fs-small);
  color: var(--tec-warning);
  text-align: center;
}

/* ─── Results header & cert grid ───────────────────────────────── */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-5);
}

.results-header h2 {
  font-size: var(--fs-h4);
  font-weight: 700;
  color: var(--tec-blue);
}

.results-count {
  font-size: var(--fs-small);
  color: var(--fg-muted);
  font-weight: 500;
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--sp-5);
}

/* ─── Cert card ────────────────────────────────────────────────── */
.cert-card {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: var(--sp-6);
  cursor: pointer;
  transition: filter var(--dur-fast) var(--ease-standard), border-color var(--dur-fast) var(--ease-standard);
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}
.cert-card:hover {
  border-color: var(--tec-turquoise);
  filter: brightness(var(--hover-brightness));
}

.cert-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}

.cert-course-name {
  font-size: var(--fs-body);
  font-weight: 700;
  line-height: var(--lh-snug);
  flex: 1;
  color: var(--tec-blue);
}

.cert-status {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.cert-status.valid {
  background: var(--tec-success-bg);
  color: var(--tec-success);
  border: 1px solid var(--tec-success);
}
.cert-status.expired {
  background: var(--tec-danger-bg);
  color: var(--tec-danger);
  border: 1px solid var(--tec-danger);
}

.cert-card-meta {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.cert-meta-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-small);
  color: var(--fg);
}
.cert-meta-row svg { flex-shrink: 0; color: var(--fg-muted); }

.cert-id {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--fg-muted);
}

.cert-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
}

/* ─── Certipedia source badge ──────────────────────────────────── */
.cert-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-xs);
  font-weight: 700;
  padding: 3px 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.cert-source-badge svg { width: 12px; height: 12px; }

.cert-source-badge.certipedia {
  background: var(--tec-blue);
  color: var(--tec-white);
}

.cert-source-badge.certipedia-verified {
  background: rgba(0, 55, 123, 0.10);
  color: var(--tec-blue);
  border: 1px solid var(--tec-blue);
}

/* ─── Certipedia banner ────────────────────────────────────────── */
.cert-certipedia-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  background: rgba(0, 55, 123, 0.06);
  border: 1px solid var(--tec-blue);
  padding: var(--sp-4) var(--sp-5);
  margin-top: var(--sp-4);
}

.certipedia-badge-large {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.certipedia-badge-large svg {
  width: 28px;
  height: 28px;
  color: var(--tec-blue);
  flex-shrink: 0;
}
.certipedia-badge-title {
  font-weight: 700;
  font-size: var(--fs-body);
  color: var(--tec-blue);
}
.certipedia-badge-subtitle {
  font-size: var(--fs-small);
  color: var(--fg-muted);
  margin-top: 2px;
}

.btn-certipedia {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: var(--tec-blue);
  color: var(--tec-white);
  border: 0;
  border-radius: var(--radius-pill);
  font-size: var(--fs-small);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: filter var(--dur-fast) var(--ease-standard);
  white-space: nowrap;
}
.btn-certipedia:hover {
  filter: brightness(var(--hover-brightness));
  color: var(--tec-white);
  text-decoration: none;
}

@media (max-width: 600px) {
  .cert-certipedia-banner { flex-direction: column; text-align: center; }
  .certipedia-badge-large { flex-direction: column; gap: var(--sp-1); }
}

/* ─── Cert detail page ─────────────────────────────────────────── */
.cert-detail {
  max-width: 800px;
  margin: 0 auto;
}

.cert-detail-card {
  background: var(--bg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-2);
}

.cert-detail-header {
  background: var(--tec-blue);
  padding: var(--sp-7) var(--sp-5);
  text-align: center;
  color: var(--tec-white);
  position: relative;
}

.cert-detail-check {
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-3);
  color: var(--tec-white);
}

.cert-detail-check.invalid {
  background: rgba(200, 16, 46, 0.30);
}

.cert-detail-title {
  font-size: var(--fs-h4);
  font-weight: 700;
  margin-bottom: 0;
  color: var(--tec-white);
}

.cert-detail-subtitle {
  font-size: var(--fs-body);
  opacity: 0.90;
  color: var(--tec-white);
}

.cert-detail-body {
  padding: var(--sp-5);
}

.cert-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}

.cert-detail-field {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.cert-detail-field.full { grid-column: 1 / -1; }

.cert-field-label {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--tec-turquoise);
  text-transform: uppercase;
  letter-spacing: var(--ls-eyebrow);
}

.cert-field-value {
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--tec-blue);
}

.cert-field-value.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
}

.cert-detail-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
}

.cert-qr-container {
  background: var(--tec-white);
  padding: var(--sp-2);
  border: 1px solid var(--border);
}

.cert-qr-label {
  font-size: var(--fs-small);
  color: var(--fg-muted);
  text-align: center;
}

.cert-detail-actions {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Generic buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 12px 22px;
  border: 0;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: var(--fs-small);
  font-weight: 700;
  cursor: pointer;
  transition: filter var(--dur-fast) var(--ease-standard);
  text-decoration: none;
}
.btn:active { filter: brightness(var(--press-brightness)); }

.btn-primary {
  background: var(--tec-turquoise);
  color: var(--tec-white);
}
.btn-primary:hover {
  filter: brightness(var(--hover-brightness));
  color: var(--tec-white);
  text-decoration: none;
}

.btn-secondary {
  background: var(--tec-white);
  color: var(--tec-blue);
  border: 1.5px solid var(--tec-blue);
}
.btn-secondary:hover {
  background: var(--tec-blue);
  color: var(--tec-white);
  text-decoration: none;
}

/* ─── User portfolio ───────────────────────────────────────────── */
.user-header {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  margin-bottom: var(--sp-9);
  padding: var(--sp-6);
  background: var(--bg);
  border: 1px solid var(--border);
}

.user-avatar {
  width: 72px;
  height: 72px;
  background: var(--tec-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-h3);
  font-weight: 700;
  color: var(--tec-white);
  flex-shrink: 0;
}

.user-info h2 {
  font-size: var(--fs-h3);
  font-weight: 700;
  margin-bottom: var(--sp-1);
  color: var(--tec-blue);
}

.user-email {
  font-size: var(--fs-small);
  color: var(--fg-muted);
}

/* ─── Loading skeleton ─────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg,
    rgba(194, 208, 215, 0.30) 25%,
    rgba(194, 208, 215, 0.10) 50%,
    rgba(194, 208, 215, 0.30) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-card { height: 180px; }

.skeleton-text { height: 20px; margin-bottom: var(--sp-2); }
.skeleton-text.sm { height: 14px; width: 60%; }

/* ─── Empty / error states ─────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: var(--sp-12) var(--sp-6);
}

.empty-icon {
  display: flex;
  justify-content: center;
  margin-bottom: var(--sp-4);
  color: var(--tec-grey);
}

.empty-title {
  font-size: var(--fs-h4);
  font-weight: 700;
  margin-bottom: var(--sp-2);
  color: var(--tec-blue);
}

.empty-desc {
  color: var(--fg-muted);
  font-size: var(--fs-small);
  max-width: 400px;
  margin: 0 auto;
}

.error-card {
  background: var(--tec-danger-bg);
  border: 1px solid var(--tec-danger);
  padding: var(--sp-6);
  text-align: center;
  color: var(--tec-danger);
}

.not-found-card {
  max-width: 600px;
  margin: var(--sp-9) auto;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: var(--sp-12) var(--sp-6);
  text-align: center;
}

/* ─── Back link ────────────────────────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--fg-muted);
  margin-bottom: var(--sp-6);
  transition: color var(--dur-fast) var(--ease-standard);
}
.back-link:hover { color: var(--tec-turquoise); text-decoration: none; }

/* ─── Footer ───────────────────────────────────────────────────── */
.footer {
  margin-top: auto;
  padding: var(--sp-5) 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
  text-align: center;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.footer-logo {
  font-weight: 700;
  font-size: var(--fs-body);
  color: var(--tec-blue);
}

.footer-copy {
  font-size: var(--fs-small);
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-1);
}
.footer-copy a {
  color: var(--tec-blue);
  text-decoration: none;
  font-weight: 600;
}
.footer-copy a:hover { color: var(--tec-turquoise); text-decoration: underline; text-underline-offset: 3px; }
.footer-sep { color: var(--tec-grey); margin: 0 var(--sp-1); }

/* ─── Score badge ──────────────────────────────────────────────── */
.score-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: 700;
  font-family: var(--font-mono);
}
.score-badge.high { background: var(--tec-success-bg); color: var(--tec-success); }
.score-badge.mid  { background: var(--tec-warning-bg); color: var(--tec-warning); }
.score-badge.low  { background: var(--tec-danger-bg);  color: var(--tec-danger); }

/* ─── Search page ──────────────────────────────────────────────── */
.search-page {
  max-width: 900px;
  margin: 0 auto;
}

.search-page h1 {
  font-size: var(--fs-h2);
  font-weight: 700;
  margin-bottom: var(--sp-5);
  color: var(--tec-blue);
}

/* ─── Animations (restrained — short fades only) ───────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── tec.excellent — sin gold, con signet hexagonal ───────────── */

.cert-card--excellent {
  border-color: var(--tec-turquoise) !important;
  border-left: 4px solid var(--tec-turquoise);
  position: relative;
}

.cert-excellent-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--tec-turquoise);
  color: var(--tec-white);
  font-weight: 700;
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
  text-transform: lowercase;
  white-space: nowrap;
}
.cert-excellent-badge img {
  width: 14px;
  height: 14px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.cert-detail-card--excellent {
  border: 1.5px solid var(--tec-turquoise) !important;
}

.excellent-banner {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  padding: var(--sp-5) var(--sp-6);
  background: var(--tec-blue);
  color: var(--tec-white);
  margin-top: var(--sp-5);
  margin-bottom: var(--sp-5);
}
.excellent-banner-logo { flex-shrink: 0; }
.excellent-logo-img {
  width: 84px;
  height: 84px;
  object-fit: contain;
  display: block;
}
.excellent-banner-title {
  font-weight: 700;
  font-size: var(--fs-body);
  color: var(--tec-white);
}
.excellent-banner-subtitle {
  font-size: var(--fs-small);
  color: rgba(255, 255, 255, 0.85);
  margin-top: 2px;
}

@media (max-width: 600px) {
  .excellent-banner { flex-direction: column; text-align: center; gap: var(--sp-3); }
}

/* ─── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  .header-inner { height: 60px; }

  .hero { padding: var(--sp-5) 0; }
  .hero h1 { font-size: var(--fs-h3); }
  .hero-subtitle { font-size: var(--fs-small); }

  .search-input { padding: 12px var(--sp-4) 12px 48px; font-size: var(--fs-small); }
  .search-btn { padding: 8px var(--sp-4); font-size: var(--fs-xs); }

  .courses-grid { grid-template-columns: 1fr; gap: var(--sp-3); }

  .cert-grid { grid-template-columns: 1fr; }
  .cert-detail-grid { grid-template-columns: 1fr; }
  .cert-detail-actions { flex-direction: column; }

  .user-header { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .course-card__footer { flex-direction: column; gap: var(--sp-2); align-items: stretch; }
  .course-card__link { text-align: center; }
}
